设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8654|回复: 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'7 N- b: i8 O' p9 \8 _  d) e
*/
6 R4 ~, R" U3 l6 D2 E8 @- lis. Z/ V1 r) [8 z: I( G8 u
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;' h2 p4 H: n4 b  C4 ]8 Y
do
- @5 e, I: S( X- |, W6 y* x        Lan := rootfolder.Internal.Tools.AOLlanguage;
0 \: @( k; g9 C7 O/ H# {        if current = @.Destination -- else return
. ?" \5 q0 l- j% v4 a        then& X' S: K+ W" r
                @.Destination := void;
) d$ u6 T4 E: u! O                if @.occupied then
( P5 K' x$ k% p( j                        part := @.cont;/ j. P/ v) d1 j/ M' ~/ x
                        @.transpOrder := void;/ b% u2 k. S; t* n* a7 N6 J9 O$ [
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
0 A* A: q8 D1 v: D8 H  _6 @                                @,root.eventcontroller.simTime);
' q. i/ ?: ~: G" j  q9 M                        @.HasOrder := false;) N: V2 T. |9 e* t% W# H* I
                        @.DrivingHome := true;2 Z6 D% P" ~6 q1 g( j  T; C
                        rgManager.tryToStartTransOrder;
1 h) y5 T3 d% |, }3 K. X" k                        if @.Destination = void9 A  B8 t" f7 Z  b
                        then -- no transport order for vehicle @/ a0 f2 K% @+ S0 f
                                @.Destination :=
* |% y5 l! [+ M$ n" P; p" X! {+ c: g                                rgManager.nearestFreeStation(@,track.~);% p. Z2 Q3 f+ a. F7 m
                                newDirection(@);   / ^  n6 v: E0 s: X8 ?5 t. T! q
                                if @.Destination /= void then5 D( X& N% W. a2 l, ?1 T8 L6 H* h
                                        @.Destination.NumReservation :=
- c* ?: G. f7 h; P* V, \                                        @.Destination.NumReservation + 1;
1 ?0 A5 E* K- N, l                                end;
9 t+ B- W, x- u, a                                @.CurrIcon := "drivingHome";% ~6 e$ ^7 \2 t  f8 N8 G$ H" P
                                @.DrivingHome := true;: }& W4 j: l9 m$ W/ q* u* z9 c
                        end;
5 K1 ~: M) ~) f- A- T- y. H" g7 \# P8 [                else -- the vehicle @ is empty, both vehicle and part are in the same dock station* ]5 ?' C, l0 e! V. g
                        part := @.transpOrder;
' }" Q+ M5 Z; u' A) E                        part.move(@);-- load part
0 A) K6 A/ _1 f0 N7 ]6 D8 l                        @.CurrIcon := "load";
7 ~1 I( I* ]) |2 z5 S# l                        GlobalDistObj := part.globDestination;
8 _3 ?0 x4 W) f- _3 t. j                        assignLObj := rgmanager.rgAssignL;: _0 a5 g5 \# L. @2 N4 G' Z) x$ x
                        row := assignLObj.getRowNo(GlobalDistObj);
8 b. o1 L* {4 r  K! o3 Y4 k/ S9 n                        if Row = -1 then -- since 70
8 W, Z0 X, y. b                                if lan=1 then
: m/ d" T+ P; t6 I* Z3 ?+ J% P                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," f* Y  R' L  Q+ ^! l% F6 A' K
                                                to_str("in der Andockstation: \"",?.~.name,"\""));5 u8 A# M" G1 W3 c& ^
                                else( n4 X0 {& f  G) S% l
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),) L7 a+ U3 m: ]& w
                                                to_str("in docking station: \"",?.~.name,"\""));                               
% d' V0 ?6 R$ Q4 v" i& S                                end;. X8 j7 G9 ^4 ]5 Y  N# s. ]
                        else
1 T+ I, P# z" o$ \; q' W  x                                @.Destination := assignLObj[1,row];
: i9 o& J" }6 |6 m1 l) Q) f4 g. d7 K                        end;                       
# E& T+ c* f8 S6 W/ E                        newDirection(@);
8 D8 ^( ]6 G' I' t                        @.HasOrder := true;  S' ]1 t+ N( N$ w& D
                end;9 I% K1 R. W! X# c% Z+ {5 u1 }2 e
        end;6 ~, B% b& u  p! _% @0 |" z
end;        -- of the method7 h3 g. P6 r9 F) V# V
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
+ O  s: A( D2 A" a9 n. B1 g, W
  k" ?7 c; I. D' s1 t' {+ p; h这是AGV_putin中arrive的method。
; k; I* j. q5 b$ {" i+ v0 b  u1 k* K% q6 h% z) `
当到达物料速度越高时,这个报警更多,- I* n) n$ |2 d3 M. T  Y
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
7 F4 E% Y# ]4 X程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?1 F' Z( Z) t- v  M
0 G: A/ P( @- w$ D9 [2 _" p
另外一个小建议,就是move,所有的move都可以这样
8 a+ l! j8 D, x6 K* Nif not move() then debug end
7 I( Q$ F1 l) K4 {6 `! I- A+ R  |这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
3 l4 I) o% H1 [0 y, ^$ tplant simulation中的free libraries有AGV模板,
/ E) _" a5 V7 @- O) t6 {里面也有案例。
. s9 p6 W3 c8 K' t我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
+ G* x- P- p5 @$ P# a6 q  s4 {4 _: G2 ?
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
) @+ A3 K0 m  O! U: P3 Y! N, B  W* z* `4 X# s- R! s
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
, K$ M; O+ v2 V6 u9 i这是AGV_putin中arrive的method。
" B( ^$ C  c5 T3 o$ X$ p( u7 s" _& a, ^- m8 }+ f" V
当到达物料速度越高时,这个报警更多,
  u% l4 i- w. C2 n
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-18 04:03 , Processed in 0.015159 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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