设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6713|回复: 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'8 i' j, q' ], G) I
*/
# q  z8 W5 `' z- v$ j; yis$ `1 N1 n$ b# s5 G2 z
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) }; w& W5 M) L1 N" cdo8 `0 _' Z. k5 O4 U* c( W# ?' o; @
        Lan := rootfolder.Internal.Tools.AOLlanguage;( L! f* o# q9 d4 y$ J# [3 ~% q
        if current = @.Destination -- else return
7 {: P/ Z; h5 L6 H* E& T! A        then
0 y2 {" e8 B5 d$ |: \. d                @.Destination := void;. o7 x4 I0 i$ B1 }, t3 l2 f
                if @.occupied then
' z8 M) H% J$ c  C( C                        part := @.cont;
1 |* d: U: a( l5 p& d9 g! v                        @.transpOrder := void;
% \) Z- a1 _, z  q" k0 c4 |                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ U5 Q" J6 V: [# x                                @,root.eventcontroller.simTime);+ X, L3 e; D  H& @
                        @.HasOrder := false;7 k; x7 Q1 ^- \& t) E. g- b
                        @.DrivingHome := true;  r0 \/ e6 Z0 O1 h! m, q# g5 p& v
                        rgManager.tryToStartTransOrder;$ [3 {- Z/ W" v: H
                        if @.Destination = void  p9 I% H5 w2 q5 ~* E
                        then -- no transport order for vehicle @: S" u6 |4 H  A- d% i
                                @.Destination :=
5 e3 L! T8 I0 h5 [5 E6 \                                rgManager.nearestFreeStation(@,track.~);
& G& @/ l) a6 D* c  E% C. s                                newDirection(@);   + O  @" ]' @5 Q1 e
                                if @.Destination /= void then
+ u  H" U0 w, W) ^                                        @.Destination.NumReservation :=/ G8 _$ D' V; G2 }2 c8 y+ b  t6 B# [
                                        @.Destination.NumReservation + 1;
1 p. x- j. N  N                                end;) r& e# `9 A* X& ~
                                @.CurrIcon := "drivingHome";
( I3 {3 ?5 s0 _# z                                @.DrivingHome := true;  F5 B8 s. K& \$ T
                        end;
. n. c# s' I8 U2 O                else -- the vehicle @ is empty, both vehicle and part are in the same dock station' d2 ~2 b; X) {: x. R' ?, f6 B
                        part := @.transpOrder;
' {' A3 u1 S7 X9 s8 n' d) C' K6 \                        part.move(@);-- load part
# e) U7 P( S3 u2 V7 U, i/ l                        @.CurrIcon := "load";% y8 s! m* v: z9 Z2 \
                        GlobalDistObj := part.globDestination;
; C7 R' l7 N3 b+ o4 d                        assignLObj := rgmanager.rgAssignL;/ ~* Y- X3 U  V" U$ w, y' \( u+ o
                        row := assignLObj.getRowNo(GlobalDistObj);7 b+ _: Y  l. I0 F
                        if Row = -1 then -- since 70
0 q7 ]5 Y& N) ?, E- _6 D, b  g; R                                if lan=1 then
/ t5 ^2 d& x" m( ]2 {" z9 n                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: M4 Y) f: I7 g
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
. d6 V5 q' M! e. V8 {5 t" f                                else
) B6 X$ s% K& j) k1 V0 z4 `! c                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# R2 H. y% _0 B/ b) S) f- J; q                                                to_str("in docking station: \"",?.~.name,"\""));                               
; H/ `3 B3 Y( J, @) B* Q                                end;+ b! D0 d) j4 |' c" e- U8 `
                        else
3 V, ^2 H% d% E                                @.Destination := assignLObj[1,row];, a. v8 M& y+ o. X, X
                        end;                       
! U9 q( N5 p: T+ f                        newDirection(@);; C( @/ ]- d0 d8 S+ C: N9 [% ~
                        @.HasOrder := true;
" R7 B3 g* x$ s5 G                end;
8 s6 E0 ~3 n) b' c/ g- V  G2 h        end;
1 m; |# z; G: O: m, nend;        -- of the method! d* T  `+ E$ I" B  F0 n/ H
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
% Z6 R# o- S+ N) t, m
2 B- Q* {+ C9 `6 g! y& h6 @9 |这是AGV_putin中arrive的method。
1 ^3 O" t: B- h! C5 ^6 Z' y# ~6 O! G4 \, \8 T
当到达物料速度越高时,这个报警更多,
, h' Y- a* f( x0 \2 G可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。3 e9 C3 v- o! {
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?, k6 L; v. a' \
4 ]6 [. s1 s; v% a
另外一个小建议,就是move,所有的move都可以这样
6 q/ V: F) h. Q8 w4 h0 s% `( d5 gif not move() then debug end
' q" z  V7 Q2 |7 h7 U这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
. c- C) a/ h) ]  q  wplant simulation中的free libraries有AGV模板,
2 Y# k5 i' d) C+ Z& [& I( K里面也有案例。
2 i) T1 m: [5 u, U8 c我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。' O! M* o* T7 Z4 q4 q

. ]/ X4 ~2 v/ R9 n, Z, B4 K我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 6 T5 u* b, `& L  o+ E0 _  E9 ]( o
2 _4 s' t" h" T5 p5 O% o
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 - C. ~% y4 I0 o: ?
这是AGV_putin中arrive的method。  b2 l! f6 f% x" a3 ~6 A

$ {5 L. J% }/ N1 n+ k当到达物料速度越高时,这个报警更多,
% N% q& q2 `  y7 W2 a
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-22 04:56 , Processed in 3.869195 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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