设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8417|回复: 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'1 H! [9 x; D$ G) S3 T
*/% i" _" v' W2 _/ D4 r+ J
is
! W- W$ u( U7 w4 ~$ T        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
* n. q1 s1 ^2 [& Gdo5 C5 n0 b7 C0 w6 e4 S* h# f+ g
        Lan := rootfolder.Internal.Tools.AOLlanguage;
+ [( U  [4 d/ M* _2 y# }$ `. U        if current = @.Destination -- else return
1 h' Y9 M6 o3 z6 K        then
- X) k( O& z3 A. D$ [                @.Destination := void;) I' F0 }) R5 T& |) @
                if @.occupied then# ~1 E/ p/ B5 Y4 r! I2 y
                        part := @.cont;: b% V" \5 `5 h5 C4 p
                        @.transpOrder := void;
5 N6 K* k3 ?1 T8 G# C  k                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,' D; i# h: v! ?. N' @' t
                                @,root.eventcontroller.simTime);
7 b# V( m" C+ ], ]; f7 x7 ]5 p4 @                        @.HasOrder := false;  I! n: g9 B  n+ c9 o2 B
                        @.DrivingHome := true;7 U- u; `' u5 ]3 ^3 M
                        rgManager.tryToStartTransOrder;* S" B6 P) Y0 ^2 a- N
                        if @.Destination = void
) V, J: `: v* j* z                        then -- no transport order for vehicle @& T" u9 G# j  S) j+ y. a0 q* L0 s
                                @.Destination :=
% l$ W$ _0 Y. U+ p# d5 h                                rgManager.nearestFreeStation(@,track.~);
* q3 x. Q1 _/ F2 T3 p                                newDirection(@);   
3 B  ]7 h, L. f/ z( a$ i: W                                if @.Destination /= void then
: ?: I0 y+ j  ?1 }                                        @.Destination.NumReservation :=6 q) @! A, g7 v
                                        @.Destination.NumReservation + 1;, s- S/ ?5 E6 t/ z2 T
                                end;3 e* Z4 B, d2 Z0 R5 z- E* ]8 a! n
                                @.CurrIcon := "drivingHome";% V- h8 A4 i4 O$ h* _# Y/ p
                                @.DrivingHome := true;$ y; F% ^5 E# v8 K2 p) L) k
                        end;! W- Y6 b( r8 f9 P; Q/ O, r
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 [  R) j; ]# H( W$ A) |9 U                        part := @.transpOrder;
. V. o) j! C, Y, d, h8 W1 g0 x                        part.move(@);-- load part
3 p# a' e% N) Q$ u8 b5 O                        @.CurrIcon := "load";% Y# x) C: G& h
                        GlobalDistObj := part.globDestination;
- H2 b# k' M0 T; X0 l                        assignLObj := rgmanager.rgAssignL;! s6 ^* W. `' p% T4 `  \. y
                        row := assignLObj.getRowNo(GlobalDistObj);
1 Z! [( S! {1 ~" C/ a4 \; Z9 r( `                        if Row = -1 then -- since 70
! g; H% L/ K( |- {1 b& c) k6 q                                if lan=1 then* w3 {5 k. L, q3 y1 D; l' f& _
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 x0 g4 r! M. ^" g% g/ Z  ]                                                to_str("in der Andockstation: \"",?.~.name,"\""));
+ i# N: A. j4 X* u! w3 Y                                else
8 U0 m# k- \% F3 `/ u$ F                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),1 p3 w0 O( R- o* l' q$ ^
                                                to_str("in docking station: \"",?.~.name,"\""));                                ; f( ~( w: V! H& @& D6 H
                                end;
# b4 Q2 K3 l6 W% g1 g' @# w. b                        else6 ^: O6 X& r, _  c: I9 t
                                @.Destination := assignLObj[1,row];: l# T* e6 G4 B, c8 `$ ]' ]7 C
                        end;                        3 n# m/ E+ ^% F9 Z
                        newDirection(@);) y* D# O* v& `
                        @.HasOrder := true;. M5 i6 d/ E. e7 u2 n1 `9 w
                end;
+ q  Y! `, X8 Q' ~0 l8 a1 {        end;. O& e$ C# u0 Z# B! v) ~
end;        -- of the method! K! a; K2 ]( L+ n" m* @* M: S
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 ( u3 S% o; i9 g2 [. E( O/ g- G# p
) s0 Q: S2 i+ s# |
这是AGV_putin中arrive的method。. N( k' o3 m5 e  o
+ D( v9 T$ N  \* T) ^; z
当到达物料速度越高时,这个报警更多,
' H) V. J- h3 M5 i9 {! ^可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
) L0 G# a1 O- S/ v" p: c: O" }程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
5 J- z+ j" ]8 j. Q7 T/ b& A( |8 F. a$ K' r1 W  V& V/ N- P
另外一个小建议,就是move,所有的move都可以这样& q8 k9 L6 q# z, p7 H
if not move() then debug end7 ?8 d) E8 w: t. f% M( i
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。& B( O% W# ~( J
plant simulation中的free libraries有AGV模板,
; ~* O' z4 H! d( J7 w" I" O里面也有案例。9 @6 e$ [1 F. [) h
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
& a# a& u; r- M  x( W7 v8 P7 Z/ L" R4 I
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 & U  F/ H  q% t5 m, `% z
4 @7 p: u) B  B- D4 P0 s
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
+ j5 S3 }' o& y& q0 T7 |% A6 ?这是AGV_putin中arrive的method。
0 L% \$ {- y- I% [
5 C/ }% [+ s9 j# X, {' w- p# ^当到达物料速度越高时,这个报警更多,

4 S) [1 l4 n4 J" T5 ~% g9 w另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-2 15:15 , Processed in 0.016619 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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