设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7012|回复: 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') k( T. H4 O5 v# M4 ?0 m
*/1 L4 E1 K: I3 \
is
4 j+ g; q# I3 r, ?# e        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
9 w2 j  ~8 r! k& U( O/ m) @do
( s6 D9 L6 D, m: `- X3 e3 [. A        Lan := rootfolder.Internal.Tools.AOLlanguage;
0 ^7 R7 n' S; d        if current = @.Destination -- else return
. J- }" d9 Z1 G/ ^4 N        then
# I* B  C( H# ]" }                @.Destination := void;3 |. O1 `4 C4 _2 c; F
                if @.occupied then9 k# \, L5 U- P- x8 M4 I0 B" Z1 W
                        part := @.cont;
/ w/ d+ \3 l# x4 |& M* R- d8 E                        @.transpOrder := void;
1 M1 d& W' H1 F  q                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
2 J% f, P6 k. l: h+ [+ S/ s+ b                                @,root.eventcontroller.simTime);' s/ K$ K1 A- b
                        @.HasOrder := false;1 Z  B& f9 M9 d% H2 l1 {/ d/ [' m" y
                        @.DrivingHome := true;
. G9 A7 w; P7 n& L                        rgManager.tryToStartTransOrder;
- q9 Z* I5 C0 W* X) Z0 J0 A                        if @.Destination = void6 h- q. y( y3 G. ~
                        then -- no transport order for vehicle @2 K# G/ }, k$ p' D, r
                                @.Destination :=. o* o) O* u, Q3 a& B3 o5 O$ z
                                rgManager.nearestFreeStation(@,track.~);
! l. }& J% y$ b: N3 L; y                                newDirection(@);   ! e+ z; m0 v* {2 @* @
                                if @.Destination /= void then
$ A. A( q* V5 l; d, P+ H                                        @.Destination.NumReservation :=
: B, @2 n; F: m: F# ~                                        @.Destination.NumReservation + 1;
2 o5 ]8 V/ O. }  u: c0 d                                end;
. g: w3 A) p: i: [9 w/ y6 T& @4 D                                @.CurrIcon := "drivingHome";: ~3 o! h2 x7 T' r# P, T% ?
                                @.DrivingHome := true;
, r; H( g( a4 Q& V) L                        end;
! w; v4 T. Z- m& }! n3 \6 l) n) B                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
( Y( N! @" ]4 E1 g                        part := @.transpOrder;2 M6 y5 ^: U: f$ M) c) Q9 c
                        part.move(@);-- load part
' h* p& ]  p/ Z  [! L8 v                        @.CurrIcon := "load";
+ c. E* \5 C4 }, U& h$ r2 O. a                        GlobalDistObj := part.globDestination;; @3 P3 v, j+ I
                        assignLObj := rgmanager.rgAssignL;5 g7 B0 P; k4 w' a
                        row := assignLObj.getRowNo(GlobalDistObj);
( e- P4 @  f! W: G) Y8 B% y                        if Row = -1 then -- since 70( n1 Q0 L) G3 U1 u1 x- x
                                if lan=1 then
) |* B# L$ j7 O1 v1 F9 L/ f+ ?                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),$ v# F" |+ q% z5 S
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
+ T8 |+ a6 q. E5 b3 ]# s, p3 P                                else5 h6 \6 g+ E/ n  t+ j/ `  d; ^! S
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 Z9 _5 {6 J- }0 s: o- n                                                to_str("in docking station: \"",?.~.name,"\""));                                - E; P& z& l4 G/ Y& U' h
                                end;
4 {7 Z8 a& {  J. c0 n                        else
* `; q; ]. S* s8 V7 h                                @.Destination := assignLObj[1,row];! @7 U6 q: E1 \3 G
                        end;                        3 s5 C1 _3 t6 s% L
                        newDirection(@);
7 y/ y  ^7 }; {                        @.HasOrder := true;' U* l( |; C. a. u! l
                end;7 S2 Z5 I1 [7 h+ g) D
        end;  c8 u6 D" t$ D  i/ p, h
end;        -- of the method
  Q" Q- p; m' n" z- f
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 9 v# G, f% f5 f0 l' O+ X* w( g. E
+ F- {5 l3 Y, s  X, H
这是AGV_putin中arrive的method。
+ t% B! w) h9 P) X" E, y# V9 T$ P# @- M( ]
当到达物料速度越高时,这个报警更多,; a( z' C7 L. h! j
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
" a0 ]  K4 |% X- z, c, C' [" F, S程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
1 y' V) x) `8 c/ N. m) s' s6 n6 N4 L9 {- o+ F6 x" X/ M
另外一个小建议,就是move,所有的move都可以这样
$ {- v( C) e( @* kif not move() then debug end- `! K; h* g9 f: ?- A; y
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
' a: V) L9 b1 B$ Zplant simulation中的free libraries有AGV模板,
( |3 f1 C7 W- I- A+ n里面也有案例。
+ |, y/ o- d7 |我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
1 R% C% R. Q; {' K. f! r; a* w0 h# W; q9 i# p8 N
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 0 @8 d) ~& z% v

0 |( F& z. b* p! [% L0 l那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
1 J( X) c, g! B1 E这是AGV_putin中arrive的method。
& ]2 F& x& n- ], f3 I2 G' S0 A" i
3 ?: U0 b; N8 d当到达物料速度越高时,这个报警更多,
& I! y8 S, m: W
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-11 06:29 , Processed in 0.022258 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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