设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5218|回复: 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'
5 M, }7 u  F3 L& }; O1 q: Q, }# u*/
3 ~/ O6 R, j3 N# Gis9 n- V* G# v8 {1 i0 O
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 }' G' Q: v, o
do0 f% O+ r2 `" i) ]) A+ w1 ~3 V2 {4 U
        Lan := rootfolder.Internal.Tools.AOLlanguage;/ U3 x# L* h; I1 w' S; I
        if current = @.Destination -- else return
8 y- p& v7 N4 o8 Y: z/ `- S6 @        then. k% v4 N6 E2 W- v. G
                @.Destination := void;: r' A: K7 E* F) b6 @
                if @.occupied then
: F5 x, w0 m1 P, U) K& O. l                        part := @.cont;$ Y% |, A+ Z8 _1 ^' S# Q
                        @.transpOrder := void;9 V) C6 R, @/ b0 V6 Q) b' @; `
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
1 q. a3 U/ g2 q9 S3 ]" C) w7 f7 l  n                                @,root.eventcontroller.simTime);
* Y7 R$ V( `$ O3 S) c* ]) b                        @.HasOrder := false;. X5 R) ?! R( [6 F' }" ^
                        @.DrivingHome := true;
: O! N# R0 h+ g; H- V                        rgManager.tryToStartTransOrder;' x7 j3 D; J0 e
                        if @.Destination = void
+ A) e$ O/ e+ h) D; l/ n: X3 N; ^                        then -- no transport order for vehicle @& e% ^8 O4 [1 Z/ j8 i
                                @.Destination :=
" J+ t* I* P- o$ w9 A8 P0 n                                rgManager.nearestFreeStation(@,track.~);2 M( ^: X; J0 H8 r, W1 v
                                newDirection(@);   
$ I1 c! @! E) ?3 N9 h/ A) m+ z* l                                if @.Destination /= void then; o8 J  n3 m9 Q& D4 A5 A
                                        @.Destination.NumReservation :=2 u9 q! n8 ^% @4 c  o( t& h. [
                                        @.Destination.NumReservation + 1;
2 |: x& Y" ?3 L                                end;
! ~2 i& H1 a3 I+ a, w) f( b                                @.CurrIcon := "drivingHome";4 K7 M2 T9 b  {- }2 T
                                @.DrivingHome := true;4 C& T! j. a; i0 k
                        end;
! Y! s, |4 \5 [. P9 e                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
) K2 g% U+ j$ K) @                        part := @.transpOrder;
' o! g, @: v% y- E+ P6 t                        part.move(@);-- load part- u+ j1 W5 q' D
                        @.CurrIcon := "load";
9 K' l  T1 A+ z8 E1 w  Q1 f                        GlobalDistObj := part.globDestination;
7 L6 `# D# R5 R# b, [. {                        assignLObj := rgmanager.rgAssignL;
& ~4 E8 N) H* V3 A8 t- \0 h5 t                        row := assignLObj.getRowNo(GlobalDistObj);
% X" h0 t% q& q2 G5 L& N6 q  |2 V  i                        if Row = -1 then -- since 70
& E* ]! `+ B7 T, ?0 ]                                if lan=1 then
: R% {0 u- Y2 N0 w                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
. F6 J9 d& a" l1 Z8 K                                                to_str("in der Andockstation: \"",?.~.name,"\""));$ \( e% |# d/ C$ m7 l& Z
                                else
. R9 [* w! x  m1 x# ?                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),, g3 D- n- x% d5 A% C
                                                to_str("in docking station: \"",?.~.name,"\""));                               
) f7 G4 H1 l( s                                end;) Y- b$ H0 b; j% }$ |9 x
                        else
  [( H. ~" f  y6 H# }) }( P* d  @                                @.Destination := assignLObj[1,row];
2 N  x. S- R; E6 g  h& j  i                        end;                        # G9 X; Y; D" B( \! S* U" V
                        newDirection(@);/ c& O! |3 o7 h7 F' _$ P1 @/ z
                        @.HasOrder := true;" T5 ^2 h0 W0 V3 Y5 K/ p
                end;. S' i5 _$ `$ o0 l0 z+ Q: v
        end;% n9 J3 |% Z  C4 K' ~
end;        -- of the method! C# ]2 d9 F! _  i# o: _
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 $ p1 d5 ?3 b& |+ @+ a! U7 U

" ~  {: O$ [4 t. ?这是AGV_putin中arrive的method。
* Y8 \' S6 i1 L& I7 `' B
& K( z; `+ R& R当到达物料速度越高时,这个报警更多,) S5 o3 A5 D/ u6 A, c/ X
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。4 t& i6 }" E3 J( F
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?, w. v/ n6 s! S+ M7 ^
. ~  p+ x. e! P2 B5 r
另外一个小建议,就是move,所有的move都可以这样
& a, O5 K2 m7 Q9 h5 j2 w6 A- W/ Qif not move() then debug end
# c7 K$ a! @6 i( E这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。4 L5 J7 X4 \" L4 ?+ [
plant simulation中的free libraries有AGV模板,
' y' c# ?& f  m- t里面也有案例。
3 s, J4 ~1 s. @8 j) X4 U+ w' I3 M我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。) E' h) W; y* ~* V& Y8 o
! }. X1 _2 [7 {  O+ _
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 / }0 j0 P) \, D) w, ~2 S4 C

  x% x6 ^  n3 f/ L7 I9 J9 J那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
" V- H% S( a& Q* d6 @( E1 l这是AGV_putin中arrive的method。
( o) _* c+ Z6 h7 m8 q4 K' E5 }  W+ M  I6 z0 t
当到达物料速度越高时,这个报警更多,

- K1 T- O6 t: w  I/ ?另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-10-30 07:54 , Processed in 0.014889 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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