设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9650|回复: 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'
2 T1 J. N& k8 I! o) W*/# v7 z+ C( l% ^5 O% }/ Y
is2 w! I% U# |; |- y8 l- \: s
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;+ S5 L* l2 D3 G
do
; t- a( m& ]: U/ i3 E- ^. Z        Lan := rootfolder.Internal.Tools.AOLlanguage;
" N: V( g4 k) N        if current = @.Destination -- else return% C1 y0 B* `. x  a7 P) J, t
        then
3 U1 m% r( C5 p3 r! B2 x2 ~                @.Destination := void;
3 J& i7 ~7 @* E! X3 _( \; [/ A5 S                if @.occupied then
7 d5 ?* g( i" U$ g5 C% G                        part := @.cont;
) `# u) b* a5 P: u0 J                        @.transpOrder := void;8 B; |. Q: B" P2 }
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
  O; @2 L6 x1 C' u' W6 ?                                @,root.eventcontroller.simTime);
3 d2 s3 x, g0 W4 y                        @.HasOrder := false;+ G' P- }5 z+ `2 C' O+ t" i# T7 W
                        @.DrivingHome := true;4 ~3 c8 @9 E, O" i2 b# `
                        rgManager.tryToStartTransOrder;
+ k4 O! Q, [2 J. }& X/ C, d                        if @.Destination = void9 `# L7 F/ n4 k
                        then -- no transport order for vehicle @
0 n  Z2 B  k3 [6 w- A, R/ H8 X                                @.Destination :=
! J4 }( P8 e. v' P8 O1 H; v7 g                                rgManager.nearestFreeStation(@,track.~);/ j# `6 i+ t- F7 `8 p6 {: y
                                newDirection(@);   
" G) ]" j! P" p6 S8 T) m& z( G                                if @.Destination /= void then
. l. O" b1 q: A                                        @.Destination.NumReservation :=
) i8 ?8 ^6 f% F" [: Z) v                                        @.Destination.NumReservation + 1;
" d+ B; d/ }* [8 J# y$ ]' ~( ?5 K- }                                end;
8 t' {& `1 ?2 s/ H9 u                                @.CurrIcon := "drivingHome";
. {( v5 ~4 W* C. P3 T2 @                                @.DrivingHome := true;
6 E  `( D# ]  O0 [5 \" x/ C                        end;2 S$ S. s* e* Q, _! G5 q+ h
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
( l: H6 ]# A' w1 Z& l2 Z' H                        part := @.transpOrder;
7 W) ?+ x, ^2 E' m2 }                        part.move(@);-- load part
" D: D! H2 J1 w' X6 \9 R2 k) w                        @.CurrIcon := "load";
8 W& C0 `5 Q; D# S- d                        GlobalDistObj := part.globDestination;1 q6 K2 x% ?/ z+ S3 s: F
                        assignLObj := rgmanager.rgAssignL;: v. i# A2 V. x9 y: |
                        row := assignLObj.getRowNo(GlobalDistObj);: w1 }6 u) _7 q. h' w5 ~
                        if Row = -1 then -- since 709 Y+ U; D# _  b" l0 F
                                if lan=1 then$ Y4 Q& j+ m; j2 S4 ?2 N, o& ^
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 K# }8 b" f* |. {3 l/ S, f# e                                                to_str("in der Andockstation: \"",?.~.name,"\""));
0 x. N/ o/ l0 F( y/ F% K. N2 V                                else
) o6 \3 \( C2 E                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
8 {4 A" d, S4 y' ]& x( f$ z                                                to_str("in docking station: \"",?.~.name,"\""));                               
3 X. X! w: Z6 {( P* i                                end;' J5 N# Z3 y2 Y' o/ S; S
                        else
) Q3 c9 A) w6 K( Y: ?; u% F9 h                                @.Destination := assignLObj[1,row];
3 K5 m; l* ?. m0 y                        end;                       
! U' c; L8 v6 c/ R/ ?4 M. p8 A9 ~                        newDirection(@);( a7 o! K; T. _3 `; k$ v8 j
                        @.HasOrder := true;7 e" b: V% q4 v6 K( a& @5 x' K' J
                end;
" {: F  P$ N+ {, z, T        end;( P. [, x4 F4 m6 x" ~9 n
end;        -- of the method; c( m4 T( [( D+ G% p# K
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 . u6 U' Q4 ?2 o  f

+ S; G, s4 n7 t% e( r* q这是AGV_putin中arrive的method。
* F) x  f$ Z+ p3 N/ E, D% t: ?+ J1 |3 Y4 Y* j" o" ]/ @
当到达物料速度越高时,这个报警更多,
; ?8 D# _' Y8 Q6 R( ]' S# f7 t可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
0 J# I- y7 ?6 M; {+ F" q程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
  v/ U: q9 ?, S7 v" O! M0 G9 @- G8 g0 l6 I5 c$ ?
另外一个小建议,就是move,所有的move都可以这样9 c7 l$ L5 Z0 Y; W/ N3 w4 a" ^
if not move() then debug end
5 ~  I2 `, Y& D" o这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。2 M6 ]2 b1 h9 ^  p
plant simulation中的free libraries有AGV模板,: e5 N* [8 ~2 x& l: f( ^# E
里面也有案例。8 {5 _  {" U, [& F0 I) B% D: X+ G  h
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。- H7 Z1 V9 x8 W* B8 _% q4 ~* s
7 _" v9 U& M9 D% }4 o7 w% t6 E3 T0 V
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 7 u, }4 h* u1 y% b$ q! {0 u

' _4 I" A4 y5 b) }4 f  Z那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
: X! {9 c& }* h这是AGV_putin中arrive的method。% j+ C7 p$ @, v, d$ R" Z

/ d7 O7 `/ @+ c, A. _) ~当到达物料速度越高时,这个报警更多,

: Q+ i: L* `; L2 `0 ~" |& |另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-8-14 15:49 , Processed in 0.021573 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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