设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7612|回复: 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'5 X/ c5 ?1 O  s
*/* g# b7 g- |( o6 l1 G
is
1 S) t0 y; d/ K8 V        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 j* o& y: |" l4 Y* cdo
3 n* x1 {0 L9 q6 f& K0 ^        Lan := rootfolder.Internal.Tools.AOLlanguage;9 a5 U# t. c4 ^6 r6 k
        if current = @.Destination -- else return. g5 j6 X2 I, H) _
        then
2 Q' [, D- q9 G) a' L9 J                @.Destination := void;1 b. ?& J, W; @; g3 |
                if @.occupied then' M/ s! W7 G! l; b0 J
                        part := @.cont;
) s2 v" I7 J, x9 }8 H                        @.transpOrder := void;! Y; {7 Z5 |3 O
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,; @/ A5 Y: z# N0 z2 j8 F, H
                                @,root.eventcontroller.simTime);
1 F- A; ?5 _% K5 b  c" C                        @.HasOrder := false;
/ }* K  k: J, T! l& f. H/ N                        @.DrivingHome := true;
5 V: i4 }' u  j9 \                        rgManager.tryToStartTransOrder;; m5 X, U9 U5 N) r6 s
                        if @.Destination = void6 P& ]' K2 q, R/ J. p) V
                        then -- no transport order for vehicle @& K9 N: v" D3 |2 m3 K7 r
                                @.Destination :=5 K! N# D3 R9 N& c  I% G# W
                                rgManager.nearestFreeStation(@,track.~);
: C8 R0 Q# ~, @5 y& q' h2 K                                newDirection(@);   . u; {5 X' ~1 F8 B( i8 N" v0 p/ `  }
                                if @.Destination /= void then2 s* o/ [3 n# A6 R. Z- h: X
                                        @.Destination.NumReservation :=# L! Q- _( X$ `* a! l- |
                                        @.Destination.NumReservation + 1;: i0 P3 G  o% h4 G+ @" N% [1 f
                                end;: i1 A" x' g& `6 F
                                @.CurrIcon := "drivingHome";# u2 p; J4 Q2 m/ S) \6 P. ?
                                @.DrivingHome := true;
. W, O. j; L3 Y. o; g+ p5 H                        end;
, C/ X4 x5 c$ h                else -- the vehicle @ is empty, both vehicle and part are in the same dock station# Z5 g5 G# c# W  M
                        part := @.transpOrder;( u& c  n. d4 T3 O- g
                        part.move(@);-- load part1 ]3 t) B: F; J
                        @.CurrIcon := "load";
5 M: W$ j- L% Y8 B                        GlobalDistObj := part.globDestination;
* z; j8 B; q! {! K                        assignLObj := rgmanager.rgAssignL;
3 T9 x( |8 x5 L                        row := assignLObj.getRowNo(GlobalDistObj);
% Q* s& k0 s; _# U7 b$ F6 g1 F                        if Row = -1 then -- since 70: a2 G, a* c, s" ]: k
                                if lan=1 then6 \# [  W; q+ H8 `, w
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
) P5 A+ x) y% D                                                to_str("in der Andockstation: \"",?.~.name,"\""));4 ~6 e; W, Y+ x8 c
                                else  u9 A( W% d, w6 R3 u
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 }  H3 K. P4 I) Z                                                to_str("in docking station: \"",?.~.name,"\""));                               
5 T: S6 F. Y4 q6 p" _( V                                end;$ t- |) |" X7 t. q% j& Q. A$ Q
                        else/ r: [* u4 t9 z8 k( p2 T
                                @.Destination := assignLObj[1,row];, X# z  ~7 c6 Y' \2 Z9 i% L; c5 d
                        end;                        9 e4 q: o' N* T1 W7 _1 E$ ?
                        newDirection(@);% @5 u$ V/ u2 D) q: q
                        @.HasOrder := true;4 w0 u$ J1 e$ `* }4 o5 }
                end;: D% x+ f$ A$ _4 J3 E
        end;
, G- @  y+ |4 J5 c% P( ^' c& W4 z( Kend;        -- of the method
3 ^# K+ o+ H: x; a' ]3 ]
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 $ O8 q% w" ~1 f7 S" e3 L. \  p

) w* i) {; N/ `, C% F& Z" l这是AGV_putin中arrive的method。
; y2 Z& z/ O) h. x$ p
8 _2 |( v( i$ j/ H) _# I当到达物料速度越高时,这个报警更多,+ [5 F# R4 r9 c$ p, u5 Y
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。! D% c! w( ?7 j' \6 P
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?* L7 w6 a) B- Y* W5 K( l' u- j

+ H9 h2 f! J+ c  v$ H另外一个小建议,就是move,所有的move都可以这样7 x' k) q* k) z8 T' V) R7 o' K
if not move() then debug end
$ x+ a1 |7 w; L, }) u' [, r4 E这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
% f, u' l- n2 I( D% Yplant simulation中的free libraries有AGV模板,  y, S+ P8 C' ]4 i) w
里面也有案例。8 z# ~9 D+ M6 e! F$ F  }) G+ c
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
0 i2 e- F# i/ G/ w; m9 j3 D% l- k+ p/ F. e6 e
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 ; f' P3 P7 C4 j" U/ w
0 L5 K6 B& A8 f0 n+ m$ o
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
5 v' J7 k4 O/ f  q2 B. _2 i& L0 n这是AGV_putin中arrive的method。
. h& \5 [: E. ]: }2 ]
# J' M- Y6 a  j" a0 S: ^当到达物料速度越高时,这个报警更多,

( p% ?- M1 y9 K2 H. D另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-20 03:39 , Processed in 0.019184 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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