设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6022|回复: 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'
# Q! _* l" x7 u' f# ~$ {: F& ~*/
$ [4 `- B8 R4 f" N* z4 Fis  R2 U7 n8 U9 j) ]- c4 e  F, |. O
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
; U* e7 e! {) i! udo1 V6 g2 }- A6 J0 p' T! U: ~$ K( C: {
        Lan := rootfolder.Internal.Tools.AOLlanguage;
1 R, }$ _# X" _- _8 `; l        if current = @.Destination -- else return! Z3 h- J: H$ ~- P' r" _5 [: L. W
        then
# k; e- b7 {3 M& m, R& |                @.Destination := void;
  e2 M3 ]# k, k; _                if @.occupied then" R1 k4 f9 a7 y! z3 M+ e
                        part := @.cont;
. u9 H" c0 M, X; ]& R2 l$ x5 t                        @.transpOrder := void;
+ I9 ?3 `1 t3 l. C% c1 \+ B* ^# j; y                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
4 K+ z. c: q- f/ Y2 i, h- n                                @,root.eventcontroller.simTime);
$ i% d6 a, [! j7 Z% H( Z                        @.HasOrder := false;: t( ^4 E- E% k) B8 e& E8 V
                        @.DrivingHome := true;
1 Z9 x% n0 b1 H6 o6 G                        rgManager.tryToStartTransOrder;5 X$ f; i6 @1 i5 H* ]+ d
                        if @.Destination = void/ ^% t( I$ d/ [6 I+ @, q: A+ w
                        then -- no transport order for vehicle @* {  B1 A; B# A3 h3 k
                                @.Destination :=
( s5 v9 T1 o1 u( E* _+ U  z( H                                rgManager.nearestFreeStation(@,track.~);
( J1 x6 u0 m+ P) o6 s                                newDirection(@);   , M8 O; B1 G) K: e
                                if @.Destination /= void then9 T' x2 s9 c2 i5 O* y: a4 u3 q
                                        @.Destination.NumReservation :=
& S9 X9 M8 E) P. l" L0 |  Y. I                                        @.Destination.NumReservation + 1;7 J9 l+ g0 i0 Y# A
                                end;
& m! l' {1 B4 N9 Y: n+ Y; A                                @.CurrIcon := "drivingHome";
! m% N& u3 M5 z( I                                @.DrivingHome := true;
$ ]5 @6 l8 U. a: D0 A                        end;3 b' i. S* d3 f; L" _! v
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station" [& F+ Q, T( Z6 M
                        part := @.transpOrder;5 k, C; @& g6 v& W$ K$ q( o5 _
                        part.move(@);-- load part# Y, g; Z5 j! S- C/ f
                        @.CurrIcon := "load";
) W1 f9 f5 x0 y5 K                        GlobalDistObj := part.globDestination;$ Z" Y/ v3 d4 A: O5 N" }% d2 f# ~5 t
                        assignLObj := rgmanager.rgAssignL;
* D$ R* ~4 e9 A" ~' Z% u                        row := assignLObj.getRowNo(GlobalDistObj);
* e- W0 ~' w/ f; e                        if Row = -1 then -- since 702 _8 }& K+ X) B$ f, S' |
                                if lan=1 then
6 E& X9 B4 n8 _; U& q2 A                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: R4 i+ g2 ^4 i9 B                                                to_str("in der Andockstation: \"",?.~.name,"\""));. i3 E, m+ _  C; u+ \
                                else
# |0 H1 D2 z& `% {* Y                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# I9 k# \0 ?  B8 w# z                                                to_str("in docking station: \"",?.~.name,"\""));                               
) Y" b5 [2 R) I7 z# H2 W                                end;$ x$ i; R% k4 z, q9 `$ e6 g1 R
                        else- W1 Q' r, H6 \" [+ T$ W% p
                                @.Destination := assignLObj[1,row];" ]$ Y9 R" r! U3 B
                        end;                       
1 j- a+ n  v4 E5 C3 c6 t3 q. Y6 e7 w                        newDirection(@);7 c; C" ^$ \0 c7 ^) r* S
                        @.HasOrder := true;
5 ~- G$ M) l0 k. I$ ?                end;5 G/ T  H8 B( M  x0 n
        end;5 o7 w) U- ~' Z/ n
end;        -- of the method/ P2 {3 }' V$ P) x0 [6 n. v
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
8 p8 {( F  r% J2 y2 \" x4 H& x; S/ P: r! I/ ?' E
这是AGV_putin中arrive的method。$ r" i4 Z* N+ \
# A2 a1 ?) h) m  X6 ?4 d$ P. q9 E
当到达物料速度越高时,这个报警更多,& P# b6 U/ J& d$ E- }& T3 N' b0 J
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
' N# Z5 c7 X* d* F5 {程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?& w, O8 N# X# Z, y% \5 Q

0 Q6 [' y: x0 g1 @" {另外一个小建议,就是move,所有的move都可以这样
5 H( q9 T5 ^: Hif not move() then debug end
) F; C, O8 A, W) z" Q& A这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
( ^) J, P" e2 _2 M+ D3 }9 ~plant simulation中的free libraries有AGV模板,% ^" h& u" H! ~/ B: P% |- i( Y
里面也有案例。
3 [6 |; z3 Q/ G8 D4 c- K5 Q3 Y我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
, ^1 x0 D) i# q4 E6 X, Y0 L& j# E, `5 \; x8 e
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 2 x# I( C* s5 i. V4 M( ~% ]; ^

2 d( v" N: X4 E那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 + t7 P% x9 ~6 s( u/ B1 r7 ^
这是AGV_putin中arrive的method。
% {1 ]+ A* N6 a. }+ k( P: b
) A- y+ y" ^: c8 x0 J8 L当到达物料速度越高时,这个报警更多,

. n5 d9 E- |7 H9 x另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-1-13 09:40 , Processed in 0.022847 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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