设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8920|回复: 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'+ K! M" B, [7 ~: Z2 i1 F& t, I
*/, Z5 t% y9 [; E
is
( A: }5 L% m0 l9 p9 e9 L        part, GlobalDistObj, assignLObj:object;row,Lan:integer;; S# p# i* A( G8 ~
do
: E+ C2 {" G+ W6 Z) {  x9 ~4 [8 \        Lan := rootfolder.Internal.Tools.AOLlanguage;
8 L! z' n4 C' @) ^/ k8 f! Y        if current = @.Destination -- else return0 X' @* d' K4 T1 O; E
        then
. R# F; v  U  `                @.Destination := void;+ b5 s! `0 F. j/ t3 |" m
                if @.occupied then4 _3 i- s& S- V
                        part := @.cont;
% U2 i8 c2 s' g6 {6 v& X8 f( B                        @.transpOrder := void;
* d' Q2 q7 g2 Z' f; o                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
* n. A7 A1 h$ g- ]                                @,root.eventcontroller.simTime);$ n! o* |2 B8 E" h& M
                        @.HasOrder := false;3 G' C3 H0 Q9 h
                        @.DrivingHome := true;6 {1 S2 I1 J; ^# I& B+ u
                        rgManager.tryToStartTransOrder;
- B) x. Y$ @. t& ]                        if @.Destination = void
" b, y8 [/ |0 ^) [. W( e5 [# h                        then -- no transport order for vehicle @( W% O7 c  L  q: I$ @+ C
                                @.Destination :=8 r9 l  m: D7 d; f/ A! G/ ~, n
                                rgManager.nearestFreeStation(@,track.~);8 f. K* |+ ?+ b% a
                                newDirection(@);   6 r( [2 E+ S- Q0 X
                                if @.Destination /= void then
" h% R) K- o/ Z1 o, V+ R* {                                        @.Destination.NumReservation :=5 a9 k2 G; W- I+ ~; [# H
                                        @.Destination.NumReservation + 1;
. B: R1 `2 i6 T2 R7 k* v                                end;
  Y2 y" g0 G- W4 v- j                                @.CurrIcon := "drivingHome";
3 O( y- C! `/ c, y5 j" N                                @.DrivingHome := true;
5 U' ]1 s7 }% `; m" Q1 ?                        end;
8 O0 l2 N1 m5 |! ]& ~2 t+ d/ Q! p                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 y8 [7 g: \& o9 w# \0 Z0 `% ?                        part := @.transpOrder;
8 \( T* e/ |/ i2 C/ c1 f$ p                        part.move(@);-- load part# x% U7 \* |8 F: V7 U7 X
                        @.CurrIcon := "load";) U1 @' ^: C4 t& n: I& u" _) f
                        GlobalDistObj := part.globDestination;9 R' l& l; O# y- z' X$ C3 a; P
                        assignLObj := rgmanager.rgAssignL;
. U. C3 {# l; b) f4 z' x) `                        row := assignLObj.getRowNo(GlobalDistObj);, s/ r' E! I# R' G8 s; W
                        if Row = -1 then -- since 70
, n+ i9 e1 w. z2 l3 w                                if lan=1 then
  U7 q1 U% H) S9 }/ l/ i) [8 N3 i                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),3 E4 O' C" Q8 T' v! I# n8 W6 h
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
. V: s& B' L. b0 n" H8 s8 T                                else
4 k7 J: S% i" R* _                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
% ?$ }; f4 v3 J, M9 D9 P1 r                                                to_str("in docking station: \"",?.~.name,"\""));                                  A" c1 P; o. K
                                end;
( K: J& s8 T, R* G2 ~& v. S; j3 X; e3 i                        else
. ]- v# D: }! W4 u                                @.Destination := assignLObj[1,row];
' ^# D: J5 y/ N5 l  J                        end;                       
- W! b( m2 v( E# S6 L, q                        newDirection(@);+ ^2 c9 H6 f/ H2 |9 w
                        @.HasOrder := true;
0 o- W$ l$ ~  d. Q                end;
7 W& W, T/ _( F* {, n" h        end;
9 H) t0 q) W7 fend;        -- of the method
1 v/ N* X9 Z# E- ]/ Y1 n. `* X' O7 y
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 5 x& Y8 e; f. g' I

; c* @* a3 X5 E8 |- V这是AGV_putin中arrive的method。4 r- Z# S. m5 M

% z5 F( z( A  v: ?- g当到达物料速度越高时,这个报警更多,
0 M5 d6 M& d# o; ^/ q- N+ y可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
' N, n, q3 g$ {3 O( x4 Z程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
" h: ^* n2 ?2 Q0 V
! p1 L* P: K" @另外一个小建议,就是move,所有的move都可以这样
- w/ C0 N1 u# U7 P: l( k. ~if not move() then debug end
. Q+ O" o* F* F& `6 W  o这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。# _/ `/ F0 t( A, U' T5 n/ B. H
plant simulation中的free libraries有AGV模板,
1 V4 j% D: f7 l8 n里面也有案例。
! z  o/ W# y" O, O) B, @7 o1 j我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。% p% f- |. a; Z; F2 b0 z! }
( L/ {: f, B" H& o
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 3 o0 u8 a8 \1 Z0 p" N) d7 B% H

) w7 u7 d) W3 Z( e" m) m# x2 h( F那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
! J& H8 @5 c) l! a" c这是AGV_putin中arrive的method。
! x/ t/ y* j! n3 I  {6 ~' H9 t8 E. J9 O; u# N! Q
当到达物料速度越高时,这个报警更多,
* M& b9 b$ ^7 j
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-4 08:09 , Processed in 0.018418 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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