设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6526|回复: 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'
4 j5 X, W& i( Y*/5 C8 _6 T7 c% j, _; Q! X! ^
is
0 }" h( l/ ~4 Y( T0 k7 i        part, GlobalDistObj, assignLObj:object;row,Lan:integer;% H) X3 e4 a6 J/ L* y6 ^+ ^) n
do
7 H' Q/ b' ^" ]4 `9 `        Lan := rootfolder.Internal.Tools.AOLlanguage;
5 n0 Z$ G( [  u6 h% N: E        if current = @.Destination -- else return2 C$ {% V3 a2 L6 g" }; R: g6 M
        then
( }2 m; C, h, l8 G/ ^                @.Destination := void;+ r1 z* h3 I  c2 [. X6 `( G
                if @.occupied then3 M2 A6 C6 T/ q, c
                        part := @.cont;
8 [* n) B( C  c% n                        @.transpOrder := void;
6 j1 T6 k; `" S+ z7 n+ B: O                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
8 M& U( o' p0 H  R7 J, Q- O9 @                                @,root.eventcontroller.simTime);
8 c4 x. ^% S* E, j$ C                        @.HasOrder := false;3 J  M$ t# @. ~$ c2 X' j3 T3 x
                        @.DrivingHome := true;" Y2 M9 g+ p  o* H
                        rgManager.tryToStartTransOrder;# h5 g, @8 N4 k0 Z6 q) I. o$ |
                        if @.Destination = void0 l5 U3 g+ S' J- b0 D6 g
                        then -- no transport order for vehicle @! ~4 Q4 e* G# b9 U6 Q9 i) V" S
                                @.Destination :=
) J+ \3 d( `2 u8 v6 N8 e6 r                                rgManager.nearestFreeStation(@,track.~);
  k8 Y. f1 u- p" u3 ]8 K9 a                                newDirection(@);   ( n2 |! J& J* w+ ~! V! }( T) x! _
                                if @.Destination /= void then
" Z6 x  T" x4 T5 {$ `, q  D                                        @.Destination.NumReservation :=" d+ b8 v* {0 y$ x; n6 d
                                        @.Destination.NumReservation + 1;  ~2 n! Y% O1 ]/ b) v$ s+ D8 u
                                end;
3 [# @; Q; r) i6 q+ q8 V                                @.CurrIcon := "drivingHome";# ~( Q5 C$ i; r. j" R/ }  R) Z
                                @.DrivingHome := true;
; s5 W9 X: k: @5 J                        end;( n( L1 A7 P' n' {# h+ T0 n
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
( }6 J1 N5 k) P8 r9 X$ r                        part := @.transpOrder;, F/ `9 U0 m& v7 x* W
                        part.move(@);-- load part
. a- R7 i) P0 ^. b. \; p5 f, y                        @.CurrIcon := "load";' F  a% k, I# D7 I0 O  }
                        GlobalDistObj := part.globDestination;8 q7 k: X/ z# `, p/ |" {) ~* t
                        assignLObj := rgmanager.rgAssignL;
: P- ^9 p$ r& i0 {4 G: H. E                        row := assignLObj.getRowNo(GlobalDistObj);
" k1 t: I+ d" c9 n4 X                        if Row = -1 then -- since 701 X4 ]% W# ]' r6 ~( p$ T- a) B0 M) @" h
                                if lan=1 then3 y$ \6 c8 t) Z7 V  r! Y" s
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
; C7 ~5 m- Q' y+ v% X& o                                                to_str("in der Andockstation: \"",?.~.name,"\""));8 H6 b. w+ p8 i% B( H
                                else
) D1 K5 s5 }) i  b/ L! k! B                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! H5 n* k. m4 @: K! D8 U
                                                to_str("in docking station: \"",?.~.name,"\""));                                5 A+ w: x4 s. |
                                end;
( t& \# K" d' X- ^! b+ z5 v2 F                        else
9 d2 P3 t( x& d                                @.Destination := assignLObj[1,row];% J4 n" X2 s5 ~* ~+ p
                        end;                        " r* Z9 p- B. h. I0 R3 R
                        newDirection(@);
# ]# N' J4 E, N+ w                        @.HasOrder := true;
5 t0 y7 H  t; D. }                end;
$ r: ~7 m0 \) `6 G# I  n7 s- H! d        end;
& J9 s6 y# p% aend;        -- of the method# q; t" D! o3 I; n
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
* y8 U  N, r3 `+ \5 X
5 F4 C' v& x# Z' V6 V这是AGV_putin中arrive的method。
) `% j( \3 N" U1 {! n) j0 S+ n7 z
: U% w7 T# i2 |/ f* ^- E* W4 W当到达物料速度越高时,这个报警更多,8 |+ a$ l3 c% Q/ ^7 [. f
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
+ w/ I! I6 @0 `$ X$ W7 Z) F程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?% w5 L( e3 A$ o) A
! D  k: D, W2 D0 i( H; L; z4 ^, T
另外一个小建议,就是move,所有的move都可以这样
; H( S2 x5 F& F2 E$ Qif not move() then debug end% |4 \7 K7 `1 X0 V
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。) x; x1 f" G; R! m  W9 w
plant simulation中的free libraries有AGV模板,
# n' b% Y! a2 V* i5 U, T% Y里面也有案例。$ {; `1 \- k8 p: b
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
6 O0 `2 H* m, V* u1 u1 y( b4 n& M
; y& w9 b* l3 c) i; t我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
/ i  g$ L/ A- \1 _) F( ^) O% D; d' w
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
5 _. ^  ~  L# d+ o这是AGV_putin中arrive的method。
' t8 Q- l- D. z  g2 Z) c
/ @& \, p  Q$ i) ?2 p: f当到达物料速度越高时,这个报警更多,
7 C% L/ W! r2 W1 U8 }
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-10 21:08 , Processed in 0.020986 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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