设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5640|回复: 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'
* n6 s4 \, N. h*/$ ]/ D7 Q4 x1 x( V0 F. ?
is
2 A# d3 Y% L4 k2 \: I1 O; d        part, GlobalDistObj, assignLObj:object;row,Lan:integer;0 [; B$ D5 P2 N# y9 ^
do8 \' S. [# L% c  h2 ~
        Lan := rootfolder.Internal.Tools.AOLlanguage;
0 L; Z2 c* f: V) ]        if current = @.Destination -- else return. Z+ _: f" E5 `* f$ u# g7 c
        then3 A# c8 r+ t8 A( ]$ J1 D
                @.Destination := void;# ]/ l; {2 o; A5 f
                if @.occupied then
9 ?) j/ X7 ]. B) d' H' x8 |                        part := @.cont;
1 H4 I6 q2 H  I' [' c                        @.transpOrder := void;: d" R1 b( y% P( q# l0 `2 x
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: Q* Z( X9 E& F, T                                @,root.eventcontroller.simTime);. N; G5 N, F  R% h
                        @.HasOrder := false;
4 [! ^% S+ }1 p, I                        @.DrivingHome := true;
/ l" G6 @/ o3 Q* o                        rgManager.tryToStartTransOrder;9 n% d3 y; X6 m4 q) c, k
                        if @.Destination = void3 q% b1 |: T2 t4 D
                        then -- no transport order for vehicle @+ x1 ^! S$ x$ H0 T
                                @.Destination :=/ d% O$ g; ]% |0 M. S$ [% J0 J. e# e
                                rgManager.nearestFreeStation(@,track.~);5 \3 D' d- X2 O& V
                                newDirection(@);   
* r; V0 T) o; c& I# |+ _                                if @.Destination /= void then
! S" x8 ~4 X# G1 Z                                        @.Destination.NumReservation :=, Z4 }- ]' T0 }' s
                                        @.Destination.NumReservation + 1;
) {5 O) r: r) S8 g! T1 I8 @0 m  _                                end;
% U4 b* \$ [1 B! m                                @.CurrIcon := "drivingHome";; b9 h- x$ b6 `( P
                                @.DrivingHome := true;5 l% c4 h- t6 x5 H7 c
                        end;0 L- Q" E0 u! a" x
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 \5 k0 b* \+ @4 M& I( a4 _! X% L) z                        part := @.transpOrder;8 Q) G( }; b! E# o; D' _
                        part.move(@);-- load part+ F/ |3 U" x6 {% W5 p+ S
                        @.CurrIcon := "load";( C! C% ^; X- G" g
                        GlobalDistObj := part.globDestination;
$ I$ ]6 E4 O2 a* W4 S                        assignLObj := rgmanager.rgAssignL;8 k' {: g4 G4 q6 G5 S# {
                        row := assignLObj.getRowNo(GlobalDistObj);
* m9 f8 X4 N$ p# V, b$ m                        if Row = -1 then -- since 70; N* V, M3 v6 Z$ c4 B. m
                                if lan=1 then
- c+ R, k# `3 ^9 U* H7 b' K3 T                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# u" d2 {  l4 o7 @' I
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
& U( [! c8 K0 J" b+ L4 Y                                else
+ w0 ~( Z& ~2 i: b# `                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
; N: [: I6 G8 }/ n* n2 [/ g5 Q                                                to_str("in docking station: \"",?.~.name,"\""));                               
/ {, m) w! d5 P. r( X. j4 d                                end;6 O; {9 G$ D6 T5 y6 n  ?1 X
                        else
' a9 l0 C) T3 b& D3 Y9 G& D% ~( |                                @.Destination := assignLObj[1,row];
  ]1 ?! i0 J: C                        end;                       
0 Z& \0 q, W1 B9 a                        newDirection(@);! U& H8 G0 B" X' [2 S$ P
                        @.HasOrder := true;" q! ^; V% i# g
                end;
2 p% l, ~: C' k3 P3 L! O        end;' l+ W' N* [" A* I; |3 w
end;        -- of the method$ D2 [. ]( z% ~6 i
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
, u, y( K' g% B, a( k* `- [# P3 E" j+ ^7 b$ {
这是AGV_putin中arrive的method。
# V$ M3 I) B) u, e4 l0 e2 B+ }  S6 N0 O4 b) Y4 f2 n
当到达物料速度越高时,这个报警更多,6 h+ C( Q2 L' z  P! E
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
) ]5 k; [# c& h) F7 f# y程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?5 [3 P# c! Y" E

8 o8 p$ M* \4 Z/ O另外一个小建议,就是move,所有的move都可以这样- l  K) M* h1 [# b
if not move() then debug end
. r2 e: O& q1 D. |4 h这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
- U2 V' D& e9 u7 g& Tplant simulation中的free libraries有AGV模板,
7 ]2 Q% `. Y$ \' p$ p" o/ s0 ~里面也有案例。
$ t  m- v2 W9 a我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。5 K) m, p! U! d0 @: A- Z/ p9 W$ s

# \; ?, _1 Y' |3 P. L9 X我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
/ [2 H7 t' x' I- U' v) I$ a
; N* J# r3 s- p+ @2 F; E那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
. v5 m: ~$ u/ k9 G! f这是AGV_putin中arrive的method。' Y& D  ?. z+ e* f+ m
7 N$ V. _- }- l/ L
当到达物料速度越高时,这个报警更多,
5 ^2 j; |8 F+ c3 Z4 J
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-12-10 23:02 , Processed in 0.017891 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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