设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6291|回复: 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'
+ `- M" w# @$ L% m& U4 r8 f7 a9 n*/, ?: B% z& ^- @* m
is
$ L( T6 m) q. r$ I/ S! }        part, GlobalDistObj, assignLObj:object;row,Lan:integer;: `3 w8 {" u! A8 R5 i. O8 X
do
: |, R, _. c* g        Lan := rootfolder.Internal.Tools.AOLlanguage;
$ \% T. K7 W  q3 _/ o: `3 J. r        if current = @.Destination -- else return
3 `/ e; s5 L4 U3 c1 u  A1 C4 `        then
# |/ z) x0 Y/ T3 b  P                @.Destination := void;5 \6 S& |. F, V* X
                if @.occupied then- z1 z! z3 Z. j% A
                        part := @.cont;
$ z  `+ {7 G% e' c* i                        @.transpOrder := void;; ~6 [3 m2 N& }8 R$ i! s, i
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
" S0 p5 E$ I' C% n2 A6 s                                @,root.eventcontroller.simTime);  {- D0 R4 r5 @$ l$ [: {+ i
                        @.HasOrder := false;
3 O5 P' V+ v% U" p                        @.DrivingHome := true;
  h- V7 x) \- B: r3 u  D$ L/ C                        rgManager.tryToStartTransOrder;9 G; S8 V; m9 t+ h/ U/ m, {; [
                        if @.Destination = void
$ S' m, K# g* D0 V5 ]+ A. S" \. i                        then -- no transport order for vehicle @5 W0 f8 k( U4 j' ]5 W5 r7 l" e
                                @.Destination :=
8 }$ V& `6 W& d- y% _                                rgManager.nearestFreeStation(@,track.~);
3 ?+ H8 X( Q* ]/ Z1 N                                newDirection(@);   
2 D! B9 G$ N9 a* i2 g3 \; i                                if @.Destination /= void then
+ N9 V! D% q# X, L0 ~+ }. A; U+ E                                        @.Destination.NumReservation :=
. y* u  B+ E/ c8 }4 D, }/ U                                        @.Destination.NumReservation + 1;& T4 g* k* G' X( H; F8 O$ W7 v
                                end;  r' f* c! J3 E+ m0 m7 A6 [. n
                                @.CurrIcon := "drivingHome";0 \) S9 e3 A' V' G4 w4 M" D, y( C" p
                                @.DrivingHome := true;: B4 ?& y* G" \
                        end;0 v+ z1 e" E1 s4 c! I1 k. q, y; L
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station/ }( W* @2 i1 {& ]
                        part := @.transpOrder;
" X- ?/ A3 c6 v. l                        part.move(@);-- load part* j. G# s: b! i+ f! w4 p. G8 ]4 j! k
                        @.CurrIcon := "load";
) P( E! @9 [. l4 j7 l                        GlobalDistObj := part.globDestination;
5 h( T7 C3 O0 p; p                        assignLObj := rgmanager.rgAssignL;
3 d6 w7 ?7 Q' g  {) n                        row := assignLObj.getRowNo(GlobalDistObj);
7 i; S& a) |+ t3 D: e7 f                        if Row = -1 then -- since 70
. v# V) {. v1 c+ a5 C- K. C                                if lan=1 then  x( k: U( W0 A+ G9 q8 ]6 Z8 A% }
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
4 `3 r" J$ f5 V; {7 y. R8 r" \                                                to_str("in der Andockstation: \"",?.~.name,"\""));, J% |. X0 [: z) c4 E+ c7 I7 V0 F* n4 I
                                else! s, O5 D4 D$ Q' C( o, s3 z' U
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. I! G9 c+ d  l" y
                                                to_str("in docking station: \"",?.~.name,"\""));                               
# f. k5 {; T( c2 p7 B, ^                                end;, Q* w1 [8 H) z* ?
                        else
3 R+ W1 w; @/ V5 \0 N, ~                                @.Destination := assignLObj[1,row];7 i: U- N3 j1 c
                        end;                       
: x  ]0 T! e0 o, L0 V$ P4 B% l4 g                        newDirection(@);) A7 o- |1 }. S0 G
                        @.HasOrder := true;
( d3 }$ J/ b# B                end;; a# M" z3 i5 I$ Z" I
        end;  h8 r# G# |; v2 P: _
end;        -- of the method
4 i$ q4 W2 t2 t7 j
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑   Q$ J3 ]% f: |5 g* b+ {, R2 n
, y3 d. ?5 C% S. n
这是AGV_putin中arrive的method。% _# C& ~6 w+ K. F6 c- S

+ ?0 ^+ e7 ^; r1 w当到达物料速度越高时,这个报警更多,
: l  V6 M8 Q5 z1 Y$ K可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
+ X- E/ b* ?2 ~! u程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
$ c1 ?" e2 l: J& L$ y" Y! T4 {  C+ @  {" w6 X4 U8 C0 [! K
另外一个小建议,就是move,所有的move都可以这样
# R  W* \. J! r9 G8 u1 e7 t3 |if not move() then debug end
, u/ }/ F1 m' n5 {* ?% \9 _这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
, {- A. Y" J5 C; Z2 l; l" ^plant simulation中的free libraries有AGV模板,* l. P: S  v0 K3 a1 l
里面也有案例。+ |% d. K: I0 G! |/ V! W
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
& O% t) ^7 U1 X' Q2 ]0 Y# B$ J. c! r! t/ G9 E
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
6 V$ n  I! U5 |, v* H4 F' Q
: ]9 n0 q$ R$ Y( L! K* r那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 . a; H* m( Y4 x
这是AGV_putin中arrive的method。
4 l; B7 g9 Z, V# j. k! d* R/ V% [) [5 \3 E
当到达物料速度越高时,这个报警更多,
7 C6 d, z' ^9 y* U+ c' u& `1 h% b
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-1-29 01:44 , Processed in 0.021262 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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