设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7680|回复: 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'
/ M" b6 C# o9 b( Y5 ]' P*/+ M2 G& M+ j5 D( w
is- i. K# \  S$ ?# J
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
% w; c: D$ p. Z* f1 `do  K# P  k& y- j; F
        Lan := rootfolder.Internal.Tools.AOLlanguage;7 p, X7 f1 \; r! o7 G
        if current = @.Destination -- else return2 {  X. \3 \! h* X
        then
% n/ {" @. c% a9 O' P( e2 w, J                @.Destination := void;
9 y3 F& c, S( O1 E" y9 {. G1 {# J                if @.occupied then
7 d6 D6 e# m: {                        part := @.cont;0 K7 p  U( x  H( }5 _* h
                        @.transpOrder := void;4 i( S2 A4 t5 G. ~7 n1 B
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," W- K" L. f- `, ~& }# f
                                @,root.eventcontroller.simTime);
) d  ]% T. V7 @8 x$ m                        @.HasOrder := false;6 o. g/ n/ C5 S8 P9 h2 C
                        @.DrivingHome := true;" b9 _4 ]1 [. X* T. D% @
                        rgManager.tryToStartTransOrder;  v6 B' k: N  p/ {
                        if @.Destination = void
4 S$ d! Y) T3 D$ b' l0 [                        then -- no transport order for vehicle @
* W$ ^8 B7 p  a) e                                @.Destination :=" v/ r! U6 {3 Y7 g4 z/ Y/ d, u, D
                                rgManager.nearestFreeStation(@,track.~);
3 T7 O3 i% {$ h                                newDirection(@);   
9 m3 ?; V" j! S9 A( c/ |: D4 E                                if @.Destination /= void then
: u- \" J8 ^  m- ?. w2 v                                        @.Destination.NumReservation :=
$ ]% u% {2 Q9 k. n- X                                        @.Destination.NumReservation + 1;8 _# @( V0 ?: `1 a
                                end;' D6 ^' ?8 K; W2 I$ ?$ H
                                @.CurrIcon := "drivingHome";
6 N; E1 u0 d8 A; R  u) g                                @.DrivingHome := true;, U" X* C+ X2 I+ S! ~* U& D/ J5 H
                        end;2 }- S5 O& u+ A
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
' z$ g8 u' w" N, D! c/ x! g                        part := @.transpOrder;4 s: `  I  w$ `  G
                        part.move(@);-- load part
5 F5 W5 @, b4 b* O4 t( }+ b, j                        @.CurrIcon := "load";
5 t6 y6 u- o; X) [: e                        GlobalDistObj := part.globDestination;
( K( a* [/ S7 Y0 R3 ^. D$ U8 Q                        assignLObj := rgmanager.rgAssignL;
' G* F% t# P1 s+ Y' \7 K7 j5 \                        row := assignLObj.getRowNo(GlobalDistObj);% a" f) \7 C, m1 A
                        if Row = -1 then -- since 70. f4 Q6 K( x9 U% n7 _4 z
                                if lan=1 then
5 q' C9 {5 s7 z9 N& K9 {/ ^9 x( Y                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),1 t1 y9 M( Q1 M* v3 a: T! f
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
3 z+ O0 q/ W; x4 e/ n                                else
" y5 d* |: f- Z0 U, b. f                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),) k; L- }1 t- P. K- O
                                                to_str("in docking station: \"",?.~.name,"\""));                                7 l- {: j3 R. ~
                                end;9 ]8 R; v8 d, g  c0 e  e7 |$ `; E$ J
                        else2 F" C" Y9 }0 z( O0 w6 ?9 R
                                @.Destination := assignLObj[1,row];2 d& M6 _  a4 h2 ]
                        end;                       
4 c8 c1 S  n: C: w" A( P+ o                        newDirection(@);- R/ n) z. I: V5 k! L! x
                        @.HasOrder := true;
( O. b4 K9 _1 K8 r. y                end;
1 M( U4 A, ~# c5 K( D& N        end;4 |. t1 k  g% D9 D* \, C
end;        -- of the method
: h. k! S0 R& @# c: F9 e
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
  V: m" g( W. `6 L1 P% P( G; ], h8 X0 Y$ g7 ]+ f; @4 D
这是AGV_putin中arrive的method。
1 A9 M% w" x# M" @; y
4 k* n3 K' p0 D6 V. m0 M7 D) f& n5 l当到达物料速度越高时,这个报警更多,
0 A1 P. F* B1 K1 \" ]  e. Y- x可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
7 A7 G7 G$ t9 V9 T程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?/ ~+ C1 [& V3 b9 @, [

4 \+ e- |3 q" x% y另外一个小建议,就是move,所有的move都可以这样0 p1 x! X; q2 Y  q* ], H& U% F
if not move() then debug end/ E) q, w8 G* `& ]4 ~7 ~/ ^
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。2 D  G( ]! j7 y! g! s1 [/ Q: w
plant simulation中的free libraries有AGV模板,
5 N3 R: d# [0 W, e9 ^: x. N里面也有案例。, C  _- n2 [' _: ]1 |5 v/ C
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。- a4 J; i$ h2 \: N: f  [

: p- u% \. o3 r& z我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 " x' p  V( J# |" y6 B( A4 j
7 z7 U8 |! ]6 @" O- Q8 U
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
) S- U2 w! M, @/ a  G这是AGV_putin中arrive的method。
7 i& p% Q( f5 l/ _- I8 Z/ r: x* r6 X
+ `, j4 n. j; \& T9 w5 t2 {当到达物料速度越高时,这个报警更多,
6 A" T5 n% h7 K. z2 y
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-23 23:31 , Processed in 0.019604 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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