设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8830|回复: 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'
" ?& \, o# Q. R# P8 Q- }1 r$ h' I*/
# m2 ]5 S  J0 v9 Jis
- H- u8 M" D- V" t        part, GlobalDistObj, assignLObj:object;row,Lan:integer;! r1 u$ d$ E- Q# t) I! B6 ~
do; Q: }1 }5 l1 X. T3 b
        Lan := rootfolder.Internal.Tools.AOLlanguage;  s1 v7 }, X9 e' q& _; e
        if current = @.Destination -- else return4 r7 P# D! f/ f1 Y9 f
        then7 B# l( F( `" c, x4 N
                @.Destination := void;
6 f! h, f8 `* a1 }1 h8 Z                if @.occupied then
. V* l$ V$ D* E6 T8 P$ l: D                        part := @.cont;, j/ }3 A0 \/ j! x$ F
                        @.transpOrder := void;
* s1 D0 W9 I8 J$ Z" B) M8 p                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,3 B! s. m1 g; V, W9 B6 x
                                @,root.eventcontroller.simTime);
5 V7 j4 K; g: P0 `# f8 u3 `8 D8 q                        @.HasOrder := false;: ~# u8 U7 f7 X, f" P1 N/ Y; n" c
                        @.DrivingHome := true;
& ^7 s$ \; h( n6 w1 @" y/ G                        rgManager.tryToStartTransOrder;
, l4 d, p# F5 G5 G1 A: \6 d! h. A5 o                        if @.Destination = void
" x/ ]2 G* B4 {3 }7 K3 v9 z" o+ C                        then -- no transport order for vehicle @- t) w1 q' U7 C& {5 A, j
                                @.Destination :=
  {* s+ T" I5 t( {8 N' b# Y                                rgManager.nearestFreeStation(@,track.~);
0 f- C* X6 H9 x                                newDirection(@);   
' |, B, P; }& z: L% x5 P                                if @.Destination /= void then
% M  h  M2 c& U. b0 k                                        @.Destination.NumReservation :=- Y2 i% L2 d7 H( {( l
                                        @.Destination.NumReservation + 1;1 p" {1 D% p$ I0 f) i9 Q8 B% H: o
                                end;
2 Z5 P4 K2 q& N                                @.CurrIcon := "drivingHome";
  e: T- m8 J1 G3 h) U2 r  h0 A2 y                                @.DrivingHome := true;
% [5 J6 W7 m6 }4 B9 t                        end;
) C& }2 R1 h" \4 P" L) P# p! K                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. `% b+ C$ `* V6 t! o                        part := @.transpOrder;# l  Q/ Q( t; K6 z& B
                        part.move(@);-- load part8 L% X3 ^' [% |7 M" `( \, I; @9 j
                        @.CurrIcon := "load";. m! J9 K5 Z! T3 h' J* ]
                        GlobalDistObj := part.globDestination;
* w5 n' t- H& A                        assignLObj := rgmanager.rgAssignL;3 U+ N  H6 o, k- @
                        row := assignLObj.getRowNo(GlobalDistObj);
' _: C8 F; n% P  l: H, k                        if Row = -1 then -- since 70
/ X4 N3 ]0 d1 D% T                                if lan=1 then
' h8 A. N4 `' I* W# j2 ]                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),4 m. H0 l5 ]5 I8 Z- N) ?
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
2 U" o) I: B, k9 t4 z, K! `                                else
+ o, Q# c# j( Y2 f7 x) i! G& ?4 U& |                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
  J7 Z4 w% A3 |# Y8 S                                                to_str("in docking station: \"",?.~.name,"\""));                                7 t; J) {1 {* @# [
                                end;
# }/ w# p" ~5 R, K; U                        else' B+ F" M8 Z! b+ z- T
                                @.Destination := assignLObj[1,row];0 `* E. i4 D% h. s# N* W$ L
                        end;                        8 l6 G% R& u+ P# p8 g
                        newDirection(@);" O3 e! C7 D6 m! Z6 j
                        @.HasOrder := true;* |- J5 Y$ u3 z; }% F; ?
                end;
* |% Q1 Y8 t8 S        end;/ G8 o% [. I$ |' w. w
end;        -- of the method
- ~% [$ t! O2 ]1 h4 X# J
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
! R9 @* d5 |  N. v1 c9 l$ F" ]; ]! N
这是AGV_putin中arrive的method。
" z- g9 z+ a9 a  K! E$ a2 H& ~0 M+ G2 o# R/ j
当到达物料速度越高时,这个报警更多,
# T2 |3 W- o  y) I可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
  D# @6 r7 [% E3 r程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?4 r& W/ U) \& h* \0 M3 o
5 b' j2 J7 ^" a6 Y1 |
另外一个小建议,就是move,所有的move都可以这样
) h# `  Y! n0 @( s# sif not move() then debug end. _8 N% W) s% |# y% e, u: q/ M
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
: [2 ]# r/ Y1 W2 ?plant simulation中的free libraries有AGV模板,3 x7 l! l- H# F& u. z* a& H7 {
里面也有案例。( U: F  M, M1 ]  {* a% a
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
. }7 x9 A0 y7 _; \' q' z& y7 D& ^' `% d3 Q( L. x
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
% m4 ]3 R& e: Z2 v/ Y  ]' u% \
% {" r/ B: g  I( B0 i' B那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
0 V7 j' t, j, X( l这是AGV_putin中arrive的method。& |- |$ K# v' \9 V5 S

0 [& ?" q) J4 Z; u* t1 \5 N. j当到达物料速度越高时,这个报警更多,

. v7 [! s& o! Q2 Z3 y$ A, c另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-28 20:56 , Processed in 0.015271 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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