设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8986|回复: 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': U4 G( v# K& @8 l; U+ Q
*/9 d8 P- E, }$ `  M* S, V$ p
is
2 o) @0 `" U& o4 j( B' ]        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# p: O! e* z- E7 y  w. Edo8 L7 o: P0 c- c+ K
        Lan := rootfolder.Internal.Tools.AOLlanguage;
. |) G) Q0 M) f1 t) @" I        if current = @.Destination -- else return$ b& g! x& s7 {& C. v, ?
        then
; J" B7 F8 p9 F# t; R. O                @.Destination := void;  O9 z0 q. J6 Y( i6 m" u
                if @.occupied then
) P8 ?) Y! {6 t0 J: K: H                        part := @.cont;5 Q9 ]- A0 @7 _3 w
                        @.transpOrder := void;8 M9 `6 A7 c7 N
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: S0 f  @4 ?9 O                                @,root.eventcontroller.simTime);& @4 J/ I6 U5 E! C" w! I
                        @.HasOrder := false;
) ]/ H) F5 x! R5 L* x                        @.DrivingHome := true;5 u) S: h6 }: M9 V
                        rgManager.tryToStartTransOrder;
- U; ?. p- d. L+ s                        if @.Destination = void
- J4 ]  ]3 U, `& [5 P                        then -- no transport order for vehicle @
2 W* }9 W; R. X8 r$ _& b0 A                                @.Destination :=4 {6 d+ ]1 ^; H1 A$ F( V
                                rgManager.nearestFreeStation(@,track.~);% y9 l1 Z5 N0 `
                                newDirection(@);   9 v9 g- p/ h# K) q, m
                                if @.Destination /= void then
7 t2 i) F8 ?# I4 u                                        @.Destination.NumReservation :=
6 T, I  |/ t7 u" s                                        @.Destination.NumReservation + 1;: n( n5 ?+ M9 G( e
                                end;% H' s! G% A6 j2 Q3 L/ K
                                @.CurrIcon := "drivingHome";1 j0 N& c( y1 @& r5 f' |
                                @.DrivingHome := true;6 u) N9 I' V( ^( b& r, v
                        end;5 [$ @/ E1 X8 r- J4 A9 H$ k+ a
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
5 u5 ~1 R9 n$ s% ?                        part := @.transpOrder;
0 k0 w1 [  {- w' _! c" ?# J                        part.move(@);-- load part
6 ]& m% W0 U1 F" i# F                        @.CurrIcon := "load";
0 `* U; d. m  G, Y                        GlobalDistObj := part.globDestination;! E" M1 R5 K0 F, x" ~; B
                        assignLObj := rgmanager.rgAssignL;& Z  v8 M2 I: e! o* @
                        row := assignLObj.getRowNo(GlobalDistObj);6 I5 Q8 w. p0 g- {6 h& c, A$ [# t
                        if Row = -1 then -- since 70  m% X/ C3 V* x0 g. p7 A
                                if lan=1 then
6 O6 h9 K$ {& o9 U6 D6 n# R                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
5 {- I' S6 Q$ X& z: ^                                                to_str("in der Andockstation: \"",?.~.name,"\""));
: Q8 V# q/ D: w* `3 |9 Q5 n                                else
0 t) g9 F- D& _3 ]' t3 I0 h                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
% f. A( L% `( C7 ~) N# u0 x                                                to_str("in docking station: \"",?.~.name,"\""));                                # Q$ j$ z2 Y5 s  g6 g5 X% F; Y
                                end;
9 ^# `3 W" d) h2 H1 w0 {) L                        else- ^# d9 B% O* i" b
                                @.Destination := assignLObj[1,row];% @7 H# i, g+ f2 V3 k
                        end;                       
# ~6 }, k* h5 ]; I% F4 P8 g                        newDirection(@);
! T  b6 i, G; Q" f) `% F( j  i                        @.HasOrder := true;1 p& E1 E2 h8 _/ r& @& Y0 i! \5 G5 O* n
                end;. p$ d, l. g6 M3 U
        end;  E- C! z, y( C. l+ D& p
end;        -- of the method
. I/ V- G6 _% U& ^( y* E
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 ! Y  Z5 f. @: T( Z- G
. K8 ?+ C, K& p& g  f! J
这是AGV_putin中arrive的method。
5 L, M- v* Z' E* R: n0 N  a3 G
) m8 `* N; T' E1 T" V1 S当到达物料速度越高时,这个报警更多,; g( s5 A0 I1 v6 ^/ [
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。  N/ |" _) x7 _: E
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?: V+ \+ c" e* Z" q, ?+ \+ K: m) _
! M4 f' `$ x- E
另外一个小建议,就是move,所有的move都可以这样
" a% s; o% n. o6 hif not move() then debug end
; v; K' W0 \7 ], m4 d; r这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。1 d8 t/ ^  K0 @' o) n
plant simulation中的free libraries有AGV模板,
7 o& W, `1 o% {9 F0 M+ }里面也有案例。2 Y* U) l3 m+ H! A9 ]) ~
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
+ g; N4 @$ t3 E. @- F# z9 m0 z4 f$ B# J, Q
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
+ P  G# Y4 T' ^4 a# I+ R" q7 ?) }
' t- _2 q; ?5 X0 z8 _- N* ~4 E那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
6 b: [9 G& [% z7 ?' F这是AGV_putin中arrive的method。' b! n, s$ J/ F# m. n; I6 C" ^3 e
/ g! U4 j( D, s; M( R) W& m8 ~
当到达物料速度越高时,这个报警更多,

& Y" E& T/ D" l* i+ r7 ~另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-7 15:49 , Processed in 0.020528 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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