设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7916|回复: 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'6 @; W$ g4 ~9 l
*/- P6 e* I* Y# z
is1 d$ U! P% `7 s3 u0 z1 _& C
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;% k5 L* \; C1 `8 ~6 ?2 r
do
- E( i2 [, D- `4 d8 V2 l6 R        Lan := rootfolder.Internal.Tools.AOLlanguage;
- {6 `' V: v# ^4 {) h! F        if current = @.Destination -- else return
5 @; m! O& M$ a' t2 C6 ?$ X7 v        then
- p! j# i/ ~7 f/ E+ o                @.Destination := void;
  v5 j! e6 w5 a7 \$ f0 j4 x                if @.occupied then1 Y: a( C6 \0 M0 X* Z( h5 e# t" a( @
                        part := @.cont;
+ A' B. a- o7 n; \( b1 P                        @.transpOrder := void;
$ S8 F" V5 k$ V' ?4 i+ `) M, \                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
0 s# J# T& G3 C: ~3 J                                @,root.eventcontroller.simTime);$ O8 y& O& \2 V+ Y; y6 f. I6 \
                        @.HasOrder := false;9 G' {& T' E" M6 {: F  _
                        @.DrivingHome := true;3 v/ e7 g; `6 M( c4 [# |
                        rgManager.tryToStartTransOrder;
2 e3 ]* ^9 A) O, Z1 a) ^3 p1 t4 `                        if @.Destination = void, n- t9 O3 ~7 ?. v
                        then -- no transport order for vehicle @
5 D, `) }: o- T4 W: o                                @.Destination :=4 U; r: a' h7 S' K2 W8 A
                                rgManager.nearestFreeStation(@,track.~);! v: d5 T9 i6 ^* c  f0 [1 w
                                newDirection(@);   
: _  ]9 r! {9 ]% ]6 q! M' C                                if @.Destination /= void then4 J& Z  a% c5 ~+ Y' [
                                        @.Destination.NumReservation :=" [8 N' E. r$ X
                                        @.Destination.NumReservation + 1;* T* V  g; Y. U( M  o  r
                                end;; _: a2 T$ h7 H4 b& N0 c; S) X
                                @.CurrIcon := "drivingHome";
! U6 l; B$ a9 m: ]* j( W. R                                @.DrivingHome := true;  {' c& r) B  m% s: k% L8 o9 o+ ~
                        end;
3 L; I: J; E: C# s5 I8 I$ t9 O                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
0 @8 a% Y1 l; r. n; j                        part := @.transpOrder;! W+ G0 d7 G. {3 N% A5 V, W$ f
                        part.move(@);-- load part8 b: [  Q* J3 j& |. m9 x' x+ G2 W
                        @.CurrIcon := "load";0 z7 g( t- o  W2 m* F
                        GlobalDistObj := part.globDestination;
$ c) L/ B  o: p& y* n7 `                        assignLObj := rgmanager.rgAssignL;6 \+ A7 s. v7 ?* [" ?
                        row := assignLObj.getRowNo(GlobalDistObj);
) \3 g! _6 e/ ?/ g                        if Row = -1 then -- since 702 T1 `- g, c( J3 z
                                if lan=1 then
3 m" t0 G: R: M                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),  L) T+ U# p4 V( g. y' H
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
7 T, V( h1 c8 A5 L. Y; w+ A* D                                else
3 C" y# v# W: t9 k" ?; `4 Y  A5 z7 ~                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: Z& c2 J# Z) q9 I  E. ~
                                                to_str("in docking station: \"",?.~.name,"\""));                               
/ [1 r% }! w" J# o9 Q! m& ?                                end;
4 s3 [. c* V7 d& Y                        else5 k& l8 V: \6 v: k
                                @.Destination := assignLObj[1,row];/ P( s9 e9 S! R( y
                        end;                        : ^% B- Z+ t/ u  y) A! ~3 L
                        newDirection(@);
) J6 e; s8 C+ k0 P" a                        @.HasOrder := true;( o5 U9 o* c" r2 I
                end;/ ?) f& n* T) H, t5 |5 Q3 z
        end;+ }  r3 l1 C, c" V+ }3 N1 P- D, `
end;        -- of the method
& u/ d0 O2 W, h/ b
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
  y3 B8 v4 X/ X& x. I* b  j/ M8 F7 t( r4 s2 l4 @
这是AGV_putin中arrive的method。
, s$ b" N$ E% R' S3 I2 s; d* T
# D& i1 X' P* M  |9 r当到达物料速度越高时,这个报警更多,
2 v/ g4 Z  |6 u- f3 ^1 ?; X' f5 C可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。5 S% x" Z, N% i- k3 Q1 r' g* F
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
* Y# U3 r( m$ k  u- ]# S8 A
& F+ \, B! q4 q另外一个小建议,就是move,所有的move都可以这样
# v& S9 D* F; \. Jif not move() then debug end, l& \& ^5 l5 u3 f
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
" Y; I* \4 u$ Iplant simulation中的free libraries有AGV模板,
/ ]! A! x6 c! b. O0 O. D7 {2 e, H里面也有案例。/ @! C- S* O! S
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。5 ~, w6 W- U( Y  j' x. t/ a
3 \2 Q- v  o' s8 e% k- p* p
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 & ~* \) A  H+ `
% i* X$ V0 m- f' I5 n7 j# F
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 8 R5 ?2 S- H: }
这是AGV_putin中arrive的method。2 |" A0 w. O% T3 `  S* o& ^+ Q, j

- [0 ~; w' y2 F1 Y0 b! O当到达物料速度越高时,这个报警更多,
: \; l: p4 p. _7 \0 F; {$ ~- M9 V
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-5 11:13 , Processed in 0.024609 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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