设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9566|回复: 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'
. O7 y' I) y) x6 H; h3 \5 o*/
  ?$ [8 I7 u. b3 {+ Ois5 y0 M6 @4 _" y2 N  m% l
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# Z/ g+ H% J5 ]' K6 s) Ydo2 d! Z5 X; Q* e; X  l6 L" j4 \: I
        Lan := rootfolder.Internal.Tools.AOLlanguage;
4 U5 W2 T) _+ _1 I& y0 ~/ U4 x        if current = @.Destination -- else return
  `0 i1 j0 x& |& F: F! I        then3 ]* _# s% D. B
                @.Destination := void;, E$ _8 X8 Y# O* g8 E: }
                if @.occupied then
& P* r# x, C" E& }7 w9 b                        part := @.cont;
9 |, E! ~1 i( {" x! ^2 _                        @.transpOrder := void;
( S* I( E: I8 p* @$ f! |( b                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 P, k( c, X9 c  L8 l. Q
                                @,root.eventcontroller.simTime);/ b- s( {4 `! C" |
                        @.HasOrder := false;
4 T8 `# Y! h3 z; O5 X. W                        @.DrivingHome := true;+ t9 t, _* P, F: D3 g% M
                        rgManager.tryToStartTransOrder;
& S& r* M2 p# a( e8 t/ Q                        if @.Destination = void  _1 ^1 {$ _, ?  T1 R6 t
                        then -- no transport order for vehicle @: R5 \" r) K7 _- P. b, D6 Q
                                @.Destination :=4 o. O! `  D: M
                                rgManager.nearestFreeStation(@,track.~);6 B7 i7 z- d: I, b' o
                                newDirection(@);   $ o# O6 ^' H" ^* X# P
                                if @.Destination /= void then% v" c- L$ V9 K1 @; W: R2 Y
                                        @.Destination.NumReservation :=4 p4 M+ w- f; N, C9 T! |" Z
                                        @.Destination.NumReservation + 1;
! @6 t1 r+ [1 D! U; ?& L5 b% u                                end;
( c8 L5 m: X- h( p( p# [0 g                                @.CurrIcon := "drivingHome";  w3 D9 P, p6 m  J. I2 E
                                @.DrivingHome := true;
0 m0 R1 K/ X3 o$ M& H+ a                        end;
- K6 r* Q5 w  z- E                else -- the vehicle @ is empty, both vehicle and part are in the same dock station/ `! p! ]/ h* L0 e# [5 [. T; v; [1 X
                        part := @.transpOrder;
( `2 Z3 B7 h& S; K5 Y. i                        part.move(@);-- load part
3 Z$ X4 e  S6 v2 y9 R" B% O$ q                        @.CurrIcon := "load";
4 L% T: |' w; R* ?9 @0 n                        GlobalDistObj := part.globDestination;
, N7 H, E5 D' R  c6 w                        assignLObj := rgmanager.rgAssignL;9 Q6 Z$ h; R  h6 |5 j
                        row := assignLObj.getRowNo(GlobalDistObj);6 y, T2 s( K- V7 @  f6 ?
                        if Row = -1 then -- since 70
; X2 K) Y# P( H3 y# R" _! V                                if lan=1 then
/ j% u, G6 Q9 T; m. h                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
4 J# d5 Y! B) P: F* s, z5 N1 E4 R                                                to_str("in der Andockstation: \"",?.~.name,"\""));
" s) ?% D( Y# o1 n' O/ }* Q9 F                                else' ]0 E# x" K% [
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 ]0 j: i2 k0 |0 \7 _. r) J                                                to_str("in docking station: \"",?.~.name,"\""));                                / ~( \% g# t+ O( b% [+ P
                                end;  u" E3 @' B+ S8 q0 @, W) J
                        else
: n3 X/ |- `* P; G) }- @% f; _                                @.Destination := assignLObj[1,row];
( P& ?0 h2 a( ?& y                        end;                        & N$ L/ }" h/ T$ K5 a& Q) D) A
                        newDirection(@);# Y8 X3 }% r* N7 S* c+ d; W$ h
                        @.HasOrder := true;
1 b& F8 w% Q" W9 A: O: ~5 R+ J                end;
% R! F: ^. B8 W+ L- Q3 s        end;  |) O! d0 C5 y2 j) U% K8 O3 X: Y( @
end;        -- of the method
* p& e; d/ Z* J  l4 s$ x9 h
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 3 f) \# G( Z: \% u( D" j

3 K5 B$ T' [, q这是AGV_putin中arrive的method。
% n# U3 V$ g3 @9 \, Y, [
6 z& D9 P+ l+ y8 e" i当到达物料速度越高时,这个报警更多,
2 s) ?; y) Z) l# q3 F, `2 r可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
9 x! v: ^- B( R9 d* T2 T: Y程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
3 k& E3 w4 ?5 L
8 {. y6 h8 ~: B/ ?# P8 Z/ ^另外一个小建议,就是move,所有的move都可以这样6 A8 q$ }4 l. u" ?& }
if not move() then debug end
/ R: t( I  e4 S' t" f. t( a这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。+ Z$ Q9 G& T  r2 M
plant simulation中的free libraries有AGV模板,
8 m. Q6 ~/ D8 S9 ]* W2 {& r里面也有案例。5 P+ k+ x5 q3 c) z$ {
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
. x2 T  c+ [7 S2 T' \3 p! A$ s: Q4 O+ r! f
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 9 d  q3 J/ U& |3 [+ f. _( {

% M  N: V; U9 E2 t% ^  o% ~' ?4 w那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
6 D( i: L% I+ F, [这是AGV_putin中arrive的method。
; ?4 K8 S7 u5 ]4 M4 l/ }# ]6 c
, F8 D3 q! F& o" g当到达物料速度越高时,这个报警更多,

7 ?! l: e2 U+ n) K3 Z另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-8-8 13:03 , Processed in 0.019383 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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