设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 4566|回复: 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'
" h" ~' C7 \2 p% i*/
1 g' S' `- E) w8 Y: j4 O2 v  N8 I3 ris
# I+ Q  T- E6 M7 H5 d        part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 I) G& W' l5 Y. l& L6 o
do
. X9 H1 z8 p# C& {        Lan := rootfolder.Internal.Tools.AOLlanguage;
0 E" C6 _2 R; L& |% C        if current = @.Destination -- else return
  I/ ?5 F) Y3 {- r" Z! @" [  }) ^% |: J        then" b8 R$ }( i1 Y& t. a( |1 w
                @.Destination := void;
/ _& J# |* M- H; a                if @.occupied then
$ i0 S+ q9 u( x8 F$ h3 {/ a1 M                        part := @.cont;6 r3 e1 q! x4 o' I! }9 Q3 w3 k
                        @.transpOrder := void;6 H3 r- o1 j3 u9 x2 _  t2 C% ]7 L
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
1 h6 a7 S8 \0 y& o9 F3 V                                @,root.eventcontroller.simTime);" _1 z! s  h5 _* n! E. Z# V
                        @.HasOrder := false;
4 \0 Z8 _4 n) R& j8 `; D                        @.DrivingHome := true;
- A; Z  N, B$ o/ P5 t; J2 P                        rgManager.tryToStartTransOrder;
" u2 P$ a+ \$ V1 }6 `. a                        if @.Destination = void, p  {# @  C  _; n1 k" K% m" E: a
                        then -- no transport order for vehicle @
' S. p/ ~; a% A7 Q                                @.Destination :=
; U- F$ i+ b5 T1 R                                rgManager.nearestFreeStation(@,track.~);) ?9 ~& N1 z* I4 y, R/ [4 l3 G
                                newDirection(@);   
" h* v, k" B1 @! F# I& r* |                                if @.Destination /= void then- h3 K) I8 h- M7 {  V2 s; h! X( d
                                        @.Destination.NumReservation :=
2 F6 x1 W1 F" W5 I/ A5 o                                        @.Destination.NumReservation + 1;
' E" S3 F; T9 ~2 V7 z, q8 S  y                                end;: [+ U6 m, o& W/ T5 W
                                @.CurrIcon := "drivingHome";
. t# s( E8 s- L! p" f                                @.DrivingHome := true;
4 O6 E" E1 P- K) M0 x5 J                        end;8 K' ?5 n- `, X" `
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station, P7 a2 m, Y9 n7 g8 _
                        part := @.transpOrder;
$ O+ L  J6 x' y! j9 S                        part.move(@);-- load part7 s+ X% x: c1 g+ X4 r
                        @.CurrIcon := "load";
6 M6 Q( z0 |8 y; z9 y6 D( L                        GlobalDistObj := part.globDestination;
# }  _; P+ J  c# \3 v& s; U- I                        assignLObj := rgmanager.rgAssignL;
+ S- X. V/ Y1 L                        row := assignLObj.getRowNo(GlobalDistObj);& y) X/ A* z( l% u; Y! H7 K0 {: L3 g- {
                        if Row = -1 then -- since 70- f$ M9 C0 b9 V( }: ]/ w, Z: [
                                if lan=1 then1 ?0 m4 o* M) Z% H* ]
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
" X5 m: _) N& O3 c1 m/ b( D2 r* J                                                to_str("in der Andockstation: \"",?.~.name,"\""));
2 H  Z( j2 W) \* U4 {3 D                                else
, C$ |  f9 o, d                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),# g: A0 F( t; `& K, ~2 o
                                                to_str("in docking station: \"",?.~.name,"\""));                               
! @, F  |! R' x% F8 r3 ]                                end;! g( y$ r: s1 y% l8 F  w* ^. A, \- q
                        else: L: e0 N) m3 i9 M7 |4 B& b
                                @.Destination := assignLObj[1,row];1 X1 g9 J) t% L5 \4 T$ m/ h
                        end;                        1 c- M* b. [6 d8 H1 C7 h
                        newDirection(@);
0 t  D- x  P. I                        @.HasOrder := true;
! C6 k# G+ q  {8 z% Z                end;6 ?& K# ^& N% S1 _: K
        end;1 i5 ]  L6 V) M; f0 l+ G
end;        -- of the method4 j2 D$ y! \4 {/ }1 _3 y! ?3 a" R
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
, `3 j- s+ V! p% K. n- M6 [9 y; u( w. {7 \6 X/ G. t9 s
这是AGV_putin中arrive的method。
1 v% `' B5 c0 G8 v  k3 u7 p! g6 {, m( }, S% B
当到达物料速度越高时,这个报警更多,
8 q2 H: W8 g7 p9 e4 J可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。- @- H: a, j& B  F+ q4 ~1 u2 u: a5 d
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
7 |' q$ L( B4 X$ f
* o$ V& \5 J( K  K: _. q0 `另外一个小建议,就是move,所有的move都可以这样* \( v9 p# P" |
if not move() then debug end5 ]6 U& \% w* P- ?1 R
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。  g6 ~& M5 S+ L/ B
plant simulation中的free libraries有AGV模板,3 N0 A# z7 E8 z5 d. |3 i1 L
里面也有案例。
* J0 e( L" u4 M( \我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
, \( h, A$ d* \; B
) S+ r% @0 b! U' b& J7 v$ C我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
# J# I  ]5 S% ]" O  f5 }* S5 P& |5 `% n
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 0 a% j4 R( u" \: L
这是AGV_putin中arrive的method。( b: r: L, N" `

2 k& X) u. I. B, P. R当到达物料速度越高时,这个报警更多,

* K. r+ H3 v# Z7 U5 _另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-7-1 02:43 , Processed in 0.023708 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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