设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9424|回复: 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'' G( y3 y1 g% S* O. E* k9 t
*/: I  F9 K) s" o. \2 s. p" d; k
is) B$ P0 |1 v* S) x
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;2 J% _& i0 S6 z( G4 E. {4 V1 O
do0 L) y. B9 y8 G4 z6 Q
        Lan := rootfolder.Internal.Tools.AOLlanguage;
. B  P- E: ?: X) u6 X- b2 _% d        if current = @.Destination -- else return) Q9 G2 m1 c$ f- q4 c
        then& z) i1 X- D5 J1 W
                @.Destination := void;1 s3 E: i7 c6 G3 L, T
                if @.occupied then2 U/ z9 V5 h/ |' `
                        part := @.cont;$ v1 A. s7 e9 p" y
                        @.transpOrder := void;
1 H7 B4 K/ F4 n2 G                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
& O( q) Y1 u! ~) x  }( J/ N                                @,root.eventcontroller.simTime);5 w$ P6 Q) p: x1 G4 `
                        @.HasOrder := false;3 s# B* S& f- ]) ?9 A3 Y! U
                        @.DrivingHome := true;( r) Y) N# d! V
                        rgManager.tryToStartTransOrder;! r$ G0 P: I! M! \/ O
                        if @.Destination = void
6 H# d) t# b8 z: {" n: U( ~1 D! z                        then -- no transport order for vehicle @
3 ?3 C, a0 S2 q5 m                                @.Destination :=: m0 y, U1 Z  C: Z. ]
                                rgManager.nearestFreeStation(@,track.~);
: r, p* i7 E/ b; ~8 C                                newDirection(@);   8 t4 C. s; j8 ^/ j; B& R; \
                                if @.Destination /= void then
, J3 w( Q0 ^+ i. S                                        @.Destination.NumReservation :=
6 J! S) {5 H4 {! L0 o3 @. ^7 l                                        @.Destination.NumReservation + 1;
* ]. N+ ^1 h8 V6 Q& C                                end;
8 G+ }  {! c4 t5 f; m7 b0 U                                @.CurrIcon := "drivingHome";
& X8 E, E" S6 ?7 ]4 s/ a% H: e0 \3 `                                @.DrivingHome := true;6 ]; A, l- h9 B/ v
                        end;
+ O- b' Z5 ?% w                else -- the vehicle @ is empty, both vehicle and part are in the same dock station! ~/ ?8 U1 ~7 R+ K) v% W; \
                        part := @.transpOrder;
' z- W+ O, `) ~$ ^$ u5 @                        part.move(@);-- load part: {( p* W" S4 j7 c0 a: Y3 w: p9 H
                        @.CurrIcon := "load";4 b# J: r( z1 q
                        GlobalDistObj := part.globDestination;
7 Z+ f% E( q/ _- H. ~. g8 k/ P                        assignLObj := rgmanager.rgAssignL;
' t, w  y$ q5 H% ]; k2 H  Y# n                        row := assignLObj.getRowNo(GlobalDistObj);
* e+ Q% i  H3 ]$ ?; y' ]                        if Row = -1 then -- since 70
' `3 \* d; Z* ?                                if lan=1 then% D3 V0 w. T7 D2 ~! w
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
2 Z' n- T0 C0 P* J& P) v! ?7 z3 y                                                to_str("in der Andockstation: \"",?.~.name,"\""));0 v( b$ q4 H7 c  x2 U9 s
                                else
/ M- ?: ~8 }- F1 f2 H                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
  P* b- a) l7 Q0 M, ?$ U                                                to_str("in docking station: \"",?.~.name,"\""));                               
" ?5 I0 R5 q5 b+ h% k- |                                end;9 y8 B9 F+ O6 O1 G) z9 Q8 f0 r+ X6 c
                        else  Y. V) G8 f" u+ N6 e# n
                                @.Destination := assignLObj[1,row];
, G! B( V% G2 [, a  g6 m+ p* y                        end;                        1 G* L. [) K  ^8 _. ~
                        newDirection(@);# _) l8 r  D+ E. |* U$ L
                        @.HasOrder := true;# q' v6 t# k6 K+ I" `: y
                end;
6 p% Y1 t% L# \% C0 i        end;
. ~) D% h) q: }  dend;        -- of the method
) m( T$ ~3 Y0 J5 x" j
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
  R/ r# K. j& X( Y8 y' h) \7 B' B- w; B! ?$ n# p  x0 M( U% e
这是AGV_putin中arrive的method。
0 m8 w# y5 w) V, R$ O3 l7 J
7 p5 m: ^3 C# _当到达物料速度越高时,这个报警更多,* L' a$ Q9 y: z  j# e
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。$ ]7 A2 `: K& w
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?% K2 c1 D' Z9 Y6 f4 I

" g3 O% r7 b& f% n  U) E6 R) X另外一个小建议,就是move,所有的move都可以这样+ }. y; P8 R, c+ R. P
if not move() then debug end
7 O: G5 y3 t% _- Y这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
' {) x$ ~; ?' N9 Y; b" I7 q  P) Nplant simulation中的free libraries有AGV模板,8 Z6 I2 ?1 u$ d" s
里面也有案例。
6 [$ \( c* p: M. w- I4 h. o+ C我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。8 x  y0 u( ^' Y+ R/ r6 a/ [: n

) ^  W9 w- |9 Z3 B3 R我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 2 U! k0 Z" B) ^; d7 ?/ @2 `
6 H3 f9 i) Q' V; d/ h
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 6 z% _! c  M# H2 r7 F4 W: K
这是AGV_putin中arrive的method。7 S9 {( c1 u: O' j  p
8 a1 v! T4 ^& c' U3 j0 D7 g
当到达物料速度越高时,这个报警更多,
" N' v+ V; Z# }" F4 f# E, r8 f
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-31 11:29 , Processed in 0.021358 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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