设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7913|回复: 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') v9 A/ Z2 r" R, `  p0 z- H
*/
2 V" h- A' B6 a1 B! _is
+ Y% M; L9 z( K# X* q! _! m        part, GlobalDistObj, assignLObj:object;row,Lan:integer;. f  p+ C9 y$ K% H
do
2 }1 @/ D7 x" I6 ]2 a# q2 j# m        Lan := rootfolder.Internal.Tools.AOLlanguage;* Z7 _9 t1 g* w; h
        if current = @.Destination -- else return
" g7 m/ J$ ]: V9 }5 a        then
' C; c& H& L/ b  [- g& q                @.Destination := void;
8 r+ H$ J1 u/ \; R9 P                if @.occupied then' d; Z; Y; f, H& m1 ^' b
                        part := @.cont;
+ |" p7 g( j9 `# A* \1 ]0 `0 e7 K                        @.transpOrder := void;+ p0 ~1 G0 \7 T2 h: o
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,& `  K0 I, s$ b; k" S7 V' X
                                @,root.eventcontroller.simTime);- i, H1 U- U2 P$ K; `
                        @.HasOrder := false;- Q) v: F/ R+ {  a
                        @.DrivingHome := true;
3 ~( R) Z1 R: m7 ]  [$ S                        rgManager.tryToStartTransOrder;  A4 {9 _5 _1 N5 Q. f6 w
                        if @.Destination = void
$ J+ J  r: x; U8 @/ h( f; j. z                        then -- no transport order for vehicle @
4 P! @2 P. }  W, ?                                @.Destination :=6 w: l9 A. _6 I; j8 y
                                rgManager.nearestFreeStation(@,track.~);6 ?6 G. _/ G# |2 q+ E% q' L
                                newDirection(@);   
! S) Y7 O- D4 T1 `2 v6 y2 F                                if @.Destination /= void then
/ [7 V$ k+ u3 E* P* `! M                                        @.Destination.NumReservation :=7 l) d( i( u0 K1 H8 ^# p# Z! W
                                        @.Destination.NumReservation + 1;
# G" b. K/ |/ v( r                                end;% @/ k! `7 y2 q1 N5 F
                                @.CurrIcon := "drivingHome";6 c6 j: r8 I& _- i
                                @.DrivingHome := true;
% o4 k+ w1 m* V, A. c  s                        end;4 i7 L; e% Y& ~6 S
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station, H6 f9 @& M6 d
                        part := @.transpOrder;# |) T6 q  r  z( m4 v8 ^6 G
                        part.move(@);-- load part
2 y/ l  d4 f0 i/ u8 ]' `" ]4 |                        @.CurrIcon := "load";0 r- ]( c( `+ T: J1 r
                        GlobalDistObj := part.globDestination;
+ x& \" [5 T4 x* v3 W                        assignLObj := rgmanager.rgAssignL;: K. t5 s/ _( ]
                        row := assignLObj.getRowNo(GlobalDistObj);" S: s& a, S1 U+ k' N) L
                        if Row = -1 then -- since 70, @* @0 `2 e' b; ]: K
                                if lan=1 then
7 J6 ~3 m" y$ c1 v" i8 e                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
0 x; I1 d) A3 |, X                                                to_str("in der Andockstation: \"",?.~.name,"\""));" S) {$ k8 I. o$ r$ D) e8 v; \6 ?
                                else) A% y! H0 x+ |+ ~% U
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),* |$ j' D4 g) [$ S1 E
                                                to_str("in docking station: \"",?.~.name,"\""));                                  R" I& H3 G6 b# V4 `4 j
                                end;! C, x' e/ ?  Q7 E& o5 y/ y; ]
                        else
" `" b+ ]: c4 L6 ?3 k0 t- r                                @.Destination := assignLObj[1,row];6 E! f: X# c" Q
                        end;                       
" A! ~/ D: g6 l6 G4 P4 ^                        newDirection(@);( C: M0 D- G4 k7 O7 N  O% A
                        @.HasOrder := true;
% M  a7 U8 [% p! U* P' _5 p- o" C) w                end;) r) L5 X/ p! O. I6 w
        end;
# F& r  {2 l8 w& r2 y# b  dend;        -- of the method! }: r+ @+ M  m0 M+ ^; q) J
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 7 p4 M! _# g2 ^; q1 G1 N. V! R

: g, u4 l# }6 b& A这是AGV_putin中arrive的method。. M8 m5 ^0 G% m; F7 _

6 P8 J( E) s; T( X当到达物料速度越高时,这个报警更多,: n8 g$ ^3 o, }# @) D
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。/ X; z( F3 ~. `
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
; N1 @! j7 `2 p: W3 V. n3 s
3 X; n6 `7 Y! \) G+ A另外一个小建议,就是move,所有的move都可以这样
) u' O9 c; `% P* G* p9 J2 u* cif not move() then debug end
$ @# U/ I+ T; v; _这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。9 S% t$ J) p' m8 T
plant simulation中的free libraries有AGV模板,% B0 w" |7 y2 T: P! F( A$ g9 Y
里面也有案例。
9 H7 r, ]/ O+ P8 ?我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
1 ]" f7 k4 R- L8 A  C& G1 Y9 f( K8 t/ g6 d/ X; c. {
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
3 {8 x$ w5 O3 ]' c9 ?  v
& Q7 Q+ [2 J) Q% u2 [那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ' C2 o; q! `$ Y
这是AGV_putin中arrive的method。
8 e, {, n7 [; N2 l1 ~& ~9 R! U( W
当到达物料速度越高时,这个报警更多,

; g+ D: [" d; u另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-4 23:26 , Processed in 0.057144 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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