设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8773|回复: 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'
+ I$ A, q9 K# g" K- N*/* P/ a+ \9 Y- ^- B) i2 f6 N
is2 l* T5 k+ R$ Z/ e- w) v
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;* y, s6 ?' \7 [. R: j% W8 n
do
. W! j4 R8 v) T% `* ?2 i        Lan := rootfolder.Internal.Tools.AOLlanguage;9 |- v1 u7 X; b/ T: d3 H1 X
        if current = @.Destination -- else return" Y  c3 v4 \* ~7 s
        then, H1 d/ }; g* e0 R  _- P# Q
                @.Destination := void;
! E( M, F( S8 _# ~; f& }                if @.occupied then, e5 Q# r  N5 [' m* y9 Y1 W
                        part := @.cont;
% Z# O0 c% O/ y  Q- |2 ]                        @.transpOrder := void;/ j0 ^. H" S9 ]: Q( q$ h
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,$ |$ I" d( Y& J8 B8 |
                                @,root.eventcontroller.simTime);
0 H7 R/ G8 l/ B" F" D8 Q0 V                        @.HasOrder := false;3 g$ e$ x& |# ~- E7 ~4 G) O* a* q
                        @.DrivingHome := true;2 H( j0 t) a$ U* j
                        rgManager.tryToStartTransOrder;2 f( c7 X4 P! \
                        if @.Destination = void# A5 |/ d: A& C. T# a5 ?% ?, {
                        then -- no transport order for vehicle @
( W$ b2 h( s8 L( l, D2 o# f                                @.Destination :=1 g5 l/ {  y+ E( v9 l( S
                                rgManager.nearestFreeStation(@,track.~);; A# q* A* Z+ _! j  T  u% Z
                                newDirection(@);   " L9 ]) E' ^; Z7 f9 X! c
                                if @.Destination /= void then5 Q' P4 V/ J+ a
                                        @.Destination.NumReservation :=
: L+ E  X+ U9 @4 L' [7 v  |                                        @.Destination.NumReservation + 1;
1 X8 V" R' }( q' \                                end;
; S% _6 P# e$ D; h% ?                                @.CurrIcon := "drivingHome";# i; h' W- w/ _$ L4 O
                                @.DrivingHome := true;
% ?  ~+ |) |4 ~( U; ?4 O                        end;
3 ]- k5 [! U( N& N5 B2 [, p                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
3 W- P0 N2 y2 q  J2 ~, y* _0 y                        part := @.transpOrder;
1 u) F' B: _/ m' i                        part.move(@);-- load part
3 \- S3 U4 y; E: q' R$ e7 g% k                        @.CurrIcon := "load";
9 B- |% W: ?# n                        GlobalDistObj := part.globDestination;3 A! |4 j$ [) i6 U) b. v
                        assignLObj := rgmanager.rgAssignL;
7 Y9 h: A& j) s5 ?                        row := assignLObj.getRowNo(GlobalDistObj);
/ W& `3 ~2 x: `/ [- ^& P. ?5 s5 t                        if Row = -1 then -- since 70
2 m' _3 Y9 L0 E) q, O/ ]) J* N4 N                                if lan=1 then
5 K  J) U. f! |7 d/ r" H- ]$ [                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),% Y+ e- N; x, H) f* p+ w; X+ J
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
$ M' X3 G- }  w* c                                else
, i( t: l! i, ^" x  E8 c                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- A+ y0 S: g. H7 m; `4 V                                                to_str("in docking station: \"",?.~.name,"\""));                               
* x3 Q5 I& }& s  E0 x                                end;0 ~7 L! P" T- E$ P# z$ b
                        else& |. T8 L: ^! w" T4 }, @
                                @.Destination := assignLObj[1,row];8 O$ ~* N7 U1 ?+ [* T' e
                        end;                       
& p$ e, v) B4 u3 M7 r0 N                        newDirection(@);
* J  S8 W. P  G% `. F5 ^4 L                        @.HasOrder := true;+ ]0 l& @) y. x
                end;
! e) N. x$ W0 X5 r  T; [3 `5 h        end;, p' Z# v% v& t% a1 D
end;        -- of the method
5 R+ g& X$ r7 `7 L4 ~# r
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
) p6 u+ R% D2 m
$ |! e+ }* r: {! w% l; q) [2 o这是AGV_putin中arrive的method。; h1 y9 Q$ S# A; {" B2 |* t
" |0 b1 a7 b: ^4 z6 C
当到达物料速度越高时,这个报警更多,
) `; B# [- Q; v2 A; _4 R* {1 o& a' a. l可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
6 B( N4 s( j; B$ X2 V, `" v: h程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
  g; [2 X/ Z, O( y2 f
+ ?* `2 g) Z+ x$ J0 m3 Q" E# u) w3 |另外一个小建议,就是move,所有的move都可以这样
9 ?% `6 u# H) X* {if not move() then debug end
! x) [% ~+ ]  L  [" p这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
1 h" X3 S2 d2 o7 a1 h4 n5 wplant simulation中的free libraries有AGV模板,+ V) \9 S; k  q" B5 W: d5 p9 Y# I
里面也有案例。
* s4 V# }  [  k4 S% U我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。1 @+ M, A" ^) v1 ~4 R& r* ?7 S: e; }
8 C7 m1 c5 f; a' E8 Q% d
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
3 O2 Z9 R* A% ~! m
" L% s+ l* {: J5 H" i: m那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 5 D4 S% C: L; r$ T
这是AGV_putin中arrive的method。
# {7 Q" V/ Z- F/ N
5 u9 ~  ~) I) b& {; s$ J. G; W当到达物料速度越高时,这个报警更多,
& B2 l/ I. x4 ~2 g# Z3 T
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-25 20:16 , Processed in 0.015355 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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