设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 10151|回复: 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'
; _6 K( m9 O/ V5 D*/
* V2 t7 ]5 O  u/ }: Qis% i. y. z  B. T" F- F
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
9 n& n$ O: n9 f' O4 a$ Gdo% D+ `9 z+ q# ~" @( v
        Lan := rootfolder.Internal.Tools.AOLlanguage;
/ i5 S5 Q, N" Q5 P5 q        if current = @.Destination -- else return6 L' i: ~( X9 _  t/ a" ~
        then  F- p1 n, e4 @( h; s7 x) h
                @.Destination := void;+ L' u1 Q7 v2 D. P2 @( J
                if @.occupied then+ f  X1 Y5 H8 z) Q3 B( P
                        part := @.cont;
; F4 \' W/ T) j: C  J- K: z                        @.transpOrder := void;
/ B; ^$ }, P0 {6 z. A; Q, i                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
  a; o+ g* x% y. {2 Y/ r) F                                @,root.eventcontroller.simTime);7 X0 Y; a7 ?% G( i3 J. {1 }9 ]
                        @.HasOrder := false;
! v: }% J* v) i% Z                        @.DrivingHome := true;
: ~. F  e, C, t, l% y! S0 z4 E                        rgManager.tryToStartTransOrder;
  ]8 I* p0 q0 |0 L0 P                        if @.Destination = void
9 d8 r! o/ @  X) o                        then -- no transport order for vehicle @* n8 O1 U. P8 z, U3 l3 k
                                @.Destination :=4 f& o& a9 O. O
                                rgManager.nearestFreeStation(@,track.~);) d" ]  {* }5 }( x0 d7 G* m3 U
                                newDirection(@);   
6 `8 o8 A( h8 h9 ~                                if @.Destination /= void then6 P+ T! S0 W7 ?5 Q4 m% P0 E) K; v, @+ e
                                        @.Destination.NumReservation :=
  B& u& R' G+ D! Y3 p- o                                        @.Destination.NumReservation + 1;
9 Q& D7 s, d" x# f                                end;6 t# N" v, M" P
                                @.CurrIcon := "drivingHome";. c3 l  b: x9 @
                                @.DrivingHome := true;$ B5 y* `. E! {+ C; m0 z5 y" }
                        end;
" Z7 ]( z% y- z  D& V" Q7 f" z( f                else -- the vehicle @ is empty, both vehicle and part are in the same dock station2 a% L: \0 r; J
                        part := @.transpOrder;
; p# ^2 \  L+ n+ _2 X  f# x                        part.move(@);-- load part- @) n0 ]( b* U
                        @.CurrIcon := "load";( L+ n4 i0 {/ D  x
                        GlobalDistObj := part.globDestination;$ {1 a$ @# E. E) [, R1 p, u
                        assignLObj := rgmanager.rgAssignL;. ^; Y# z; [0 ?  o" Z9 O: O  @
                        row := assignLObj.getRowNo(GlobalDistObj);
+ P/ }- u% Y& y0 W                        if Row = -1 then -- since 70
% d" }- l/ w7 Q$ ^6 z) E                                if lan=1 then
3 h1 O7 R. v7 {; R6 F5 I: s: m* m                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
1 M1 T4 X$ u1 {; x$ u                                                to_str("in der Andockstation: \"",?.~.name,"\""));! G. N+ m* Z( K* G2 I! \' [
                                else( x( D9 e0 k+ L; G3 V7 Q, K+ }
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),/ D0 F' I3 b2 t; K
                                                to_str("in docking station: \"",?.~.name,"\""));                                / Y4 K. t9 _; t; K' l
                                end;
( y4 x. C6 c  T0 v                        else- i; z' t9 F3 H2 T/ W
                                @.Destination := assignLObj[1,row];
$ V5 C( F' G" J6 I! h" q+ P                        end;                          I, a8 Q! a9 x1 j
                        newDirection(@);& ^$ {, F& \% s- B& }; O
                        @.HasOrder := true;3 P# e, R4 m2 u2 C9 D( J6 }/ q
                end;
9 D* k; j6 v4 ]: V1 E        end;# l: a0 t7 ?- Q: k$ I6 K3 h
end;        -- of the method+ z2 z5 Q( f4 O9 O
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
6 n  R/ y9 w0 u7 u- W; ]2 w7 Z5 V/ W% n% @2 ?/ s
这是AGV_putin中arrive的method。
4 S) w; o- U! t3 l$ n7 Y' p+ \2 l
3 u. V! ?% U7 R/ D9 {8 u当到达物料速度越高时,这个报警更多,% `$ o. L6 I- r+ S' a
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。( d! v7 ?+ C/ `3 q/ A
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
0 ^; Q" `5 h4 l3 K% h/ G# Z1 q3 f- f% w! L: V8 K4 x1 [- H3 l& k/ s
另外一个小建议,就是move,所有的move都可以这样
2 _" C7 d8 X/ R" z6 C3 wif not move() then debug end, s0 @( W; `$ P9 R5 p! z
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。3 f/ i. E# b) l; R* z0 ^
plant simulation中的free libraries有AGV模板,
- x+ H  d7 x6 ]7 j0 T8 V里面也有案例。
+ P# _# Y+ P  {6 I; C我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。- j) F) i% B0 W, s- p2 S3 w1 J+ t
4 T5 o, @7 R4 i2 J5 `. t
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
1 L6 h: L+ w/ ^( ]6 u( A! Z9 v, l
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 & W2 J" R  ~0 B5 |. [! t7 w: e6 N: h
这是AGV_putin中arrive的method。, T% i7 @+ c  W6 p: C

, ^4 w0 M; U3 \' O6 E当到达物料速度越高时,这个报警更多,

' H) ?# I' w6 w4 _- q5 ]7 G+ H# B% I另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-9-16 09:13 , Processed in 0.020499 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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