设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7056|回复: 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'
$ B1 _! `; ]# {*/( w0 G; d' _- J* Z/ u
is
7 H1 K" h+ D1 g( O        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ p' a, {7 x" v+ J/ M4 r2 i1 `2 B* d0 |do
' z; J6 i8 E2 J/ c2 o/ a8 m* m        Lan := rootfolder.Internal.Tools.AOLlanguage;" J: _) {. @: h: q. {0 o- g
        if current = @.Destination -- else return4 }( o8 R4 J# \7 o- }4 ^
        then) x* [& s* R/ p; E3 _) j; [6 J, X
                @.Destination := void;  J  n+ B7 s) `# b0 w8 {
                if @.occupied then
- Y7 F, W/ J9 ^7 a! D: F* C; p                        part := @.cont;9 U% X) x! E, U5 I  {, J
                        @.transpOrder := void;
( a2 f5 ~7 e. u9 y% q                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
, H4 ?# z7 P% q                                @,root.eventcontroller.simTime);  d5 d% d! R! W
                        @.HasOrder := false;. E& Q5 E( i& _: b3 M8 p' W, e6 }
                        @.DrivingHome := true;/ P7 z) b$ G- }& l9 q
                        rgManager.tryToStartTransOrder;0 u9 c$ s% y- I( J8 Q, ^
                        if @.Destination = void
' C6 u, t1 H' g                        then -- no transport order for vehicle @
: _, C9 c% P, g                                @.Destination :=8 K2 B& `. q! s: d- b( H: j# ]
                                rgManager.nearestFreeStation(@,track.~);/ Y! ?6 ]) {. F
                                newDirection(@);     y  r% a0 \) }6 p$ E4 _
                                if @.Destination /= void then
! H- ^+ o: k$ s, |; A$ [! k5 {5 p                                        @.Destination.NumReservation :=% G+ h6 @$ Q. `8 F( V4 [3 h$ a2 @
                                        @.Destination.NumReservation + 1;
. L: P) r! o% r$ N5 ?: {" Y                                end;, e, H  u6 [0 p8 M2 F6 r" S
                                @.CurrIcon := "drivingHome";
% [9 h8 z& W3 S$ I! L5 L' t1 Q                                @.DrivingHome := true;
( _, q" c* u6 L$ G& U( i9 {9 P& s                        end;# w, q, R$ a% x/ ]5 \4 N! p
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. Y7 h2 ^( p+ D- M                        part := @.transpOrder;
" s( I/ t0 k5 d5 U8 s9 X' C  C! \                        part.move(@);-- load part& f9 A. g8 _, a! x0 @* q3 ?( [
                        @.CurrIcon := "load";
8 b# R3 H% G. w9 b" D! g$ o                        GlobalDistObj := part.globDestination;
, G; `: B1 \" ^                        assignLObj := rgmanager.rgAssignL;
/ E4 R; o2 `6 S" q8 }- Q                        row := assignLObj.getRowNo(GlobalDistObj);  B& P8 |0 ?. n3 _, z
                        if Row = -1 then -- since 70
' A$ w+ `) a6 P7 B4 R6 J; h                                if lan=1 then* D4 o4 ?' L5 z' p
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),. c1 j9 G9 `- A# y
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
$ q  y" @: [( o) }" j                                else8 A3 n6 u& x1 L2 J4 i9 I
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),4 A& c" g3 f; l$ m+ ^4 K: l1 ^% N) h3 N
                                                to_str("in docking station: \"",?.~.name,"\""));                               
7 j" }: Y3 w3 c/ i0 ]                                end;8 q5 d9 T/ n$ I1 t) o( B" r
                        else2 Y% Y0 [0 \  o3 F& I& P
                                @.Destination := assignLObj[1,row];: L# Y2 X  e2 r1 V& S1 x9 w4 R
                        end;                        9 J$ ]6 d. i) O5 M6 p: s
                        newDirection(@);
& e* K7 Q* H$ h1 d* ], b                        @.HasOrder := true;6 l$ {; V( C* `/ w! n6 V7 ?
                end;
. X4 r: n" {$ i2 X- Q        end;
; q. A+ ~" L3 bend;        -- of the method' l4 |9 u$ t: S/ @( m- `; {  S* \2 c
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 . V3 A7 A- x) \* x" K7 M. R6 n' r/ M! t

7 Y2 b- }: J( _* F2 `* F- _这是AGV_putin中arrive的method。
  O2 F/ W6 L8 x2 Q# Y- A- b) U! ]
当到达物料速度越高时,这个报警更多,
. b( H0 n3 v$ H" X可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。" |1 i6 f) h' a- {* p5 o4 Q! T; Y0 C
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?; i$ _9 H5 r, h/ f/ x0 |. j, u
) m. u* @- {1 t4 E( n5 O0 x1 S
另外一个小建议,就是move,所有的move都可以这样
$ E5 o1 w' r3 }9 K5 p' ]if not move() then debug end
! Z( Z( A$ o& ]' l! A" x这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。8 I3 U4 I+ _1 C. m* G2 N" @
plant simulation中的free libraries有AGV模板,
- C) Y+ Q, r5 \+ Z里面也有案例。
" k' T. t! U9 G% D2 Y- `7 j" c/ ?5 c我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。) `' N. V- T+ x
- U% b* s( o! x6 V7 Y$ k# e. C
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 1 q2 N' ?! O  s+ T
3 m3 b9 \& s1 o7 l, Z6 @
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ( ?( s7 l. m9 K' D4 E
这是AGV_putin中arrive的method。
. G/ U! k+ m( q$ f5 d/ }/ L$ P8 G" {" X! \5 x' L
当到达物料速度越高时,这个报警更多,

6 r- X5 H+ D6 S7 l- `$ s另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-13 23:05 , Processed in 0.018995 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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