设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6863|回复: 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'
1 Y' ?  g. v% ?. Q1 O- O$ w# e  W& g  R*/5 O/ C# E( Z  E1 z2 X
is
7 J8 a  l* g7 e0 c! R# `# q% K        part, GlobalDistObj, assignLObj:object;row,Lan:integer;9 {0 ^' M& ]* ?% O5 n! A
do
4 V& h. I4 ~- B1 s/ X4 P, t        Lan := rootfolder.Internal.Tools.AOLlanguage;9 o' x) m" ?7 _; ~- s  o+ V
        if current = @.Destination -- else return
: C2 F* A0 ~, u5 @! O# B% k        then
! d/ a; [4 O2 L8 `                @.Destination := void;" M1 _8 z; b, ^/ o) \
                if @.occupied then8 K6 L( j0 O* i3 w/ r
                        part := @.cont;
3 G. y5 x( K% O$ k8 W5 w% t* c+ }                        @.transpOrder := void;
% y4 L0 U2 l8 y$ ?) G                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 g- \4 c& m& f& [( X                                @,root.eventcontroller.simTime);; z$ ^8 }3 R' x" N9 W) Y0 n
                        @.HasOrder := false;
0 Z( y: Z; U0 M: T( {, U                        @.DrivingHome := true;
, B7 Q' P7 m  ?                        rgManager.tryToStartTransOrder;; ^9 V& L7 X! [
                        if @.Destination = void
; V& D8 Q: \) T4 a/ T6 p: z- a                        then -- no transport order for vehicle @
# P$ f# m! n+ z/ G# J; P1 g0 `" {                                @.Destination :=
, \# H! ~5 ?2 v: p0 q" N5 N                                rgManager.nearestFreeStation(@,track.~);
8 r7 e6 J& R) f( H3 d: X                                newDirection(@);   
4 Y' a, g7 L) \0 _& a$ p. b                                if @.Destination /= void then
* q. R0 ?/ z" o& g9 e2 w                                        @.Destination.NumReservation :=
' G& l/ ^- }& Q                                        @.Destination.NumReservation + 1;% p$ j  q' J/ d; M( u# x6 i
                                end;
. s, a7 x/ Z# k' ?1 J# z                                @.CurrIcon := "drivingHome";
! p5 K1 b5 ]) W! ~6 B. ~                                @.DrivingHome := true;
% g' d$ l. H4 _5 w% k1 V( R                        end;
; Z7 {- K7 t" G2 S  j6 o) A! f                else -- the vehicle @ is empty, both vehicle and part are in the same dock station' I: Q$ W, c5 [5 \0 s
                        part := @.transpOrder;
" [7 S3 h' d* M. u. C" b9 @                        part.move(@);-- load part. N( Q& I# `3 v; ?( a
                        @.CurrIcon := "load";
7 W  u' l$ ^, `1 S                        GlobalDistObj := part.globDestination;% n8 B. f+ Z' E: l6 G
                        assignLObj := rgmanager.rgAssignL;9 f# [, H1 _) n: h9 R8 e' x" z
                        row := assignLObj.getRowNo(GlobalDistObj);& v- A1 \' K: {  Y  _3 S+ r& J9 P
                        if Row = -1 then -- since 70
; s% }( M2 k" f3 M- I                                if lan=1 then; i- ]1 `  ^; y6 X: M1 j( [2 _
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 h5 d# M0 N9 V+ r7 y* c, r4 A                                                to_str("in der Andockstation: \"",?.~.name,"\""));& J3 H* ^7 `1 C/ _( ?
                                else
$ }) K2 m+ s1 O/ E5 B) ^  y9 Y                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
6 r! f* v' `, G+ p% O! `. x                                                to_str("in docking station: \"",?.~.name,"\""));                                . d* s. O& T9 H- _, Z! J/ P5 e
                                end;# J7 ]" A# m2 n4 M% L  f
                        else5 ~* }+ X8 s1 v
                                @.Destination := assignLObj[1,row];
) _: y! K3 @1 s1 \9 Z  U% i                        end;                        , \0 u; o% d0 u! D8 O# L% }
                        newDirection(@);
5 R0 v# }# s1 i4 ?2 Z+ T                        @.HasOrder := true;) w- O; C9 Y" y/ |
                end;; `- X# ^, x; Z7 N" K0 ?5 s& p
        end;& L( Q. |/ B3 J  U) J/ q
end;        -- of the method# `- K3 r7 m% K" Z, Y8 S
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
' R6 [, {) c; [, ^0 R
) c6 O# l( A7 P$ O这是AGV_putin中arrive的method。
" C6 b" V+ s3 l& ?8 Q
' [9 f( _& k& W) A) d9 A当到达物料速度越高时,这个报警更多,
  |& [3 r  @* ~: }0 s可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
( m6 K( _, ]. b4 P8 \1 B! f! m! ~程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?/ D+ d9 _9 P( X0 f+ `* T5 S8 U+ `' O. I
& l) O1 ?8 D; [; `
另外一个小建议,就是move,所有的move都可以这样* z: s2 z& `  `% x5 y
if not move() then debug end
6 n" c* e7 @, ]4 N3 E) x3 C0 O这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。& E! `# j, y( w9 F, m" o1 @) U
plant simulation中的free libraries有AGV模板,
+ l. F6 i9 |$ {9 Z: F, \' S( B里面也有案例。
6 \- _1 Q7 C/ l  g. P我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
; t3 y- [: e' {, b# F# Q( O& w# F( l& Z8 j( g: d, }- h: x. f: q
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
/ q, E  L& G/ v& H. |+ i5 o3 c8 R; M! Y- w+ Y
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 # Y. F7 p& \- A) X
这是AGV_putin中arrive的method。
" p6 N& m7 @, G0 o7 o
5 @' M9 a9 U% d6 R1 o( ?& a当到达物料速度越高时,这个报警更多,

" S2 o# p5 H9 U5 C0 ~另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-3 08:27 , Processed in 0.020157 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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