设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 4582|回复: 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'! L5 ~4 ^, m0 ?* B3 W; C
*/
- p3 o- X: u3 X9 cis3 [7 I: \" S- ^( @( j/ i" f5 P
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
  [% B, i) H9 [# G2 }/ Zdo. l$ U. e6 }, x
        Lan := rootfolder.Internal.Tools.AOLlanguage;
. ~: J; {; Z5 G% |  V2 U- e        if current = @.Destination -- else return
* h/ z% }/ c. D: {        then
8 q7 T- e& d, t# D                @.Destination := void;2 j8 e' M' T" C- l' ^' \6 v
                if @.occupied then
; F# v# S& D0 w1 ^- W# l8 g* ^, G3 ?                        part := @.cont;
0 S- ?0 W! p* q6 G                        @.transpOrder := void;5 `. L- H5 {! h% Q. W! V
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 i3 m9 H$ I* x3 x9 W                                @,root.eventcontroller.simTime);2 H/ h8 C" s$ h# ]* g
                        @.HasOrder := false;9 G1 n% b, T( U) o4 [0 V
                        @.DrivingHome := true;
7 X( S4 x  b/ ~3 W                        rgManager.tryToStartTransOrder;- F& n8 `( h2 o  P8 J* `( e# M  ~
                        if @.Destination = void% {4 m- R0 Z% i4 u7 Z' v6 k7 x( ^6 G
                        then -- no transport order for vehicle @6 \( J5 `; P& C4 w; E; g
                                @.Destination :=
) S  s/ U# F/ `- Z" b/ r6 Z9 w                                rgManager.nearestFreeStation(@,track.~);
- y* P5 S8 X& t( x1 ~0 L) _                                newDirection(@);   ! L2 D. A! R0 R9 K" g. a" d4 ^
                                if @.Destination /= void then
) w+ C; |/ N' O) L                                        @.Destination.NumReservation :=
  x* Z. j, T+ M2 @9 Z                                        @.Destination.NumReservation + 1;
# B* C4 J1 J2 _: U, ^. r* L" m                                end;
* x. ?* C8 U. T8 Q' g5 P                                @.CurrIcon := "drivingHome";
1 _8 t( b0 o7 h2 b& X1 [8 B" N                                @.DrivingHome := true;! u- K' a$ K& f% N/ q# v0 x, o
                        end;
* |7 @! h( I5 g' a' h! Z9 I                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
+ F/ D) S, k* H" C$ }) y; N/ h                        part := @.transpOrder;1 y) C' w& ], `8 r9 y
                        part.move(@);-- load part9 f8 `/ F. t* a+ r
                        @.CurrIcon := "load";$ ~/ V5 o8 L9 t3 J# C/ ~2 Y- h3 q
                        GlobalDistObj := part.globDestination;5 Q( m( M9 }. S
                        assignLObj := rgmanager.rgAssignL;
2 s: `! X7 r6 h" \                        row := assignLObj.getRowNo(GlobalDistObj);
9 |) v4 g; K$ A0 ^+ |8 l) A                        if Row = -1 then -- since 70& j6 ]6 s! x$ s) \: l! h/ d& b1 ?5 m
                                if lan=1 then
+ R4 L& k  m7 G2 V                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),  f% s7 U* V2 }* n
                                                to_str("in der Andockstation: \"",?.~.name,"\""));3 q: y, y7 W% T3 J* e
                                else
' t; g" @: N: ~) _- C" ^                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),1 @2 M" w" r& x0 ?" S. N* i* F9 \
                                                to_str("in docking station: \"",?.~.name,"\""));                                2 Q9 G2 |: B2 s! c. P
                                end;
: ]. m% h' J5 a/ |$ A4 i                        else
8 b( `/ h; U" ^. I$ }0 [                                @.Destination := assignLObj[1,row];
8 `" i7 ]' w( G* g/ Q* t8 M                        end;                        . B4 W! n! {: }6 d+ O- k
                        newDirection(@);5 E( C; O% D% m+ x
                        @.HasOrder := true;5 L( ?) Y/ P: [! f2 _9 G  d
                end;( c: ^: l3 f7 t2 o, l" l
        end;! o- _1 N- ~/ H2 ^5 S% \' T  i
end;        -- of the method; R- I0 ~, l# h6 [2 b, k/ _
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
# f9 d, o8 }) y% g8 _; K, g( }' v! i0 J& f( ^! X
这是AGV_putin中arrive的method。
5 ?3 G+ \& Q; @- S5 o: r1 F7 f# {6 Q5 t# i
当到达物料速度越高时,这个报警更多,4 _" {% L3 A8 e3 y1 @+ |- K
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。+ R1 j5 J7 Z; i0 f1 z
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
) V% i0 n6 q: q6 N. @3 J
7 `9 [4 H# t8 U  Q: y; W5 |另外一个小建议,就是move,所有的move都可以这样
, X( f( A  c9 I) H. Gif not move() then debug end
7 Q$ q8 S" O( a+ D3 N+ P/ c' y这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
6 G; f! f- p7 M+ ^/ {plant simulation中的free libraries有AGV模板,7 P& M/ ?. K- z% x' O
里面也有案例。& G- d6 w3 @% O- B  ~3 ^( C, }
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
/ a. C, s0 _1 q3 _6 R
+ n/ x* w  E5 Q* v! ~% j+ f我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
/ `& g6 w2 a# Y& ~( g
* _# J: P& c4 C6 F) h那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 6 h# K% n+ w. B0 L) I
这是AGV_putin中arrive的method。
1 G% v; _, _5 S& W; [* U- ~+ N, \* ?- U) B' u" R% U
当到达物料速度越高时,这个报警更多,
' C7 x, y& T6 k0 f7 p" e
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-7-4 22:51 , Processed in 0.014352 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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