设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7996|回复: 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'
; d6 \, c# g- N, @8 w*/
8 ~$ F* k; @- r0 ^is- Y1 B. x. S. K) `
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
+ l: j3 l1 l2 V, a  s0 [2 V9 Ddo2 Z/ l  O) n4 W4 a1 I
        Lan := rootfolder.Internal.Tools.AOLlanguage;5 ~* Z1 u: V/ C  N
        if current = @.Destination -- else return0 I: J' M% u, U. }" P: s
        then0 V& f6 {3 e* v9 H& ]
                @.Destination := void;0 o3 D$ _6 v4 l  x6 r& T4 g1 O% D
                if @.occupied then0 w8 `. Q  X2 Z; u: L
                        part := @.cont;
" p: t: R3 Z/ `! }                        @.transpOrder := void;
) n) B% `! j, c3 Y8 f' O                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
8 v5 O. I3 c+ @4 c, [/ N! O8 Z- b                                @,root.eventcontroller.simTime);5 e5 o5 a4 G) d% L# K2 x
                        @.HasOrder := false;
- U: l2 {0 \+ C+ n/ S- f& P) Z                        @.DrivingHome := true;
* L1 }5 V( E" i8 Z  x" L' S                        rgManager.tryToStartTransOrder;
" t  u3 T- m/ H: S2 X                        if @.Destination = void0 [5 t5 U& f( [, R
                        then -- no transport order for vehicle @! }5 z6 `+ @* M1 w4 U
                                @.Destination :=
7 _8 y2 b% V4 d5 k0 V0 n2 T# }                                rgManager.nearestFreeStation(@,track.~);
& k9 D7 x3 Y& w                                newDirection(@);   " Q6 u' O- q& \* {6 b
                                if @.Destination /= void then; n& `; ^) C, L1 [/ o
                                        @.Destination.NumReservation :=! c0 {( S9 x8 o* G( x! U6 o' D2 [
                                        @.Destination.NumReservation + 1;0 y8 ]! T$ O- I, s# c4 b
                                end;
# q! o  p1 N3 J: J                                @.CurrIcon := "drivingHome";2 S: c- u! A! \+ k! _! ^3 @3 d
                                @.DrivingHome := true;/ Z; w; u' c7 e2 A
                        end;3 x) ^2 T, W9 O3 G% v' `" i
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station$ {: Z( h7 {0 y9 U0 p
                        part := @.transpOrder;' c+ L/ k7 a/ ^! {
                        part.move(@);-- load part/ S( s6 u3 C$ E, ?  j7 L
                        @.CurrIcon := "load";
. r0 Y9 v  Y. O# B7 j& [                        GlobalDistObj := part.globDestination;) |2 s' E* O. D  [3 D- t: ]
                        assignLObj := rgmanager.rgAssignL;
+ B2 g6 @& k/ |0 g. ?' i" W                        row := assignLObj.getRowNo(GlobalDistObj);3 P  M4 ^! H4 v1 H
                        if Row = -1 then -- since 70: F" D7 Y5 T/ \6 @' m% [
                                if lan=1 then
! c& \! F6 X1 u, ^6 D3 J                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
) w$ j; P) m- D( ]                                                to_str("in der Andockstation: \"",?.~.name,"\""));2 s: w1 C6 W, S
                                else
. U' b" e2 q$ @$ r: B( x                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: d- p5 K4 m1 \8 }% y3 `3 |
                                                to_str("in docking station: \"",?.~.name,"\""));                                : }5 R! w& M& B3 C
                                end;
* M. p4 f, K! f% i% Z0 C4 i                        else! j2 ~1 e7 M+ Q' f6 Z) v' c
                                @.Destination := assignLObj[1,row];* F0 A1 a$ n+ D: P6 E! f6 |
                        end;                       
" `* E2 B: b2 p; O. z                        newDirection(@);: Y3 W, ]) a4 f! @) L9 Y) T
                        @.HasOrder := true;' \. ?9 Y. t- |7 ~& X+ L, o3 M
                end;
) P: t( b6 X. F2 K; H/ e        end;
7 A- @' s/ ]  `; F$ Q8 C- ~  fend;        -- of the method+ j2 h: \7 u! ^1 y* j; X
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 2 s( _* W) d! e, H
- _" T7 H. s$ n# i3 d) }0 i- ~
这是AGV_putin中arrive的method。
' s/ {0 L" a- l! h2 d4 I4 v8 ?* @: T1 j' U2 @# O3 g
当到达物料速度越高时,这个报警更多,
# Z' T- O& U* J8 ]/ M可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。3 Z+ j; E8 I9 p3 F# q, d* O
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?( d" {) t( r( N  Q5 D" d8 e
0 x+ a5 Y# A) C4 i6 B0 `
另外一个小建议,就是move,所有的move都可以这样
, o- N$ I5 Y" _7 `if not move() then debug end
1 y. v. q- v! R9 r+ r( B这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。3 _/ ?* x9 {% l6 ^6 f% t0 ~
plant simulation中的free libraries有AGV模板,
; q9 N" e( y$ f5 E7 z里面也有案例。. X! L( S" F7 E$ ~/ S$ t1 Y8 B
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
2 Q( z. Z4 o" w, [! {, s: D, C, p, b/ U
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
1 C# L2 C/ D$ v2 s2 @. A* \4 f: |( L4 h
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 $ G0 l( P1 a6 @
这是AGV_putin中arrive的method。0 T" d3 x. o1 Q4 E% {

- n6 j. z: u( I/ B% N2 q当到达物料速度越高时,这个报警更多,

' K. F0 a9 q# m" W+ z$ V另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-9 22:19 , Processed in 0.022936 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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