设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6530|回复: 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', [# C% a; T- H/ N2 m1 @& P( L& |0 i3 J. b
*/
8 N5 E! l$ n9 Y2 U( q. |is
- s5 I$ _, q$ K8 j" ?        part, GlobalDistObj, assignLObj:object;row,Lan:integer;  G0 [5 r6 J- G9 H; |- d
do. A9 q! n9 E6 T0 o6 N! e
        Lan := rootfolder.Internal.Tools.AOLlanguage;7 U$ z' R/ ?1 M, j! I6 ^7 O
        if current = @.Destination -- else return
2 S/ K  b* K: l1 U. G. p4 |        then3 [$ j1 Z: T3 b( L" T5 @
                @.Destination := void;. E( r. b+ S0 b5 J! g
                if @.occupied then. x3 G4 i! V* \/ i) _3 r1 {, {
                        part := @.cont;0 I4 m! Z/ L9 b9 O# |1 h; X: T
                        @.transpOrder := void;
6 `3 B1 G  W2 e1 L                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
4 |' l  p0 A% k; f) }                                @,root.eventcontroller.simTime);
$ I: o! `, O1 @& K. o5 C                        @.HasOrder := false;
0 A# s, h) T9 }! r2 x# _                        @.DrivingHome := true;
! T( t% X/ ^9 l3 T) y1 M9 N# o                        rgManager.tryToStartTransOrder;
% X  V$ w, b0 E, A                        if @.Destination = void- r8 Y% x3 @- @/ q7 h8 B. e1 \( ~
                        then -- no transport order for vehicle @+ I& f: |+ T0 }* K
                                @.Destination :=
8 u4 Z6 |: s3 i5 n4 |: ?: X                                rgManager.nearestFreeStation(@,track.~);2 s3 ?: T$ v( [9 ]: L
                                newDirection(@);   
. X# a6 N! s0 i$ J7 i                                if @.Destination /= void then
. C" _$ s3 N5 n* ~                                        @.Destination.NumReservation :=3 \. h/ o2 |7 n8 l; f; f9 u
                                        @.Destination.NumReservation + 1;1 U$ h9 V* a% K; r& Y
                                end;! L4 }3 W8 u# H: k' |$ a# e$ i
                                @.CurrIcon := "drivingHome";
" J& e* @7 a" e4 X0 X/ _2 P                                @.DrivingHome := true;& I6 a: }3 Q; w4 k; d& K
                        end;* \  r3 J, m6 g2 V
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
+ }5 w, {8 k# m" ~2 F  _, L# C0 y                        part := @.transpOrder;( P* k+ a; K9 n( x6 K
                        part.move(@);-- load part; z& ~! u% E/ q
                        @.CurrIcon := "load";9 a1 G  }4 P  T
                        GlobalDistObj := part.globDestination;
' k  [& e( J6 ^: M  _' R# Z6 w, r                        assignLObj := rgmanager.rgAssignL;4 ]. z8 l9 w2 m4 b; X( d
                        row := assignLObj.getRowNo(GlobalDistObj);% L# m  J) }/ d/ M5 D
                        if Row = -1 then -- since 70
' T7 f( d9 O* W8 O  h9 L: Y                                if lan=1 then
& M) [+ U) P+ @0 `                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),4 u+ u' k4 T9 }
                                                to_str("in der Andockstation: \"",?.~.name,"\""));. A3 y! ~& C$ g" K9 Q8 w
                                else* c& c7 O" W7 Z: g7 U
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 }) c, F3 S* u0 g4 Z. g
                                                to_str("in docking station: \"",?.~.name,"\""));                                : N; J; `+ a+ Q3 X
                                end;
) S1 w  R: t  p$ V% y8 v5 ]                        else* Q$ T2 G  [& \. ^1 e$ A, B) z5 K
                                @.Destination := assignLObj[1,row];% M, f4 R$ h4 Y: {$ M9 `
                        end;                       
" c$ Z' ?$ ?1 X* i: k: h                        newDirection(@);
, e: B* z  P! [) K, m& \, r                        @.HasOrder := true;2 ^: P. R9 U0 ^& X" E6 W
                end;. z& y* C/ V4 ~% K, l& E1 [
        end;' q/ \% L3 q2 S+ v- }$ ~; ^9 q
end;        -- of the method2 u7 u" B. D  ~1 a8 l
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
0 {( @- ~0 D2 S- z2 T% c5 ^4 B6 }: V3 a
这是AGV_putin中arrive的method。# t4 a3 ^& i7 b: ]' C

5 ?( B' c6 f& F. j/ U" o& }/ {当到达物料速度越高时,这个报警更多,
% h# J: ?) `( W; a7 h可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。; v! S7 b) a$ [2 g! q+ l" |
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?5 N& t' X7 s" y* n. J& p; q( I) q
" M/ g! g  Z2 A. V! O( ]
另外一个小建议,就是move,所有的move都可以这样
* h, t4 i2 P' |# q& _if not move() then debug end- i$ h8 F& o( p  H: \) T
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。! j& e* z: |* L+ y& c# M& f
plant simulation中的free libraries有AGV模板,5 K" k+ L! U8 w- t) a
里面也有案例。
. C' |1 `" o$ d+ e我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。  |7 g) R5 |' t$ V- B
* A" `, J( `2 D1 @1 h, @& ]/ l
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
6 n- R: k9 G# O- |& a3 |- I8 s! l5 N% t5 F) [+ O
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 & }4 a, Y; [7 l& U" P3 i4 E, ?2 c
这是AGV_putin中arrive的method。3 O: Z- p+ R' D! I/ L7 N
' u6 a$ C, K# E7 I0 Z0 c4 C: ^
当到达物料速度越高时,这个报警更多,

7 c' M8 }, V$ u3 h, F6 h7 u( K! ^另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-11 03:11 , Processed in 0.018336 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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