设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7399|回复: 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'# Z! _3 y  F  a
*/& @0 g/ R7 Q. i0 o! N  y
is
' c# ^" p: ]# P6 k( u# q" e2 P1 M7 B% h        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
3 I  D  @3 e- X% ?8 A4 |do
" F& t/ k, F. S; j' b+ G0 W+ U# }. |        Lan := rootfolder.Internal.Tools.AOLlanguage;
$ P6 q8 u8 e# y9 D# {# J        if current = @.Destination -- else return
) g% ~( C6 A( [( _  G        then
) r; C/ q, X3 [2 G/ a& z                @.Destination := void;( p' ^. o0 h# X: K* @) A
                if @.occupied then
9 w$ Y) }4 Q* Z                        part := @.cont;
# w8 l# E6 L$ g4 C1 z7 F                        @.transpOrder := void;# X" u: s. G0 ^
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
0 `2 `7 D; u* d' y                                @,root.eventcontroller.simTime);" y3 ?' ~. j- c) W5 ~. z! i( O
                        @.HasOrder := false;4 X9 ]6 p2 p. E2 W
                        @.DrivingHome := true;6 `) f$ O- b+ h& t
                        rgManager.tryToStartTransOrder;
& f, }9 x# K, z+ T4 y$ }. t& L                        if @.Destination = void
# g. w8 u* W: |* Z                        then -- no transport order for vehicle @3 u1 j) j4 b# F: G% Y4 s; f
                                @.Destination :=
- d/ O+ E  @& Y. @7 x                                rgManager.nearestFreeStation(@,track.~);
- i6 p" d& j: m8 @, {! h                                newDirection(@);   
+ d0 u& {, x; R4 h7 t3 q3 N) r                                if @.Destination /= void then4 x+ E: k% K' v* D4 ~
                                        @.Destination.NumReservation :=" M9 B( k( ?7 u& ^5 T
                                        @.Destination.NumReservation + 1;
4 x: e; l$ H! e% h6 F0 o1 I                                end;6 d0 ^  c3 w& Z' W& d
                                @.CurrIcon := "drivingHome";3 {  g9 g8 ~' i8 b! `; u- `
                                @.DrivingHome := true;
. k+ i/ \. Z$ R! S- N' F                        end;
# z5 B. _8 V( L9 d2 N- x                else -- the vehicle @ is empty, both vehicle and part are in the same dock station' |8 V( w# E  y* P
                        part := @.transpOrder;
# H  q' ^6 X, D; |! p                        part.move(@);-- load part
# ~* E* h1 V3 v8 D. x                        @.CurrIcon := "load";( b. u8 n/ _! A/ X
                        GlobalDistObj := part.globDestination;3 X( d' L6 x6 q/ ]! a
                        assignLObj := rgmanager.rgAssignL;" T9 \6 S0 ~5 L" k6 O/ I. Q
                        row := assignLObj.getRowNo(GlobalDistObj);$ b2 _4 W  {7 W2 J3 e3 l
                        if Row = -1 then -- since 70
# v7 I) s9 y$ @* |7 b2 U                                if lan=1 then
/ l) p' `7 Y1 X$ L                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),/ F% r5 v  F7 e3 P7 X
                                                to_str("in der Andockstation: \"",?.~.name,"\""));. O/ s; H/ ~/ ^" H! k3 P
                                else! T1 n7 ], [% L0 j7 a0 w
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
" S7 ~8 k5 h/ p, w% T                                                to_str("in docking station: \"",?.~.name,"\""));                               
9 V0 a9 t( u1 {) ?- b" [6 q* |                                end;
6 S$ K- R$ ]* ]! [/ T# @7 q                        else! g2 M' r# l$ H1 V4 p  n! l
                                @.Destination := assignLObj[1,row];: r+ a) M$ M6 m" j3 w2 V" _
                        end;                       
  U; p; H. \+ U5 J                        newDirection(@);
$ G" D. e' a$ R" X                        @.HasOrder := true;
! a! f; j! R+ a; T6 |: i                end;6 ]; B4 A& [0 X, v  h
        end;
8 G- |" p& O' y& }. cend;        -- of the method: n/ Z0 t$ ^; I4 ]) w' ]- l
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
# I& p0 w+ T$ w( e
/ Y2 }' F- E$ |  \0 A这是AGV_putin中arrive的method。+ j0 I- m2 m4 F2 f! g
% {: _# p5 W* q% J; u
当到达物料速度越高时,这个报警更多,
# p* m: J; o; P8 g可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
" i1 w6 A! L3 O8 J; m" }程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?) e  V8 _! r' P: P& O& f0 C! F( `. d
: H1 ]: _) C% ?& D6 @) F2 U
另外一个小建议,就是move,所有的move都可以这样' N" H8 C* h2 w
if not move() then debug end# n/ J8 g* Y% t$ _6 I
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
/ j/ o% }* S4 p& x4 Zplant simulation中的free libraries有AGV模板,% y: f* a* J. y4 d3 B3 h
里面也有案例。$ e- X4 Y9 i, o* E2 V2 D' O# e
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。+ e! t- U% z# Q+ s7 D9 p0 k

( z9 f; I. S; a  x+ y我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
9 Z: r6 g, }. v$ B& M+ f$ I0 ?: |% v3 Z6 B7 G/ F% e) w8 D
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 * ^% U+ ]: I) o1 w5 z+ N! s6 J
这是AGV_putin中arrive的method。
0 Q! e# J& q2 ^; W
& Q2 B, s- l5 \& Z当到达物料速度越高时,这个报警更多,
. h3 ?: I% O; n
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-9 14:15 , Processed in 0.020068 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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