设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9872|回复: 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'
. J8 X' |* L; S*/( Y. b+ [# M& `1 R, x8 a
is7 D# w4 u$ `0 ]- [3 r
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 ^( v" R6 k9 `
do; L; ^6 e  l- V: a4 Z& [3 s4 s$ D
        Lan := rootfolder.Internal.Tools.AOLlanguage;
5 n8 i$ K% r- n# l$ ?7 Z; A        if current = @.Destination -- else return8 j+ {. ], b9 v5 A6 W" |' r
        then
3 K6 Q2 A! L  r- R6 J                @.Destination := void;
$ u2 e+ `" b  v                if @.occupied then
- a. {+ [; N4 i* W, g9 o9 c2 U, K' D3 S                        part := @.cont;
% P! j9 _( ~3 @# e                        @.transpOrder := void;
+ x! Q& E) h7 H  F# Y% V                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
. }' O( X: c! `# }( E8 Z                                @,root.eventcontroller.simTime);
( l5 ]6 @5 s# J; P. B9 K                        @.HasOrder := false;( r# u* S1 o( q  m" |+ N
                        @.DrivingHome := true;2 `  z" ]/ ~% p! {
                        rgManager.tryToStartTransOrder;/ t, Q9 f6 E- v8 k; [; U
                        if @.Destination = void
4 O1 a" `& f# ~+ f5 h! a& v3 s' J, ?                        then -- no transport order for vehicle @# X: U+ {! c  y7 t
                                @.Destination :=' z! S7 N# V8 m* M' T1 a* E" q
                                rgManager.nearestFreeStation(@,track.~);- z1 P/ J5 A! r& [5 L
                                newDirection(@);   
, s( s% I: Y. O% _! A) t! ]                                if @.Destination /= void then
4 `1 v2 J; J% \1 W! E. A; x                                        @.Destination.NumReservation :=
' \8 ~; W. m8 V0 @; C                                        @.Destination.NumReservation + 1;' f( }% X% i- {4 I4 p) e
                                end;5 p# Y+ e5 _5 f# K' L
                                @.CurrIcon := "drivingHome";
+ d! D5 M  A2 w* d" O7 Q                                @.DrivingHome := true;: ^% d( j* U% q( T
                        end;
" m& j' M4 W% {7 j" v6 L                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
, N6 O3 ~2 H6 w2 U0 c/ P                        part := @.transpOrder;% J. u3 @. T4 e( m/ I
                        part.move(@);-- load part
! b' N, z- x/ w) G8 `) m                        @.CurrIcon := "load";) J6 @' q, s8 A5 [9 y' ?7 j
                        GlobalDistObj := part.globDestination;+ S% t: Z# U; H" J
                        assignLObj := rgmanager.rgAssignL;
% Y; x6 _" ]  I5 g                        row := assignLObj.getRowNo(GlobalDistObj);) b! P, R0 r6 j, [# Q. G9 w. p% ?
                        if Row = -1 then -- since 70, c/ a) Y8 d0 r+ G" n9 A8 y
                                if lan=1 then# P" C  d/ P: l. u; t
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( G* D6 S1 [2 R3 L$ w% ~! H                                                to_str("in der Andockstation: \"",?.~.name,"\""));
( l% F% [+ }+ L) d! k+ O4 b                                else( I- X+ [" Y9 C  h* k& @7 X& F
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),' x0 g' f, ]& R( i7 t
                                                to_str("in docking station: \"",?.~.name,"\""));                               
- z# M; J: ]6 ^4 u                                end;
7 N$ }/ u2 s5 d% _                        else
9 Z% A- a4 v. f' {$ b                                @.Destination := assignLObj[1,row];' V+ t9 Y9 O7 l
                        end;                       
& y: C" s2 q0 R( U                        newDirection(@);% }  U+ U$ U6 {* R7 d+ ^2 E1 n4 d
                        @.HasOrder := true;- [0 a* ?: @) Q9 j0 S) m! f1 x
                end;5 `! ?9 W  i' m3 d" @; ?- H
        end;
  Z# P9 n8 b% [8 Tend;        -- of the method% t" U5 q) n7 M8 c! T0 O
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 / f! t. |) c% |& `9 z

: C! b. h8 D. x7 l! l, ~这是AGV_putin中arrive的method。5 H. _6 j  x6 G& \0 n
0 d) ~  K% i; }1 T; Q. g7 S
当到达物料速度越高时,这个报警更多,9 K4 ^+ X( t2 ]4 J* c  f
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。( h# f4 S) d2 M
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
5 u% m/ m( e6 o) P( Q6 g% J8 c0 [( O
另外一个小建议,就是move,所有的move都可以这样) f) D% F, f3 I: T0 m
if not move() then debug end6 L* A2 W, o7 x7 d
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。7 [$ g6 r2 t- c" a. [
plant simulation中的free libraries有AGV模板,& A1 a& n6 W  j2 u' b; l
里面也有案例。9 j; ?2 X  K5 k! {. J0 F# e+ a
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
# N. u2 G( Z* v# f4 A# Z2 _2 }1 k3 q2 l& x  R. g% c. S
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
! q( R8 S0 C+ l+ E8 `: ]0 F3 R
' }$ ^9 _7 G. @; e那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 / y: ~+ m! H! V2 h) z, h! l: Y) H% n2 o
这是AGV_putin中arrive的method。
0 t5 n) Z) ?, e8 `* E& Z. i3 M
5 A5 ~: u+ T. g; V. x3 Z3 w当到达物料速度越高时,这个报警更多,
& S' O1 h1 T" J! L& ?! `( z
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-8-30 16:38 , Processed in 0.018342 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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