设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5260|回复: 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'& n: V! N1 I* N$ k5 N- X
*/
6 h" c0 |8 L( @# s0 A1 Tis, ?4 r  P5 y: S- O$ {
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;7 m/ E9 z2 @( h0 w8 H; y6 X2 c
do9 u: h- Y  ~. W' G" r  \
        Lan := rootfolder.Internal.Tools.AOLlanguage;: D, V4 z% A. w3 p# C/ K+ q/ y: L1 \
        if current = @.Destination -- else return& m5 L/ x6 u; ?
        then
) m6 |1 L! b# H                @.Destination := void;% I3 X# X# O% Z
                if @.occupied then* }  t" K7 p" R6 }& M
                        part := @.cont;
# h- I7 h  O" c3 q. Y                        @.transpOrder := void;: T* D: ~  y( S6 P3 Y) @
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
, ^! U+ o" ?1 [2 O) L  j                                @,root.eventcontroller.simTime);/ K( @4 {+ c! X. a
                        @.HasOrder := false;
- g# Y# c+ w8 J- R+ c( ?                        @.DrivingHome := true;' H$ \% m" V1 q( l1 H3 a( j
                        rgManager.tryToStartTransOrder;. M2 k  V7 b, a7 T6 a9 w
                        if @.Destination = void+ v( ^+ f* o5 B2 ~
                        then -- no transport order for vehicle @4 C: W3 `- k$ }) A9 \# L  m6 S
                                @.Destination :=
! j/ [4 t) ~. D1 S- U2 x                                rgManager.nearestFreeStation(@,track.~);
+ L0 C$ }& u1 y8 T- D; c/ V                                newDirection(@);   4 h4 U0 x9 t! i
                                if @.Destination /= void then
! [/ m& b# J0 n2 I                                        @.Destination.NumReservation :=
" P1 m$ r, [2 S2 O8 `3 D* U                                        @.Destination.NumReservation + 1;9 U* u, F1 K* H/ a0 w
                                end;$ n' J5 f! m7 ~; n  m0 {5 b3 K! y5 U5 ~
                                @.CurrIcon := "drivingHome";2 x. Q1 T, }" U4 ]
                                @.DrivingHome := true;
. M3 Z" v0 N* L0 D/ E( i- W  [                        end;
6 Y" ?: p7 d$ j- d/ |                else -- the vehicle @ is empty, both vehicle and part are in the same dock station. f  w% E- P6 M3 e: M
                        part := @.transpOrder;
$ M' ?: o/ h$ j7 d- q* r, g4 b                        part.move(@);-- load part
( ~6 ~' x+ p/ [# }5 R                        @.CurrIcon := "load";, L0 c( {+ l* q) ]* D
                        GlobalDistObj := part.globDestination;& l$ G/ p5 r3 ?/ v3 E  j/ W
                        assignLObj := rgmanager.rgAssignL;
+ D' z7 `# h) }7 D; x                        row := assignLObj.getRowNo(GlobalDistObj);
. w) X6 w3 X5 J/ h                        if Row = -1 then -- since 70
& i7 \$ @! V$ R& j                                if lan=1 then3 \- V1 `6 n$ {3 x1 J: e
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),/ N6 y4 q9 X7 C4 {* r
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
+ c9 L1 j7 j) [" c1 Z0 Q3 U                                else
" _8 M" C. I; ]1 c/ p  `& O3 }7 S                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) \- r; D  S1 V; h                                                to_str("in docking station: \"",?.~.name,"\""));                                1 }6 _4 @% Y$ J/ |6 Q3 J* |# J
                                end;
6 ^! R/ W- A; [/ x; G5 H# I6 ]1 m                        else( V* B* n3 I5 r: s7 i0 s9 {
                                @.Destination := assignLObj[1,row];
( @. H/ ]6 h1 B2 V                        end;                       
# B2 C) f5 C: _6 o9 G4 e                        newDirection(@);
5 t$ O# w% O0 a5 ?. L6 H) G; x                        @.HasOrder := true;
* q, R, C/ Q1 @# |                end;3 d" W% X' t$ J1 L) t
        end;+ x$ m/ {% e: t0 j8 m+ c
end;        -- of the method
, I6 S. m+ @' O
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 * _7 f. W2 C- O( i
! t5 e' k( E# }- G9 C/ P9 R# F
这是AGV_putin中arrive的method。
) ^6 S, \) s, @1 Q
) s/ \1 X1 t$ p, ?5 h- l当到达物料速度越高时,这个报警更多,0 |) k: N, o, i; x8 L
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
( k7 c& e5 f0 a0 x0 ~程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?6 R: ^7 c- A+ ?$ `+ ?
8 E" z+ Z+ v  U; ?  d
另外一个小建议,就是move,所有的move都可以这样- V, V+ ]! i+ w4 ]. W, l# @& X
if not move() then debug end1 _+ R3 }' |0 W: C' Q/ E7 E& y
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
# S, i- t2 t3 \& ^+ ~plant simulation中的free libraries有AGV模板,( o& q/ B1 ~4 R# R
里面也有案例。
+ H, d( s7 K+ g/ n+ j) ~; s4 a我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。- \$ a0 p9 @4 v: B
" f  T3 Z2 D- M& F
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 2 G$ z1 p! X) T2 z
( X% D! O. Q6 P+ Z
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
" k% u( }6 V. ?这是AGV_putin中arrive的method。
! f0 h$ ^; g  ~1 V) d" k) ^6 ]
" V- p( k4 q. j  v* e, s& N当到达物料速度越高时,这个报警更多,
% W/ h; Q9 t  P# _
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-11-6 03:57 , Processed in 0.015657 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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