设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 10169|回复: 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'
3 C) T: V  I8 T. I( S*/* n8 y, w& ~9 U+ r$ {
is
1 Y- b" H- d) t! D        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
& c. P" G8 R( Rdo+ ?- ~- ?2 @6 j! i/ b5 `9 z
        Lan := rootfolder.Internal.Tools.AOLlanguage;4 d# m4 d4 ?  i
        if current = @.Destination -- else return
5 f8 Q; `. U; V3 s$ f1 D. Z$ K" c        then4 V( X: Q  }% |* i1 x' A
                @.Destination := void;$ C0 a" J- s4 X" b0 ^
                if @.occupied then/ D7 ~& a* z/ |) {2 L
                        part := @.cont;
* l1 K* R6 }4 Y+ c                        @.transpOrder := void;
5 W8 V0 S. T+ \! }                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,% m! S9 a2 L, `/ j5 j
                                @,root.eventcontroller.simTime);
7 X) m% m4 w; C: S                        @.HasOrder := false;, W( r# H& k; U; A2 h7 G7 S
                        @.DrivingHome := true;
- u7 f" p% \# s5 \                        rgManager.tryToStartTransOrder;) Z! e. Z! y9 c+ T9 Z
                        if @.Destination = void
" N& g* H0 ?5 s: }                        then -- no transport order for vehicle @& r# R4 O; Q# W) F  {' ^" y
                                @.Destination :=1 {3 f+ m$ H# n1 I8 M# H
                                rgManager.nearestFreeStation(@,track.~);2 x% @2 B+ r6 J+ E" R
                                newDirection(@);   5 E* O) Y/ l& l' p' w
                                if @.Destination /= void then
4 t0 G4 @. b+ _* x                                        @.Destination.NumReservation :=
& q/ i, G3 ~4 g1 O" f' \. J' k. a                                        @.Destination.NumReservation + 1;% D( [) H: D1 A; L( I& \1 j
                                end;
) w. O6 l3 |4 C1 E                                @.CurrIcon := "drivingHome";( v( i# F& N( x( w: Z7 c
                                @.DrivingHome := true;
2 H9 g; Z" ^& Q% g% Z                        end;7 @7 z. b7 P# q! Y4 @$ O! w
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
( f% X( r6 `; {! Q. q                        part := @.transpOrder;7 u: y/ m& w7 l5 e* w" r/ p1 t. J' ]3 D
                        part.move(@);-- load part
5 {6 q. @3 h& _- V6 a' U" w: d2 L                        @.CurrIcon := "load";0 ^# V3 `! p& g' F
                        GlobalDistObj := part.globDestination;- \- ]/ i. a5 Q& u  o
                        assignLObj := rgmanager.rgAssignL;% R$ q$ c- m, l8 C
                        row := assignLObj.getRowNo(GlobalDistObj);
. O# L* u' d% _9 A1 x6 w, C                        if Row = -1 then -- since 70# ]9 g2 ~3 s  `% U8 R
                                if lan=1 then
! @. A+ o/ o" g% [3 A* n                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
) J" M  T  {% |3 @* |1 }                                                to_str("in der Andockstation: \"",?.~.name,"\""));$ J2 I9 B' t" V4 v6 e% `
                                else$ F. s7 P# V) r: k, |; {4 N! {
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! U( p( @2 t/ Q: c( R$ s
                                                to_str("in docking station: \"",?.~.name,"\""));                                ) F5 w5 h0 K3 K# W
                                end;9 T7 J+ l8 V& r
                        else
  m( \. }, t( U8 T7 e                                @.Destination := assignLObj[1,row];
( H8 A3 ~5 e- L% s' e: `                        end;                       
. W0 ?9 F- O5 u& @5 D# ^                        newDirection(@);
8 N- s: f  I6 b* k7 s' ~7 `# u! {                        @.HasOrder := true;
7 P0 ?" j. q* M+ ?0 U6 o# B! I  y' W" T                end;8 O0 d! J# J& x. K7 ]( P& F
        end;
% T1 H- G. ], {% P2 yend;        -- of the method
) z2 X& d% w7 p' G
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
1 @/ O8 b- S% M' m2 C
; _1 G: F5 X4 A- b' @这是AGV_putin中arrive的method。
6 D+ J" g1 q# H: Q6 d! ~  R% w0 C* L% Y) O/ S" A
当到达物料速度越高时,这个报警更多,
# ]/ V2 }, ]& _可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。' F. _8 Z6 e# m9 [
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
: Z- N- R# E; _" Z7 x. w2 B' ]
5 u) E# a3 ?  J4 q) O- N+ X( u  ]另外一个小建议,就是move,所有的move都可以这样( u/ C) a* b- h' K1 [; f% H# F5 [8 ^
if not move() then debug end
8 L1 W/ P$ J' v这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。5 y7 d7 h, t' H# }; A0 R) y
plant simulation中的free libraries有AGV模板,
3 y1 n6 l) x  t- h$ D- H里面也有案例。7 t4 X4 O# O) v+ h! r
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。" m( J0 [" W3 q4 P0 \  F1 k1 d

! ^5 D3 t* p$ |, j" V6 w我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 : j$ e& H, A! Z

) @3 d! w- f# u3 ]' n那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
  ^, j0 U! Q0 H: e这是AGV_putin中arrive的method。; j; r4 G1 V5 b
$ T8 D3 I1 C* d
当到达物料速度越高时,这个报警更多,
$ C; e+ U  y) o9 `9 h- I
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-9-18 01:03 , Processed in 0.015915 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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