设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8475|回复: 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'0 C$ k2 M# b. I! V4 B
*/, ~; G/ `) [  I7 E4 t
is5 s" G3 p0 w9 ]# o& r& j
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
9 s$ F2 Y9 A; \1 ^+ udo" n8 @9 |% L- G+ M
        Lan := rootfolder.Internal.Tools.AOLlanguage;+ G8 a6 L  i) X/ z2 L8 z
        if current = @.Destination -- else return
, Q0 w) Q4 H: c) l        then
  ^: y- {" z. U( g- j. e% ~                @.Destination := void;( l* S" n9 U) Y" u$ e6 e1 M* n% J* O
                if @.occupied then
; z) w. `3 A1 l2 @5 B7 n7 m/ a: B5 I                        part := @.cont;( s" ]8 W2 x* H5 Y
                        @.transpOrder := void;& K" r2 e" d: w, z, O! ]
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,- d: `/ y% Y6 s+ k6 T
                                @,root.eventcontroller.simTime);! K; e* B5 k1 J+ g5 K. t8 c5 \
                        @.HasOrder := false;0 R( m3 n) K$ X7 y. v
                        @.DrivingHome := true;% s1 o# {2 Y5 w& P$ f& Y+ ]
                        rgManager.tryToStartTransOrder;+ p7 ~! D" t! ]- ?* K" n
                        if @.Destination = void
* @7 _/ ^( u# G' X6 _  M! }                        then -- no transport order for vehicle @6 ]: R! j1 y, _' a4 T& S3 W3 \! {0 j
                                @.Destination :=8 f8 M. }  H& ~6 F2 d  a
                                rgManager.nearestFreeStation(@,track.~);
9 b3 a; i( {2 J( p7 J" l5 G                                newDirection(@);   
* E( r# ?& H5 w& n7 U, A. B                                if @.Destination /= void then
1 v9 b7 F2 l2 B, {; |+ P                                        @.Destination.NumReservation :=# Q" n' Z4 U8 j8 a* q4 j* H
                                        @.Destination.NumReservation + 1;/ |5 p" F& R3 d+ Y: K: d8 i2 @! N9 t
                                end;
2 d+ k2 Y( S# [2 \; v                                @.CurrIcon := "drivingHome";
% Q' s2 d6 e! g3 p  \/ f, `                                @.DrivingHome := true;
  m  a# c5 S( `$ i( [/ U& n. `                        end;
1 T3 J! Y$ `! b. K                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
2 N0 h% P& s0 [% t- u- ^0 v                        part := @.transpOrder;- k5 W5 o2 K( D! [% E# q
                        part.move(@);-- load part
, l0 h: d6 ]8 x) }) E                        @.CurrIcon := "load";# V7 E! F% l7 F1 [. R: L  g/ C& n3 U
                        GlobalDistObj := part.globDestination;
1 u$ _/ N# {' n" p( C. Z                        assignLObj := rgmanager.rgAssignL;7 E9 o7 O/ d# S6 ~! \4 C
                        row := assignLObj.getRowNo(GlobalDistObj);' Y: a+ F2 \, T1 ^' \" G
                        if Row = -1 then -- since 70
  @  X- M) r6 T  W) t1 r+ v                                if lan=1 then
0 n: X( P% W. n  ^, w, N2 w                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
. r! O; l- @1 r6 Z' ~0 s                                                to_str("in der Andockstation: \"",?.~.name,"\""));
9 X8 b6 h8 u1 W                                else2 T, u1 M% A- T
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
; ]% A! Q7 ^( }4 ~8 b2 Z                                                to_str("in docking station: \"",?.~.name,"\""));                                * X! l  s0 H1 U  @
                                end;
; F# X. @8 @. i7 v8 N. e                        else% u" G! S4 J; J6 I
                                @.Destination := assignLObj[1,row];
* r: ], K6 m! f) S4 e                        end;                        8 d6 b/ [  \1 L" c! V
                        newDirection(@);
# S5 \' n$ S. E                        @.HasOrder := true;
& Q# x9 D( ?4 `. E                end;$ C7 I- G" l: ^! Z
        end;
: n/ D& T1 r# Zend;        -- of the method
1 s1 }/ }! e5 j
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
  l% ]4 X; S! T7 b; }/ F3 E
' |  V. U# {7 F5 v  y; C3 F这是AGV_putin中arrive的method。- T; T  R  h. O9 B6 t
* S5 s) o- ?  ^' _& i
当到达物料速度越高时,这个报警更多,
) M( A) H0 H& ]9 s5 h2 J可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。, K3 X, I* ~# }$ H
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
2 T" C7 b4 ^! q, [' F1 t) h% {% j' X3 @
另外一个小建议,就是move,所有的move都可以这样, u* ]' {- i# \3 b% P
if not move() then debug end
/ \8 {0 J" z. j4 q& G  f+ d/ V这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。* Y: q" J2 e4 I( u
plant simulation中的free libraries有AGV模板,
+ S' h, J' q' e, ]里面也有案例。
9 L4 v% I, w8 U3 F# O我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。6 E" |: ^# M+ ]# ?

9 w7 H/ e6 _/ y1 }+ B  k; W$ _我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 8 i+ S+ m: B% c% g

# `+ I$ ^) c" k) d1 e那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
5 Z& M- A# a. P. n这是AGV_putin中arrive的method。
: Z4 w; o- s; k+ N! C
, G5 U; {/ @& p5 n9 z  C当到达物料速度越高时,这个报警更多,

' K- M' t+ ^" L! y. A( q0 q. ^* l另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-6 06:46 , Processed in 7.235032 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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