设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8706|回复: 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': l9 q  w% f+ L
*/
/ o+ r2 G; j. A8 I) M4 S! ^0 B, Zis/ }0 I$ s4 i$ \/ F4 M4 Y7 X
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
& @* I4 \7 Y  J4 Qdo( |# X% Q0 B% J, M0 J7 r
        Lan := rootfolder.Internal.Tools.AOLlanguage;
+ Q; S& ]- Q6 Z; Y$ _5 P0 w0 _        if current = @.Destination -- else return1 F1 G4 S. R- q
        then
) Y! a, b; i, z3 I                @.Destination := void;' F0 C2 ~# Q: u- F( j: w) F3 L
                if @.occupied then- f1 F' \4 `4 D' d; _# v
                        part := @.cont;
# B6 C* |# Y( x. N% \8 Z+ c                        @.transpOrder := void;* f% V' Z, {6 l& r7 x/ ^& A
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,8 \0 i( s9 E" x! y6 U4 |
                                @,root.eventcontroller.simTime);
$ f3 u# V  i( W# ]) Z                        @.HasOrder := false;
1 M! x. ]1 {( K2 ]                        @.DrivingHome := true;
% R, o- k3 w8 K" f- Z! A3 P                        rgManager.tryToStartTransOrder;
  C9 e% J+ p8 i- W$ b7 R                        if @.Destination = void8 Q4 K# Q0 ]! Y9 L
                        then -- no transport order for vehicle @* F; a" s+ |/ n
                                @.Destination :=
4 O9 Z4 C2 X1 B9 T                                rgManager.nearestFreeStation(@,track.~);
7 `% a* J! J; L5 b                                newDirection(@);   
6 a: u' V4 k% ?6 w; ^7 l                                if @.Destination /= void then8 B% i' C# d, D4 n- ?
                                        @.Destination.NumReservation :=/ S2 V9 J+ ~. n
                                        @.Destination.NumReservation + 1;' C- z2 |1 y! n1 e1 |' M. ?
                                end;& ]0 U; a. ~2 O, d0 }9 ~) \* r
                                @.CurrIcon := "drivingHome";8 y* f0 n$ y( ~4 B
                                @.DrivingHome := true;
% [+ V0 w" \" J) _* ]; J6 ]5 m/ J                        end;& R; D. R( [* p9 d( j4 i9 d
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station1 n& r: l* F% ]* l7 j4 ]
                        part := @.transpOrder;
+ G3 w% f# T- ?5 [                        part.move(@);-- load part( W. I6 i8 T3 g& a3 W/ e
                        @.CurrIcon := "load";0 u" U( X& y9 y# R. |
                        GlobalDistObj := part.globDestination;
7 b) e% A1 p! |4 \7 H                        assignLObj := rgmanager.rgAssignL;' c3 D5 g& E  g; d/ a$ L# u
                        row := assignLObj.getRowNo(GlobalDistObj);
- \% P% w! c5 M5 R- P* Q( |% }                        if Row = -1 then -- since 70% y5 r. O& z' Y% f9 k! }8 g* T  N
                                if lan=1 then
; R. N- W/ l" j9 f                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),1 e- x  Y2 Y& o
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
0 `0 b& f( x2 @( M                                else
. G9 e4 L, q) l  ~# Z5 w/ U                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# Y; V" ^8 M5 a( Y" A0 y                                                to_str("in docking station: \"",?.~.name,"\""));                                / u) b# q7 Z" T$ Y; v9 H0 R
                                end;7 z' A$ K3 A# [" C# x5 d0 z) ]% C; a
                        else
8 E( O1 n8 ^% u                                @.Destination := assignLObj[1,row];( A- s8 {: t* U6 ^7 m9 y6 O
                        end;                       
; s3 {- i  B3 L8 O5 I                        newDirection(@);
- |4 B0 d8 H! Z+ B' `) M! M                        @.HasOrder := true;
. q  r: J* x! X9 \                end;
4 Y, |8 D" n* B- E4 R        end;6 W+ I6 q: e5 r
end;        -- of the method
9 M) t1 e# m9 F
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 # Y$ r9 N% [& w

# t4 m# D7 J; W7 S这是AGV_putin中arrive的method。
8 U" N9 I9 H5 P: k/ j# \7 D. i! x; s% f  ?. P3 L/ x6 ?/ L  ?
当到达物料速度越高时,这个报警更多,9 b  f( t  C! T, F' g
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。$ |; T! J7 L# g. g1 `: Q! ]
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
/ z# ?9 E* Y2 r: |: B, X8 r
$ h% l$ u$ K2 k$ X$ @- C$ s另外一个小建议,就是move,所有的move都可以这样( j1 s; G7 g. o6 I+ a1 z7 ~/ u1 y
if not move() then debug end; B% P. s! }" Z
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。6 ^' {4 e0 b6 X' d& [! \  k
plant simulation中的free libraries有AGV模板,& W6 l! z5 H8 F1 @
里面也有案例。$ T! }* t) H: w8 z4 I
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
$ F' [/ Q& o$ Z! L1 R; J
  E7 t6 M+ h! w) `/ p% a我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 6 ]8 a: J( Z* u9 T5 y6 t8 A+ n

* |* K0 k+ X$ t! _* D+ |那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
) d" F5 s2 F8 i2 C) T6 v% m这是AGV_putin中arrive的method。5 k& x! v0 l! C0 r/ u2 y  o( L' u
0 f( E1 c4 w7 o1 n' ^
当到达物料速度越高时,这个报警更多,

$ K! x5 Z7 b2 B% |9 `0 h另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-21 15:49 , Processed in 0.020981 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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