设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7729|回复: 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'$ w: @" c& u- U" _; q0 \" k
*/
2 U& G1 J& I) B' _. xis
5 \7 ]* D8 p* }  C1 z) A        part, GlobalDistObj, assignLObj:object;row,Lan:integer;  {1 y" c9 z$ T! o- T
do
9 O- y, @9 E/ F3 ?3 t" R        Lan := rootfolder.Internal.Tools.AOLlanguage;
" Z: _4 s3 l$ F) N( }( b9 C        if current = @.Destination -- else return: E" U7 Z* w& _* q% i% u
        then) D$ X$ V4 p  Z: c
                @.Destination := void;, p' j; k* c1 |0 h; f
                if @.occupied then( e* L; _' w, N% A4 Y
                        part := @.cont;  Y; P$ z" A& \, l) U  D. k
                        @.transpOrder := void;; [+ P, l4 I0 x) j
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,% Q3 B- ?$ I8 T# f9 ?
                                @,root.eventcontroller.simTime);
4 c/ s9 |; t4 Z! w                        @.HasOrder := false;* q/ |0 J7 Q0 [1 d. m/ d/ R# L& s
                        @.DrivingHome := true;, b: l8 F5 M& U
                        rgManager.tryToStartTransOrder;# _! P5 m7 E' C; q
                        if @.Destination = void
. ]2 Q1 B* j2 E- Y9 N2 A( g; a                        then -- no transport order for vehicle @
3 T. H/ t4 T; a/ J4 o  ~8 Y$ `! ~, b                                @.Destination :=
) U5 V1 H4 U& R4 g$ S/ k# V                                rgManager.nearestFreeStation(@,track.~);
7 [) c! `# M. {& H; Z- F! a- [+ L                                newDirection(@);   - r. v5 J) R6 r; o5 m6 r4 Y
                                if @.Destination /= void then5 \. a8 N# Q2 v
                                        @.Destination.NumReservation :=
" c  a- q1 S7 z                                        @.Destination.NumReservation + 1;
( h2 D$ e7 y. m' }                                end;4 R+ E) V; o( E, @" d" |% ?  S
                                @.CurrIcon := "drivingHome";( l* j" G  A$ E5 |; @
                                @.DrivingHome := true;, }; o6 e4 G9 |: m0 @: h1 Z% H6 t9 ^: K
                        end;6 C! @" }$ u& x
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station, {1 w1 J  x4 D- r7 p. v# V
                        part := @.transpOrder;
# @4 }9 m4 i* n7 z% s2 x* V' H" _: T5 I                        part.move(@);-- load part
: H7 s+ `8 D  f                        @.CurrIcon := "load";, N- g' s( S  l) X, o# z
                        GlobalDistObj := part.globDestination;
: y1 h0 Z/ |3 L4 w& i. q" Y# e; o                        assignLObj := rgmanager.rgAssignL;
1 N* j: T  a" j                        row := assignLObj.getRowNo(GlobalDistObj);2 k4 _( k0 ?8 m( @7 \$ H( P! S
                        if Row = -1 then -- since 70& O2 R# b2 m+ S! T: `* G4 d
                                if lan=1 then1 h2 L  W$ n* E5 ]6 v5 L, g& }0 z* i" q
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),5 F: w1 |0 k' \* C9 j
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
/ ~( f5 l; j( r6 O                                else
, Z; `5 @1 [" n                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: |8 z8 A6 c& ]* ^4 E: d
                                                to_str("in docking station: \"",?.~.name,"\""));                               
& c( f+ ^  z: `$ M4 G                                end;
8 A; E% O3 [2 K: u: O                        else9 E- P' ]7 H' F; u# l
                                @.Destination := assignLObj[1,row];4 {5 q4 b& r, R) l
                        end;                       
  v1 l% a9 {, h9 {3 N& c7 C# R  Z                        newDirection(@);
5 v- q  j9 n5 S4 K: |  ~! J- t' A                        @.HasOrder := true;2 x  P; B) F9 H! Q% u. A* L0 T
                end;
3 I2 i5 E9 f2 |        end;
6 D$ G" N7 C9 c' L" Rend;        -- of the method! r1 \+ }' `- |7 U* S3 A: F
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
* R& |8 u0 e2 g8 L
9 B* g( T9 T7 g这是AGV_putin中arrive的method。
8 q; k2 c/ M% a! j; ?6 u1 L% Q. O) y) J2 F: K$ ]. {
当到达物料速度越高时,这个报警更多,
1 ^3 o+ r- n* C7 u4 }/ }可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。# `& C9 G$ ~: a- Y6 t
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?: ^3 z8 _4 u; A& f. ?$ f

2 m# ^  p, C( @. y8 M另外一个小建议,就是move,所有的move都可以这样
7 `. y& i" M6 d1 d9 _if not move() then debug end( Q) Q( `8 M& W! y) a# p# T! X
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
$ v  e. C; q+ o, Z9 Pplant simulation中的free libraries有AGV模板,
* s- E# j  b' y( L' M里面也有案例。8 i: t2 A9 L& e8 g9 p2 g. V) u
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
* X3 T# j; l0 _, ]
% D" d$ r$ k+ o7 M8 i我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 8 R1 R/ o1 [  U9 c
' V. U: e0 m0 l+ L9 [- V0 A
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
' H, g8 R# j. [# {$ w5 ^( D0 |. O5 P# E这是AGV_putin中arrive的method。
$ I3 t. l! ~* o* X  U7 V! F
! s( M, O' M" h( Y8 y6 p当到达物料速度越高时,这个报警更多,

( F" O' ]: s( Q" k3 ]8 x, O7 }另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-26 11:39 , Processed in 0.019356 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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