设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6461|回复: 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'
- `' e1 N+ X1 ~! [7 y* `*/4 u# b. w( d2 t: A4 C4 u
is5 ^4 a$ f$ ~$ A4 R* R( V4 G' u$ X
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
% @1 `- O  u: ?2 b( q/ |do
$ }7 W0 s  o. m* N; u4 ~7 k& E        Lan := rootfolder.Internal.Tools.AOLlanguage;  J" F" [: u# d
        if current = @.Destination -- else return4 X9 s  `; C7 u; h; E' O- D5 M
        then) B2 h. w; C' t+ V$ m  l& b
                @.Destination := void;
7 d& c' [0 z: V6 h7 r* B% J                if @.occupied then+ T4 |$ R" C, S
                        part := @.cont;
$ ], l0 F" x$ q5 y8 {0 S3 g                        @.transpOrder := void;, M1 d. V7 \5 M2 f' S' ~& R
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,' t/ e" \' x6 e: F2 E7 V0 G
                                @,root.eventcontroller.simTime);% L# S) t, ]* O; q4 M
                        @.HasOrder := false;
9 d' `" h2 x6 d9 k$ Y7 F                        @.DrivingHome := true;
, B3 D/ q% l" t( i0 q3 e                        rgManager.tryToStartTransOrder;
8 C7 y+ B; t( d7 W# |5 e+ c                        if @.Destination = void. u, y" v  A" z. C8 @
                        then -- no transport order for vehicle @
. R6 v, v7 [( r/ Y                                @.Destination :=" e5 v1 Y: ]" e- x( z& t3 ^5 Y
                                rgManager.nearestFreeStation(@,track.~);) V. u9 y- \$ ]# z( d9 Q
                                newDirection(@);     ?* v  j' y4 O! q0 F- P/ x5 Z
                                if @.Destination /= void then
- k5 f+ ]2 P% ^! T) k! h                                        @.Destination.NumReservation :=
- ]  g3 ^/ l' ]1 h. F0 q% {                                        @.Destination.NumReservation + 1;
# e3 L0 l! y# s  J7 P+ I" Q0 {                                end;
1 G. `" q& D- R- Y5 y                                @.CurrIcon := "drivingHome";7 D5 H8 m0 }3 r* h6 S
                                @.DrivingHome := true;4 T2 {2 `9 H6 l
                        end;
1 y  q2 o  p1 l* w" l                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 a% f2 u6 t+ W                        part := @.transpOrder;# Z& l% Y2 S7 `3 }
                        part.move(@);-- load part( s  d; ^6 t: v& w
                        @.CurrIcon := "load";; X2 G7 e# E0 F/ x- d& N2 b. |% X
                        GlobalDistObj := part.globDestination;
8 a+ K# @( _  e6 N9 \% K1 x6 Z                        assignLObj := rgmanager.rgAssignL;) f& w% E& G' L6 ^
                        row := assignLObj.getRowNo(GlobalDistObj);6 f- O& }8 t( S! S
                        if Row = -1 then -- since 709 p0 K1 l$ z. u6 P/ ^  l
                                if lan=1 then' @6 ~3 c* i# n# z  J
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),) ?  x6 T  X: E4 o
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
4 I3 U; S! r# O- P                                else; F1 z8 w5 u: P* l
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! h& [5 s5 F3 g: h
                                                to_str("in docking station: \"",?.~.name,"\""));                               
. n) g- ]/ i5 S* \8 O                                end;% A) ^3 S8 ~3 T/ G: ]
                        else
+ A  w5 M5 o/ {1 Y: m$ Y                                @.Destination := assignLObj[1,row];3 J- N: j) g6 ^2 s3 I0 N
                        end;                        * O. s; B  v) W& D. N
                        newDirection(@);
1 A6 M4 ^0 N! L) z                        @.HasOrder := true;
$ w; B  h  m* H# {- [                end;- o  [' p. h( _5 G
        end;5 p8 P; t' `2 D# V2 v
end;        -- of the method
* F, y/ {- r, S' u" I( l
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 1 t: E) ?, |' v) y1 F$ s: j
1 U4 ^' Y1 I  h
这是AGV_putin中arrive的method。1 N7 {8 M) ~. o0 W3 G, E6 G

( Y% Z% c4 [! e, D/ @当到达物料速度越高时,这个报警更多,3 x' k  L- ~! s. v8 Y6 D, j
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。  P1 a! }6 b7 t
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
/ N. b) N. @& N' \6 z# x8 H8 G3 J
2 G! }1 j1 ^7 s另外一个小建议,就是move,所有的move都可以这样9 Y) j. S$ T- V9 @9 V" ~: O& ]
if not move() then debug end
8 O: O9 B; U0 Z* `& y这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。2 [3 v# z' m+ ?
plant simulation中的free libraries有AGV模板," |" X' F0 l6 x: d. `: x8 _
里面也有案例。8 e9 _9 q" @' Y# P# m
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。7 n6 n! V8 g2 K; Z; S0 G0 y
! Q! w/ D* A+ s/ `4 c
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 7 U% G+ e: [/ D* s* d
9 S' G6 |/ k, `# f7 ~9 i
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 * X( g3 |1 N( ~* P. I$ s, x, f
这是AGV_putin中arrive的method。& u, b( @% d/ l( ~/ n

9 C" r: Y' N) G0 ]0 a当到达物料速度越高时,这个报警更多,

3 I: D$ t% ]+ K( _" Z另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-8 03:35 , Processed in 0.019411 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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