设为首页收藏本站

最大的系统仿真与系统优化公益交流社区

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5524|回复: 9

[求助] 用AGV模板发生了以下错误,请解!

  [复制链接]
发表于 2011-11-5 16:38:28 | 显示全部楼层 |阅读模式
问题在哪里?

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
 楼主| 发表于 2011-11-14 10:37:54 | 显示全部楼层
没有解决,再顶一下。
 楼主| 发表于 2011-11-17 11:03:27 | 显示全部楼层
/* called by:        entrance ctrl of the object 'track'
: f! ~) z' E2 `0 y0 M* p*/7 L# A: y2 e) H: J
is- s/ C6 |( H) g# t$ S
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 X9 m! p1 q: @' k' ^8 Q/ Ddo4 x& h1 l0 o: _
        Lan := rootfolder.Internal.Tools.AOLlanguage;! E4 m7 C! [: l$ n/ h" Y; ?4 x
        if current = @.Destination -- else return# }7 l4 Y* }* O  k% L6 H2 ?
        then) S0 j0 _$ v) u$ Q
                @.Destination := void;
( H! L1 S1 j6 P                if @.occupied then
2 Q* t) Y: d2 x+ g: J, Y, D                        part := @.cont;
8 Y* d; v2 x; s, C/ p1 K                        @.transpOrder := void;, f- f. z/ n7 D  h2 `  ~
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
# Z. C8 Y3 }7 C" `' j3 h                                @,root.eventcontroller.simTime);
1 f; q% z6 \: F* c7 C                        @.HasOrder := false;5 s+ f. s/ M* E4 i& D
                        @.DrivingHome := true;
4 @6 h$ ^, m8 c& o; K0 U                        rgManager.tryToStartTransOrder;, q! B- d& Q- B' k2 D6 i
                        if @.Destination = void! J/ W. Y+ m3 |. q
                        then -- no transport order for vehicle @
' V8 H& |9 C) b                                @.Destination :=
- D0 q) u# x; p                                rgManager.nearestFreeStation(@,track.~);
; M( n/ Q$ v6 {                                newDirection(@);   : d* d+ t8 N$ `  V" {  d0 s
                                if @.Destination /= void then3 J! ^, f' D! i- b* |. F' j! R
                                        @.Destination.NumReservation :=& d. G/ U' x5 M
                                        @.Destination.NumReservation + 1;
6 y0 J7 W" o  Y- d9 N* R                                end;) e6 |8 Q0 ~+ }: }  q. V: L
                                @.CurrIcon := "drivingHome";
  E4 I% [/ L# `% ^                                @.DrivingHome := true;$ C" ]% @: F7 ?/ \3 W$ D
                        end;0 ?* O9 f; Z  M" @3 W
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station' E# Z$ s; g6 D+ s3 f' ^5 `
                        part := @.transpOrder;) j& f2 I. W$ E3 {9 L- q6 ?
                        part.move(@);-- load part
# a3 l: W1 c3 ~* L                        @.CurrIcon := "load";
$ n0 _7 S5 Y3 b                        GlobalDistObj := part.globDestination;, ]0 O! {# \. G# ?' G, s' o
                        assignLObj := rgmanager.rgAssignL;% A* U) Q8 p. P
                        row := assignLObj.getRowNo(GlobalDistObj);8 v3 O6 y) N% e* C
                        if Row = -1 then -- since 70- _9 b$ x+ Q+ x6 I; k* y
                                if lan=1 then- T8 r1 M, B/ k# K
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
" z- n& L  C1 g9 t' s( `% s                                                to_str("in der Andockstation: \"",?.~.name,"\""));! l$ k( j! D% ?) F+ W. D, L
                                else' \8 q& Y7 w# O( {
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
' u, F/ B( q( `1 g- v0 c9 `                                                to_str("in docking station: \"",?.~.name,"\""));                               
/ v% e  i: [. G6 {& @                                end;  E6 f; F9 \4 ]" R' C
                        else
% v7 l; p3 A! a: `                                @.Destination := assignLObj[1,row];* \2 N5 U2 |0 M
                        end;                       
1 S7 w4 i) q0 D0 t: M' l" @                        newDirection(@);
- L& t  W- h. ~6 r                        @.HasOrder := true;
$ f  ]" o/ k0 D% W  r                end;+ D9 `( r4 }: q, i5 L) s+ B( Y" L# L
        end;
/ g4 B* l! x3 q: G( X6 ?& pend;        -- of the method
6 F) R( A9 \/ }, J, Q
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 , S4 z8 X2 N; N. U

+ w; q, o+ H2 _1 b# B/ }3 g这是AGV_putin中arrive的method。- ?+ [5 N9 ~) z4 z4 o8 m+ [
; W( w  ~# t8 ^
当到达物料速度越高时,这个报警更多,  {$ r' {; ]% N9 J
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
, y0 j- s. v/ h9 V8 f程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?# E) N$ O0 u1 V; i- s

3 W- r" j/ p. C3 w2 j另外一个小建议,就是move,所有的move都可以这样
& A# K0 G8 f  r/ e/ tif not move() then debug end
" S- g. Y6 _6 }% [* p* A这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
& N+ h0 `. t# E. T* Cplant simulation中的free libraries有AGV模板,3 h) z* w9 k+ H6 Q
里面也有案例。" j; {) N, x) o( t
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
$ e+ I' F+ c" b8 Y0 q# A. e
+ R) Q$ I  ?5 n- s' M我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
2 R( m7 E: P# G5 E8 s# H! F# K( B$ E( E5 X3 h
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
# v6 G& X) E  T0 E* ~3 d这是AGV_putin中arrive的method。
7 t% s/ q; |0 n  N- _' f2 r$ e6 c2 C  A* f0 D6 F4 G9 @  f4 w; D* V: b
当到达物料速度越高时,这个报警更多,

* _0 _% ~& F- U6 R另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|手机版|SimulWay 道于仿真   

GMT+8, 2025-12-1 18:01 , Processed in 0.021490 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表