设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9208|回复: 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'* o8 H% u. g$ H3 o* y+ v+ p% e
*/
, @; F0 M6 P! _$ I" tis
$ [# _( }+ ~$ E" n( S* H& t2 R; P        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
! |7 [0 |' H2 x. x/ b! Edo; {* _% d2 c! {' H
        Lan := rootfolder.Internal.Tools.AOLlanguage;. t4 L& m. t4 m2 H! h7 K
        if current = @.Destination -- else return
2 j1 b! M/ s& k4 K5 f2 Q        then
2 o2 j) j1 W$ e. b                @.Destination := void;+ h7 L# Z3 l/ c& r" D! _
                if @.occupied then
# T. J+ W" X& k" B- F. f! C0 U                        part := @.cont;4 y- N% D, u6 @0 y3 z
                        @.transpOrder := void;1 H0 T- @) _" c- _
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! }2 S5 p1 r& v% \5 u% d
                                @,root.eventcontroller.simTime);
3 |6 k7 E1 G% y* V3 E# L/ `                        @.HasOrder := false;  n$ ^5 Y/ Q  d3 o: S6 V# c3 a
                        @.DrivingHome := true;: g$ x# Y  t) P8 y' Q- R( u% u
                        rgManager.tryToStartTransOrder;1 L% K  i, G8 I( n0 l
                        if @.Destination = void
1 E. w( b3 w' q" }3 ^                        then -- no transport order for vehicle @
: p! Q. W2 a1 p; t/ Y% ~                                @.Destination :=
. l. F+ Z( j$ |) ?/ k  b                                rgManager.nearestFreeStation(@,track.~);+ L; k& M8 O$ t6 {1 b$ Y# D: g
                                newDirection(@);   
# l+ M# H- w; q, u                                if @.Destination /= void then
8 j, R! u) z' W, N5 Y7 t  Y                                        @.Destination.NumReservation :=
2 s2 ~% [' b! ~: |4 l                                        @.Destination.NumReservation + 1;
: C7 z  G: l/ z  E1 I0 e* \$ D" {; `                                end;. [9 _3 M- O! t( [; o8 A
                                @.CurrIcon := "drivingHome";/ Q" Q  m# i. v5 }$ M0 G
                                @.DrivingHome := true;
; t  c" z! M% v; H, F                        end;
/ a3 R5 m: E- B  _% ^% y/ Y5 _: q                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% S8 Z/ t; p6 o' ~! a# l                        part := @.transpOrder;" e7 }7 V+ M: |/ X
                        part.move(@);-- load part: O& @! `3 J6 z# R( Z% ~  @
                        @.CurrIcon := "load";. `0 r# _& M# w: X8 l
                        GlobalDistObj := part.globDestination;
* ^3 R  J' J/ K$ f, B4 ?                        assignLObj := rgmanager.rgAssignL;
3 x! A8 n7 O* ^4 V                        row := assignLObj.getRowNo(GlobalDistObj);
: {0 T3 o: m( _3 @. c                        if Row = -1 then -- since 70
  B  s) D# }" }, q                                if lan=1 then0 k" [) W2 ?) u0 _9 h* Z6 e
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),. k2 z2 A" J; \7 F, w! a2 C8 E: i
                                                to_str("in der Andockstation: \"",?.~.name,"\""));; D6 Q1 G) W9 \2 q$ e& k3 y
                                else- o$ `9 w& u+ J" G2 B5 p! X
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 o: e8 B) ^* r: o7 \5 {* B* M( I
                                                to_str("in docking station: \"",?.~.name,"\""));                               
! J( Q- d& f- Z- x5 D                                end;
6 ^, e) q' a. d8 U" e, t( N+ H$ x                        else0 b/ L% _  `3 ?! G7 E; h$ Q0 h
                                @.Destination := assignLObj[1,row];" j+ r, ^- N- @% _$ @5 I+ E' m! S. {
                        end;                       
1 y5 p% i( I  w6 G, v0 z                        newDirection(@);7 F3 L4 n- S. b' z! \4 ]: l
                        @.HasOrder := true;# O# `3 T5 w, S0 n$ ^; h  c! |
                end;7 l9 B! w( d, _; v' P' U
        end;4 K1 c) b' w' r3 Q1 r2 S
end;        -- of the method" q) P+ V" n2 j7 x. y  Q4 U
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 ! [3 s5 g1 X2 }5 e. [: \2 k

6 q+ P8 E; |" [这是AGV_putin中arrive的method。3 `& @" j% _- S$ f

$ }+ |0 X) d. I2 g当到达物料速度越高时,这个报警更多,
3 G: O1 t% V: W3 L! e可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
3 o' V: @$ E* ?程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
! ^! f- U8 o1 d2 ^4 A  x0 }- e& |( ^/ ^# c
另外一个小建议,就是move,所有的move都可以这样) B" D" y3 L# g+ I! _
if not move() then debug end
" Z  v" I( j1 F- ~9 ?( f这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。2 U; v2 y1 y9 e0 J7 x* F
plant simulation中的free libraries有AGV模板,7 |, d+ m3 s7 q9 O: G& d
里面也有案例。
# l: P) V* p; y6 o9 m' i我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
- z3 D1 M5 I1 f; U9 K0 ?5 G; \& v+ @8 m" ~$ q% \
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 * X7 W8 I6 E/ S7 [4 o5 U! G/ A: U6 W

2 u+ S# S5 F9 Z+ c那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
  l7 H! Y% v3 j这是AGV_putin中arrive的method。
- Q- r$ ^( |  h" y, f6 `, s5 q% q8 z  ~8 F6 N% k- r
当到达物料速度越高时,这个报警更多,

1 b7 ], w* d# B# B% j另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-19 14:54 , Processed in 0.018310 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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