设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6093|回复: 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', H- [$ F  S3 S$ K! ]
*/
3 k0 B" ^5 c. y; x# R7 {is! O. n4 O2 ~4 }8 m: S/ v
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
4 \* @& ~+ q& q$ _, Ldo
$ d; z1 M# N# J9 n( `! O        Lan := rootfolder.Internal.Tools.AOLlanguage;
( e3 K8 m' _$ [; E' d        if current = @.Destination -- else return
1 _. }! O' W+ ?; {/ ^        then
( ?7 ?# N/ ~' Q: |$ J                @.Destination := void;
+ u: g8 `7 j1 ]- H; x. H" y- {" G                if @.occupied then
. R* ^- y1 H9 |                        part := @.cont;4 }$ N$ w# L  e4 E
                        @.transpOrder := void;9 u- y' `; P  l
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,. c6 i6 Z. O& x+ j
                                @,root.eventcontroller.simTime);$ P0 B: C$ c5 f; v3 F
                        @.HasOrder := false;! }2 Y' D' W& d% m* o! ^
                        @.DrivingHome := true;
! I, F5 {! l4 ?% k                        rgManager.tryToStartTransOrder;& \& b* J5 I& x& B- Q
                        if @.Destination = void
; E" I5 u2 N" y8 }% `" m                        then -- no transport order for vehicle @# \# T2 s4 E2 L2 x. G% [
                                @.Destination :=: P8 M' H! `# a/ l1 y" X2 |8 @4 ]
                                rgManager.nearestFreeStation(@,track.~);9 ~2 C+ c8 W) K5 ?, T
                                newDirection(@);   9 M% C, m9 w8 d/ [- `, s
                                if @.Destination /= void then% |3 q3 F" _8 k! G6 E5 j
                                        @.Destination.NumReservation :=& X: E; n) i7 ]. b/ A% _2 Y
                                        @.Destination.NumReservation + 1;4 R* ?$ K+ F& [" |
                                end;
0 }4 a& G& S+ f$ r6 M                                @.CurrIcon := "drivingHome";8 Q: }% {$ r2 w$ W! ?
                                @.DrivingHome := true;
+ k  k$ J2 [% k                        end;& B/ O* ~0 j, @1 r+ o- \& g) B
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
5 K4 W/ ?5 Z% X% [" F                        part := @.transpOrder;+ K9 U' q" c" U2 y
                        part.move(@);-- load part; _" U9 Y/ T/ F& `8 V5 }( g
                        @.CurrIcon := "load";6 r* s* z* O$ ^. ?
                        GlobalDistObj := part.globDestination;
; E6 f% c% u, v9 Z                        assignLObj := rgmanager.rgAssignL;5 B9 R9 o/ g2 h$ q# o
                        row := assignLObj.getRowNo(GlobalDistObj);
8 `+ H! H- s( [4 [; A, k9 x: r                        if Row = -1 then -- since 70
" s& @3 D6 k# G                                if lan=1 then
5 G1 v$ H1 i( i) Q( D5 O" U! U- J8 U                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
* d4 [" Y( f; ~5 a; j9 \( U  |                                                to_str("in der Andockstation: \"",?.~.name,"\""));4 r+ k4 u: f0 g! q
                                else1 Y. E# l; l6 n5 D
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," [7 Q2 \% P8 R+ @% t% Q+ f
                                                to_str("in docking station: \"",?.~.name,"\""));                                4 Y: M% @5 q% S0 ^
                                end;
% e" k) p8 ?% j* J. e+ D' [                        else9 T  |3 e) J+ `# S$ j' s) T% E
                                @.Destination := assignLObj[1,row];/ d+ s5 k4 ~  W) V  o( j4 {
                        end;                        7 `3 e( E9 _. V4 D0 \' {
                        newDirection(@);
9 B# Z; F# z7 ~2 u                        @.HasOrder := true;
2 u1 K6 B4 p; w( }. @# v6 z6 m                end;
  q, ?/ k8 S( r% W8 V$ N8 p5 j$ u% t        end;: Z9 R" V0 e& X+ n# J; {$ O: ^
end;        -- of the method+ m3 V  m! _6 ], j. E1 m5 h) D
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 - R/ w; l/ J1 q* N& Y

2 f3 t4 h1 Z) ~/ D$ L- H这是AGV_putin中arrive的method。" s. v  C! H2 A1 O8 u
  ~) k8 v+ t% ?% H3 E  h; p
当到达物料速度越高时,这个报警更多,' v' W, D* q' T3 V
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
7 r8 V" U3 ?, i3 E) ^5 G程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
* x: k; _$ a0 n8 f# G& Z( F4 d6 _7 c; M- T% I" b: O, |! l! x2 C
另外一个小建议,就是move,所有的move都可以这样
9 O; ^1 o: Z' E& S4 }if not move() then debug end) I( l" r+ I  }0 E1 L! p
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。$ ~% d& P7 B  K! k# d
plant simulation中的free libraries有AGV模板,! m6 G4 R/ Y5 j& X( |
里面也有案例。
( {8 s" t, k, F/ Z, c我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
: ^9 w* h: u, r# C; m
' m4 _1 Y% E* R, a1 w) L我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
- C" p- `/ u  k" {- L7 R1 q7 ~' E) }
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
5 |8 L- _0 c! m7 k3 h这是AGV_putin中arrive的method。
! A9 A" n) s% K9 g
, x, t5 ?5 m' p) I2 f& `当到达物料速度越高时,这个报警更多,
. S5 ~7 |' X2 x
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-1-18 00:38 , Processed in 0.020487 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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