设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 4419|回复: 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'( D* ~) l( O( U) y9 v9 m+ G
*/
5 c/ o: A) o  A5 }+ q/ y( {+ f) Kis  k+ \  K+ {/ ^! l" W
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;+ ^/ E0 T: ^. B, s8 R! j% ^3 v9 n
do8 h5 v' f9 g, G' n8 u
        Lan := rootfolder.Internal.Tools.AOLlanguage;1 ?/ S! [) e; [/ U5 W
        if current = @.Destination -- else return
% T: O& Z; A$ h5 [2 s( m        then
$ _& N+ U+ e5 _( S                @.Destination := void;
7 F. o. c# D, ?/ c0 ]                if @.occupied then; n' A' q1 S: \5 _
                        part := @.cont;
3 ~$ Y9 a6 K" d% O- u1 L5 U# K                        @.transpOrder := void;
& b  i# H; }' V8 i                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) t9 Y' J( Y+ L% C2 P  m- c1 Q9 e                                @,root.eventcontroller.simTime);
. }" e. |  M3 x9 R4 P7 i                        @.HasOrder := false;
  m% t$ M& d, H) j                        @.DrivingHome := true;: N8 n& w4 k8 @
                        rgManager.tryToStartTransOrder;6 b6 I! `) B  m$ n9 J/ E
                        if @.Destination = void
; H5 m7 |% }7 c. o' ]6 g/ \' g/ v                        then -- no transport order for vehicle @& R% t' U4 I$ ^" r* P5 L# e- }
                                @.Destination :=# j. F4 x4 O0 D# T6 U6 d/ k2 \
                                rgManager.nearestFreeStation(@,track.~);0 }& S; H  S. w% `1 e7 `0 W
                                newDirection(@);   9 @% e+ v7 g: N( r
                                if @.Destination /= void then+ D! |3 y4 R- O0 B' h  m* j/ w
                                        @.Destination.NumReservation :=
( E1 R1 f: N+ h                                        @.Destination.NumReservation + 1;& r; u) D/ W! Q' Z3 \, }! I
                                end;
9 Q2 B# g. N+ }7 g                                @.CurrIcon := "drivingHome";& D/ f7 j1 R+ O; S- t/ T# g
                                @.DrivingHome := true;
9 Q0 d& \; {0 g                        end;
0 b9 j& @( f7 b" X7 z+ z4 `* r                else -- the vehicle @ is empty, both vehicle and part are in the same dock station, j) O( F) E2 Y9 A, \' z& V
                        part := @.transpOrder;2 g6 }+ O: }* N# m0 y
                        part.move(@);-- load part* z& `4 _% L  w5 C% _! b
                        @.CurrIcon := "load";6 \* N# Q+ T! L
                        GlobalDistObj := part.globDestination;- E7 b; @8 n, j  [
                        assignLObj := rgmanager.rgAssignL;
1 @6 G/ t# a% @9 \                        row := assignLObj.getRowNo(GlobalDistObj);# C2 b' w; e" c- B3 K8 G
                        if Row = -1 then -- since 70+ z1 D! Z# |" T8 ]* b
                                if lan=1 then
' f3 ^; ^3 C( f( ?                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 `, W) W* ~1 f# w5 Y                                                to_str("in der Andockstation: \"",?.~.name,"\""));
2 u: F% R6 ]  {( s" d                                else: {. u1 ~- t9 u( o
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
( V) L. K0 v. Z) c& B  H. n                                                to_str("in docking station: \"",?.~.name,"\""));                               
1 r' a$ _/ o1 c' M3 M                                end;7 d1 r+ y3 T- m' c5 {7 K
                        else# ~5 d6 ]4 w: G6 y$ n
                                @.Destination := assignLObj[1,row];' }" [" B# F, i
                        end;                       
2 n* V, @* H  {) J9 k/ ?6 F                        newDirection(@);) I3 [; w- _# Q8 w1 ?" ?
                        @.HasOrder := true;
/ ]0 P2 k8 S, J                end;
/ q- V% e# y/ n6 M, }7 B        end;. E- D$ C" n! _2 ~% I7 ^! }
end;        -- of the method. N! S( J# a2 E2 _& y9 U- F
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 : o0 G+ {+ {. ^7 g
4 X! N: c2 d% I) k: [+ y2 Y
这是AGV_putin中arrive的method。
! J' P' y. x0 r4 S2 Y; `) ?% \, L: g) L1 ]; U
当到达物料速度越高时,这个报警更多,0 K7 D# B$ x# }$ Z
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。/ s" I3 S' i. I' C
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?$ w" ^" o- o) C/ B1 R# }

0 B6 B; Y, o7 U# Z另外一个小建议,就是move,所有的move都可以这样  d9 R) S# H2 O: e6 Z
if not move() then debug end
# ~6 A$ [1 x6 p' Y! g& m这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
) l4 f& v& L# I! `, _3 yplant simulation中的free libraries有AGV模板," U1 D$ A0 \! ]' p7 ~$ p
里面也有案例。7 y0 v3 I9 m" {
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
) N. N5 r. R) D% Q5 B# V! i; c- ~2 \8 e* @
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
8 M# h7 U& B2 R( R7 ?9 ~& B
( ]) w2 T/ `/ a3 N. N, y+ o那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
& R: z. M5 a: m这是AGV_putin中arrive的method。& u( C2 m, y8 f  S( ^9 d* z

' h" m9 ~4 ?+ y7 C& e' ^7 k; K当到达物料速度越高时,这个报警更多,
8 x4 B  Q1 z% V+ c/ _; }) \+ Z! a
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-5-15 02:33 , Processed in 0.017277 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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