设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5603|回复: 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'0 I  h7 ^/ ]4 o  P, `* ~5 O
*/
- t: u; F  e! F8 Y! r% [7 v. i5 Iis
  q( Z! f% i" s4 B/ W# i% J        part, GlobalDistObj, assignLObj:object;row,Lan:integer;' Y6 A; `) W; \# H
do- Q) e3 F8 Z; u( Z) G( t! Q
        Lan := rootfolder.Internal.Tools.AOLlanguage;7 @0 f1 P5 G. A
        if current = @.Destination -- else return
6 W- b5 |. |* I$ L/ V/ p7 t7 O        then
3 z& b  }; u+ B* j* F                @.Destination := void;
2 d1 [/ C, G% k: X                if @.occupied then5 D% [6 V: l" y/ }3 a
                        part := @.cont;
9 Z2 j& T+ ]; l) P3 U                        @.transpOrder := void;
. c5 I9 h! z) f" D* P' o, |4 c                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
1 R6 h( I% _* O) n$ Y! W& t                                @,root.eventcontroller.simTime);- |+ [0 G: |) N7 t
                        @.HasOrder := false;
+ V# \6 t1 \+ O( c1 i                        @.DrivingHome := true;
( m. g( S  y1 v1 h7 L) h                        rgManager.tryToStartTransOrder;
9 D: j2 Q* U, H% f% x* [                        if @.Destination = void
9 `" ?6 o, P7 K0 g, K$ F# |2 i! B: o                        then -- no transport order for vehicle @, G* L0 o& q3 g0 }
                                @.Destination :=; i, A1 j2 \0 w, N
                                rgManager.nearestFreeStation(@,track.~);4 s  O4 M( P: v# T/ g2 B. @
                                newDirection(@);   / p- V; d  B1 p  M
                                if @.Destination /= void then3 L0 x2 N" v5 k. r
                                        @.Destination.NumReservation :=* j# e3 T6 g$ y  w
                                        @.Destination.NumReservation + 1;
, x9 V5 m; }8 i' {- ?                                end;* C. s# Z* }) x; R
                                @.CurrIcon := "drivingHome";2 L. D  t, m8 o( v6 j
                                @.DrivingHome := true;
$ I; O# [5 T0 a7 }4 L                        end;
. b: E4 z# p" m2 C! X5 G% [                else -- the vehicle @ is empty, both vehicle and part are in the same dock station/ x8 ?# R# o- H* e& Z
                        part := @.transpOrder;. n" @7 h% P3 s7 V. j$ Z( U
                        part.move(@);-- load part
& H' l# ?; t# k5 J) D                        @.CurrIcon := "load";0 w, p% l3 {* L; O( s7 q
                        GlobalDistObj := part.globDestination;
" q% L4 K: ^! K6 u3 `' X4 K                        assignLObj := rgmanager.rgAssignL;; _  q4 {/ o1 o
                        row := assignLObj.getRowNo(GlobalDistObj);& c8 ?) k$ J, e3 r" b# X2 Y) F
                        if Row = -1 then -- since 702 U0 S3 ~2 q9 A9 h
                                if lan=1 then
$ C9 D8 ^. A2 c1 O* u/ O, p                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," J" g8 m6 y/ Q7 }! Y$ Y
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
2 {/ J  L: h1 ?) p& z: [                                else
0 w2 G% O  u! T                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),# Y  k1 a, c/ M3 s
                                                to_str("in docking station: \"",?.~.name,"\""));                                " k0 s. x. g/ K6 q
                                end;4 D/ v# ^! l" }* L8 l
                        else9 e# u' b% D% j& Z/ n9 V! L
                                @.Destination := assignLObj[1,row];* O; Q+ }5 @% p1 n3 {6 {  i  `8 |
                        end;                       
/ u6 S5 x8 ], G/ a$ H                        newDirection(@);
3 X3 A5 H- a2 [5 n3 X% A                        @.HasOrder := true;
, f) b# z4 |. W) h) \) {                end;
  J0 y+ K& T- B6 P        end;
& H8 X2 u* r6 H( ~end;        -- of the method
4 z6 H  H$ o& i9 b0 @* {
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
* u3 s! T- R* h! R7 o9 v( A; _! l7 Z' r0 n3 Q. I. r
这是AGV_putin中arrive的method。. x6 P' R, U. X. ]% }2 N

) F" a9 O1 e! J) j当到达物料速度越高时,这个报警更多,
& _5 A! X9 I  |  s4 f可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。0 d4 g) V0 C5 d2 ]. U$ d* B2 \
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
1 Y. o5 G  e8 p; d( a0 g# q. g
3 g" M+ e3 y" m0 B3 [0 s1 J. U8 j" X另外一个小建议,就是move,所有的move都可以这样
+ u9 [3 C" p5 K$ Zif not move() then debug end
0 }: x. i" G0 x! M这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
# q- a+ A3 K3 e6 e- aplant simulation中的free libraries有AGV模板,* Y9 ~" N; D  P1 Z
里面也有案例。
. G' V3 q! F! O5 s# W. H: W我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
5 l; k: d  Y2 u! E' ~- N2 b8 T: Z3 r$ r/ Q
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 ) E% U: v$ g* u4 J  |5 o, q
/ ~" c( d. J* a, L0 E1 M
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 + L: b0 U& l# p' S0 b( \
这是AGV_putin中arrive的method。, \/ e8 R( B9 B. w
& x: z) E6 x' O; V4 Y5 K
当到达物料速度越高时,这个报警更多,

1 o4 S- c0 i" k$ z8 X, W$ y1 X另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-12-8 08:52 , Processed in 0.019491 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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