设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9893|回复: 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') O! D% P" t& s
*/
% c& e$ l& r8 B) H* Y3 @is4 U( `6 E7 q* B' ^4 r$ u8 E
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
" r2 r$ \5 h* S& fdo$ n" H2 B, j8 I' v( _2 Q4 s  C: O
        Lan := rootfolder.Internal.Tools.AOLlanguage;; M9 K. n) }" M5 P$ _
        if current = @.Destination -- else return7 o% d8 i+ X3 H  h3 y; n0 W
        then
# [, c+ ^% T" X                @.Destination := void;
* h; l" {) ^; @3 R" s+ o                if @.occupied then
9 N3 a* C" j8 t9 r$ _: b" G7 {                        part := @.cont;8 P! G9 e5 O' c( t( S: m
                        @.transpOrder := void;
) C$ e+ p' H. M# E4 p                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,, \% I/ V- t) i1 r/ |1 N, _' m
                                @,root.eventcontroller.simTime);
9 i- L6 {$ ^+ |' W4 S' a8 `4 v                        @.HasOrder := false;: Y, z( G2 O5 V. m; K3 N, A! }
                        @.DrivingHome := true;
1 i( U! N& r0 _                        rgManager.tryToStartTransOrder;
2 E/ l  z8 O2 K, }% b( m                        if @.Destination = void2 N4 c/ m5 u7 Y, U1 F7 p) j, I
                        then -- no transport order for vehicle @
/ p3 @3 r, R2 B0 P                                @.Destination :=" ~# D/ I* I3 G1 a7 I) E9 }
                                rgManager.nearestFreeStation(@,track.~);9 A' w( F& V9 G: b  c- Z
                                newDirection(@);   1 d- \5 V+ W3 E5 G
                                if @.Destination /= void then
& K6 B2 ^( O9 s                                        @.Destination.NumReservation :=
; H4 {1 w( V( l8 `* I9 ^- M- d" ~                                        @.Destination.NumReservation + 1;+ ~8 ]9 `1 u, z3 i8 Q1 t# p
                                end;8 W! s0 j. w2 u% n  b7 z3 H
                                @.CurrIcon := "drivingHome";
* L( B/ M4 a" g9 n- H" D! a. ]                                @.DrivingHome := true;
! D% u; G1 ?+ l                        end;
" ^5 m& n. U/ Q2 v: b                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
+ s/ g. H* k8 V, w) w                        part := @.transpOrder;
& [1 I" [6 g% V. \                        part.move(@);-- load part% a+ E; L7 z. p3 t
                        @.CurrIcon := "load";2 c2 }: R/ W; F' k& N
                        GlobalDistObj := part.globDestination;$ H+ A! W  _4 z
                        assignLObj := rgmanager.rgAssignL;3 y& x6 T1 i/ ?; Q: h# |$ e
                        row := assignLObj.getRowNo(GlobalDistObj);
0 P$ J  X9 c( z  n- y! @; T                        if Row = -1 then -- since 70- q6 [  {1 C( W9 d- d( W& W3 W
                                if lan=1 then
) L' q( q1 ~* I5 Y" E$ o                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),3 j0 B( C# P% l6 g$ {/ x
                                                to_str("in der Andockstation: \"",?.~.name,"\""));% \. T6 M5 [: \3 j9 p5 O1 e6 L" D
                                else( w/ b3 u8 U5 ?0 u4 p1 r, W) ~. l
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
% w- t& K2 E0 J! Q* @; j) r! d# Z                                                to_str("in docking station: \"",?.~.name,"\""));                               
4 }9 u  S5 [* n( ?/ ]* `                                end;) e9 x+ I# u+ ~, {2 B! L
                        else
4 ^0 n( y, y# y8 r: q4 o                                @.Destination := assignLObj[1,row];& e( z! G. P, }, j, \
                        end;                        ; N5 ?/ O3 n$ o& K4 Q) {
                        newDirection(@);
5 V8 W5 Q- S9 Y8 s$ |) ]% K7 W                        @.HasOrder := true;
! L- Z. t0 ~! x; h                end;
; k' {- x7 y$ m+ c        end;8 A9 s* C0 ~% m/ Q" l  K$ Z
end;        -- of the method: l4 c, D: V6 _# X
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
) |4 d  R* }9 T3 t! O/ [7 R. i7 W, v7 L9 n+ R) ?: @
这是AGV_putin中arrive的method。
- A* K: ~0 S, {. {# S- p
7 T) s+ @1 K, W2 S当到达物料速度越高时,这个报警更多,
4 O+ g, a0 o7 P' ]- i1 L可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。& Z' F9 T9 Z, b) _. A# A# e' F4 s
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
! L9 g' g7 d$ R3 x6 w2 B5 T4 u8 i9 C4 o5 T# X' J' R9 N
另外一个小建议,就是move,所有的move都可以这样2 L$ G4 I/ o7 {7 n% ?
if not move() then debug end' u# f5 I6 J% }7 l  ?
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。. Z" \8 h3 Q8 g" \$ c
plant simulation中的free libraries有AGV模板,# }1 E7 y. ~% q* ]: v9 W
里面也有案例。
1 ?& N7 W) ]: h" o# K  L: i+ c" @我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
) u: [' m# a# l% A$ L) ?- I
" r7 e' K5 h% A2 }( ]/ i! B我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
% a+ D: M7 a# g, H. H+ Z; w  V# b
+ _' j7 \2 J6 b; P# g5 Z. w那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
$ Y( z& c7 h3 ^4 x1 J* D( f1 \6 r这是AGV_putin中arrive的method。. y6 L# Q4 l  y+ k7 @' J

) k0 i8 K- T, p# F  e7 F3 Q" r& N当到达物料速度越高时,这个报警更多,

3 A- y( v. j! b3 N7 j( O另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-9-1 01:43 , Processed in 0.027766 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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