设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5559|回复: 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'6 @# r* h6 f2 x6 R
*/
; x6 P  i2 L" x5 ]; a+ b) [is' S- H: L3 V+ ], a
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;" o% f) s6 ?7 d
do
0 C) {' p) {7 M4 d  G        Lan := rootfolder.Internal.Tools.AOLlanguage;
6 j. }0 B5 u: f; f2 [6 L: c        if current = @.Destination -- else return
8 o" C* O& Q3 I  K/ o        then
. G. k3 v1 D3 |! B                @.Destination := void;3 A5 [2 Z9 r7 W. q. c
                if @.occupied then
7 Z9 @) Q: I2 M) N# {, H                        part := @.cont;+ _3 z$ p) M" r* [
                        @.transpOrder := void;: x* n% j, ^' T) V5 U6 d5 ]* v& N
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,3 M$ J: z0 }- D
                                @,root.eventcontroller.simTime);
* q& V1 J, O  h' K% D' G; j* J                        @.HasOrder := false;
; F8 ~$ Y5 @6 i. p- ~2 v                        @.DrivingHome := true;2 H9 U# d4 m6 U: k
                        rgManager.tryToStartTransOrder;$ n8 T- n5 a6 c( w; b8 b  ^7 b  e7 a7 {
                        if @.Destination = void3 X& @" z7 U9 U
                        then -- no transport order for vehicle @) D( r+ m- k' w$ J3 v  e
                                @.Destination :=
6 P. [# m- n7 v9 e1 U; g( u/ _5 c                                rgManager.nearestFreeStation(@,track.~);- j0 E& m7 Q; Q3 P* K; N  G
                                newDirection(@);   
4 h1 C  f  L6 l- b" f6 w2 I                                if @.Destination /= void then. }0 k% i+ G( O9 L% t# @
                                        @.Destination.NumReservation :=
& H( W. r9 V" p9 O8 c1 U                                        @.Destination.NumReservation + 1;
: I1 ~* a2 T0 V                                end;
. Y; E* [1 R3 \                                @.CurrIcon := "drivingHome";
9 Y/ v8 l$ C; ~3 v                                @.DrivingHome := true;
  M7 g0 j& L& c* [7 |: R$ u0 T                        end;! A) }; [2 u" y0 S; o1 R9 ]
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station. G( o: z. e& D1 A6 e
                        part := @.transpOrder;/ k; {' _: ^- s: {
                        part.move(@);-- load part2 F7 E4 c3 d% g" Y
                        @.CurrIcon := "load";0 v8 g! T( W9 t4 e$ |
                        GlobalDistObj := part.globDestination;- r- n6 S4 d+ H6 Z1 G- ]5 J: J3 @/ a
                        assignLObj := rgmanager.rgAssignL;
+ Z" i! z5 x5 C2 z! T                        row := assignLObj.getRowNo(GlobalDistObj);9 E3 S: Y! x  @3 R" A
                        if Row = -1 then -- since 70- P( U* i, F* y1 @; Z; T& B
                                if lan=1 then
! w" P* x7 R4 B3 a: b2 I                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),* Q4 Z, g, H3 B: z$ {
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
* j0 E' P7 P4 `$ M; z                                else+ Z+ Z: ]; l/ @+ R5 p9 `
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),+ O0 ~' l3 \( K/ n, q
                                                to_str("in docking station: \"",?.~.name,"\""));                               
, `: k' t2 ^! n/ H6 @' m1 `/ p                                end;
$ ~5 M  @  j; j* ^                        else2 }0 J& ^  [* V7 e9 \$ Z0 r) T
                                @.Destination := assignLObj[1,row];
6 `0 U/ A: q8 W) g4 T  k                        end;                       
* J7 R4 ^- a2 `7 M                        newDirection(@);
! j9 \6 ^9 P) v4 a1 A0 z0 N' L                        @.HasOrder := true;9 M) m" d7 s5 N: Q" ?+ j! v- k, E
                end;
% V' X* t) @0 k' N3 R9 W& H7 Q! J        end;; b# e- J4 Z9 [9 i5 ], R5 v# ~
end;        -- of the method
% b" u! t, {$ V# t1 n
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 & H, e2 P9 a; P. A
% M, d' n) _2 X- O; S6 P8 F7 i  M
这是AGV_putin中arrive的method。& y' a$ T; q# c2 q6 P
. X+ R" l5 _" ~- U. r. \
当到达物料速度越高时,这个报警更多,
' f3 Q4 c. Q8 K* R0 w! D可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。$ L( H% k& q0 x" Q% c7 L& G
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
+ w3 z: V, c1 R( B1 j9 v+ _) ?0 n2 T+ K* S; S. T
另外一个小建议,就是move,所有的move都可以这样3 X. K, Y4 Q2 v- P( {% r
if not move() then debug end/ r0 A. b# m, m2 Y# V
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。3 [( F; v7 M- v2 K2 T! ~6 J
plant simulation中的free libraries有AGV模板,2 _, p4 O, t. q
里面也有案例。- E/ u2 _( O' K" B( Y4 C
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。9 o' Z1 \+ z, H' c6 E! i
- C9 }: y7 H: b4 p" R: O# B
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 2 {" o8 ~3 h- b+ v
8 x/ n: P! x' t' j, @
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 1 B: w$ [/ I6 x3 z6 h- G
这是AGV_putin中arrive的method。6 j2 f. v+ e% ^6 s2 Q: m
6 d$ t0 V. _8 T/ o) E
当到达物料速度越高时,这个报警更多,

7 M2 |% b; z: t# b2 `另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-12-5 18:46 , Processed in 0.020239 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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