设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8656|回复: 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'
+ W6 l& E! B, F9 s8 W9 x2 G  A*/
, G2 S) e6 p$ ?- Qis3 p9 |2 Z" N  b: m: y
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;* x/ G- ?* p3 ?* l
do$ H/ z9 G- j6 o
        Lan := rootfolder.Internal.Tools.AOLlanguage;
( P0 \$ F* z. P. x        if current = @.Destination -- else return
$ p; u" g, P3 Q        then8 Q( E+ G# X- [0 ]0 N
                @.Destination := void;
! t5 h9 X# _, ~& S                if @.occupied then
: }9 O2 r) @. ^/ m                        part := @.cont;$ T: Y: g5 l: x+ r
                        @.transpOrder := void;( \1 l4 ]5 Z/ t  {$ I. C
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,, x3 j# g2 ]) ?5 W
                                @,root.eventcontroller.simTime);3 L+ ~- h0 k( t- T# a5 V2 G
                        @.HasOrder := false;
2 I* ], s( Y; h: A. r' S                        @.DrivingHome := true;
+ E1 `6 x0 {) y" ?                        rgManager.tryToStartTransOrder;9 T# ~6 N7 |7 Z. I7 R
                        if @.Destination = void; R" E9 j, `) W7 T9 q0 u5 ?
                        then -- no transport order for vehicle @" q! V) J) t- y( o1 `3 D# k
                                @.Destination :=4 M6 w/ e/ x! W+ r& _
                                rgManager.nearestFreeStation(@,track.~);
0 J: a6 O# X8 b5 _2 ?                                newDirection(@);   
+ r0 G4 F2 e& Y0 c- Q                                if @.Destination /= void then# y/ k: N+ g6 o6 K5 [6 x3 L% h
                                        @.Destination.NumReservation :=; W4 j7 y; k2 S
                                        @.Destination.NumReservation + 1;  k: t- N& B4 c! t# A* A
                                end;
& u8 f0 a" X# v) i" S                                @.CurrIcon := "drivingHome";- E$ Y0 v8 T% c0 ^7 P4 a9 N$ ?
                                @.DrivingHome := true;
7 v* o( \1 c" V! C                        end;
; R' u7 P6 A' J( o& Z                else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 }$ J" i0 B- P0 A8 w; {
                        part := @.transpOrder;
* E" p* L& y& `. x9 j                        part.move(@);-- load part( d' n$ E2 R* w5 ?: b
                        @.CurrIcon := "load";6 j! Y, M% U8 N8 u
                        GlobalDistObj := part.globDestination;
& A9 @' v/ x; l- h                        assignLObj := rgmanager.rgAssignL;5 Z7 H1 f9 l/ `+ w- O) P* `
                        row := assignLObj.getRowNo(GlobalDistObj);
2 W4 {8 W7 K( a9 z                        if Row = -1 then -- since 70
4 U' Z! H9 [: F% H- |% @                                if lan=1 then0 a* Y+ I0 J" u% l% A* q5 x1 Q
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
' K# \4 C# g) \                                                to_str("in der Andockstation: \"",?.~.name,"\""));6 s3 s0 g/ C* }( l; N
                                else& ]1 _/ n# _% \" Q8 t: X' |
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
, y4 m, I6 b4 `: \% t                                                to_str("in docking station: \"",?.~.name,"\""));                               
% T6 s$ [6 b. r& H                                end;
; Y; [# A& z: q; V8 I                        else/ M6 {. ^, A- u$ z' Y- D  C& T
                                @.Destination := assignLObj[1,row];
+ ~# ?5 P$ B2 e6 u                        end;                       
2 H  v" ?5 o' V5 |$ L4 P+ F! t! d                        newDirection(@);
5 U7 s- f2 Z2 M  y& V# u" }3 I                        @.HasOrder := true;8 X0 i7 L: _. y+ p
                end;+ h6 i6 S% g1 w" o( _7 u. `
        end;
8 u- X8 x1 l$ c) h6 u1 Cend;        -- of the method
4 x4 p7 x/ `' S% c* k- [
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑   u! T5 m5 T  x% p% L

! b& l' y4 {, h. S这是AGV_putin中arrive的method。
4 u8 R" x* l0 T* P' X. r
. R8 y; o0 f; Z) E当到达物料速度越高时,这个报警更多,
) {) x  d- l: g- h可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。0 x2 X3 l$ m; e! `( y  {9 z( }
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?# r* ~: q6 `$ m: ]0 W
. [& ^. H  d6 T
另外一个小建议,就是move,所有的move都可以这样
* x' ^; ?: c% Y5 v" f5 eif not move() then debug end
3 V, N( A* b4 m" M这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
8 ^& M+ X6 x+ D# S, ]) R: Yplant simulation中的free libraries有AGV模板,
$ I8 _8 q- V7 F  N. t% b7 q里面也有案例。
+ O% t/ U! D% r1 J我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。  I0 X2 S$ S' c0 ~$ T2 ^1 _

* I5 W8 V; P7 g9 h2 i! Q4 f我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
0 T4 R8 W( v0 ~: g& \9 V( N$ J2 |# V. n  f! ~9 V
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 " T& O5 }. k0 t+ W( U! O
这是AGV_putin中arrive的method。* ^/ M6 q, C2 b; y1 F. f

4 A* x9 r# V0 e* a  U; T0 {当到达物料速度越高时,这个报警更多,

, V- L+ Y8 h& {+ m6 z1 \; s; U. A6 T另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-18 10:44 , Processed in 0.016588 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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