设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9524|回复: 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'" O- B, ~$ o' Q( w
*/
5 O1 w6 I4 D1 o. Y& \8 M9 \& Dis* B, E3 `) c, z0 ?
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# p7 z0 O3 s: v7 o6 h2 a( w9 Sdo9 \* [( H% `% b! ?
        Lan := rootfolder.Internal.Tools.AOLlanguage;
$ O( k- K" s* `( }2 d" u) `        if current = @.Destination -- else return
0 e4 l% ^4 W2 n0 ]8 {9 }7 N8 I4 }! r        then
( B* F- {7 {. y+ E                @.Destination := void;% r2 F% O+ \: y- M
                if @.occupied then  b" @! d$ A8 m* z* {! A* |
                        part := @.cont;# J9 I' p; p4 J' G' l# H! G
                        @.transpOrder := void;
3 Z7 p0 }  B( g) v( M" Q7 N                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,4 t2 h+ F# r' F9 S5 l
                                @,root.eventcontroller.simTime);$ h2 ~9 i* H, C2 _& V( a* m4 w7 V, @- c2 f! C
                        @.HasOrder := false;
7 @3 b; U% k/ q                        @.DrivingHome := true;& J7 `1 m# i, a: G7 m( ~
                        rgManager.tryToStartTransOrder;6 |( G: w/ ^6 @5 B* V, ?
                        if @.Destination = void
; ~1 K; P, |& I3 R, h3 V                        then -- no transport order for vehicle @
( p; {. }: T/ i3 [! D2 J2 g$ b                                @.Destination :=% Y7 K: P$ c, U+ P. S9 c
                                rgManager.nearestFreeStation(@,track.~);0 v; J, d$ B' {9 [& G
                                newDirection(@);   1 w/ j$ b: M, L. E# d8 J6 j
                                if @.Destination /= void then1 @, D# V! T- k& K2 J8 j" c
                                        @.Destination.NumReservation :=
% l1 |$ B$ u. `- o                                        @.Destination.NumReservation + 1;! @& c1 v5 s4 I/ C
                                end;, w$ m# u& }% U: b% X6 C& e
                                @.CurrIcon := "drivingHome";
( t1 |' _7 b8 R# a$ v* E                                @.DrivingHome := true;9 A) ~/ ~3 R, }: ]* F8 S4 z
                        end;
/ P" q% @, M8 r& I8 o                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
3 L% |( N3 m3 J! [" o                        part := @.transpOrder;( X% S8 I% F3 Q3 i0 y
                        part.move(@);-- load part
/ i8 B3 o  m* ^. U! W4 n                        @.CurrIcon := "load";
' q- d5 F  k3 |7 J3 u                        GlobalDistObj := part.globDestination;) |* j1 w3 k9 j8 {7 I
                        assignLObj := rgmanager.rgAssignL;
9 ?. I  B; |: ]# r6 M; E                        row := assignLObj.getRowNo(GlobalDistObj);
* ]% }. D5 Z: _9 Y, O                        if Row = -1 then -- since 70
- F+ V( e$ R- M# e2 Q                                if lan=1 then) z! s# y+ e0 _$ A
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
  v8 ?! I8 p1 \, Z$ w                                                to_str("in der Andockstation: \"",?.~.name,"\""));
$ t  h8 F3 G7 C' C! H% P                                else
/ \5 D1 T5 j: d" f! c: d% o                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),$ O% S  T/ E$ m7 }
                                                to_str("in docking station: \"",?.~.name,"\""));                                1 }; L1 i/ F" Y! J2 t- u
                                end;) L; x/ Z$ ]& k4 U2 A6 z4 K
                        else6 v8 z* U/ H9 S; x6 S# P! M' E
                                @.Destination := assignLObj[1,row];
" @; P* V: u  X0 T' r                        end;                        ! K* y9 y; e: r. l
                        newDirection(@);. v' |1 \+ t! C" e
                        @.HasOrder := true;6 f2 F5 m$ T' `) E
                end;
& b% K( X6 \9 c2 l* O" @: D        end;5 q( k, C( j* v) R/ D3 \1 S: t. P8 O1 q
end;        -- of the method$ C! [- y; |, I; A7 a5 L! ~+ A, l
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 4 P! q8 B$ L8 J; f4 v+ _- f
9 ~$ Q& G# U7 E! A/ ~) Y
这是AGV_putin中arrive的method。9 \3 N! ~. L( x) c

5 }3 O1 }! A/ h, U) d! |: ^8 o6 h当到达物料速度越高时,这个报警更多,5 y: i# P! K+ w- U2 M
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
3 E. H; ]$ h, B, p* Z7 {) R7 Y程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?2 t3 ~" |, s" `6 y3 u: }
/ o2 ]' T" M5 F8 o
另外一个小建议,就是move,所有的move都可以这样) [& ]' q2 p  }/ m* T) [
if not move() then debug end+ v; j6 Y; G& U( @
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
) ~+ r* C# q+ v( cplant simulation中的free libraries有AGV模板,2 P+ r" O! D! y9 E1 y' K0 T2 \
里面也有案例。
& {& O' ?  A( R2 f, c2 o$ P0 ~我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。& s' J( A. G, n! ?
7 i* S7 n8 r' g6 C" c
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
4 p6 {6 ~- {, K# Y" g
  O% ]: v$ [% u那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 7 D' d; M3 e6 m$ r* U
这是AGV_putin中arrive的method。
& V* m* m( r+ X  V; b3 B7 }) r4 _# L  Z. O" F" Q
当到达物料速度越高时,这个报警更多,
' X5 m( C8 p& }* c1 ?% e' U
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-8-5 23:07 , Processed in 0.015357 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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