设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8389|回复: 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', K, P# d* W8 W, w
*/
. ]5 l) r+ T4 bis+ h% I4 k5 R' M8 {) @( l, r
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;( R" b2 w. ?, z$ `
do
: ?! F5 U! n! \7 g        Lan := rootfolder.Internal.Tools.AOLlanguage;
) B; m( b3 x0 H, Y$ |        if current = @.Destination -- else return
  A2 _/ Z5 I" \! z% c6 f6 _        then
3 @9 H; a6 d* @/ |, A                @.Destination := void;6 H( \% S( r3 ^3 I& B$ G. x( e
                if @.occupied then9 _2 N% w0 W  [" [* ]0 K* z$ i2 m. p
                        part := @.cont;
5 N  {0 h& ?: ?                        @.transpOrder := void;2 x! P- U6 M  ?" P: T
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
2 c7 G, T' ?4 h8 j+ a, a& J$ O                                @,root.eventcontroller.simTime);7 j6 ]% t4 J8 E
                        @.HasOrder := false;0 Z% }" D( w0 |1 i7 v. P; I. Z
                        @.DrivingHome := true;
6 Y/ ^; U7 a( i                        rgManager.tryToStartTransOrder;0 p8 V% c* `9 o
                        if @.Destination = void
" Z2 b8 d" {8 T  q6 G                        then -- no transport order for vehicle @9 y! s- ^" `# \6 \5 @: d
                                @.Destination :=: S: |. a5 u5 t2 z! O
                                rgManager.nearestFreeStation(@,track.~);: [* N  w5 r( O. |6 |: Q
                                newDirection(@);   $ i5 j4 ?3 P, |. T( @8 A
                                if @.Destination /= void then
. R9 ]4 ^# T/ `3 j- k; R, j7 `                                        @.Destination.NumReservation :=1 a/ g, _/ D6 w( `
                                        @.Destination.NumReservation + 1;) C# X; b: D  R. o# x( v& y* V3 X
                                end;
0 S- J8 `4 l2 c2 n6 b: w( z                                @.CurrIcon := "drivingHome";
: F& T/ ^6 H# r; ^# b0 l7 V                                @.DrivingHome := true;
3 F- E+ y8 q& J  [0 G                        end;
5 s  a- e+ z3 a3 r" x                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
! b/ O& q- x$ Q1 U                        part := @.transpOrder;
6 {2 b$ B% ]1 n8 V9 T+ @                        part.move(@);-- load part
5 L9 R$ l: r4 L                        @.CurrIcon := "load";
: _7 U7 @* N: h+ V9 G1 u7 s2 E7 ~                        GlobalDistObj := part.globDestination;2 u. a6 H# a. H, Q, {1 l/ o
                        assignLObj := rgmanager.rgAssignL;
" M1 z& u: h$ ^$ G6 m  G; _' K% E/ ?                        row := assignLObj.getRowNo(GlobalDistObj);
8 F. ]' L; t) k4 R% g4 Z8 \, V                        if Row = -1 then -- since 70
3 y* x. ?9 {3 j0 e4 n! k/ f                                if lan=1 then
4 r: M8 r4 ~1 D8 W' d                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: i/ D9 D  i2 l0 }- K' L
                                                to_str("in der Andockstation: \"",?.~.name,"\""));- ?/ A1 b) m! }' n& `# b! C
                                else9 O- o1 o9 ]2 i4 C/ o
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),9 B" y. i7 k. {- s# h& Q7 _
                                                to_str("in docking station: \"",?.~.name,"\""));                               
6 C, x9 R1 {3 k2 M+ c1 U* Z9 Z+ _) a' w                                end;4 ?# \/ x* Y4 e0 C% g4 i
                        else
2 p9 i+ K9 L+ W4 p                                @.Destination := assignLObj[1,row];9 e+ h+ d, S1 U* ^, E- Z) }  W
                        end;                        ; a5 @" n) F1 D
                        newDirection(@);
8 l, G8 |' Z& C" l: n2 M                        @.HasOrder := true;
2 d0 |: J, m& A' @* @! J" l' I8 j                end;: ^$ \9 J0 v3 H+ q$ C3 y
        end;
9 T% Y# x) i) N/ l* s7 tend;        -- of the method! z8 u9 }1 r5 E  R* U
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
7 C. ^' O# C8 U
1 }0 T: _$ I$ O这是AGV_putin中arrive的method。# C0 ?7 ~4 d, \4 |& n- \

8 q3 ^& _5 M  k. {/ ~/ k4 ?. p当到达物料速度越高时,这个报警更多,& D2 {! P# F. c. _# V
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
) R# o, C, ?# N9 @# N5 }& X程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?/ b4 t3 B/ o) e( L1 \9 n3 b. ]

# K% a' ^! c0 ]0 p: H! I3 D另外一个小建议,就是move,所有的move都可以这样2 [5 P6 U0 h% Q0 d$ E# v
if not move() then debug end
9 M; V* N+ u# N6 ]4 B# v这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。! @5 }& U5 V" p- P% H9 m
plant simulation中的free libraries有AGV模板,
1 T' ^5 e5 v. Z$ D里面也有案例。
! c- O, F) {1 Q/ N我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。( K7 b/ Q6 U0 I& m9 f% \1 c. c, |- I
8 l6 Y0 r& R9 p/ e$ F1 K. ]! J
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
3 ?& A# q6 ~" I, r, t- |- o/ A
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
% c3 S+ Z: e2 x% X这是AGV_putin中arrive的method。/ z: p; P5 t% J
7 p5 g5 m* F) E5 L) O) {
当到达物料速度越高时,这个报警更多,
8 r) \' e" u( O5 Z! A3 s
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-1 03:00 , Processed in 0.015737 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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