设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9742|回复: 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'
, b* ^; O) P: r/ `4 V/ i7 H*/1 |# e( n+ |  C( n( P
is
1 ]$ k3 h" C$ ]1 [; k        part, GlobalDistObj, assignLObj:object;row,Lan:integer;: s2 A( j& f/ L1 ~9 V# u
do
& |) T; R( z9 R- s) s4 y) [$ o" Y        Lan := rootfolder.Internal.Tools.AOLlanguage;
& \( E) y. T6 q) a        if current = @.Destination -- else return
! N9 n) G' u2 S7 s! o0 H        then0 r! G& B* K9 K# C6 y3 D
                @.Destination := void;
" H! L0 `% h5 D2 o3 X1 N                if @.occupied then
. `, C! z) f" F9 p4 \3 e                        part := @.cont;5 r# ?  k: E; |; O7 }& u  q" B: d
                        @.transpOrder := void;  q' S4 L& |1 _7 p( w
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,; s3 Q0 m9 J5 D$ ^8 e7 ]; i- b
                                @,root.eventcontroller.simTime);* ]5 h2 K+ N1 k
                        @.HasOrder := false;
0 l0 \( _! q+ E7 A                        @.DrivingHome := true;. r% D) Q  z: p  |1 H& {
                        rgManager.tryToStartTransOrder;
1 h6 \+ C4 m0 |6 ]9 [; f1 T                        if @.Destination = void& ~5 s7 U4 M2 g" q9 U6 g6 l
                        then -- no transport order for vehicle @
( ~" L! e: Z; C6 {                                @.Destination :=
" j% e3 ]. t- z  Z" A3 z* A0 |                                rgManager.nearestFreeStation(@,track.~);' f" f1 t% a  p- W
                                newDirection(@);   ; D" ?3 S: S6 |3 ?+ {) {
                                if @.Destination /= void then
5 Y0 U. F' I& m1 b& ^/ q6 t* z  Y                                        @.Destination.NumReservation :=) C! a% q, D  t5 s
                                        @.Destination.NumReservation + 1;- X: ^! A6 d( v' u1 x3 l( j
                                end;
& B" a3 t' u2 K, ^6 L- J                                @.CurrIcon := "drivingHome";
" f/ z4 k6 O3 K' F4 O                                @.DrivingHome := true;( m+ v+ l4 x' K& e
                        end;# l' V" p4 T- \5 D
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 J6 e2 s  h0 v3 r1 f! [                        part := @.transpOrder;
& y2 d) e1 E2 ?  @8 n2 P                        part.move(@);-- load part  J. w5 ?# W4 D+ t* s
                        @.CurrIcon := "load";; \! W  a+ j% \4 T# f
                        GlobalDistObj := part.globDestination;
- ?- y) r: u2 X4 p                        assignLObj := rgmanager.rgAssignL;
' j8 j% M; R4 I7 V5 a( C                        row := assignLObj.getRowNo(GlobalDistObj);
( Q1 _. D, T- r3 Q" H                        if Row = -1 then -- since 701 a* y' \! K6 ~; p
                                if lan=1 then: D7 f5 e$ g. w- ?% o6 B7 D
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),7 k0 v' Z% @) \* D
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
: w$ U& c- J0 X* }                                else- H- a: j$ K2 h0 s; v
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 S0 w/ p+ U! }! \# g  O                                                to_str("in docking station: \"",?.~.name,"\""));                                0 C& D/ @* P3 C6 j) B' q
                                end;" e! u. ?2 g' C1 x# h# o
                        else
) Z( T! W3 v$ E3 f                                @.Destination := assignLObj[1,row];4 e; C- [' _( t, }" }
                        end;                       
0 d# e) G" j. i+ L( [2 g6 _                        newDirection(@);
) Z) a  C4 T6 {1 D+ j                        @.HasOrder := true;8 k$ J) f# Z* ]3 N. k
                end;) y# L& [3 i% b& f
        end;3 Q. V! h1 E$ |/ D3 r
end;        -- of the method" j8 T/ X# B+ W" @* D5 k: [
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
( \9 b6 [+ T$ n4 _4 t1 `
# F2 P; W# B  m/ Q这是AGV_putin中arrive的method。% K8 l  D2 J- m* z

/ C& d0 f9 t: `' ^4 d3 D当到达物料速度越高时,这个报警更多,+ \; n0 L, k: z& b6 t- l* }
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
; W: E: H, _) T2 V7 a程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
2 g& ]; Z- A4 s  |2 y- t3 b- [# a* c, O( k2 t
另外一个小建议,就是move,所有的move都可以这样
- f  V( a+ y% B$ H" C7 d! aif not move() then debug end
+ s+ t9 U7 x9 ^7 s/ S: d- t% ], W! s这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。7 q; V" n' B7 N' ~
plant simulation中的free libraries有AGV模板,1 x7 H4 K; P) e$ B
里面也有案例。
2 @1 P0 h% x) F$ A! U8 f# d% p我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
- \6 ^) r* }4 {& _4 X7 _/ E
! a2 Q$ W: I0 e& T8 z& K我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
# X& w# K% W7 s) G1 K1 A- |( W6 f1 Z& D: w2 O
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
. _, P8 @# w" v  x8 m) t& w这是AGV_putin中arrive的method。
+ g  v1 {- j$ u6 o3 f6 z' F) I; a! ^8 J& k
当到达物料速度越高时,这个报警更多,
: p% ?! Y: Z) B- O" ]- g/ B( n
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-8-21 13:28 , Processed in 0.014676 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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