设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8229|回复: 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'
) Y$ E  C3 Z% l  A4 X7 x*/
  C! o5 S  Y. j# W  Q1 \is, |) |( W9 H) g2 o8 v) M
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
: R2 p# t7 ?2 Ydo8 X9 j( E! ?9 O2 t, k9 e) l/ _; n
        Lan := rootfolder.Internal.Tools.AOLlanguage;0 E& ~7 Q" n1 ~- O, a
        if current = @.Destination -- else return" e; {' O; h: c" x0 n
        then; R) }7 r: L6 |, _/ X9 x( A
                @.Destination := void;4 K9 K5 h/ n; q$ F
                if @.occupied then
; Z2 o8 ]- l- d. l4 z                        part := @.cont;6 y' O1 S# E5 ~9 t9 _/ o$ ~4 V
                        @.transpOrder := void;7 T* x# Y" F, |5 |* A
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,+ U& a3 i+ y- J7 k2 `" ^
                                @,root.eventcontroller.simTime);/ z) o& U6 [2 |- z
                        @.HasOrder := false;
. y8 m5 J' w  V3 h1 h1 @, \8 B                        @.DrivingHome := true;
  d- ?- U: [1 I. z4 _' q9 \+ G! Y; M                        rgManager.tryToStartTransOrder;
+ p7 l: _5 F& b$ T, H. V                        if @.Destination = void* f6 {/ ?1 s3 u; m5 V
                        then -- no transport order for vehicle @
4 i6 \7 N2 e, R' c: ^6 x' H                                @.Destination :=5 m, N2 q! P: J
                                rgManager.nearestFreeStation(@,track.~);
' I6 H- u  P$ T5 U( S                                newDirection(@);   
4 A" A5 T* B, P8 O/ L! P( e0 k, T                                if @.Destination /= void then
7 X9 m5 j/ Y& X                                        @.Destination.NumReservation :=2 S5 O0 G& u( }0 J( S
                                        @.Destination.NumReservation + 1;
3 p2 z! e! Z; B5 \# g                                end;  x2 T. M1 ?: v0 U' E6 T0 T
                                @.CurrIcon := "drivingHome";' e5 N4 [& K' w8 S/ M
                                @.DrivingHome := true;* M* p/ Y6 {7 p9 c$ {9 |( U! h$ |& ]
                        end;
% Q: {- s" t8 `3 Z) a                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 y- J9 c1 E* Z                        part := @.transpOrder;" L- k" C. [& |
                        part.move(@);-- load part! W) z+ B# s6 R* t# I4 {; F
                        @.CurrIcon := "load";, F  f, Q) F. w- e, \2 L1 Q  a
                        GlobalDistObj := part.globDestination;2 q9 h* ?) N4 e( x
                        assignLObj := rgmanager.rgAssignL;
* o7 f: i2 x$ _( T# G6 }+ Z                        row := assignLObj.getRowNo(GlobalDistObj);( [7 r5 Q/ F5 M: J- o2 d" @
                        if Row = -1 then -- since 70* G; v2 x0 _0 w& ?1 g
                                if lan=1 then
. b5 L4 d% x$ _! ~                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
$ S' [1 I/ X0 o, n8 @7 @6 k                                                to_str("in der Andockstation: \"",?.~.name,"\""));
5 I# E3 k  R! w- w7 d                                else
4 l# [' }0 t# n: H                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),( W; t4 g  j4 w5 S) d/ W, @
                                                to_str("in docking station: \"",?.~.name,"\""));                               
8 j$ Q+ B( b: O* W6 i; ]9 j                                end;! u; f* [/ n1 I( m4 g7 Q/ A
                        else2 }/ H& P) J" W- I7 d
                                @.Destination := assignLObj[1,row];# }- Z% I: j4 W: M5 _% X
                        end;                        8 l; V6 {9 l' D5 T; k: l
                        newDirection(@);
, u9 R# r% u/ g+ N! o5 v# F0 k  e                        @.HasOrder := true;  g  @7 I) R' }
                end;
; c8 Z  i. Y& m; z! t& x        end;* P8 ^  e1 Z, X7 Z
end;        -- of the method
& A. p: @& g) B0 \' g' \
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 0 x# ~. y$ O; c/ X1 {# H# C5 s

$ y3 N+ [1 ]" I. `$ W5 }4 {这是AGV_putin中arrive的method。; m( G" d' L5 D' @
* o; d3 r; @0 I4 J# F
当到达物料速度越高时,这个报警更多,( U8 D1 E+ ~/ i; j
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。" K$ C$ _  p* `1 z  p
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?" r9 f8 o) ~8 i
$ B1 G3 l- \0 O  ]
另外一个小建议,就是move,所有的move都可以这样
7 X: c8 A) {# }  tif not move() then debug end! c+ v0 N; n8 i7 S6 {0 F( i/ U
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。% U1 z0 |0 r3 M
plant simulation中的free libraries有AGV模板,
: F, C3 U3 I& A6 Y2 C7 c里面也有案例。
: m$ k+ D; ^) D! J我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
) M# K: q4 Z4 E) [; ]+ @% B# p; B  ]: p5 N( U" j+ ?
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
/ {/ I$ p5 ^# N3 R2 V* E3 z- h
1 y9 r) w4 @% X  H6 q% C; `那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ' f5 @* ?" N* @& i; x. D
这是AGV_putin中arrive的method。) N8 i3 T, c/ Z) \

, X8 P) b6 o3 ~6 J当到达物料速度越高时,这个报警更多,

* F$ R8 ?! q5 x7 o, L另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-22 06:13 , Processed in 0.018042 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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