设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9991|回复: 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'
" z$ k: h# E1 O) ^. J: B*/+ `/ j8 l0 ^7 d4 a0 z" X6 ^9 H
is
% G0 [$ s, }- j1 v        part, GlobalDistObj, assignLObj:object;row,Lan:integer;* G, m1 `6 }; c) h! e0 ]: V5 ?. T
do$ H0 f; I4 a9 X3 B: H. B2 w% o
        Lan := rootfolder.Internal.Tools.AOLlanguage;9 F- x0 z( ?6 Q; v3 ^
        if current = @.Destination -- else return( p0 O9 i2 a" x+ F5 Q$ e; u# k
        then2 _( n: G4 O; V
                @.Destination := void;
7 K. n# ?  }  t/ t1 s( U3 x" y                if @.occupied then
7 m, D" o; W0 x( j. m                        part := @.cont;
+ }$ ?9 h7 ^8 h% ~                        @.transpOrder := void;
$ s- m9 e8 I3 A" s9 x6 I+ }8 r5 m0 ]                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
& a* `9 _1 \+ }# J: p( P( |7 C                                @,root.eventcontroller.simTime);
$ |* `" `8 p7 V                        @.HasOrder := false;1 k1 T1 o  r! ?$ B' \6 \' F( x' C
                        @.DrivingHome := true;, I# h6 c  a" P8 y4 |% B
                        rgManager.tryToStartTransOrder;
' D7 }3 B- L  x% }7 \                        if @.Destination = void
/ W4 O: r" g& g                        then -- no transport order for vehicle @
: @' v/ o% W2 h8 |7 d                                @.Destination :=6 r# v; s3 U& o7 n* ?. a1 z. T! @
                                rgManager.nearestFreeStation(@,track.~);( `8 a. K- O* E, [3 R2 ~9 M
                                newDirection(@);   
$ a" Y* V6 B  g" R. o                                if @.Destination /= void then
) e+ U; o* v/ U! U4 E. R# C                                        @.Destination.NumReservation :=4 e0 V3 k9 G  {$ ^1 O& q
                                        @.Destination.NumReservation + 1;$ s' I  C9 l2 D6 e
                                end;
) |: H. X( d( t& s" N$ Y' Z# |* ~                                @.CurrIcon := "drivingHome";" b4 g- y! l5 i$ K5 X1 O( q3 |
                                @.DrivingHome := true;- O* @5 m; E  C: v& g! S
                        end;) G8 ?6 K3 j8 ^) w
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
3 Z, L; A, g0 {                        part := @.transpOrder;" V8 ?& E, o& P+ F9 w( A: [! F4 S
                        part.move(@);-- load part
  g8 W  h# v/ J5 H, Y* k5 e7 e                        @.CurrIcon := "load";
4 n" G$ ?3 W$ B4 {                        GlobalDistObj := part.globDestination;
+ ]9 p2 g0 _6 H/ E6 _8 a                        assignLObj := rgmanager.rgAssignL;1 K& V% b$ Z% p* `& n7 [
                        row := assignLObj.getRowNo(GlobalDistObj);$ o8 m/ R4 |: P) g7 v# i
                        if Row = -1 then -- since 70
. v. {& O# k- B                                if lan=1 then- n; Q' g$ o7 A: g+ z
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
/ Q/ v6 W1 n7 z6 A                                                to_str("in der Andockstation: \"",?.~.name,"\""));
) {( Y7 ~  V1 X5 B* E$ k                                else* G6 J& [7 Z2 b1 g. k
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),$ ~& W  a" B" w5 q
                                                to_str("in docking station: \"",?.~.name,"\""));                                2 h) M1 _5 G3 _0 X  f5 k
                                end;( `; n3 b/ n% a/ ^; J
                        else6 f# K$ n5 y% C' v/ y  c
                                @.Destination := assignLObj[1,row];. d" I/ s( O' x7 y
                        end;                        1 a! p5 K6 u! X. i
                        newDirection(@);
8 m8 g5 g  Z' K' D+ _2 E- j                        @.HasOrder := true;* ]+ S# o4 ?+ u9 _5 {0 r. C
                end;
: t9 u6 a* b. L# F7 D. W. `9 Q0 b        end;0 f6 }& H9 V% o/ O( y  g" S; n
end;        -- of the method
* t9 o4 i- l' Y. X2 |& h0 ?5 U4 R
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 4 X' \* C1 {, D. e
  f# @% Z* j/ u' Z
这是AGV_putin中arrive的method。
. |. T' H3 s" r% v2 l9 U0 D: I& F% a7 j
当到达物料速度越高时,这个报警更多,( W& D2 k5 ]: l" x3 P
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。' Q  K: `: {! ]( h" p
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
& M* T" e8 M' {: ~
) o1 c/ n; C! ]: E5 E; N另外一个小建议,就是move,所有的move都可以这样
% D" M1 T  j# ]) |if not move() then debug end* \. n) Y" L8 t- _1 w0 `
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
8 O6 v/ {( Z3 u( T; Kplant simulation中的free libraries有AGV模板,/ t" N0 p% B0 T! O9 H# z
里面也有案例。+ _! m$ \$ Q, c; ]
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。% d1 M& c0 e2 K+ D$ k
7 T9 ^8 p; y5 T
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 . |2 ~! i7 p  z8 K1 D
6 p+ _% _9 m3 o/ \0 ?6 `8 A7 F
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 0 T& {& ?9 \/ Z0 |3 }4 c
这是AGV_putin中arrive的method。
3 J3 P: @2 x; R: x9 [
5 C  I8 f% P+ g9 i当到达物料速度越高时,这个报警更多,

$ Y" o& L# j9 b! w. }另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-9-6 06:48 , Processed in 0.022804 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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