设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6837|回复: 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 q8 v, S; E" I# J# m) e5 a+ a*/3 [5 A3 s& ~8 u0 C# N" A
is$ R6 A) l7 P0 m
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
  R* Z+ s7 q: a- k4 `do
& B% Y3 g' Y" t# S3 o        Lan := rootfolder.Internal.Tools.AOLlanguage;+ I! J  X9 O! s7 ]1 k
        if current = @.Destination -- else return
, P! Z9 y2 q$ e* \+ |5 z        then
4 B& Q, E/ z: U8 ?& Y9 s                @.Destination := void;  j/ G! Z+ D& ^
                if @.occupied then
, z8 q) q( G" u" @. @( V' |                        part := @.cont;4 s2 S8 d' y7 t. B; y
                        @.transpOrder := void;% i( e( n6 s: M8 H
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ g, Z$ D% z6 f3 ?* V( r& j                                @,root.eventcontroller.simTime);( v3 M3 Y% m- C( C: i
                        @.HasOrder := false;/ Y. t2 _) ~) J! q+ r
                        @.DrivingHome := true;3 @% |6 S1 w  q
                        rgManager.tryToStartTransOrder;
7 W! \2 c# m8 B' F/ E' t* C, T% D                        if @.Destination = void
/ f' P0 i3 ]% X: c' ^3 @                        then -- no transport order for vehicle @
: S+ X( p/ c: w4 s9 X# f                                @.Destination :=
( t  h- I* ]2 V                                rgManager.nearestFreeStation(@,track.~);. {1 p, T8 \2 \% ?. `8 _
                                newDirection(@);   $ \- h. X. M+ N0 u7 F
                                if @.Destination /= void then- [' n+ c, P+ d  N) @# Y' n
                                        @.Destination.NumReservation :=
7 ~, g( Z+ J: R0 F! v                                        @.Destination.NumReservation + 1;5 ^: P5 y$ [4 M3 Q' ]( v) E
                                end;* ]6 ]& [8 j& v9 Y# m) ]7 K
                                @.CurrIcon := "drivingHome";; d' s, i( N+ L- o% b% ]. @
                                @.DrivingHome := true;4 }, }+ p% m. e5 H1 G# x% @
                        end;  ^6 Y: }* o+ c* f: m
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station1 S( q4 x1 K. c( L' R2 y
                        part := @.transpOrder;; d! ^5 ^& A" }" ^
                        part.move(@);-- load part
+ n: E) v4 c+ B                        @.CurrIcon := "load";+ _6 F6 R" r5 s+ ?- g4 P( ^* E  Y8 O( S
                        GlobalDistObj := part.globDestination;
( H+ h2 z7 }4 F8 t3 q! L                        assignLObj := rgmanager.rgAssignL;
0 e* _4 V7 A7 O9 c1 V# Z                        row := assignLObj.getRowNo(GlobalDistObj);
( N0 ~4 k4 P4 ~  P                        if Row = -1 then -- since 70
/ \# W, N2 p( _, H( x) V' p' B. S                                if lan=1 then* b) |4 j2 Q0 N2 L' B( \, ?
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
  E( N. S$ Y) d" z. V5 A+ T                                                to_str("in der Andockstation: \"",?.~.name,"\""));' g1 t- r# `3 A5 e% H7 D0 g
                                else" @5 D' S# _2 w4 L1 U
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
1 p4 \! X4 l% s                                                to_str("in docking station: \"",?.~.name,"\""));                               
- a$ d9 k( G& B# z1 q                                end;- M9 O& H% q1 O9 Y
                        else
1 r* l0 m3 i3 g4 K( ?3 q1 P                                @.Destination := assignLObj[1,row];
! G) f. i1 z/ w# Y! \5 d+ d. T) H                        end;                        + e; R. p3 C5 `& t9 Z( `; L& b
                        newDirection(@);& m2 Y6 B* Q+ t  D- q9 Y) v: p8 ]/ }
                        @.HasOrder := true;" J9 W7 u1 o4 d% s" f' A2 Q4 Z
                end;
7 D2 C* {8 F$ `5 l( F* n+ `        end;* l" f' H$ ?4 M
end;        -- of the method
) A8 K" h6 I* q; e' z( E
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
+ z& e2 t# a4 ?1 E" i5 b
+ |! U/ F% J7 w6 d: ]% D+ `6 v* I这是AGV_putin中arrive的method。# `# Q2 h. k: o% A- @# @. N. C) q

9 b1 a! z2 `% e0 _; F; K, k% Q当到达物料速度越高时,这个报警更多,
9 b' P' P8 F# {2 O) W; ^可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。/ y" s" r; B, n; i) |/ z3 b
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?9 f' B9 W5 [5 I+ \9 G! r* F
7 D' }! C* y& S* [! z
另外一个小建议,就是move,所有的move都可以这样& `5 Q( {4 a4 t3 ^' F4 _
if not move() then debug end7 C( D2 c& y' f, E- b$ g) E9 N! W0 h, `
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
# _% {4 g0 L6 D5 Rplant simulation中的free libraries有AGV模板,* ?. e# c9 B9 X% g. ~
里面也有案例。
4 i: I- Z( J! _+ t我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
+ J2 t: V) m1 W% c, ?, t/ V) U) ^4 N1 ~6 Z/ ?" B
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 , Z2 R8 l4 ^1 E, t- v

. j2 o! d. |8 b) n' p8 ~那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
5 A( a4 d" [$ h, b. x( J这是AGV_putin中arrive的method。; Q/ Y! h! e9 I" Q; i& G

. M" Z7 C+ e! t. C+ R当到达物料速度越高时,这个报警更多,
' W6 J# W4 v5 n4 J  h: p
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-1 18:47 , Processed in 0.021339 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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