设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5586|回复: 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'
$ n- i8 r2 a) g. r/ u! ?*/
) K, |: Z5 @) j) P4 |8 B$ B6 E; ais, z' }* D6 k. D7 v
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
+ m! s( \  ^* W: E+ Gdo' I0 }& |6 \) d% `- T
        Lan := rootfolder.Internal.Tools.AOLlanguage;! W& p5 d& ~' {
        if current = @.Destination -- else return( C9 W! O& q3 j6 ]
        then
9 t/ ~; _0 P, Z% r4 }8 K8 K1 j                @.Destination := void;
0 c9 K7 N; m& o2 @0 t8 Z1 M: Q                if @.occupied then
2 O1 G7 {  c" R* e                        part := @.cont;: i) A* |3 y5 y/ n2 A3 y
                        @.transpOrder := void;
* U/ }/ v0 u2 _1 u) @4 g! ^1 f  V( R                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,5 @2 j7 C+ S( u+ y) B
                                @,root.eventcontroller.simTime);; L3 R2 H5 ?! T! I
                        @.HasOrder := false;
: `) ]/ M* H- r  X- A  R8 Q% }                        @.DrivingHome := true;
" k  d( B- f% T' ]( g& _4 I% R                        rgManager.tryToStartTransOrder;1 G. t* u: |& _: \
                        if @.Destination = void8 ^5 E4 C9 D/ \9 K9 e
                        then -- no transport order for vehicle @# J' L# j/ m+ L2 V! ]1 k- t
                                @.Destination :=
: ~( }+ L* i5 D& s% H; m3 x9 P7 Z                                rgManager.nearestFreeStation(@,track.~);
; |6 x5 }3 X! g  L8 Q- U2 }: |8 `                                newDirection(@);   
( e2 w0 m& a4 d; W; C3 V                                if @.Destination /= void then- x: g* `: N/ G$ O) M: d1 a
                                        @.Destination.NumReservation :=
( L9 F$ y2 e4 }% J8 i, B                                        @.Destination.NumReservation + 1;. k" S0 K7 n6 G
                                end;# N4 A' A2 u$ E4 ~9 X5 U
                                @.CurrIcon := "drivingHome";
5 u' V7 M( ~& h# I2 S                                @.DrivingHome := true;  w3 G) ?+ G! |9 ?/ M0 K
                        end;
) |# T' H$ N: @8 O" e  I9 ~                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
) {4 R4 x4 {& Y6 Z1 o                        part := @.transpOrder;
& c' ^' X8 N' @+ `1 P                        part.move(@);-- load part
; ?6 }/ D2 j4 X1 M7 q                        @.CurrIcon := "load";
) s' ?1 I5 K/ K% |                        GlobalDistObj := part.globDestination;+ Z+ r' D/ L& m4 j  p3 {1 D5 G
                        assignLObj := rgmanager.rgAssignL;
( X$ q) d2 ^) W. ?0 \                        row := assignLObj.getRowNo(GlobalDistObj);
( A' h4 k2 j8 `# s3 L, a% o                        if Row = -1 then -- since 701 N2 ]3 d6 U- b! L9 K  d
                                if lan=1 then
+ {: C# f8 r$ q  C0 j: P! b5 Y                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
/ Q& t+ i/ B" X* p                                                to_str("in der Andockstation: \"",?.~.name,"\""));
4 y# r  ]' A# V& e2 ~& s/ n2 y                                else
% h) m! r/ c9 c9 ?5 S1 P                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 L/ f8 ]3 }+ i6 b
                                                to_str("in docking station: \"",?.~.name,"\""));                               
& E# z6 J' e2 o, M2 S0 Q                                end;
4 C8 E  Z1 O! o0 W* Z5 e1 T                        else" p4 B0 \% e: e& I0 o# C
                                @.Destination := assignLObj[1,row];
/ y. i* p) y8 S: s# R: |& q8 I. \                        end;                        7 r$ ~9 Y, x" Q
                        newDirection(@);
1 E& F% p! ^3 u" @4 S                        @.HasOrder := true;$ y8 c5 I8 a5 e# m- z7 R" U
                end;% r: X, \, d# ?- Q* {( M- L# T! H
        end;- l% T2 S& L& `6 h. B2 C
end;        -- of the method' Z- T, p# \, @6 l6 K$ t% V
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 ! F: R: @' t& \2 X1 m

# x. d) U: \2 F+ A' f这是AGV_putin中arrive的method。+ }4 f( V% A+ n: ~1 A( \$ F
# i  U7 l& z( c4 H9 N) K% w, y4 S
当到达物料速度越高时,这个报警更多,; Z0 U3 K- }% C3 h
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。2 \! i9 h7 h1 F
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?  o. X& H7 |& d, V+ z2 Q

& P, U5 P% \- }4 `# J3 ?另外一个小建议,就是move,所有的move都可以这样! h( j/ K  T; x- e" a. x7 V2 ^
if not move() then debug end
% R/ H* L! l' Z2 k# N  l" R这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
9 V. E* T- ]2 D# hplant simulation中的free libraries有AGV模板,* t; h- W7 h- F9 ~; h
里面也有案例。
) F6 |1 Q  G  M$ n, ]. `' Z我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
" e' y+ r# p5 A* m+ K
; t1 _; a+ _8 w9 g, S6 ^5 w我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 ! m3 s( H1 g# t0 a( r. k4 |, N
" C& f2 y1 q9 y$ f9 V# `
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 " c) ^6 g: s# v( F& `2 ?
这是AGV_putin中arrive的method。
5 }: G; O" e/ O. V2 ^6 w
; {# i7 h, t# s; w; O当到达物料速度越高时,这个报警更多,

, ~) G1 j- Z$ @( d+ v  u另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-12-7 08:54 , Processed in 0.021048 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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