设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 10292|回复: 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'5 X6 y1 |  p" p
*/: V& j- E% [" _3 \
is
) g" M7 C2 v: T        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
* x0 a- G) C4 B  ~2 m4 Tdo* h7 a5 s8 y* c+ D* s7 e; ^& x& u! q
        Lan := rootfolder.Internal.Tools.AOLlanguage;
& W* g: @% W" i& F. j$ w4 Z" `/ O        if current = @.Destination -- else return
0 G% J; h6 G) I; P. w0 ~8 J        then4 J8 @0 d3 C) ~- B3 ?
                @.Destination := void;/ G6 M) K3 D( B
                if @.occupied then
& c' G2 e5 p. Z; C+ u- w                        part := @.cont;
) w; s+ {( n) {2 W                        @.transpOrder := void;
! t8 |7 k7 d$ T9 a3 `  a                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! G  w  i- s1 _7 e8 G6 r+ T
                                @,root.eventcontroller.simTime);' e. ]4 z% [$ y+ ]* z$ H
                        @.HasOrder := false;/ Q  F2 A! r5 o: a; W, M
                        @.DrivingHome := true;" [( T8 o. S1 o0 X: k( u
                        rgManager.tryToStartTransOrder;' s  X" k! M% ?. R% @* m
                        if @.Destination = void
7 Y$ D. @. K# g$ \                        then -- no transport order for vehicle @
6 A8 Q; Y3 D  n0 _: B+ {+ R/ N                                @.Destination :=! B* p2 O/ p! S1 k; @) P9 |8 @
                                rgManager.nearestFreeStation(@,track.~);; {, Z3 j) @& k4 L3 v6 n
                                newDirection(@);   
+ \1 A* r8 m1 p                                if @.Destination /= void then
) y  ^3 ^. b' M- j3 r                                        @.Destination.NumReservation :=6 B  u8 [$ B" ~. r
                                        @.Destination.NumReservation + 1;: y4 }. A  }, e$ R# s; z9 @
                                end;7 O5 l  @7 T" K
                                @.CurrIcon := "drivingHome";$ c' X9 R1 A' L
                                @.DrivingHome := true;
, w" i5 n# E4 n2 K) a3 d                        end;# Q  ^! Q- P0 h, o3 X3 ?) [* v' U
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
+ P- w, o/ o' d                        part := @.transpOrder;4 u! b+ i" S/ ]! d0 s* W% @5 z
                        part.move(@);-- load part: R7 a% ~3 W+ n* e, i* J- E1 w
                        @.CurrIcon := "load";1 {- g+ O# {- W8 W, e
                        GlobalDistObj := part.globDestination;
1 G% ]1 s5 O* B, d' v                        assignLObj := rgmanager.rgAssignL;
2 m- b. `" H+ j) c( [                        row := assignLObj.getRowNo(GlobalDistObj);3 u: m8 A; }4 o
                        if Row = -1 then -- since 70
/ S' r& `  D( A/ G! t, {7 L                                if lan=1 then# z' q7 a) t: l8 k
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),3 l9 y9 I& R2 o" l* D  w. b
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
% a& ?. [3 z. {# V. X                                else( G% h; r" m; ~+ p% a
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. D  S; l3 q+ h) g
                                                to_str("in docking station: \"",?.~.name,"\""));                                3 {. C8 p' ?% {# O! o( q
                                end;' T( Q) ]* m" e4 ?
                        else
; t# _$ s2 s" K. B                                @.Destination := assignLObj[1,row];0 n2 r9 r) m; O, K' Y# L0 {
                        end;                        / P( g+ |4 j& b/ }
                        newDirection(@);
: f$ `$ J4 j! r/ ^9 C) I                        @.HasOrder := true;5 a9 @2 S6 S4 n0 S
                end;, T* ~* j9 c: F6 f7 [& q) i
        end;
! c9 r) c+ k  W$ Y# Z& Uend;        -- of the method
; ~3 N. m. a7 [# i- V3 [5 }
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 " f) Q8 u$ U2 Y

; m, r& ~( D7 f6 E2 U这是AGV_putin中arrive的method。1 ~  Y3 O2 v: Z$ _$ ~
9 @& ]4 {6 E- a) ]1 ]8 _+ n' S/ W
当到达物料速度越高时,这个报警更多,
6 o; m% \: r% `6 u, O4 x可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。6 H# [/ l; r1 c
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?$ Q2 [9 q. K4 ?, R3 S% C

' m/ ]/ i2 D" o, J5 Q& i# e另外一个小建议,就是move,所有的move都可以这样
2 q7 I2 j8 M3 g7 R' X: `4 W1 Z# iif not move() then debug end
+ L  o# M8 O6 {1 C9 l这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
: a. y& A2 ]4 \% l: f$ ?plant simulation中的free libraries有AGV模板,3 i$ n" E7 Y6 N( T# B
里面也有案例。/ X0 {4 a6 T& b: \: T5 \+ N* n
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
& J9 ]/ X( c: K4 x+ L* ?6 }" P$ k0 ?2 B/ D( a9 \6 ]
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
1 i( i4 A3 O" `( x9 R. i' B& k7 V" B4 H2 L. ^
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 7 ^* U6 X5 O+ b! q. l6 y) e
这是AGV_putin中arrive的method。
% e+ E9 n% \0 {' G
6 v, F1 g9 p) E3 {当到达物料速度越高时,这个报警更多,
$ [& [4 ]( y- d# O
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-9-25 01:01 , Processed in 0.020673 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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