设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7159|回复: 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', y; U# n* N: R& W+ U5 Q: B/ r
*/
( |) F9 y( R/ a6 sis
; F6 ^; F7 D5 {+ X1 t- S7 M6 e        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
  I6 \0 m$ c0 V/ @( ?0 wdo3 M6 K7 p! m, V3 G3 n
        Lan := rootfolder.Internal.Tools.AOLlanguage;
1 \/ Q# f$ N7 x+ d4 i4 O9 b        if current = @.Destination -- else return
1 D+ D' j9 B6 l) _. K3 @& n        then
) `6 Z/ C, q7 E  H' d& ^2 J. B                @.Destination := void;$ i5 E" v# h. e
                if @.occupied then4 B6 S: K: H8 Q5 b6 S
                        part := @.cont;6 j3 \+ B2 ]! g7 w/ f  a
                        @.transpOrder := void;$ a; q3 Y$ C( `: a5 U; K
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
& q, L) X. N8 b5 ^8 C2 t( F$ S9 e                                @,root.eventcontroller.simTime);  b8 p+ k' }- v9 C% s: I
                        @.HasOrder := false;0 w, u5 v6 m% F: c$ q( I
                        @.DrivingHome := true;" K" [, E% a2 `3 ]& H1 b: E! e. z
                        rgManager.tryToStartTransOrder;
4 N+ m% k* ?7 `4 ~# a( ]: n& X/ ?                        if @.Destination = void
; I' F( _4 F8 w; U# Y. W& `                        then -- no transport order for vehicle @! b* X5 R8 a! U* q
                                @.Destination :=
1 L& E) i, u: ~# w: m- Y                                rgManager.nearestFreeStation(@,track.~);
, J! J( t2 \! P1 C6 C/ j6 }' p                                newDirection(@);   
; ?3 b( Z! Y6 a% D' y$ t                                if @.Destination /= void then
2 ?. k9 L6 V4 m" S+ i1 t" p8 ?) i! w                                        @.Destination.NumReservation :=7 f0 }* v7 g) O6 S! Z
                                        @.Destination.NumReservation + 1;6 G1 Z5 O9 h4 t$ `
                                end;
% F+ [3 `( s' P5 W                                @.CurrIcon := "drivingHome";; t, L: D& s1 p/ ?# Y# w
                                @.DrivingHome := true;3 K6 Y) z) B1 m) E
                        end;
3 v0 l5 b0 {( R5 {                else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 F- T! D. ?. I  |* C
                        part := @.transpOrder;
1 B; t: k9 [. A, H$ T                        part.move(@);-- load part
+ L1 a2 @1 U. r9 X% F+ l                        @.CurrIcon := "load";
# E' L3 ]' a- P' i. k- T                        GlobalDistObj := part.globDestination;
1 p- H/ a( t# ]9 D! s0 s                        assignLObj := rgmanager.rgAssignL;
2 h2 `5 f& R% V0 r, k( F+ @) |                        row := assignLObj.getRowNo(GlobalDistObj);& F+ c, K  J; w# Y0 }1 \2 j: b
                        if Row = -1 then -- since 70
# Z: B0 |5 @& v( G! |                                if lan=1 then8 {2 Z6 ]0 ]. B* J- v' ?  I
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
6 T4 O2 Q. {7 t0 M                                                to_str("in der Andockstation: \"",?.~.name,"\""));
, Z# K3 [  e+ v9 x: w                                else  Y& U2 K8 I( V% C& _; c; W* \
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),& e( R& v' u9 M+ p5 {# w
                                                to_str("in docking station: \"",?.~.name,"\""));                                , y$ q* v! |2 J- K
                                end;
" x' O" a+ ]. a                        else
5 p" X4 U3 ^+ _  I. V1 w, H$ x                                @.Destination := assignLObj[1,row];6 h+ F9 a  M. E" {* Z
                        end;                       
2 J; A. J3 H( u% c                        newDirection(@);1 l) }$ N8 y8 z& J/ a( ~% r
                        @.HasOrder := true;
3 O( A- p5 f; R6 |# g7 Q0 ?                end;
7 N$ d+ _) \- u" @  q, f/ N        end;
. u/ o) X4 `# ]end;        -- of the method9 }' c! N* J. g2 Z0 ~4 q/ x" j- k
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 ) x/ _* V5 F1 j6 E9 v

: h: f$ w$ a+ H. b这是AGV_putin中arrive的method。
6 W3 D, K. u" A/ _3 ^6 t8 {, \2 }- A) r! e+ B
当到达物料速度越高时,这个报警更多,
3 y% S8 S- P1 @* V5 W/ n; s可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。( `7 q: \9 @' q( B$ }. w4 ]
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
6 W2 e9 i+ f; X& l8 J$ d, u2 _
5 h, Q) _; p. a* y. x0 y另外一个小建议,就是move,所有的move都可以这样- N/ X( L% A( X0 s6 }
if not move() then debug end
( l. d+ p7 Z  T- G) c5 i. E这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
# P+ w8 a7 A1 kplant simulation中的free libraries有AGV模板,
7 p" ?; n4 a- {5 S* x5 k里面也有案例。
4 F" ^1 k) o$ X  E) m" n4 o! l我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。: w9 h$ g/ u: r  G3 d

, c" n4 [* L# W4 R4 F我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
6 Q: Q9 s" V$ N5 @0 v1 g; K3 r' J5 v
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
" q0 t6 u! d8 ~! O这是AGV_putin中arrive的method。1 D) `: F. [2 I2 h# n

5 t( S; J, |5 H: c7 k( r* p当到达物料速度越高时,这个报警更多,

5 B( \+ P$ h- x9 V& _& P/ F  T. p另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-23 04:00 , Processed in 0.019406 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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