设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8547|回复: 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'/ f+ A: I% D! _; R8 p( |- z: q% f
*/
1 |( I8 B: W4 @0 [0 e# iis% ]! S- S. G' |8 D* N. R
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;$ z. K% F, u' b# L6 W& I$ L) z0 i1 M
do
$ n8 N- c- F" U5 Y, Z" J  k        Lan := rootfolder.Internal.Tools.AOLlanguage;+ z; l. M) B3 a# O# i
        if current = @.Destination -- else return
( D9 Q$ S7 Q/ T  `. R        then2 I, h* [: U) }' e$ b
                @.Destination := void;7 G3 n" Z- q; l/ M! h
                if @.occupied then2 v* z. u. a$ x2 u% @' R
                        part := @.cont;' }( ^8 b( w) M# N9 R
                        @.transpOrder := void;
& {) I% M) p* P. @, x                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
7 O! @' ^5 R& {' n                                @,root.eventcontroller.simTime);& q- r. m5 T! h, W  D
                        @.HasOrder := false;% G6 I9 `6 ^* p- x* h. ~1 t7 _( q+ N
                        @.DrivingHome := true;* i& A& i- S! p9 T2 d& x
                        rgManager.tryToStartTransOrder;
5 R" A8 Q& l# V3 r8 ]* z                        if @.Destination = void
8 u3 ^$ F% L- J  `; Z" c2 `& \- B                        then -- no transport order for vehicle @
8 z1 x8 l3 B1 A% }* U1 `5 K6 v                                @.Destination :=
/ B; L' I' Q0 W                                rgManager.nearestFreeStation(@,track.~);
; u) E: [: v& @- a                                newDirection(@);   0 }# D( E1 I$ O. j
                                if @.Destination /= void then' l' p) i1 O6 ~+ x
                                        @.Destination.NumReservation :=
" X1 H5 C3 I- S9 s                                        @.Destination.NumReservation + 1;
* t& y/ U# ?4 ^$ l& w                                end;4 }# Z# G( P) _; {1 m3 ^" D
                                @.CurrIcon := "drivingHome";
& N' H4 M1 s6 K, D( f: a                                @.DrivingHome := true;* c$ R. _1 a, D8 p6 c9 y$ b5 {; D
                        end;
! x& G$ k( k2 y: }2 N                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
) o) m; W5 }" T3 O9 v8 p% `) o                        part := @.transpOrder;
( Z; e8 f/ q! ^. Z                        part.move(@);-- load part
6 o7 {. u  B' ]8 u" l                        @.CurrIcon := "load";% G2 g0 K/ n4 G0 I' g
                        GlobalDistObj := part.globDestination;3 a+ P8 Z% f8 c) ?6 Q/ J
                        assignLObj := rgmanager.rgAssignL;7 x9 D' t. j  X: D- U3 V
                        row := assignLObj.getRowNo(GlobalDistObj);+ v+ _0 W7 F0 L- l0 t$ ]  D
                        if Row = -1 then -- since 70) c+ B/ S: c7 I
                                if lan=1 then
# p/ N, C( F0 |5 L& k; S                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
1 A3 a- }- q0 ^2 [) W5 P                                                to_str("in der Andockstation: \"",?.~.name,"\""));
4 H7 U, j+ O; c+ M; ~* ]  S                                else
, b$ }5 X" G* F' ^: _                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 j! t: |# P/ O) C: E5 e                                                to_str("in docking station: \"",?.~.name,"\""));                               
( l) q( M- }' B                                end;/ S! R9 J8 Y7 O" T
                        else
& ]9 ]! L7 b3 M3 k9 q; k                                @.Destination := assignLObj[1,row];
: L* k) E& {6 B  s                        end;                        7 K7 h) [* Y7 \- t+ E
                        newDirection(@);8 ~( @+ ^0 f5 @) Q5 B
                        @.HasOrder := true;/ a+ d5 z6 i& e4 d  E
                end;4 ?, X& l8 R& J% E- W
        end;
! W, r/ v9 J) e6 send;        -- of the method
4 U9 j; r9 [: o
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
$ L) E: y- s+ ^! c: ^
5 h1 b) [) C, L) G5 Z# \( ^这是AGV_putin中arrive的method。
% u* C$ I, |8 z1 W! s/ _- {& I( H0 j( q( M
当到达物料速度越高时,这个报警更多,
# m9 O; G# Y! @* a8 Y可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。! H* q1 I. ~3 t) _$ B/ [
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?2 s% P. m. w  `% f: Q& b

" I0 p7 p# o" H2 U9 \4 I: Y7 ?0 F6 \另外一个小建议,就是move,所有的move都可以这样: q) M" V) Z9 U) s$ F. e, w0 m
if not move() then debug end
+ R7 J: _& [: R( v这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。6 w9 p; q" G) F* d( B
plant simulation中的free libraries有AGV模板,5 _! g3 H& c5 G1 n9 J5 P
里面也有案例。" j5 }: i: ^! ^
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。( N3 F7 d& O; j" V9 d  q- m

) U9 I4 j" H' \5 o- C9 S我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
  }& G4 K5 v' M( `( o/ w+ W$ T6 d6 A) @2 f  n
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
) t) R' X1 n* {) k" n这是AGV_putin中arrive的method。
$ ^/ J; ?& S' |0 A
$ [! x$ O& |$ D+ e当到达物料速度越高时,这个报警更多,

7 @0 y0 [' t* W* K2 ^另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-10 20:20 , Processed in 0.015850 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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