设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9519|回复: 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'! M( h% x6 H, ]2 R8 a/ d) k
*/
7 M; F/ e- I( O% V* K5 Jis
7 m0 U/ g: c; Y0 E        part, GlobalDistObj, assignLObj:object;row,Lan:integer;4 D& A4 D+ j& }) R
do! b" I9 L# p4 F$ E4 F) o
        Lan := rootfolder.Internal.Tools.AOLlanguage;% o, w; x# w0 X7 M
        if current = @.Destination -- else return
! I$ P6 ^3 b$ k# C7 r5 Q        then, ]6 N3 I, S4 r2 }& ^$ v  y9 ?: L
                @.Destination := void;
2 d; c& ?& y) v1 V- c                if @.occupied then
& z1 R* t: e7 k, U( J0 x; |) h& h                        part := @.cont;
! K5 x) m& H9 O                        @.transpOrder := void;
( y5 w( n- L% G6 c4 p! @* z                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,, N3 Z6 [) \8 }1 U9 t, n
                                @,root.eventcontroller.simTime);
8 {% J5 ]2 o, K2 G                        @.HasOrder := false;
' e, f+ n  e  ]8 z                        @.DrivingHome := true;
6 |4 c8 s. Y3 O6 R: K' X  o                        rgManager.tryToStartTransOrder;
8 l8 Y: b: N; q0 n                        if @.Destination = void! f; y- p5 t" ~7 u3 w
                        then -- no transport order for vehicle @
/ F( r3 r8 o3 P& B+ G                                @.Destination :=7 }* e! O. N3 n
                                rgManager.nearestFreeStation(@,track.~);1 d/ A0 p3 A. ^% J5 K. J. k4 h# ~
                                newDirection(@);   ( b  }& H/ e6 E. o! E
                                if @.Destination /= void then! G6 \9 \, s8 g, I4 L6 _( i) e
                                        @.Destination.NumReservation :=
8 a- g/ I" a; B1 y                                        @.Destination.NumReservation + 1;, ]: U) G' U5 i+ H7 O" G
                                end;) r) z% U1 R5 R8 ^
                                @.CurrIcon := "drivingHome";# n! ^- Q: M3 c* Q* i& H2 `) A
                                @.DrivingHome := true;
% H3 D0 z' p5 W: J  r                        end;3 k% |  Z, i& e; ^
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
+ i- X" A$ z9 e8 _                        part := @.transpOrder;4 A& P) P) d/ u) }1 A1 D7 F
                        part.move(@);-- load part' N* y& V8 p: q1 f3 w
                        @.CurrIcon := "load";! G5 @( j1 k9 y, j; |
                        GlobalDistObj := part.globDestination;8 {# g& e0 t+ e, G5 a9 l- L7 J
                        assignLObj := rgmanager.rgAssignL;1 H5 R& b+ W. f& y/ F6 R
                        row := assignLObj.getRowNo(GlobalDistObj);9 H9 a' s( m+ m- y; a8 u; W
                        if Row = -1 then -- since 70% A0 B( c9 Z6 d! ^9 P7 A/ Z9 M! k
                                if lan=1 then4 b+ F3 V5 P1 W/ p: j
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),* o5 e/ M% u5 ^9 |3 t
                                                to_str("in der Andockstation: \"",?.~.name,"\""));3 D6 i* ]/ m! L( ]
                                else
# ?( e7 X0 B7 F( e. a4 C; ?                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 R2 a6 l+ f) i& t4 o* j                                                to_str("in docking station: \"",?.~.name,"\""));                                ; t4 {5 e+ z8 C' O( W! ]3 |7 V/ r
                                end;/ d& t8 @( V, D3 Y7 E% C6 K
                        else! u' F6 u  w# v3 G
                                @.Destination := assignLObj[1,row];
* o9 `. K2 u  p, K- i: v                        end;                        ) @, R" k% ~6 V3 H0 E) _5 _6 h
                        newDirection(@);
( E: S; H, P. m: H* O) x2 w' G" K                        @.HasOrder := true;
2 }0 r6 q# [7 i' o. j% L+ k                end;
: n& `  F( U! Z3 K        end;. ]9 T- a' k+ f/ X+ Q- x* p3 @
end;        -- of the method  Q' G0 l, Q7 ]& X" D. E: A
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
- b8 ]. c4 \: e% a- _& L6 _. U; ~* N) v# U' I- f2 f
这是AGV_putin中arrive的method。
- h& Z4 e& h6 B) b
1 o5 V1 {: m8 O! J, U7 {当到达物料速度越高时,这个报警更多,& \" ^1 @- I% }8 L9 t3 ~
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。  z- x1 q* d! v* y- ]
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?  i8 |( U  n+ G8 @6 E

% }& [$ d" U3 ^8 }6 ~# _另外一个小建议,就是move,所有的move都可以这样! q$ c1 x: y) _( M
if not move() then debug end
. j' m9 ?- N1 i( `1 f这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。. I' ]+ t9 W9 `. d1 i6 s
plant simulation中的free libraries有AGV模板,
4 v/ K* `5 y+ q, G3 r1 O) S' x里面也有案例。
4 j/ f' Z- o" w, t7 G& O我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
5 b  ?' W8 y* n( u- U0 H7 V
) j: C& B* W2 w$ m9 P: e9 R% a我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
# C- v, j0 `9 ]- c' T5 g
. _) w; a+ v1 S3 Q) F那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 2 i, V! o; K6 n6 l$ k# v; V5 T
这是AGV_putin中arrive的method。
6 F& v( l( b0 l8 p! `4 t
# [8 Q; Q+ j" C当到达物料速度越高时,这个报警更多,

" j2 w! I7 _( S% W% c另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-8-5 20:24 , Processed in 0.016111 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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