设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6167|回复: 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'
2 n( A7 V* I8 |; k+ F*/" r: a) g5 M7 J2 U) d
is) s3 q1 p; q, o6 `% S5 D1 ]
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
$ e, ~, t$ j3 G2 u2 G3 _3 Z6 ~+ G. ~" fdo% x4 V: |" A1 O0 Q
        Lan := rootfolder.Internal.Tools.AOLlanguage;* I4 l8 M0 ?1 i5 G# S* p6 O
        if current = @.Destination -- else return) A) P1 P: B, C7 @% }5 N. W5 B# U
        then# K* X: t8 a/ Q0 a) Q
                @.Destination := void;3 u* u1 D+ {4 o( \9 w0 {8 m
                if @.occupied then; N# ~4 B1 L+ g& P# c7 ^
                        part := @.cont;
- |# e, q$ p0 T+ K                        @.transpOrder := void;$ T1 b) p7 b8 e0 c6 P
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 U6 w. t9 |- E" R$ o; f% l+ A
                                @,root.eventcontroller.simTime);5 k9 P+ G2 |4 C1 K3 g# L
                        @.HasOrder := false;. W1 f' b4 y, z) d4 G& y
                        @.DrivingHome := true;
# E$ E! t$ }- g3 {* h: o' t                        rgManager.tryToStartTransOrder;  \1 v& X5 A4 ~& |
                        if @.Destination = void6 M$ j4 l5 f: Q! i2 Z$ }/ B: R9 w
                        then -- no transport order for vehicle @
2 V! ]# Z( |' [* r/ t8 \3 F                                @.Destination :=) V1 G5 Q! ~6 B+ W& P& S# L5 W% a9 v9 t
                                rgManager.nearestFreeStation(@,track.~);
4 t8 j0 n& P& J' Z1 Q! z# f                                newDirection(@);   2 k4 \) o9 h" ^2 V% V
                                if @.Destination /= void then' o8 ]% Q7 C& c6 h6 y+ B2 y* `" |
                                        @.Destination.NumReservation :=
; V7 U2 d7 l: Z9 K5 z                                        @.Destination.NumReservation + 1;1 K; S6 Q: j- B8 @0 T7 x
                                end;
& ^- R9 |( O; B1 N                                @.CurrIcon := "drivingHome";8 ?  ]% M5 v+ G7 c1 s( g
                                @.DrivingHome := true;) ]: q3 P$ H8 A( H
                        end;5 G2 o1 h* x8 b: o6 o7 m5 L1 I
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station" A" U/ O& l8 G
                        part := @.transpOrder;
/ C4 X  D+ s' w% G                        part.move(@);-- load part7 j$ w, `' {, K, Y! o" P  \
                        @.CurrIcon := "load";* }* r$ \! x: ~/ H5 ^: i. X
                        GlobalDistObj := part.globDestination;
. Y& v1 V) N3 e                        assignLObj := rgmanager.rgAssignL;
( y7 ]  c# y; U$ o! ^                        row := assignLObj.getRowNo(GlobalDistObj);
) z2 i& C1 Q( ^& ~8 H! h                        if Row = -1 then -- since 70! {8 K* j( Y- C0 @4 t% u/ i
                                if lan=1 then2 O6 U2 G* o* o
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),3 s+ `" _" b  Z
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
3 o" @& B: Q/ A2 X  N9 s& x8 o                                else
+ d0 o0 `' l# c( c                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),$ j3 N: W* }) M# G2 t+ l3 f% \* q
                                                to_str("in docking station: \"",?.~.name,"\""));                                9 Y# p; o- C0 z$ e
                                end;% G9 D( v! G3 O
                        else+ c/ s( B+ G3 W) B0 v
                                @.Destination := assignLObj[1,row];
) D+ e+ |+ i& {- B  c" ^                        end;                        1 [8 [  H( _- f3 f  W, G  [
                        newDirection(@);
6 w7 P# j3 c' t' |5 I- ~/ P% T                        @.HasOrder := true;
- o9 K$ |2 c, O; B2 w9 j                end;
8 P( ]# y# ]/ d! y8 f: a* A7 G- P        end;
5 P; O) r4 A- ~4 w* f9 Yend;        -- of the method
9 j8 m8 K6 [, i: x) Z& j0 K3 Q
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 " }$ {$ n. m2 }( E; k( p+ @  i1 Y* E
  Y/ R2 i- ~% n& z
这是AGV_putin中arrive的method。5 X4 O7 W. j' D! X& f, Q9 r

: n2 r# S; d1 }8 r3 g当到达物料速度越高时,这个报警更多,$ R$ ~6 L2 i7 x$ x
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。& d+ E9 T. f8 G+ J4 J" W3 r- W& `
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?) Q- v% J+ L) N! u/ b

5 n6 \; H4 O4 r, G* ]3 x0 O另外一个小建议,就是move,所有的move都可以这样
2 w; F8 u( A4 L4 v& ?+ Tif not move() then debug end5 T4 ?, [; [. i/ q- x
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
6 g! {3 q( e/ |3 splant simulation中的free libraries有AGV模板,
; W2 p- w- i' b0 Z4 ], f; K: E里面也有案例。
5 e7 ~4 z2 [+ n我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
! x: O8 X% g6 S6 E+ F0 @6 x; h7 O! @! e& N& D% u% k2 L8 W2 D
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
6 X" `6 I! M- v/ U) n$ T
  l* n) H1 v: `" b那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 + h! \5 k( }- y$ z5 m4 B
这是AGV_putin中arrive的method。2 `, @) O3 \; i& f) S/ _

6 s2 E  ?$ x* ?- u  _当到达物料速度越高时,这个报警更多,
: n9 e6 B2 J& L: S7 S4 H
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-1-22 12:06 , Processed in 0.019283 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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