设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7176|回复: 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'6 \$ r. t+ `# ?  {4 S
*/$ D, \* v% r' b% H* R; {0 Q
is
. l/ d" w' s" r        part, GlobalDistObj, assignLObj:object;row,Lan:integer;2 g+ n6 N1 I. U- g5 |
do
/ A$ @3 \) J- x& p+ }' M        Lan := rootfolder.Internal.Tools.AOLlanguage;
6 H8 V3 R* u' h% }) D2 ^4 x. O        if current = @.Destination -- else return0 i! N6 H: Q$ C9 t
        then
+ @' E- c" f" J* L. h  P# W                @.Destination := void;
$ t5 l0 Q0 ^1 h- [                if @.occupied then/ H0 h# r& N) k' _5 B! p
                        part := @.cont;/ B& y1 o  y# f/ V* e1 u
                        @.transpOrder := void;
0 L- U1 o" X$ c( n: i' o                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,$ o- Q5 T9 N3 Q/ v
                                @,root.eventcontroller.simTime);
7 M7 y1 O: X) t8 f/ u                        @.HasOrder := false;6 E' f5 C# Q9 e$ V, M* v/ S
                        @.DrivingHome := true;
/ o# j  X: g; S- V7 V& |8 q* @                        rgManager.tryToStartTransOrder;
0 P7 h# O2 l( h7 A0 [                        if @.Destination = void+ I% J! U! j  z6 X& s
                        then -- no transport order for vehicle @0 N0 X% m; i2 I& u2 n1 f
                                @.Destination :=
/ w7 v) l+ S3 m9 [+ K, e  q1 S                                rgManager.nearestFreeStation(@,track.~);
" p( z8 y7 T3 r- ?% E8 E                                newDirection(@);   ; a) I* Y5 i: E! a
                                if @.Destination /= void then
- L1 C* @0 J# V% r9 p, {                                        @.Destination.NumReservation :=5 b3 x7 E" w. t$ Q
                                        @.Destination.NumReservation + 1;
/ R5 @1 |0 D# Z' j  U* h                                end;
/ m- T7 `7 q" R2 }/ T/ ?% J7 \                                @.CurrIcon := "drivingHome";) E9 ^' n' d7 m& I( B
                                @.DrivingHome := true;2 B4 r$ y! a) y% c
                        end;* K: L9 Z0 t: x  N8 V; u. K1 x
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
# B! H9 s8 j! H3 s+ v' h4 q                        part := @.transpOrder;& }4 o5 Z# F! d: i" c% s) k
                        part.move(@);-- load part
4 |% \/ l# W0 z# T1 q                        @.CurrIcon := "load";# p! E  K6 o0 H
                        GlobalDistObj := part.globDestination;+ @, }4 r0 g0 ~& C) f
                        assignLObj := rgmanager.rgAssignL;7 f9 g8 D4 L; h( V! o4 ]: ~% Q$ a
                        row := assignLObj.getRowNo(GlobalDistObj);
& N0 |/ H+ D/ I4 e                        if Row = -1 then -- since 70
# [: D) Z" u- H; H* f2 U4 N                                if lan=1 then8 R) `8 d# n( N& J
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: i1 V  o- m) s3 v
                                                to_str("in der Andockstation: \"",?.~.name,"\""));5 |) n- a! ~5 N9 J$ G. J
                                else
$ [( A  o/ G, R# U' V                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! S  V1 s3 C; |. W$ S( Z
                                                to_str("in docking station: \"",?.~.name,"\""));                                " M% ~2 S/ m- d) N$ A  K; U
                                end;4 p! k8 T4 U4 H8 l
                        else; e- v. U5 @0 L* R' {% u
                                @.Destination := assignLObj[1,row];
/ ~- q  q0 L! |/ |) t. i                        end;                        9 t0 Q* @/ `5 W. p2 h! S0 N
                        newDirection(@);, _) o) {5 ]$ U1 O2 P4 D
                        @.HasOrder := true;
5 f7 u3 ]: T# H- d* j6 h- \- l% r/ u                end;
0 y+ P% X# p, J        end;
; J+ b3 E6 c: h7 tend;        -- of the method
, M$ h) u! \& ?0 H: U: s
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
' g; l9 ]! H5 C/ F, \- H* R+ T$ V/ G0 ]* t( `% ?1 O3 V
这是AGV_putin中arrive的method。' _, @  K/ c' Z  i
$ j, p1 }) A+ h
当到达物料速度越高时,这个报警更多,, o3 }/ J2 n- l# w6 ^
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
4 ]+ v3 o0 o0 c% X8 i9 \程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
# u. m# o  B1 r
! F1 Q8 s# G+ m) b0 l3 E另外一个小建议,就是move,所有的move都可以这样( _' l! V# [2 ~5 T' O( @6 B3 U/ X
if not move() then debug end
: n  _; H; U! C4 a, ?9 M这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
# Q3 K" [& |+ y) N; }plant simulation中的free libraries有AGV模板,+ E  @, G' F: K$ U# H
里面也有案例。5 d3 X: D' T) z  X( q2 }
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。+ ~% Q3 @  a: V0 J: t" Y+ n- `

( L1 F; c4 i! e3 e0 Q我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 ; P* S% U. i! _5 v8 N5 q

9 A5 x/ T/ u- x( L5 M% R0 v那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 + Y- V; s+ ~; D" D
这是AGV_putin中arrive的method。
9 d# }- D9 f9 J4 m8 X2 S
8 I8 l; L* Q9 i! X当到达物料速度越高时,这个报警更多,

. Y5 s- ?& v% T4 U* N" J. V% s另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-24 20:01 , Processed in 0.020588 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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