设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 10046|回复: 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'
; i: ]0 i' i  F3 h: `9 N# n) J*/$ k, \0 L$ x( M2 y9 T
is- w& t1 o- k* P# N, i: m* V2 C8 ]
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
" ~+ c  V5 W) Z; N, |# ldo
1 f& S: o! s' B. q* u        Lan := rootfolder.Internal.Tools.AOLlanguage;
. {1 s* _+ ?! |$ @% R, U5 v0 ?        if current = @.Destination -- else return& u8 B8 ]* C  J+ Q0 ^4 C2 p3 k( M) p
        then4 r. ]9 m- t  y$ i/ T& {2 b
                @.Destination := void;0 L/ W( ?6 E7 V1 D! C
                if @.occupied then
2 p6 ~/ L& Z3 u8 y1 }, N6 m                        part := @.cont;
. E( O  V( j/ t# E/ }& `, h                        @.transpOrder := void;0 T) @' m& k" }2 C
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,5 x8 k4 {- i, E+ D8 [5 u/ f2 K
                                @,root.eventcontroller.simTime);, [% w' M- p: X+ K& ~7 C; F6 }
                        @.HasOrder := false;
' R! b, d3 f, A& I8 g$ t: Q. z                        @.DrivingHome := true;
7 U( h) x& x4 h% G                        rgManager.tryToStartTransOrder;: e1 D- V* d# l
                        if @.Destination = void
% `: G2 I, D9 N+ h! ~& n                        then -- no transport order for vehicle @
3 F* A' q- j9 T: e                                @.Destination :=
! }  l/ D: ]0 y" z: a8 S                                rgManager.nearestFreeStation(@,track.~);+ Z; ~3 e) f8 I1 q# F4 |
                                newDirection(@);   
8 y; x, f! n+ A1 _                                if @.Destination /= void then1 f* _7 I6 K9 G
                                        @.Destination.NumReservation :=
: W# o; b& q/ T7 m                                        @.Destination.NumReservation + 1;, s% j) r4 R7 e* L5 y
                                end;, _- K2 |5 B) V3 {9 N' @
                                @.CurrIcon := "drivingHome";* T/ [) o. f6 p+ x0 H7 I
                                @.DrivingHome := true;9 x5 l) ~/ I) [" k- t7 w. u4 z0 o
                        end;
. C6 X+ }) j1 k& ~" f, z' m                else -- the vehicle @ is empty, both vehicle and part are in the same dock station7 t- ~+ u. @4 M
                        part := @.transpOrder;/ W/ \9 T1 r- {2 R8 i2 X- u( T/ `
                        part.move(@);-- load part
1 H- h' Q2 T! [' v: e                        @.CurrIcon := "load";- ~9 O1 P1 O6 i0 Q3 m
                        GlobalDistObj := part.globDestination;
) W6 x5 m# q' M" B2 m                        assignLObj := rgmanager.rgAssignL;
5 W4 s2 {! e5 d0 X6 |                        row := assignLObj.getRowNo(GlobalDistObj);
* m/ K- [# d% H9 n                        if Row = -1 then -- since 704 d/ T! {; p. J/ F: o# ^
                                if lan=1 then
4 T- p2 P" P0 h1 J  l2 ]+ m                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& H: m9 M% F, w) b: `) j+ e: M4 L1 F
                                                to_str("in der Andockstation: \"",?.~.name,"\""));+ E- e7 Q$ c5 c' y: y  K
                                else
2 c0 S, I* C& d. q4 {  T. ^                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 V( m7 m# N1 z- r5 |( r# A6 n                                                to_str("in docking station: \"",?.~.name,"\""));                                # ?9 a1 T( W2 K
                                end;
  s( {) h& D. J                        else( ^, ~4 C& ^+ Z: }2 W+ l: h
                                @.Destination := assignLObj[1,row];9 k. V2 {( t1 e$ @" Y4 J' u) l
                        end;                        : o  S. c" E8 c/ E
                        newDirection(@);
4 |, A4 Z: F. D( U# I$ U                        @.HasOrder := true;
8 a; \' h# A# h# Z, i* }) b                end;
; _  E. b; [" Y4 e( \9 n        end;4 g; a+ ?& X. u6 y
end;        -- of the method
6 X& d5 ]. C4 g7 L# f- P
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
0 H4 q# a) C/ S% s" _7 X3 _. `0 c5 e
这是AGV_putin中arrive的method。
" @% Z+ x, o+ T$ X, o) y! m
9 w  e+ r6 Q# F; Z0 m* }( h当到达物料速度越高时,这个报警更多,
& R2 K$ n, I" G2 t  s% }3 a8 D+ _8 w可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。8 ]; D! n" x2 [$ F% C/ a7 P
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?; U& O6 x2 I8 F' S7 i: j" [! S
% u$ J* r( W8 V  P; T, M
另外一个小建议,就是move,所有的move都可以这样- p- y$ `2 S( A. r3 Q
if not move() then debug end
9 a/ \& y, l& w/ m7 X这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。9 R8 n7 f8 X& ^( A' j
plant simulation中的free libraries有AGV模板,
6 e8 S2 D1 d& ]4 j: k9 A* r. n+ p里面也有案例。1 I, t* ?: p7 N* E: F+ }3 M" |
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。" g4 ]  s9 e5 P
+ J  X9 h6 G6 k1 q: Y2 n& l
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
0 C* w' x+ V/ j2 d% J3 V8 p3 t
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ' ?5 j: @; F) y7 T2 y
这是AGV_putin中arrive的method。
& X4 O9 L3 L: k& Y% @1 G& G+ r0 ?* t: o3 \/ [% F( d8 ~
当到达物料速度越高时,这个报警更多,

# @! p/ p) l3 e3 s$ ^另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-9-10 00:34 , Processed in 0.018351 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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