设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6497|回复: 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'- o" B- S3 {; D% `8 c( T
*/* m" y: E  Q3 ?) E# ^, h. w
is4 ?2 `" P8 b8 e& [
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
. A" [, V' F7 n: M4 Xdo
- w! ~/ r6 M4 H+ ?* M        Lan := rootfolder.Internal.Tools.AOLlanguage;
$ Q# G1 b' R  E6 F8 X* `. O        if current = @.Destination -- else return
: M7 K( z, K' ^        then2 z6 b7 N5 C& ?* p$ P
                @.Destination := void;
, ^0 m: \/ a2 d! R  m/ ~                if @.occupied then
/ ~3 I" i6 Q2 p6 \5 V1 [                        part := @.cont;
# j2 x0 v& Q2 r, ~  g                        @.transpOrder := void;
' C" G% W; ~) i" |0 @                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
3 @8 x. B" ^3 Y6 J4 x/ ^                                @,root.eventcontroller.simTime);! r) J  c6 [% x9 c" q4 {8 p) x
                        @.HasOrder := false;
3 v( G) \: m/ M; I- }7 x* Z                        @.DrivingHome := true;. i8 W" c3 n7 @2 b+ ]2 h7 a5 z
                        rgManager.tryToStartTransOrder;  U& G# L- W9 y2 `1 q: q
                        if @.Destination = void
  t! }! U9 R" q+ O9 d                        then -- no transport order for vehicle @
' @- N! ~0 B8 W) U) [7 S                                @.Destination :=5 X$ }& F* G' z6 g& U6 k
                                rgManager.nearestFreeStation(@,track.~);  i0 Y; P8 h9 y" Q; ~3 E
                                newDirection(@);   
: x0 J. V! H1 x$ _2 p                                if @.Destination /= void then  P) G0 W  U  ~+ M% J5 s/ B8 @
                                        @.Destination.NumReservation :=# q7 y% Q) P% c; z& j2 [5 y( L! f
                                        @.Destination.NumReservation + 1;
9 G& N/ s  [+ D- F& r# s                                end;
* X* o9 r! w% }0 m                                @.CurrIcon := "drivingHome";
. T4 S  [2 ?6 N/ \( @9 N                                @.DrivingHome := true;: }; T$ m! Y- [+ [  X2 D
                        end;
0 O) C. k; I5 p% C$ ]$ V3 p                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
' }, J( h: [- G: B* w9 R( j- v/ B                        part := @.transpOrder;
3 d; {' R/ G8 Y                        part.move(@);-- load part3 K5 M. L4 O. u2 B
                        @.CurrIcon := "load";
# B8 F0 ^* h+ G3 s' o                        GlobalDistObj := part.globDestination;
" L5 t+ T$ K7 ?& }7 d* E$ L                        assignLObj := rgmanager.rgAssignL;" N" N! F9 f* i# \+ p# _, N+ B/ K
                        row := assignLObj.getRowNo(GlobalDistObj);' a/ K: r! U  f$ J
                        if Row = -1 then -- since 70% z7 P+ U( E5 Z* j' q, U; o/ u1 Q
                                if lan=1 then
1 l: B  m$ s* A3 c6 x$ g                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
' _; n2 [/ }4 g# W                                                to_str("in der Andockstation: \"",?.~.name,"\""));5 X( b* e+ w' l* w' k- d
                                else) f8 \8 x- l" b3 U/ ]( x
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- R8 u7 U/ G8 g$ |# S( h, j                                                to_str("in docking station: \"",?.~.name,"\""));                               
$ m  m! Y; J' j" @                                end;) }$ E: ?9 e) R$ H7 ^' R
                        else
( R# W- ^6 Z, a                                @.Destination := assignLObj[1,row];1 }& h2 u" m! W; q+ t7 j
                        end;                       
1 m( i# J, @, |1 {+ T. y                        newDirection(@);5 I# w: Y" e- |
                        @.HasOrder := true;5 C  m2 B% l2 c$ }/ I$ w" N% _1 ~# X
                end;/ d3 |( s) @1 {2 w
        end;) E3 x/ u; Z+ h% x: z
end;        -- of the method
( H- l6 D# G. A1 c  J
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑   r. |7 l/ s: K" U1 ~

4 T- A2 e' w9 W8 ^1 ^) K这是AGV_putin中arrive的method。
% H, p7 ?7 j: G/ |1 |1 u: L" T4 |( O2 n; l# A1 ^; A8 ^' j
当到达物料速度越高时,这个报警更多,) k4 U6 u+ ^- B
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。4 L. \* a- ~" H4 x+ n' e1 S
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?. G( t' o( N/ d
& T9 \2 K& B0 l6 K: `1 H
另外一个小建议,就是move,所有的move都可以这样) d( M4 a+ x9 ~( O
if not move() then debug end
: ?1 u! Z9 I: @7 d这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
* Z* T, Q, C+ R$ `plant simulation中的free libraries有AGV模板,
2 i+ ?# F4 i  f0 b6 F- z+ |里面也有案例。
1 S' z7 Z* e4 ]: z我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。, A2 v( B  c  g. ~0 B
8 U  e$ E1 k1 ~7 X" V3 A
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 ! g  v' @: }5 n# {; z" ]1 Z

5 l! M8 \, M. Q! ?) V' n0 V那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
' p# k. x4 `# j& }+ t+ Y( w) E# V这是AGV_putin中arrive的method。
% C7 b) w8 x# v0 ~) U& ]- o1 q& |2 b$ Q4 \- L
当到达物料速度越高时,这个报警更多,

, Y6 v7 v! |' @; X% w另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-9 21:09 , Processed in 0.019442 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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