设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5839|回复: 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'3 @3 |$ m( W! C3 I3 r: w
*/
; Y, U- y$ H! z6 y/ Mis) @. u4 N+ x2 L: x. O
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
! M6 i" J5 }3 |, M8 \0 T7 Sdo/ b7 C, x' {: i* j! L; p
        Lan := rootfolder.Internal.Tools.AOLlanguage;% J8 U( t. t3 O$ [
        if current = @.Destination -- else return
/ m6 I. O/ k1 e1 I) J        then
+ ]! q! o0 r# d/ u' B; d                @.Destination := void;3 ~/ {. C! F: y, E+ j
                if @.occupied then
7 A3 q) t4 e! {                        part := @.cont;
" V: C. d6 [' P& m2 N. h5 |4 F                        @.transpOrder := void;9 r( I! ?( ~  K
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
1 y! J6 F' R+ M) S. F2 s4 ]                                @,root.eventcontroller.simTime);$ M8 m' M3 R1 H5 r  c4 z
                        @.HasOrder := false;
! T4 P4 ?  w0 F# u- B+ |9 A                        @.DrivingHome := true;! E7 w* ]$ c( \. F* _8 o
                        rgManager.tryToStartTransOrder;
# q7 n" G0 x' y7 E7 h( ^                        if @.Destination = void
7 K3 _4 l6 ]/ A: Z3 h                        then -- no transport order for vehicle @) C2 _- v3 }3 x* z* K
                                @.Destination :=7 _; q7 K" D% ~
                                rgManager.nearestFreeStation(@,track.~);, Y9 Z, F' s! _, y' j
                                newDirection(@);   " D% F+ Q, L# Q& v, O
                                if @.Destination /= void then* b4 e& `; M/ j. p3 {
                                        @.Destination.NumReservation :=
8 \$ S5 X0 c; j% Q6 [                                        @.Destination.NumReservation + 1;
# u9 t& p' a6 f+ B0 r+ O                                end;
  C$ C! _5 o5 z0 {                                @.CurrIcon := "drivingHome";
* r! D' n! [9 u, M, P                                @.DrivingHome := true;$ V8 E* i1 f, ]& }0 g
                        end;
- O; _3 Q- T% i/ b1 B$ f9 r                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. }5 `6 i6 |- N. |8 J' X                        part := @.transpOrder;! R  ]* k7 E% U9 z
                        part.move(@);-- load part: ^9 {# e. m$ ?. T: c; D
                        @.CurrIcon := "load";
5 ], q% |( N% Q7 V& i0 x- R                        GlobalDistObj := part.globDestination;
  G, p$ _: x& P! l- P                        assignLObj := rgmanager.rgAssignL;
' U5 Y5 v" V* A# y9 {7 A& I  |                        row := assignLObj.getRowNo(GlobalDistObj);. j/ |% B( F8 @; R, ^) k$ R
                        if Row = -1 then -- since 70) m3 V8 H8 g% [' C& Q' L. x+ H5 n
                                if lan=1 then; N2 H$ s8 s9 w+ N3 Q( M
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! q$ o- q7 x% \2 T4 [8 M- |0 x8 g9 `! S                                                to_str("in der Andockstation: \"",?.~.name,"\""));& s% C" e4 D$ i( c
                                else
" V' {: W4 ?  P: X% r- b: S6 I) w                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),* W- ?9 v2 q9 c0 H0 S
                                                to_str("in docking station: \"",?.~.name,"\""));                               
, U$ y6 H' b# K                                end;
  Q  C0 E7 F; h# c% }0 j. d                        else
2 Z" M# C* ^7 v% B* b8 E                                @.Destination := assignLObj[1,row];( S) X4 p4 B9 v1 o" k  w3 s
                        end;                       
% k) y- t: Z8 q9 }/ s                        newDirection(@);9 m: B* v- X' Y$ Q- ]& r% t1 n
                        @.HasOrder := true;
1 n' O% D# s& F( S                end;$ u% B5 d$ L8 D( M
        end;
$ s1 i) p4 H) a1 T5 U$ k: \end;        -- of the method5 m" y, \) M. l! G3 c
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
* N( f! j) T3 P# j5 H. N% X, ?2 }9 I( D. B3 ]! F! ^
这是AGV_putin中arrive的method。8 `; ?' W5 I/ k+ x
& S/ w: q* j; z
当到达物料速度越高时,这个报警更多,
+ ~0 V9 D$ R! Y0 e可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
$ X0 u9 e% [! ^. }; k程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?5 I1 S% `. b6 H" M0 s% }

5 R5 `. w; J& R另外一个小建议,就是move,所有的move都可以这样
# G+ k& l* p1 b, U: _if not move() then debug end8 k4 a" Y$ e2 ?! [1 F9 a! ]4 n6 ]
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。+ b0 \6 U8 K* d9 t5 t) L
plant simulation中的free libraries有AGV模板,7 y! L' S! Q0 N% @/ R" r3 [  N: x
里面也有案例。8 l$ I$ J! O  x: ^& a
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。" l7 Y( ~! ~# i" D2 q6 J
. q1 A5 ~, \" a# g+ a" ~9 U8 N
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
, I- ]$ N0 V8 M5 [# V
7 W5 m1 f6 K& W! F4 R那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
" z! P) a; f1 k; Y这是AGV_putin中arrive的method。
+ k3 t2 G- ^$ X2 e, T. ?; I" ?; c2 \: n  t
当到达物料速度越高时,这个报警更多,
+ I3 u/ i; G3 S5 N: t
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-12-25 18:15 , Processed in 0.978432 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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