设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9761|回复: 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'8 q* p2 v$ }$ k. S
*/
5 c; f3 K1 E$ Uis9 e  T' `2 }5 W2 d' M( D) e; V
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;! T% v5 D7 S& H- z8 N
do
: h2 j' ]; `; e; t. u& ?        Lan := rootfolder.Internal.Tools.AOLlanguage;
2 V# c: {+ \5 O( \: T( _        if current = @.Destination -- else return
- {. E: G! C1 m% m  D, o0 X9 q        then$ U/ t: k. `1 E' p/ M
                @.Destination := void;7 @% Q1 Q6 H2 f( W
                if @.occupied then
9 V& {1 R2 c2 N) v& w6 m" Z                        part := @.cont;
. A; G3 h4 K, [( a2 F- r+ L                        @.transpOrder := void;
2 o& u) W' o( u4 l% R1 ]4 e* `                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,/ e; h+ ]  D: @- c+ \
                                @,root.eventcontroller.simTime);" X$ M$ X3 j1 {1 Z
                        @.HasOrder := false;" k; Y9 [& ]; B, e% L# r2 z) Q
                        @.DrivingHome := true;4 O3 s& X5 z! M
                        rgManager.tryToStartTransOrder;
' X4 @$ C% y0 F/ A0 d8 o9 w/ \                        if @.Destination = void$ c' U8 p+ D5 b2 w  R* q
                        then -- no transport order for vehicle @
/ j* C9 Q; j0 u- ^                                @.Destination :=
$ p- I* A+ D& M5 c3 G                                rgManager.nearestFreeStation(@,track.~);& [2 [) x' y% ~2 A
                                newDirection(@);   
' p5 C! k6 p3 g7 j# i                                if @.Destination /= void then
. E; x. E  ~3 v3 Y+ c/ l  t                                        @.Destination.NumReservation :=
/ m' J; o7 j: K7 G                                        @.Destination.NumReservation + 1;
, c' B" z5 O( A$ ]* @5 @' m" x                                end;3 t# W9 T1 M# X
                                @.CurrIcon := "drivingHome";
: n) n5 F, L2 q6 U, W* U' Q% J                                @.DrivingHome := true;6 j4 u. i( f$ a6 I
                        end;" p4 G# O. j* u
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station7 w! j+ C' H  E* e. p! c. g% O
                        part := @.transpOrder;
2 T& ]- t, [' V2 ]1 C$ H2 Z                        part.move(@);-- load part2 \* H# G! ?8 ?2 x( u" X
                        @.CurrIcon := "load";. {( Y( X5 H- {3 Q$ ~. w
                        GlobalDistObj := part.globDestination;
, o! K& H, m+ v  n4 A# {- e! F                        assignLObj := rgmanager.rgAssignL;, X% a) H$ a* D4 l2 L0 l& a
                        row := assignLObj.getRowNo(GlobalDistObj);" w' w( M  D6 f' c9 E/ h6 r, D
                        if Row = -1 then -- since 700 @# h# H  Q3 v! C: \
                                if lan=1 then# A" d$ Y& M% F8 i
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# j! I$ g' D4 S! x5 X) [, `+ f                                                to_str("in der Andockstation: \"",?.~.name,"\""));
; @. g4 {% A) [# @1 p7 r                                else6 c, O/ e) p7 h+ t; p" n: ?) E$ }9 u
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),9 f" T1 P) X) d
                                                to_str("in docking station: \"",?.~.name,"\""));                               
' L2 q1 F( E" R! M                                end;! ]2 m/ F; H( g* V1 ^+ a
                        else$ l% g& n- f6 E9 P. Z/ O$ m. ~
                                @.Destination := assignLObj[1,row];8 [! h' o/ o( U, P. W, w$ z
                        end;                       
+ m) b% \3 W6 X! r. s0 f% j% b7 p                        newDirection(@);
5 m: `& k  j& S, k; A9 G# v0 `                        @.HasOrder := true;
7 d# e% r- M# H- P( G1 f                end;' F8 }1 I* n1 M9 W! u
        end;
+ x" W4 b9 U2 Y7 ]# L8 X* t7 V0 nend;        -- of the method- m& q8 |- Y: }/ t" ?& b& w
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 1 {0 u3 U  o  r2 I" G; ~
9 J/ P# |" M- c5 r# e3 y
这是AGV_putin中arrive的method。; M, h2 c' Z, f
1 ~  }/ v0 }/ b1 f% X1 U3 X/ n
当到达物料速度越高时,这个报警更多,
* e7 E6 x/ \1 S可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
# f/ W3 H* n" |" ^; ?; w( U: V程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
, Y) q! N8 K# x6 x5 I  {8 W7 u0 i. e' W9 t% P
另外一个小建议,就是move,所有的move都可以这样
; i! D4 f2 ]9 z/ _9 Uif not move() then debug end
1 L2 H$ k* I& \! V2 u* @. z0 o这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
+ E1 a# K9 W( r1 u2 Xplant simulation中的free libraries有AGV模板,
7 L5 p! N5 i+ X) D+ }. L里面也有案例。
+ q* Q$ j& ?9 T: g4 m1 z我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
% [% K8 K, P9 j) O9 X* P# f
; }2 \+ r/ @3 ^, p; V1 s' T6 Y我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
1 y! f4 `8 d/ l
) N$ H; ?# q) w2 u; `3 Q. K那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
. w0 K! o8 X: e0 T6 X这是AGV_putin中arrive的method。
% M9 i. s$ k/ t. a$ m
  O7 m$ u- O; V3 {7 O9 a" f当到达物料速度越高时,这个报警更多,
) b0 i9 \9 f/ w' x( X5 W
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-8-23 03:16 , Processed in 0.018776 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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