设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7895|回复: 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'( W7 \6 R2 q( @
*/  p2 p8 A# J' |9 I% \/ I8 J) r
is
& y. l. l2 c8 K& Y        part, GlobalDistObj, assignLObj:object;row,Lan:integer;% y8 {6 u: h* G. B* V
do! j3 b! n3 {& y4 a. Y. ~3 o
        Lan := rootfolder.Internal.Tools.AOLlanguage;, \6 `1 ^5 Z8 W
        if current = @.Destination -- else return
( u7 d! W( p$ R4 q. W  b7 w5 k        then
) U0 C/ E/ O+ Q5 `7 q- R3 B# k5 N                @.Destination := void;
2 s. n# |" ?) R9 q! B) r5 y4 h: r* c                if @.occupied then
4 Q9 w9 o- k! t: Y6 L$ f7 Z) o                        part := @.cont;0 o4 i- {3 n: W. r% }; q
                        @.transpOrder := void;) @& A: m6 P9 k+ H! M  F5 a$ R
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,( [% Z" }2 T, f& t" O
                                @,root.eventcontroller.simTime);
! |! \( D6 [: X* O5 U; Z                        @.HasOrder := false;& s! ~$ i( S9 S% ~3 P- j! k1 E
                        @.DrivingHome := true;
, m6 r* `8 K# w" L: X. @+ Z                        rgManager.tryToStartTransOrder;
* |( k" D) Y1 F" N                        if @.Destination = void
9 ?8 `4 g8 U% l7 u2 S                        then -- no transport order for vehicle @" r% H6 g( i6 L  k- M1 @: k( n7 ~( J
                                @.Destination :=
/ |6 x( K) U# x( a; \  f& _0 x* ]                                rgManager.nearestFreeStation(@,track.~);
6 A9 e) Z, J  y- k/ Y                                newDirection(@);   - E0 H1 q: T+ U  m* x: m7 F  T  m* @
                                if @.Destination /= void then. L+ @% ?5 r: N) h4 h: t; _$ b
                                        @.Destination.NumReservation :=$ j9 W  s( ~6 @+ |7 Z' o$ ?5 f8 E
                                        @.Destination.NumReservation + 1;/ I! |  g5 i; l" B- T. J7 M
                                end;" y6 [4 B# ^# u2 ?# _
                                @.CurrIcon := "drivingHome";
+ ~( i" i' i# ~( z& F                                @.DrivingHome := true;
! X. A2 o  n& c/ x" p) K' x; a  E) i                        end;; H1 t4 v7 U- N) a# y& z
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 W$ q- A; ~! O" c1 f, l, p
                        part := @.transpOrder;
* u. R( O! D1 N, w6 F                        part.move(@);-- load part
# Q4 D2 T) @+ S0 v$ F6 R. g- Q% ?: ]                        @.CurrIcon := "load";) w! k) D1 N2 ^
                        GlobalDistObj := part.globDestination;
6 Z6 J7 M. w; y( I( B                        assignLObj := rgmanager.rgAssignL;
% S* k* Y8 q, `' Q8 z( e                        row := assignLObj.getRowNo(GlobalDistObj);  T2 {0 E$ k$ g
                        if Row = -1 then -- since 70
$ I; n5 Q' a1 f) y% l, ?& U5 D                                if lan=1 then
+ d* Q, t% s+ L, f4 C                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# j7 e! M! U* H5 Y$ A, R2 c4 I: B
                                                to_str("in der Andockstation: \"",?.~.name,"\""));/ W  x9 H& c' Q
                                else; F9 [: E  ?# u# e
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
/ n, c- L' F7 i                                                to_str("in docking station: \"",?.~.name,"\""));                                0 S1 n$ a) V  }0 u. ?
                                end;+ S% {" H, Z4 x0 _
                        else& \7 j3 E, S7 ^4 }, F" r0 H- d
                                @.Destination := assignLObj[1,row];! L8 \" y5 S+ S1 j; ?
                        end;                       
8 ~& O' i" i% b# o- g; O( w                        newDirection(@);
+ F, _' {) m1 m5 `                        @.HasOrder := true;
) v& H9 q, ~( c+ ~/ f                end;& O7 {* X5 g  D2 K* }
        end;
9 ?4 E; [' X4 Q  n- U& G0 @9 B4 Fend;        -- of the method
& h& b- w5 a' T9 ^! v" J
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
& r& i) J" C( Y$ \/ t( C* q( {( D6 q5 K
这是AGV_putin中arrive的method。
! w  _4 [+ H; r( }/ Z$ H2 O5 r% w3 m4 L' j
当到达物料速度越高时,这个报警更多,
2 B3 C: i9 ~6 B0 {# B  h7 p可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
! H' E! X7 g. k8 e6 p) q9 i程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
8 G0 i/ ]- R4 m: v, r/ d& B% K' N+ l0 A3 @. _3 K0 [- O0 ?
另外一个小建议,就是move,所有的move都可以这样
. ?; X) y/ O: X5 Yif not move() then debug end+ F5 U* g6 \4 O" V. f
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。' D9 a3 Q0 v, M* Q7 \+ T1 Y4 |$ q
plant simulation中的free libraries有AGV模板,$ k" k2 k6 C  i1 a; s
里面也有案例。
) B0 V" V5 O9 ^7 o我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。7 g1 ^1 C. i" }

4 n' C; v2 t  [0 l! }) p/ f) \我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 ( t  n7 @1 j6 h8 @

9 ?+ x2 W0 C) x: l那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 4 W" d+ a# K- O9 G% a
这是AGV_putin中arrive的method。1 L  I8 N! U, L# u( Q. b. u- Y0 d
# s0 _8 ^6 s3 Y' t- ~
当到达物料速度越高时,这个报警更多,
) V  H( l, {  N& Y/ p( o0 Z& ]
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-3 18:42 , Processed in 0.018194 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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