设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8960|回复: 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'
' R5 S4 L! c( [3 Z% Z9 ^$ o*/
: r4 y; j+ \5 }9 q2 b/ Xis) x# k5 H: Y( v/ e6 L
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;" [8 ^; r& ]! ]+ P3 P. G
do
; s& L$ g$ p+ H/ S# i) f        Lan := rootfolder.Internal.Tools.AOLlanguage;
2 n9 `& o, P7 E' m' X: \, D        if current = @.Destination -- else return* B# w: O- O% }4 q
        then: B+ p* A1 `( Q" j8 w
                @.Destination := void;
  t0 R  D& D/ }6 A( w% _& @2 Y8 M                if @.occupied then' F+ O7 P# B. d2 C+ I
                        part := @.cont;
+ B8 q. @1 {: I# w                        @.transpOrder := void;0 c4 G2 d; K. [1 p- F) u$ Z
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
7 e& ^; G  z2 w& e! O: ?                                @,root.eventcontroller.simTime);
( m' b  `) ]+ a5 ?: t                        @.HasOrder := false;
$ {7 H3 ]% x4 u' L- J/ h4 O                        @.DrivingHome := true;
2 s4 M! H/ |) y( `: C/ ~& J                        rgManager.tryToStartTransOrder;" P0 S# m  I, `. ~. @
                        if @.Destination = void
; q6 S8 u& u; e' P                        then -- no transport order for vehicle @* o) c2 G$ t* A5 G' K8 X
                                @.Destination :=
$ I, A0 ?; y; q6 u                                rgManager.nearestFreeStation(@,track.~);: _& z4 X7 V+ s0 e. _, c3 `3 f$ O
                                newDirection(@);   , S( e) e( e8 m: N' g
                                if @.Destination /= void then
; \1 C: V) W$ X                                        @.Destination.NumReservation :=
# m* Z6 `: h  A                                        @.Destination.NumReservation + 1;# m) y9 r! y1 c, g' R4 C
                                end;
+ Q) b  o' J. s% e2 X                                @.CurrIcon := "drivingHome";
# ?/ p. [) S3 a  F                                @.DrivingHome := true;* v5 _1 d/ p+ e. E
                        end;
7 j% r  M: S6 \7 y2 f. T4 a5 ?                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
3 \7 ~1 _6 K( m& `* s/ d% A- J* K                        part := @.transpOrder;
; t8 C0 P3 u6 x8 |, |                        part.move(@);-- load part$ o6 O. b+ E, V, H
                        @.CurrIcon := "load";
4 R/ f2 a5 g& G1 N( r0 O) F& |/ Y! s                        GlobalDistObj := part.globDestination;9 ~% ]% b2 h3 s- d# h0 _
                        assignLObj := rgmanager.rgAssignL;1 E1 `9 O2 l, L6 C: H
                        row := assignLObj.getRowNo(GlobalDistObj);
0 X7 d6 L6 z0 \  \                        if Row = -1 then -- since 70
$ H3 u' ?7 \& }4 A# y                                if lan=1 then
* J8 N3 m6 t. s1 O4 l# A2 R" }                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),9 l: W4 u1 p4 m3 N; d7 b5 w9 c
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
' c! g3 p" K2 E: A3 h' x                                else9 a2 v% @/ q# t" E9 a/ \
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),- X% ]8 Z; E, A
                                                to_str("in docking station: \"",?.~.name,"\""));                               
% }7 S- s$ L6 x7 v; u7 J  I                                end;
; i  {# ]: a: B" c* h                        else
* b: A% s( f5 z3 i1 w! R  _                                @.Destination := assignLObj[1,row];
/ k; R* L6 D" H6 y                        end;                          w3 ?" T. }+ d7 V! @/ ]
                        newDirection(@);' y  |9 i+ N% e: ^1 {! I# @7 F
                        @.HasOrder := true;% V. Q# |8 z: M
                end;5 i! _9 V3 [: S
        end;
& L/ H" ?/ w/ Q7 j6 mend;        -- of the method
; |" ]- r6 R! ?. ~; O/ O6 E
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 $ D( P- ?: V6 Q5 X* R7 r
, Q! N9 l; d+ b
这是AGV_putin中arrive的method。* k7 ~* B1 C% x. G- Q

7 \" K2 D# j: T# J' X当到达物料速度越高时,这个报警更多,
; r$ p/ x9 Q. V3 ?0 _; T2 S可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
& D/ `1 z- W! q8 m' B$ a. Z程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?% y% w: o" t, m$ _9 O
  ?* F1 k5 I; @# Y% q4 N
另外一个小建议,就是move,所有的move都可以这样
; ^9 X! |- l% w, t( ]if not move() then debug end
4 I+ y" s/ z! k  Y9 }这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
4 z0 O3 K. C/ e. N3 Z* vplant simulation中的free libraries有AGV模板,8 O3 h! ~$ E6 D* o2 q$ e( i
里面也有案例。
5 Z- F0 h/ \3 h. C7 l% x1 q  x我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。% i. ~5 h% X9 L" P

0 u- c0 V2 J. d; X6 y( ^, M7 B我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
- y. \" u. u$ K$ M3 m0 b( v
- N. A. R( B) W那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 : Q8 c2 r3 `4 ~5 }8 |0 }& o8 H
这是AGV_putin中arrive的method。- {) [) ?/ V4 i/ @% n
. w- e1 t9 u* E3 J8 |7 b: L3 y  N
当到达物料速度越高时,这个报警更多,

5 ?& \) c0 R7 |; L% I7 p另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-6 14:31 , Processed in 0.017731 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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