设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6800|回复: 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'- M9 M, H" K% Q. C+ {
*/7 Y5 J" w- f8 }5 Z. L
is2 H! k, W" ~; e
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;: g. Z8 A/ S8 l. ^- j
do! c, z4 L3 m2 C$ g; Q" ~3 \( l
        Lan := rootfolder.Internal.Tools.AOLlanguage;
5 D( V# S! x1 I" U/ a        if current = @.Destination -- else return
0 Z) x, v* O( g% T+ s9 S* l; G        then
+ i  t% f' r$ x6 |" B+ o( U( G/ _                @.Destination := void;7 E. U# L0 J( y% m5 |% i. D, G
                if @.occupied then
4 d( U% c* X- x- h                        part := @.cont;
$ f7 U2 J8 l8 W                        @.transpOrder := void;
' x' P  D5 j& ^6 U& Z$ h                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 u9 T4 }0 s2 h% E2 @# g  k
                                @,root.eventcontroller.simTime);8 v( e* ~  w: Z4 k; @- j
                        @.HasOrder := false;( J6 |( l3 S$ m5 ]) Z: {0 S2 }
                        @.DrivingHome := true;
& `" K3 E1 j1 w4 ~$ x1 _3 t                        rgManager.tryToStartTransOrder;4 F' n3 F) C+ h2 G! j" n% S
                        if @.Destination = void
$ a) V# P- I5 G/ _, p                        then -- no transport order for vehicle @
* s. ?! ^! C5 k! M                                @.Destination :=
. o7 U3 S& H/ S                                rgManager.nearestFreeStation(@,track.~);
8 U. K: |* {. G% @) |; K                                newDirection(@);   
0 o! @  `. m) _' r                                if @.Destination /= void then
9 A6 U7 g+ V; K) S! C                                        @.Destination.NumReservation :=  f9 N2 o( r! `# M0 u( Q3 s7 q3 h+ k
                                        @.Destination.NumReservation + 1;1 j$ g0 M) ]; _. E2 q# J! G/ d
                                end;( J, N' i2 Y3 e- V% a# L2 T5 v1 [
                                @.CurrIcon := "drivingHome";+ q" X3 o: t* q+ b% l; N/ ~
                                @.DrivingHome := true;
+ W. J- i  B2 y                        end;
3 _9 \  }5 K# |! j* x                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ Z4 x; y: ~" d- a; Q* Y& P                        part := @.transpOrder;
0 C- }0 R1 S4 B; ^* Z. w( [* r                        part.move(@);-- load part
, J. f( l% Q% `3 j/ Z0 _                        @.CurrIcon := "load";
( l; A& P& t2 c: {- z$ A                        GlobalDistObj := part.globDestination;0 w) w5 R( f: ?; \
                        assignLObj := rgmanager.rgAssignL;
, y0 g$ U9 {+ }+ X                        row := assignLObj.getRowNo(GlobalDistObj);; Y( R0 e+ Y8 ?- D: {! c3 e+ h6 ^& G0 [
                        if Row = -1 then -- since 70, f3 P% t$ Q5 R+ [* Q+ T
                                if lan=1 then/ i, v' V& U7 k- H4 z
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
7 c6 G' E9 Y! f$ F0 Y& R: o! G' j                                                to_str("in der Andockstation: \"",?.~.name,"\""));
, o( n% L& n8 N1 ]) [                                else; W- B) U( r8 g8 T9 I# |5 \! @
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. r" X$ Z; W, o
                                                to_str("in docking station: \"",?.~.name,"\""));                               
  q+ [8 u$ S- t6 s+ J                                end;  x) I! r- w3 B( J  S
                        else
0 J# {# f0 {" A                                @.Destination := assignLObj[1,row];
; Q7 N, P2 Z( t: P7 h- e/ C                        end;                       
  R" x' f6 L! E* H% C# ?4 O2 o                        newDirection(@);/ f9 H8 B3 X: f0 L. F: h
                        @.HasOrder := true;) u1 ~/ T3 x( s$ v! R
                end;. B: X! Q8 s( L
        end;& c$ b1 S; Z( a% `2 E- [/ }
end;        -- of the method
! x% x3 v3 N+ j4 J; P) n3 c5 `* U: M
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 ) J4 }; V% j, [- |4 a) V

9 L! \4 H& V/ |  H' R. y( O这是AGV_putin中arrive的method。
7 f$ ?* ], ~: p+ A6 j+ h' m) k! S- z# F/ j% K
当到达物料速度越高时,这个报警更多,
4 A( f( d- U  N! J/ a可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。! S1 t0 e# o- o- A" t
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?# f) U. `1 x: U. ~0 D; h
% f+ L8 z% D: Z  {, X* S2 O  V6 m
另外一个小建议,就是move,所有的move都可以这样+ n8 d9 E7 I- _8 c4 U* U' U8 v# }; P
if not move() then debug end* {0 K) W* g( C
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。1 C$ Q2 S5 N# k( b* n! @! V
plant simulation中的free libraries有AGV模板,
8 z) |. b7 s+ _1 Z里面也有案例。7 {* [$ \6 ?6 s+ R
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
5 G- Y' Q4 c; y1 s  X) B7 O$ G( T: `2 Y7 k" g
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
: C# j- H* B) r: _' Q/ |# G1 y$ j& o$ M
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 3 \$ q# ~8 k; v0 P: w
这是AGV_putin中arrive的method。
. Y' [7 a* Q- O/ B7 u, Z+ @0 i$ l% i8 o# v' ]
当到达物料速度越高时,这个报警更多,
6 c. N- h7 J  T, C+ H
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-27 11:22 , Processed in 0.027015 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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