设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7015|回复: 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'+ z% }' c1 z8 |- K) y; x3 T
*/& P- G( P, R" E1 v. F
is3 o: b4 }+ |, p7 D0 k: s
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;  }7 g1 V7 I3 A! y) t
do; @; K6 T' ~7 l  `
        Lan := rootfolder.Internal.Tools.AOLlanguage;# X+ }+ q6 `' |8 V2 T, {$ q+ r
        if current = @.Destination -- else return9 G5 o5 j7 J/ P+ W7 u
        then& B, `+ F8 G0 R: [
                @.Destination := void;
9 T9 p% c: g: ^% Y                if @.occupied then
5 Y" e& i3 `5 V2 X3 j                        part := @.cont;
2 L4 p0 t  R1 t% ^                        @.transpOrder := void;2 R" v0 z1 n4 H4 [1 R/ v* F, `2 `
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 w$ y" g3 X# i( C6 O# U* z
                                @,root.eventcontroller.simTime);
, v/ T7 \; ~: o  |5 w- _- q  `                        @.HasOrder := false;( k# h3 e( ^- B5 b# z
                        @.DrivingHome := true;
- k: e; A$ P7 z                        rgManager.tryToStartTransOrder;
( L8 Z" o* N7 l8 X! |6 L. E: G                        if @.Destination = void; O& x5 h$ w. y8 s  \5 U
                        then -- no transport order for vehicle @
3 E$ D& u% K( W2 s* q- |5 e                                @.Destination :=
3 W! \3 H2 \! v( {. c+ B4 N. G6 }                                rgManager.nearestFreeStation(@,track.~);1 `" m$ x7 {7 r3 H
                                newDirection(@);   ; ?/ Z, ?# v$ o, n* S
                                if @.Destination /= void then$ z9 Z" C# \* ~
                                        @.Destination.NumReservation :=: L) K4 \: X. M( U) p
                                        @.Destination.NumReservation + 1;7 e# n' n/ t1 c2 V- j" g
                                end;
3 X* \+ ^/ i" {# N0 @                                @.CurrIcon := "drivingHome";
4 b9 ^, [& z; Y3 D9 i% \3 T                                @.DrivingHome := true;
+ E& \/ y9 c1 H' @/ m6 f                        end;/ {6 ~1 E6 s* z% \0 Z" t7 O
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- F( c* N5 I% e9 ~) C& o2 u0 ~                        part := @.transpOrder;
' |& U. m! C  D- i                        part.move(@);-- load part
& x+ z7 q7 E* g) _% A                        @.CurrIcon := "load";2 V; G6 N( ~, {* R, j8 p% u/ K
                        GlobalDistObj := part.globDestination;7 _0 S( U, x1 \& Q3 n# [( |7 R% f$ q
                        assignLObj := rgmanager.rgAssignL;* B! d, r; W' a! I) B# \. U3 ^$ n
                        row := assignLObj.getRowNo(GlobalDistObj);* }- k8 |+ d# d& c9 W4 E; h& V4 T
                        if Row = -1 then -- since 70& d- J2 f$ o' G0 B% J
                                if lan=1 then
2 I2 j5 T) R! l' F2 t5 e5 K                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," b$ O5 D. i  b* {9 x
                                                to_str("in der Andockstation: \"",?.~.name,"\""));  k" s3 r5 e3 V3 C9 d
                                else
' x0 w9 l" w3 |4 e/ r                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# `+ r) G) @# b8 \6 L4 W                                                to_str("in docking station: \"",?.~.name,"\""));                                " L! l: K# {, }& r
                                end;
: o/ U* Z1 z. o% a' S% M4 ~                        else. R0 N3 Z# e( Y3 g( ?& S) y
                                @.Destination := assignLObj[1,row];
. c% V2 w) H6 Z# X6 s+ G  A- C                        end;                        2 y7 K  u3 I# v5 s. X, Y, h; J8 Q
                        newDirection(@);0 ~) E+ @$ l- p
                        @.HasOrder := true;
/ Z) `( @0 l( t                end;" \. A' V* b' x0 ?
        end;
) o0 h6 x! y5 _, H' ^end;        -- of the method  Y, S) n1 X1 v# y) a
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 4 z2 J( i# h2 i& S$ {
! k8 m  W/ r& F" x3 c+ N3 k
这是AGV_putin中arrive的method。
4 R! B2 f! e6 w0 M
& O. n2 K, d9 |8 ?当到达物料速度越高时,这个报警更多,# o* G2 v. p; M, }) C
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
' B& M9 I) u5 J6 j程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?$ y3 R7 K" d) o( |5 V

" R, y0 n! {. N- M! n另外一个小建议,就是move,所有的move都可以这样
, s& V) x; J6 t" Cif not move() then debug end/ f2 L3 u- |. H( W$ ]
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
5 {+ ~5 U1 m4 M# F5 ^& w5 Yplant simulation中的free libraries有AGV模板,$ m- e" u; Y" M0 w! K/ f8 s9 j! M
里面也有案例。
; K2 `" ]# {8 N我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。/ Y( u- C0 ]' N- {; \
2 l; o- B& a  y0 x1 B
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
) Y9 k. e# S% D& I
* B$ b5 z' v8 C4 R% u那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ) g% p5 O7 I7 Y/ X# T' S5 \# C; L
这是AGV_putin中arrive的method。: i6 u6 }4 k% {' }0 d" [6 f

5 W+ ]" R4 D/ V- }! L& M7 ~. l当到达物料速度越高时,这个报警更多,
1 `4 v/ U: ]* k2 g
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-11 10:41 , Processed in 0.018765 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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