设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8478|回复: 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( s- E) J9 E7 g* V2 o*/
3 t$ D5 t; i. {% @: Nis5 Y. L' j* i8 ^: T' s
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
( V2 p: U4 i0 v9 l& E8 W% v1 q1 Gdo! h( G+ m3 {  s1 y
        Lan := rootfolder.Internal.Tools.AOLlanguage;5 d, h" X& _9 K) p4 N. o: |
        if current = @.Destination -- else return+ p9 d6 R+ \6 w: a3 L# q: j
        then
1 b, I* U* l$ L# p                @.Destination := void;
( Z/ t  L8 t9 X- r, N7 j                if @.occupied then
9 Q& I) t. Y$ r+ p* `" F5 b* Y                        part := @.cont;
1 U+ k2 e6 @8 l' F8 V& k- y                        @.transpOrder := void;! o; b8 `, r6 E. Y  J6 y! W1 X* h
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
1 ^# g- }+ M. j6 `" j2 |                                @,root.eventcontroller.simTime);
" `2 T  Z1 @( n                        @.HasOrder := false;- W7 Y. X( J+ d1 s) x# i6 v! x, l
                        @.DrivingHome := true;: U' Z) b$ c7 U8 }' a9 `5 [7 o
                        rgManager.tryToStartTransOrder;
. a5 }  T1 I) M( o* I, S                        if @.Destination = void
7 L6 ]* }+ H! b4 t: V+ T/ G0 ]/ ~8 V% R                        then -- no transport order for vehicle @5 i4 b6 H, h+ g  M5 N8 c) S% R
                                @.Destination :=
5 e# P- e0 ~  @3 y0 o6 _$ y                                rgManager.nearestFreeStation(@,track.~);
, s% S! c& q$ j& ?' M                                newDirection(@);   
$ k  f5 q8 s% j- }  f2 }                                if @.Destination /= void then9 g( h. @5 X- Q
                                        @.Destination.NumReservation :=
0 w6 r7 v1 H. ]" x9 B) z; W                                        @.Destination.NumReservation + 1;
/ H2 Y' o0 O" L                                end;
; X) ?, Z# Y# U                                @.CurrIcon := "drivingHome";
' c$ i+ `$ h/ m& ]5 l1 h% J                                @.DrivingHome := true;
4 K9 Z' E" w6 S2 M' Z3 r- ?, |                        end;, ?7 }/ O, i, M* V/ b
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 k1 L1 z$ K) F0 x4 b
                        part := @.transpOrder;( \( |' J( L7 t3 D" M; h6 j& h; E
                        part.move(@);-- load part
9 o0 ]7 f7 ]% x. e3 ^                        @.CurrIcon := "load";
1 m# S+ T3 Q2 a( o5 B1 F6 g6 Z" w                        GlobalDistObj := part.globDestination;2 P$ S/ ~) N1 e- S$ a) h  S
                        assignLObj := rgmanager.rgAssignL;( n4 j/ H: D! ]1 t: D% e
                        row := assignLObj.getRowNo(GlobalDistObj);8 f& a9 B& ?& s. F
                        if Row = -1 then -- since 70
& A9 ^( \/ |/ }' ]! {+ L( j                                if lan=1 then
; |- Z: P7 u* e) i7 b  h                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: L' K2 L  a* Y4 I& o                                                to_str("in der Andockstation: \"",?.~.name,"\""));
: m/ o2 [$ O9 W                                else
3 P9 r' H9 G$ c# R( m                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
% _3 M+ k2 M# {) |* N                                                to_str("in docking station: \"",?.~.name,"\""));                               
1 R' l1 @" H& f+ d' \                                end;
7 ^# |; f$ W" j/ ^8 O                        else
1 T! f* z5 u8 I                                @.Destination := assignLObj[1,row];! R  A, @+ ~% R% d& G) [
                        end;                       
8 k0 a' W6 c! z' D4 l- D                        newDirection(@);
' A6 T$ Z) C% |8 ^                        @.HasOrder := true;$ H$ E' p( g" h
                end;
1 h# n# `0 P/ [5 X        end;3 a+ `0 G; |' M7 W
end;        -- of the method
7 e* M# W& d# h# K+ I' Y' G6 ~1 ?( r
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 - I' G5 o2 M. k
, U/ S  R& D7 Y9 K' A
这是AGV_putin中arrive的method。
1 t3 ?: N# K0 I
1 F$ {: w$ e* F0 x6 o% b2 a, r当到达物料速度越高时,这个报警更多,% i  t" ~% i! o0 `9 |
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。" t: e! U9 w: C8 Y" g, K
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?) z9 {( c2 L8 ~7 O' w6 c: o3 A
0 _! A) k1 M' H( c; y# n! w: r
另外一个小建议,就是move,所有的move都可以这样6 ?7 r. ~: Z8 z! h- C4 n' o( @6 S
if not move() then debug end4 h5 k+ R4 x: b+ k& G
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。. ~3 i5 O8 `8 \$ Q' ~5 I
plant simulation中的free libraries有AGV模板,9 B+ Z% w- h% c+ t- O/ f! T
里面也有案例。
  i4 x$ J  L: f我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
: {* Q/ i  {% P) X* z
! s& a  P9 `" J# K: R1 b) W我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
+ j7 w# S  B3 v/ l
7 X/ x+ w# u1 X$ g那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 * E  _0 q, o5 b0 i1 x9 r+ k
这是AGV_putin中arrive的method。
! @4 D, g0 ^  u' J" [8 |% ?. Y- h9 {! g
当到达物料速度越高时,这个报警更多,
4 [7 C7 _' `# t7 k  v! K8 X
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-6 12:16 , Processed in 0.017226 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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