设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8235|回复: 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'  ^1 E) I- d5 y6 l  s/ x! h
*/) Z  J; B; @+ p
is: W. I, `. k0 E4 m5 v  X0 `- r
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
6 H/ k# J2 e: ?9 f1 N0 g! Bdo* J& s% G: p* r) x% j5 n
        Lan := rootfolder.Internal.Tools.AOLlanguage;- Y& Z5 O# l1 a+ `( a9 I
        if current = @.Destination -- else return" X0 r. m# a& T& i
        then- A. @) {! Q! v4 f# R+ d6 E
                @.Destination := void;
9 @" H" v% @. ~$ t+ U                if @.occupied then
0 W, F  n9 \; E, S- r                        part := @.cont;2 }2 R# a7 ?1 a$ J! b, `
                        @.transpOrder := void;$ @" p. B4 _9 w( G" F3 V
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
3 K4 O3 a" e. J& L2 }0 v                                @,root.eventcontroller.simTime);8 U# h; ]& T: E, x; \7 W
                        @.HasOrder := false;
' Z1 r  N! g% X' C- M: X) ?                        @.DrivingHome := true;
+ N2 P; T& V1 a                        rgManager.tryToStartTransOrder;8 _' m: n: i; @7 s" v" d; m5 O
                        if @.Destination = void
) G* H" R" J2 M# V( D7 ]                        then -- no transport order for vehicle @6 t9 U( d$ p7 _8 g( Q
                                @.Destination :=
; }5 R& o: ?, z+ ]! r" d, n                                rgManager.nearestFreeStation(@,track.~);
$ ?3 z+ \0 z/ \( S; x% h4 O                                newDirection(@);   
% E8 z, |) Z7 z$ c1 `: b                                if @.Destination /= void then. v, I6 s& F/ a: J5 _+ g
                                        @.Destination.NumReservation :=4 C% \2 P" {: s2 B* ]0 V+ C
                                        @.Destination.NumReservation + 1;2 F" {) W5 h8 J. J
                                end;/ l1 |6 I2 o' A+ O+ {
                                @.CurrIcon := "drivingHome";4 v$ f/ `# Q# l% R% H
                                @.DrivingHome := true;4 b/ r. O4 q% }* \# U
                        end;
( _& Z- y' @8 ^4 ]2 b: M; [# Y5 K                else -- the vehicle @ is empty, both vehicle and part are in the same dock station- F( G! x  B5 r+ M
                        part := @.transpOrder;
0 y! a. g5 S) g0 M  i                        part.move(@);-- load part
" ?7 i- c2 I) _) Z' d+ x2 z/ g9 K# B& D                        @.CurrIcon := "load";
/ X) W5 k$ |( a9 U  r8 X8 N                        GlobalDistObj := part.globDestination;
- I6 ]9 p- I$ @, k                        assignLObj := rgmanager.rgAssignL;
( _. q' y6 C* L                        row := assignLObj.getRowNo(GlobalDistObj);
# j% R2 \) {! p3 \' |8 m- X                        if Row = -1 then -- since 70' k; X" t5 u+ c6 c
                                if lan=1 then
% P* e0 @) b* O8 ?9 W+ \; G: P                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),  c; N  g& u) Z: V* E) a" a( q
                                                to_str("in der Andockstation: \"",?.~.name,"\""));- F8 G; a6 p8 v! x
                                else
. U9 r* I4 V$ `: i4 U# u; ]7 E                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 _" I: c( T3 W. |  w8 t; j                                                to_str("in docking station: \"",?.~.name,"\""));                                # D5 E! z/ e% U6 k& C4 f" J
                                end;
0 O$ B1 I' k! y                        else& p; \  u# i0 z8 x
                                @.Destination := assignLObj[1,row];5 [( E% C6 e# L  A
                        end;                        3 J% T6 Y& F' D2 x7 y
                        newDirection(@);
. M9 r6 \% W, X! }                        @.HasOrder := true;: w4 D8 t' ^( Y2 {  H
                end;5 O7 u" m' x. L; X1 |$ E0 j
        end;
/ S+ W- t! S" G' w- Rend;        -- of the method$ H% |1 X- C8 M2 t" j
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 6 Q; Z4 V3 D$ Y. ~' H4 H$ p* R

  ~- @& A* l- m这是AGV_putin中arrive的method。
4 T  v7 ]4 C% K  t; s: F. B$ V( N( ^
当到达物料速度越高时,这个报警更多,8 M! S$ ~4 c4 B1 K6 \: ?
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
8 u1 Q& f( [( C) p/ |  y程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?, K& A2 {" c6 b& z: O! M+ z
- L1 P* t* C! S3 @
另外一个小建议,就是move,所有的move都可以这样; z0 J4 R2 O1 P( |
if not move() then debug end
/ E5 C3 [+ C! y1 j. ?7 b2 e$ l这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。6 U2 i. x8 w& t+ [: k# A
plant simulation中的free libraries有AGV模板,. h3 {  A: W5 f
里面也有案例。
9 o- _! E! r* }我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
5 ?- `7 D9 D# @: v( W* K7 ~
! _5 I3 W: J7 a4 c8 Z我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
: V" l! Q+ v/ H' n" s$ Y+ Z# A8 o: F) h/ S
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 8 b) S$ Y. u' H( o7 S! V5 Y2 J8 O
这是AGV_putin中arrive的method。0 u9 d6 ~5 ~/ T, e: Y% @) I

2 |1 |, e6 ^1 @# F当到达物料速度越高时,这个报警更多,

0 r5 Q: [0 r% P; a- K另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-22 13:11 , Processed in 0.016264 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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