设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9001|回复: 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'7 X' t/ f- O5 K  X  `' E
*/
' ~& R1 [8 k3 u+ \( xis
+ i$ f8 f, W. A" @5 O4 i, s        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
3 y7 r) q' w* t; b$ R  [/ l0 xdo5 a8 ?- q# _" r
        Lan := rootfolder.Internal.Tools.AOLlanguage;& T8 S, D0 s& h8 q; Z; S! F0 d: U
        if current = @.Destination -- else return
' J) T. f" K9 Q: N        then
  K& j% n  [+ x- B                @.Destination := void;  o! o4 A0 Q/ p0 |8 H
                if @.occupied then* u+ U1 d, G: P/ D
                        part := @.cont;' x1 |: u$ s9 {3 N5 V
                        @.transpOrder := void;  k8 ]: Z; t# V8 R/ h/ b
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
# N* T. n4 j3 y8 c2 o                                @,root.eventcontroller.simTime);
8 q, q2 R2 l/ N) T                        @.HasOrder := false;# t( }2 b: k7 E5 X- W* ^
                        @.DrivingHome := true;
' i3 K' K  l2 e3 `( i                        rgManager.tryToStartTransOrder;0 K- _6 S3 B9 ]2 c- W, k, u
                        if @.Destination = void& R& o! C3 U" [, _9 c
                        then -- no transport order for vehicle @+ s+ J5 F, N: t# Z
                                @.Destination :=
3 k: b8 O/ b* z4 ~, J( D                                rgManager.nearestFreeStation(@,track.~);
& M9 q8 |/ U2 k1 B- s" Z                                newDirection(@);   
! R1 n4 Z% ?- _7 [                                if @.Destination /= void then0 h; @0 }; z* ]& `% I  @
                                        @.Destination.NumReservation :=" G' q& ]5 A4 o) G' S
                                        @.Destination.NumReservation + 1;+ t& r6 ]. i* C3 O  x
                                end;
7 }3 o/ }1 F. a4 k                                @.CurrIcon := "drivingHome";
6 _/ g+ }, F) S                                @.DrivingHome := true;
5 Y& B# X9 ~; \, [4 n, e                        end;7 e! `4 e+ {0 ~! X0 H* ]
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- W( _# f# ]- F# d0 x                        part := @.transpOrder;
3 U# P8 ?4 i% \7 H# \0 q3 J                        part.move(@);-- load part) E' y) c0 r9 B; K" U/ d, n2 ~
                        @.CurrIcon := "load";
1 D, T, T: n0 p; n( x                        GlobalDistObj := part.globDestination;; }: U+ ~( q/ Y9 [
                        assignLObj := rgmanager.rgAssignL;
( p, _2 ^4 x; M. N, K                        row := assignLObj.getRowNo(GlobalDistObj);8 f3 n" l  @+ ?- _! N# g; d
                        if Row = -1 then -- since 70* K. |* n2 _" o  k# c/ y
                                if lan=1 then
7 l+ M( X; x* S                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
2 t* u- z& z! w) N                                                to_str("in der Andockstation: \"",?.~.name,"\""));; L. L) `( M% n" D9 |
                                else
% w; Q- _" O5 ^: ~+ o. a                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),% u8 v& d( w: z( y
                                                to_str("in docking station: \"",?.~.name,"\""));                               
9 Z4 g9 V; `4 W" t" X                                end;
* z' g  S6 j8 \$ P( m                        else- i; O# }' z% e% J9 X( V4 h6 _
                                @.Destination := assignLObj[1,row];
, X# j. X( }7 K  Q8 T                        end;                        ! C$ C3 s- a4 I; `
                        newDirection(@);
! z7 x6 j2 y4 K5 r) ]  R                        @.HasOrder := true;
5 c5 R& X, e3 O* Y                end;' ?/ x8 o3 T9 ]6 {, K0 E
        end;
* c# m0 _# v- f( k' R0 C2 vend;        -- of the method4 o, H+ L: w5 N1 B0 U
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 $ b* r5 M$ ~+ U

( P6 j1 G) B) @+ B* V这是AGV_putin中arrive的method。& c. E; Y! J+ B# Z7 ]
0 C/ W; ~1 t2 m9 D- m) x* ~
当到达物料速度越高时,这个报警更多,
+ K# b& \% }6 n4 c. A# q可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。; Z# O2 b6 C" M$ j9 s+ y" P
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
3 t. [; L( i4 F, _# L
. [" |" ^) D/ W( C! [/ V另外一个小建议,就是move,所有的move都可以这样4 i, w  k& S# R
if not move() then debug end7 p9 f5 h! X! X4 r
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
% p- c. ~; t' _plant simulation中的free libraries有AGV模板,( z" f5 U4 X1 t; s' d
里面也有案例。
. P5 A8 b9 _8 {我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。* X- C# h4 o! ~, m
. @& U5 c6 p+ @7 ?. o
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 5 Z5 R( q/ L6 d" d; a; N+ k4 W
+ y* Q# \# D4 H7 V! \9 C
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 $ X0 ?; P& e" I- u: J# G$ r
这是AGV_putin中arrive的method。
7 S( K1 F+ N% `& H9 i0 j9 @9 C
; h; z4 r( b; n/ b当到达物料速度越高时,这个报警更多,

5 a3 U1 l1 i: W" c/ k7 h' q另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-8 09:14 , Processed in 0.017006 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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