设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6739|回复: 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'1 c; K; k! G  c% Y" S: b
*/
- Q3 }, T9 W( N: w7 I. ^is* R4 f1 a" x9 U/ d* C: _0 q! a
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;4 x. d4 T$ m" o0 Q7 `! C
do
, C/ s; A; b- e* Z; C0 C        Lan := rootfolder.Internal.Tools.AOLlanguage;
8 e5 x+ |& G+ o: ]4 e8 m5 q7 f        if current = @.Destination -- else return! W- o% p! C2 X3 P
        then
8 u3 u! s4 N) y) w+ E( L                @.Destination := void;/ q, N3 ?( a4 _2 k9 b4 t' B& g3 m
                if @.occupied then
1 Q# b2 h- W0 t7 l                        part := @.cont;8 b1 ?' ^' x9 x2 a( H+ E3 t$ l5 ]
                        @.transpOrder := void;1 S/ j( q3 m& B% H
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,3 g0 }7 k4 S; W7 s. @( ~
                                @,root.eventcontroller.simTime);( _2 P& h! a1 v0 A
                        @.HasOrder := false;) Y4 l; r+ _( i5 n
                        @.DrivingHome := true;
$ v. @+ D: f2 W                        rgManager.tryToStartTransOrder;
: y$ A: C* b/ H$ Y  x                        if @.Destination = void/ a' U  Y) E" S
                        then -- no transport order for vehicle @
4 ~1 t/ C2 i6 j3 y                                @.Destination :=
5 ~/ ]" e  S/ Q+ y. U                                rgManager.nearestFreeStation(@,track.~);" m1 r0 t( U: d4 |* m
                                newDirection(@);   3 g9 q3 e1 e) |
                                if @.Destination /= void then
8 b% {# W% |) k# e                                        @.Destination.NumReservation :=1 N$ D9 T  Q6 l9 T
                                        @.Destination.NumReservation + 1;5 e$ s1 X% `+ A7 ~: j+ ]# _
                                end;
, A6 C1 Q8 l  j9 a2 G                                @.CurrIcon := "drivingHome";
3 c" M2 Q6 Z' P) |; `. `                                @.DrivingHome := true;
: G0 x% q' e  j3 L" H3 @* x* e                        end;
: \: [% m/ S3 p8 I5 T; E: h                else -- the vehicle @ is empty, both vehicle and part are in the same dock station5 e5 \6 F. O& @& U
                        part := @.transpOrder;
- B( J8 L  l* M7 f5 e                        part.move(@);-- load part
$ ?. v/ H- a/ T8 ^                        @.CurrIcon := "load";, [$ l3 s6 B* Q6 r
                        GlobalDistObj := part.globDestination;6 _" V) Z  X. I8 h
                        assignLObj := rgmanager.rgAssignL;
9 ~$ C0 s/ e  i7 C% A0 W3 b                        row := assignLObj.getRowNo(GlobalDistObj);
- ^% \4 o6 Y' i, G                        if Row = -1 then -- since 70# Q  R0 ]( {/ e+ ]# U, p4 C
                                if lan=1 then6 ?4 j0 ?1 f8 A' [
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
$ S# Y  a3 q/ ?7 J' O                                                to_str("in der Andockstation: \"",?.~.name,"\""));. ^9 |  s4 X, b6 [3 y, E& M
                                else: ?3 N( k) |& |! o# Y) Z& q
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
8 R3 P8 n1 \' L9 D2 |6 w                                                to_str("in docking station: \"",?.~.name,"\""));                               
3 q9 {- n: q8 T8 A, Q' o                                end;
7 F8 ^& @: s2 v4 m' i( a                        else4 i. d9 p5 v3 K" |) q
                                @.Destination := assignLObj[1,row];
+ R) y  I- I3 m; a/ {! B, D                        end;                        ( Q( F; R! y1 x: E
                        newDirection(@);
) i3 E" v  P4 E+ Q. @! h* C# E                        @.HasOrder := true;! o7 f4 n7 l9 o% O; ]: u7 W5 `# ?5 p
                end;
3 [* K4 p1 |3 H# t2 h* s# b& t        end;9 Z5 A) v' Q6 @9 U4 F5 u2 d% ?
end;        -- of the method5 X( T" F9 l# I0 \1 ~+ ~
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑   [- ?6 x* x4 G- M

5 d7 x  Y, z5 U: K. V: ~9 ]这是AGV_putin中arrive的method。
  ]# E/ p' s3 c7 I1 A; N# q4 Z: |% w7 c9 U  o% I- J) k
当到达物料速度越高时,这个报警更多,7 u1 F# s4 L! s( m3 `, l# J
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
. _0 Y* m/ M# b9 P: z3 \程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
9 y/ m) Q$ D# u$ v. e
7 W% N3 W3 V3 w另外一个小建议,就是move,所有的move都可以这样
! I) L4 A7 N4 q# cif not move() then debug end
2 s, n0 _- l- r这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。; x" S' a7 k% b) O+ f/ x
plant simulation中的free libraries有AGV模板,' r5 b$ Z4 S1 q) |0 U- \8 ?
里面也有案例。
8 j7 R# m  l- n8 E8 h4 N我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
& f6 g1 ^7 I5 Q5 V) f* S3 A7 f% }% \7 @* F4 q2 ~
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
9 y; B8 N' a7 h# |: b/ {+ p$ B: g4 v- z+ {  X# @7 h
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
3 g0 m, l4 m8 a: w: g! U这是AGV_putin中arrive的method。
" ~. `6 B& Q  K2 J# }" ]) X" P! N4 B: [0 t0 A+ n
当到达物料速度越高时,这个报警更多,
' n  M. W" f% z& H: N2 G
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-23 15:54 , Processed in 0.021892 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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