设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8897|回复: 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'
. B: u! `# I: I2 H% v1 h*/$ d* ~4 q3 F: ~5 Y6 w
is" {, Q  z6 U) O
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;  w1 Q. m) f1 b$ F- Z. ~8 n7 v0 K3 `
do
* X3 w+ F0 `  K. O+ K% g5 O        Lan := rootfolder.Internal.Tools.AOLlanguage;
$ S! Y5 Q! j" I: I) X        if current = @.Destination -- else return
' V) H" I' t! N. y4 }        then
# s- Q7 [' _  d& f0 G1 }5 }                @.Destination := void;- e, r* x( V% O0 f, G  H
                if @.occupied then
$ }4 l; c8 E3 }                        part := @.cont;& ^, K) f! ^3 j# g  y8 T7 D
                        @.transpOrder := void;: f0 s$ t8 S! u7 u4 Y
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ D5 |3 E2 W+ H& t1 s: t7 p                                @,root.eventcontroller.simTime);
  y5 k- y/ Z) _5 u, X4 U                        @.HasOrder := false;
: [1 ^, H: h  C  j                        @.DrivingHome := true;5 H4 [9 U. t: x$ H! S* i
                        rgManager.tryToStartTransOrder;9 E( K% u4 X4 o( _
                        if @.Destination = void
( T: L( C; \. z- A8 K, m. Y                        then -- no transport order for vehicle @$ e1 _, ^) v2 |- w3 Q3 ?6 {
                                @.Destination :=
+ O- z- T9 L* @: p' Z8 t                                rgManager.nearestFreeStation(@,track.~);& @7 M+ f( P: F+ e
                                newDirection(@);     p- h/ b5 N" s
                                if @.Destination /= void then1 ]# [. U/ W" D- \/ N' i
                                        @.Destination.NumReservation :=' L# E& e- H4 m& N1 ~; l
                                        @.Destination.NumReservation + 1;
* G! [2 J% X& B                                end;" r0 s+ `% k  u5 A9 K$ ]
                                @.CurrIcon := "drivingHome";& h# j  v4 n7 {8 ^8 F
                                @.DrivingHome := true;
& F: m+ M  I* Q, y/ R( S2 g                        end;
2 L- ]; ~2 _6 ]% p% p                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
: N9 k1 t& e7 N  B! P                        part := @.transpOrder;- |) k5 b& B" }& H4 g
                        part.move(@);-- load part
$ j: h0 U9 L- i5 E) g! d2 e' \                        @.CurrIcon := "load";3 i4 z- Z* E% l5 L5 M8 ]
                        GlobalDistObj := part.globDestination;+ Q7 T& e! T# }. i* x% N! W
                        assignLObj := rgmanager.rgAssignL;  @- p: D) u5 i$ z9 F1 {: A
                        row := assignLObj.getRowNo(GlobalDistObj);
$ y$ j8 ]8 q( B. w9 R9 N                        if Row = -1 then -- since 709 F" d1 f/ R, V& S# m' h7 B
                                if lan=1 then
) l/ }* S! C1 f+ |4 g: u/ q                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),$ F& v0 Z8 d% Y2 X+ \
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
5 C8 C+ P* i3 J& C  r/ Q; V  E8 j                                else  P4 c: }% B1 L" }8 s9 Z& k
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
. z0 r+ O: `& Z- J8 Z1 v! _; }1 h                                                to_str("in docking station: \"",?.~.name,"\""));                               
1 K5 N+ a$ G, M8 Q0 F                                end;
! n/ u" ]0 {. M: {7 r, _0 _, T: f                        else: P8 }  l' z: A7 M& h
                                @.Destination := assignLObj[1,row];9 w6 [& P' j8 K7 _" _/ r& `
                        end;                        2 t1 k  u& N8 o0 ^2 Z6 g; Z- m/ ~) N
                        newDirection(@);
. a: E3 w: l" j. c                        @.HasOrder := true;
! W. n  f8 `) G& s  l                end;& S  s6 V/ T7 C$ Z- e4 }
        end;
$ m. E/ V$ J4 O& C! uend;        -- of the method/ O+ L& X2 t" j& p
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
- T" b& h/ y$ a+ d9 G3 H# J. O' B/ N" m
7 @3 m, J& w4 o: Q; E+ x这是AGV_putin中arrive的method。
5 ~' j4 }9 t, M
+ g" i6 Q8 x' Z5 g当到达物料速度越高时,这个报警更多,
/ l/ S; R3 r" f% t# @7 n可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
5 r. u( P' i" ?3 B  P程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?: w; ^2 p/ U0 z- E9 w1 C1 N

$ M' \9 ]- S5 O  k另外一个小建议,就是move,所有的move都可以这样* S- O. O' O2 I- ~# b
if not move() then debug end5 K/ r0 S0 c; d4 n
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。" v  P5 U, O; Q  B, w
plant simulation中的free libraries有AGV模板,4 d) B4 ?( [: w7 R( e: t" q2 ^
里面也有案例。
8 _$ Z2 ~& R6 a8 E" |我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。* S. `. x8 q  [% K: {+ q! B  K
5 u/ c" i# ?0 h7 i
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 5 d2 k7 N1 y/ K% |' j9 _. J$ ~/ n
! T) ]) J7 ?: j# L) s
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 . w  o4 ?. A  C( m& q
这是AGV_putin中arrive的method。
7 f1 T. u0 D) V# W
, F0 r. _, r* y% x( t" q, [5 G当到达物料速度越高时,这个报警更多,

, B6 R5 @: K* ~# c) e1 o, M9 T. p另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-3 04:40 , Processed in 0.017139 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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