设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7881|回复: 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'3 Q) [6 B# d9 H: M
*/3 G1 Q# N6 l; Z  G0 T( T, W# Z$ r8 l
is# m: x3 I4 T# P' N: [7 X4 d
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;5 s. R" Y4 S+ J9 B# L
do
8 l/ O- V% }4 Q- Z9 O        Lan := rootfolder.Internal.Tools.AOLlanguage;
3 T, G  W& p4 Q2 X' S  ]        if current = @.Destination -- else return: G- @$ g( U+ l4 R
        then
# t1 G9 I5 z" x0 z                @.Destination := void;1 T9 u, v2 U4 ?, l2 N3 Z7 d
                if @.occupied then- _: @" f: z5 Q  o7 B% d% ?
                        part := @.cont;
. G% t1 S$ w7 [$ Z! t: r$ k                        @.transpOrder := void;
. v% x/ O! z1 k. Z0 s                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) Z; p: l; n+ c9 ^4 a2 M/ q                                @,root.eventcontroller.simTime);
$ x& J4 h3 \$ Q- V; n                        @.HasOrder := false;
) Z; A, y7 z  ?6 A: y  U                        @.DrivingHome := true;
5 T5 L) E8 A9 H( b                        rgManager.tryToStartTransOrder;8 X+ j9 L$ W6 K9 i. l1 |
                        if @.Destination = void5 m3 p1 f9 v2 {3 \
                        then -- no transport order for vehicle @& N. V- b. U, V' w- b+ k& y
                                @.Destination :=
4 Q4 i- v. z6 u! D5 K4 X                                rgManager.nearestFreeStation(@,track.~);
' [! P. B" t8 D+ \                                newDirection(@);   
) p% d( F+ V' [& o                                if @.Destination /= void then4 h+ z& F; M2 z' i1 J# [
                                        @.Destination.NumReservation :=
- N, j6 {  R  F7 B0 Z3 b                                        @.Destination.NumReservation + 1;
- w, ~! _; }9 Q( L' J2 m                                end;
9 N6 p7 A4 U, x9 h6 o                                @.CurrIcon := "drivingHome";  z% x1 K' E3 `8 P) P
                                @.DrivingHome := true;
# [( {4 `( i) V/ H6 ]" [                        end;: g$ E, N* C" _" H
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
3 ?  H" V' a) D. @5 O                        part := @.transpOrder;
1 @4 p0 u: S+ w# s                        part.move(@);-- load part
9 N& A4 o5 H1 o* q% o                        @.CurrIcon := "load";
& B3 c' {1 F1 g/ y' ?5 n! k) G                        GlobalDistObj := part.globDestination;7 Q! a; N8 d7 U5 J8 X
                        assignLObj := rgmanager.rgAssignL;
' e5 t5 r3 B' r# v& g; \                        row := assignLObj.getRowNo(GlobalDistObj);
( z  F! Y, m. s9 t                        if Row = -1 then -- since 70: h1 @/ L$ \3 D8 R
                                if lan=1 then4 i+ V0 W, L, d8 n7 O. b5 _
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
0 w% @) C( ]+ `4 q                                                to_str("in der Andockstation: \"",?.~.name,"\""));* B6 c4 V2 e9 G2 W5 M
                                else. I0 l' k  Q' ~1 M" R6 x
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! {& O$ k) r, t( H: F, c) F
                                                to_str("in docking station: \"",?.~.name,"\""));                               
& ~  ?6 I5 L# Z/ Y                                end;8 c/ H3 w3 y& Y
                        else
7 {& r0 t1 F2 O" r1 ]# `                                @.Destination := assignLObj[1,row];! B3 u% d$ I: P3 G, |
                        end;                        , M: j7 h- _/ ?. r2 i+ y3 F
                        newDirection(@);, y' ]$ P$ R  \$ m
                        @.HasOrder := true;
! b  [% s8 o& X/ }- |* {8 l                end;5 o, o; f$ o% o2 S! G
        end;% B) k4 K: ]8 y+ G# u, ?2 g, t6 w; X5 u
end;        -- of the method0 J, g* q+ H. z2 A
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 ' r. v( {7 w0 u) Y6 U

2 J8 u1 t" c3 c这是AGV_putin中arrive的method。1 `6 f2 B- y  N- N/ o) |: Q
2 W" C( Q: G! w* U; @
当到达物料速度越高时,这个报警更多,
& ^! u7 F) t5 Q& `0 C9 ?可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。7 `. D) V! G9 U( w& d
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
: K! T, c8 g' C, P; ^2 I' L# d% z* V
另外一个小建议,就是move,所有的move都可以这样( Z- x# u. I, f) e0 N. E; G5 P
if not move() then debug end% t8 U  p5 X, U1 \5 b
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
8 C9 u1 @5 U0 c8 l( K# mplant simulation中的free libraries有AGV模板,* w& {1 Q% ^7 Q
里面也有案例。* I5 ^' K2 ~5 Z, R" s: w5 q- v/ Z
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
7 B3 a1 m: j$ O: O2 ~6 [
& E9 d, ?0 N( A1 Y我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 $ d$ T7 v( l. h8 a8 J9 g

/ D, f; |2 M0 h; w( @那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 " O( i7 t  c& g1 o# R0 y
这是AGV_putin中arrive的method。
9 Z. K: I+ X0 ~6 }# a- h. F: i
1 }/ {5 v1 M& p9 ]* A9 D当到达物料速度越高时,这个报警更多,

% A5 s* p5 w3 x" R1 ?3 o$ |) T/ m5 _另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-3 04:46 , Processed in 0.020152 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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