设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8396|回复: 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'  O: F. ]2 F4 n6 y
*/, Y0 e9 s+ J5 a4 d# s( t
is/ u: G3 X, B. h  A
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;2 u4 x+ F4 J5 a% H0 l9 }/ r2 h
do
" A) ^: q) M, P- S& b        Lan := rootfolder.Internal.Tools.AOLlanguage;
- L) |  t7 N- F  `6 s, t        if current = @.Destination -- else return9 V5 V7 p. c- y6 {) F
        then
8 H) t- R2 `0 k                @.Destination := void;
9 [! ?% w. X8 G5 W/ g/ n                if @.occupied then: t+ V2 P7 P8 D/ w1 N
                        part := @.cont;8 ^8 e8 Y$ Z# y0 P
                        @.transpOrder := void;( a' p+ `( n, t9 b( e% e
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,2 G% c- X/ L) v; i  t
                                @,root.eventcontroller.simTime);8 ~( @' x% M- n) g% E
                        @.HasOrder := false;
$ b3 D5 u2 A+ p/ N- N                        @.DrivingHome := true;
2 |! x% f. ]: a( b8 U8 ~2 n                        rgManager.tryToStartTransOrder;: ^1 j+ ~% ]) D
                        if @.Destination = void
2 R4 J) a$ _9 y                        then -- no transport order for vehicle @9 l' W' W" H7 y* p( y4 }
                                @.Destination :=
2 A' \) W- I/ J6 U                                rgManager.nearestFreeStation(@,track.~);" o% v3 ^9 f6 _  J7 E: |' F( |
                                newDirection(@);   
; {( t# c/ V% ?) F  [4 U                                if @.Destination /= void then% c! w0 x# N% g4 Y
                                        @.Destination.NumReservation :=% r) C) ^2 F0 W
                                        @.Destination.NumReservation + 1;+ m9 J! `, n7 ^- }7 Q
                                end;+ S- l% p4 S/ u% M3 B
                                @.CurrIcon := "drivingHome";+ H# K1 E( Y' D- ?9 D% P' j0 c
                                @.DrivingHome := true;
5 Q) u1 _; v) `; M/ p8 m                        end;
% Q. z% E0 j0 I                else -- the vehicle @ is empty, both vehicle and part are in the same dock station' H/ z2 \" p' h* m7 D
                        part := @.transpOrder;
! r# o+ x; t) @& `                        part.move(@);-- load part. a: _* T. R* S+ J' M$ S
                        @.CurrIcon := "load";
# l2 I; S9 p2 r' v                        GlobalDistObj := part.globDestination;" Y. o# Z/ b* K$ F9 `6 _9 Y9 w0 X
                        assignLObj := rgmanager.rgAssignL;6 L/ W6 L( O: ~. r, L
                        row := assignLObj.getRowNo(GlobalDistObj);
- Y* v3 T4 M+ A# A7 A! {+ C                        if Row = -1 then -- since 70' i2 b# Y  F! P6 ]% W
                                if lan=1 then
: j0 k2 z0 ~2 N! ~" m                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
' C8 g" E6 J/ |; ]$ ^1 _                                                to_str("in der Andockstation: \"",?.~.name,"\""));
! }. K3 r% j$ }4 A                                else
/ i& M7 F4 J* m0 S5 Q                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 g5 Z/ O! H, y3 \) X                                                to_str("in docking station: \"",?.~.name,"\""));                                2 Q) X& E. @6 H+ B: N
                                end;& `! V9 h3 d) \( Z0 T6 A
                        else  Q1 \7 ^1 D1 ^: I* V6 b5 a8 p
                                @.Destination := assignLObj[1,row];
* A$ _, ]7 b  B; ?                        end;                       
  C) S# k  o5 b0 P) e) J                        newDirection(@);
& _5 @2 b3 Z9 T) G+ w! b' f1 X: n& y                        @.HasOrder := true;9 `5 k) H  c! ~1 E$ t$ E5 Z
                end;8 M% d+ T! x  j. {* N
        end;" Q$ j5 U4 r; l& ~
end;        -- of the method( i. P+ k: y+ q5 \8 J0 F% {* n
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 # l2 k7 a) }" O8 F( J- ?1 C# _6 d

' T' X8 Y. Y& L6 @8 H- S# t这是AGV_putin中arrive的method。
8 c& D. t( ]" B, ]; ^2 {* M) z7 [, c4 n: Y, p. y
当到达物料速度越高时,这个报警更多,
5 E+ l0 @9 ~9 Q0 c6 X5 u可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
- y3 ?6 p5 w% i5 {' N5 E程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
1 e1 j: x8 Q4 _  s( R( T8 U3 o, i" F3 L2 d
另外一个小建议,就是move,所有的move都可以这样2 `3 Z; L+ x% h  L; @: F$ l
if not move() then debug end3 a- K6 M, j& s7 z- ^/ g
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
  S+ R! m+ O5 `& ]- |- E% Jplant simulation中的free libraries有AGV模板,  f) ]+ y* T8 G  y6 t
里面也有案例。8 H' x" p7 g3 ]3 r- b$ g" S
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
$ U1 X1 [+ I* [( K9 c$ }* t
" r* r" q; W1 |) |& W; _. H0 K; t: Y  f我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
. p- t; [! V3 Y; b9 A8 L& X1 M  N+ ~- U9 g% o+ A1 s& Q
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08   f% \- Y# k( q% U/ K) |
这是AGV_putin中arrive的method。
8 L- k* R: r; n/ M, G
3 z: D4 D4 x( x' x& W当到达物料速度越高时,这个报警更多,
6 i, W* d. @9 @, b" ]- b  T
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-1 11:02 , Processed in 0.019609 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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