设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7219|回复: 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'
' t4 A- J) a; ~( A*/* V" c+ u( z. u/ }" F( c5 t
is& H) o0 |- y8 P* s- i
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) o- b' o) d! V5 Q" X7 J* w7 sdo' p* u" K: A, Q( |. a
        Lan := rootfolder.Internal.Tools.AOLlanguage;/ C# u8 a+ x$ h5 d* c/ R  D
        if current = @.Destination -- else return& B2 h1 Z/ U" d4 q6 R8 p! k$ |: O! D3 e
        then5 z- A9 k0 u( h) f3 r
                @.Destination := void;! R+ J! c2 [7 t8 t. W3 q' z
                if @.occupied then
' u; M7 z# [; V8 D                        part := @.cont;( ?3 `& D$ R; h0 s
                        @.transpOrder := void;
2 `. t+ T% j2 T0 Y" {( i0 L                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
. R) K3 e$ B: i0 ^                                @,root.eventcontroller.simTime);
, {9 I+ ?! r  h) X! B' C/ r, {                        @.HasOrder := false;0 S$ T( `4 ]% Z5 W% A; G' p
                        @.DrivingHome := true;
+ H9 ~" C- K  p; V- A# X! G+ X                        rgManager.tryToStartTransOrder;$ F9 ^4 M) e$ D+ b6 ?" [$ Z
                        if @.Destination = void/ ?+ q, O! c3 l$ H6 j9 {+ A; s
                        then -- no transport order for vehicle @
1 j! G( d2 p3 X5 _: h1 d                                @.Destination :=& }1 @) X% q6 Q" u( h7 v, I
                                rgManager.nearestFreeStation(@,track.~);( y" o$ Q6 W1 Z  V7 u5 ?' L2 D
                                newDirection(@);   . d& R6 u: ]/ R
                                if @.Destination /= void then
+ T. u' n$ k& r, ?1 g                                        @.Destination.NumReservation :=
7 i5 J/ H9 t, e                                        @.Destination.NumReservation + 1;
5 S8 I7 q  Z, ~# F# o9 r9 w4 Z4 _                                end;2 N: u) x  S6 y1 q# K
                                @.CurrIcon := "drivingHome";* z: B1 h! Z7 ?/ F' q& V) @! y
                                @.DrivingHome := true;2 ]4 X  U) S- c+ |. \" F
                        end;
% s8 ^' t% I5 F7 Y2 o* d, m9 D/ D                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- L9 ?  ?3 p6 Z                        part := @.transpOrder;
% \; \# N7 T7 i) S# M                        part.move(@);-- load part
7 O# B: w3 R; w- S                        @.CurrIcon := "load";5 T' d1 ]' e0 O1 L
                        GlobalDistObj := part.globDestination;
9 ?0 j! t8 D; S0 d% T                        assignLObj := rgmanager.rgAssignL;
/ p. y& [/ W  I) o1 A                        row := assignLObj.getRowNo(GlobalDistObj);$ T: D. C( ]& d+ ]* x
                        if Row = -1 then -- since 70
+ c8 J6 I1 B- w0 A& S                                if lan=1 then
9 {+ C/ E) Y5 S2 L+ Q& ]- x" V7 T: [                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),5 ?! s6 Y; V& L% J6 o
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
9 u( B4 _, `) c9 }8 F7 r* X4 Z                                else. }, O, K: r; b: ]* f, _' d
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),4 u5 Q) a) f8 Q1 s) e+ R
                                                to_str("in docking station: \"",?.~.name,"\""));                               
- |4 l* t5 N$ r! ]4 x; _! N$ L                                end;# H8 R  b+ p5 q& ?
                        else6 _  ~( G1 V" e6 D
                                @.Destination := assignLObj[1,row];
6 `1 Q0 s0 v  W% Q8 }7 D" `$ Q7 `                        end;                        # O' G) y! ~+ R" u8 E
                        newDirection(@);
; o5 z8 y" r2 r; J  {* f. `3 j                        @.HasOrder := true;5 K2 o& H( _: O+ G
                end;
" [& F; j* O3 B7 l  f; I- I" z        end;6 s; A7 y, [3 S8 P* }1 E: s1 K
end;        -- of the method
& U, Q' G( W# b1 }  g6 n
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
+ s: E+ n. |7 n* L/ t8 W  N0 z& S2 {8 l+ |2 }
这是AGV_putin中arrive的method。
8 H# N1 M$ Q. V
' M: s% w0 j3 a$ ?$ }% K; |当到达物料速度越高时,这个报警更多,
) a! W2 q, K. B% `可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
, I# Y& X" u/ e1 z8 E程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?: ]% c  H7 x. O8 Q; m
' E8 D$ f5 E- @2 t- i$ L$ o  a
另外一个小建议,就是move,所有的move都可以这样
* e" V# F5 d. z! Nif not move() then debug end
* T' z' L% k! ?3 X: `! ^5 ~( @这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
# E6 p; x& v  `) m8 m: C7 \& j0 Wplant simulation中的free libraries有AGV模板,- C; o$ W$ M/ v7 \8 {, s
里面也有案例。
, B6 n/ n+ y9 T6 K% Y' ^3 i- j" S3 p我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。* L2 d  X- P( h: a, F. d$ y4 @

. V9 r# j$ W% o4 F, y3 K, w1 ~) r* [我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
( g7 L5 v$ G$ S9 H# @9 O. T$ @" y( R  O  d* C) @& Q" r1 g1 \
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
' `! t2 R4 w' f9 Z; ^* ?1 q) v  h2 \这是AGV_putin中arrive的method。$ ?' X0 s4 _$ \1 L8 s

  c" d. {; N4 T当到达物料速度越高时,这个报警更多,

6 Q3 S! L7 }/ m  d+ I* b另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-28 02:43 , Processed in 0.018833 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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