设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9259|回复: 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'% Z) L9 Q2 f: y7 P6 q' Y
*/
1 Y- D; Y9 ]' S7 Ois; |* C( ]" Y) k/ o1 Q4 v
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
0 J8 f$ ?1 h# E. B. ddo0 \2 \# |3 s( W# p
        Lan := rootfolder.Internal.Tools.AOLlanguage;
6 y( k/ A$ b2 i        if current = @.Destination -- else return( s" g3 z) P6 |6 K' a0 b6 e
        then, F: i0 W: F. w2 N- i
                @.Destination := void;
; h. k) ]2 r0 r# ?5 P: U                if @.occupied then7 {8 l3 }5 D* Q6 W- e& ~; e: |
                        part := @.cont;! X# o2 b$ A- ^. C2 V
                        @.transpOrder := void;1 X+ Y/ z$ B$ {2 r* @, Z
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ |3 e# h" C% ]1 }5 U                                @,root.eventcontroller.simTime);
. A' ?8 X) u3 X0 v% t                        @.HasOrder := false;
0 }& s9 H, I" N" t( u                        @.DrivingHome := true;
/ T5 G9 V3 H' Q) d% c  L: r                        rgManager.tryToStartTransOrder;( I' w- l2 b# L
                        if @.Destination = void! W. ~* z+ l4 y4 h! R
                        then -- no transport order for vehicle @! K" O# V$ ]* X$ k) R) u6 [$ Q
                                @.Destination :=
# g1 m# R8 Y7 x% R5 i                                rgManager.nearestFreeStation(@,track.~);
- H$ }% z, R1 e1 q                                newDirection(@);   0 q, Z  W! C7 t: Y2 d' F' e; o
                                if @.Destination /= void then
0 b- i/ E3 S3 @3 X2 M" ]2 A                                        @.Destination.NumReservation :=3 z- m3 M0 o0 H$ `& z2 T
                                        @.Destination.NumReservation + 1;
! @+ ^# H- s! ?. R8 ?                                end;
7 b2 m* R4 n$ a# x# c                                @.CurrIcon := "drivingHome";; |* ]2 h( ?. H" C6 X
                                @.DrivingHome := true;" F: S4 b5 |' j) N9 e) j; Y1 P
                        end;5 r1 Q; ~3 a/ ~3 K7 n. Y
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ H' [0 Z% V( L! g; D; u  f5 c                        part := @.transpOrder;
. Q) s7 p$ N7 T- q4 c                        part.move(@);-- load part
. h$ h3 c4 C* N8 f  X: ]                        @.CurrIcon := "load";
' B! m' B' w) ?% P4 |                        GlobalDistObj := part.globDestination;; ]- |# F  f$ d) G+ V
                        assignLObj := rgmanager.rgAssignL;1 D8 u0 C: o$ [! ]; P* v3 |
                        row := assignLObj.getRowNo(GlobalDistObj);' i! e! p$ y( ^1 D8 q: u+ D; L. a
                        if Row = -1 then -- since 70
9 S8 }, ?; u, `                                if lan=1 then
2 ?  |( u. L2 H* B$ C                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 w. H9 U) f, I  y& J! K                                                to_str("in der Andockstation: \"",?.~.name,"\""));! i" J9 g4 w; m( Z! h0 |  M4 P
                                else5 e5 s, T  c& G9 g* j
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
: q, [- g9 P" d5 E/ n6 ?" {                                                to_str("in docking station: \"",?.~.name,"\""));                                6 k: [0 l- L9 \& w, i" T. H% b5 {
                                end;
$ Y2 \& ]. j) i                        else1 t. W' H" n+ Z& ]; o* t
                                @.Destination := assignLObj[1,row];6 i1 g3 A. y0 @, K1 }% Q' o
                        end;                       
" n& `4 a: K  G+ H' W. _7 d. A                        newDirection(@);
4 p9 L* V2 T7 c2 H+ f, Q                        @.HasOrder := true;3 B7 ~, j4 f% y
                end;
1 G& a+ N2 h+ p& l3 u3 G        end;
: v0 g8 z5 _1 K8 y6 S; x: hend;        -- of the method
7 ^# v1 W* e: \( ]+ S8 E$ I% r* `
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑   x+ c6 u0 L/ |0 i) X. Y  j& U
/ y% [; P' M7 L3 y. k9 ~
这是AGV_putin中arrive的method。( N% i: D, G* x% M3 l

0 G, I4 |) X( ^) n2 w* d当到达物料速度越高时,这个报警更多,
" J# f  V) Y' j; j; l% z可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
$ X6 {  `$ S2 N. S, V+ N程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?( \, l5 t" r8 w3 L9 A2 @0 ^5 p

" c+ Y0 c6 f1 G- ]- B另外一个小建议,就是move,所有的move都可以这样& X# q% C/ ^& J
if not move() then debug end2 V& M: O0 p5 @# B
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。8 ^9 V- U- m% P; l) e+ p
plant simulation中的free libraries有AGV模板,
' a: X) ~) u" b/ f2 s! p  o- }里面也有案例。" R1 e/ e# a$ N2 A
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
, @8 G0 `5 ^+ B7 ?9 ]7 l% h  C* }& P5 [8 c% q2 q+ g: X( ?
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 / g3 S, `! x& k; Q) \% p

5 C2 F& G: Z) f那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
7 K" l3 y) R. a+ I  O) \这是AGV_putin中arrive的method。
8 P; b1 E' B1 c9 [* ^  Z+ a8 V! z& ~
7 ^/ w2 _0 N: n  K当到达物料速度越高时,这个报警更多,
: K/ R7 c+ j9 t$ P+ m# b; B
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-21 14:36 , Processed in 0.017001 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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