设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7683|回复: 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'
. C5 _0 I1 P/ w, ^% W*/
  b, z5 `- @6 [( \is
" u1 e& o, |: A' f' |& b$ h3 l        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
! q0 l( K: o% \do
, I( f) h! m' B+ l5 W! i: [        Lan := rootfolder.Internal.Tools.AOLlanguage;& \; c1 s- G7 t% r
        if current = @.Destination -- else return
& Q4 Q# V7 c& b2 _$ N        then  R2 N" I2 f2 B2 ^1 i% R: ~$ [
                @.Destination := void;
9 A4 X% E/ j; Z6 i- [5 U                if @.occupied then
) X- t3 t. s- `0 H. H                        part := @.cont;
9 b& {3 I' d" u0 h7 \% E2 {( v! G                        @.transpOrder := void;# S5 P2 [9 d; O7 X
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
0 B' ^" Z- d" {  t( n  ~                                @,root.eventcontroller.simTime);: H$ l, w9 m4 x1 K; z0 j
                        @.HasOrder := false;3 c9 W: x$ l* X
                        @.DrivingHome := true;
( r: n+ S, y. ], o! y2 _! t                        rgManager.tryToStartTransOrder;7 S  }3 R) i* o- _+ V
                        if @.Destination = void0 G6 V. X9 d+ x$ Q* E9 T
                        then -- no transport order for vehicle @1 b9 ]' U( W" {4 f2 D7 Y, r
                                @.Destination :=
  i/ S) x& n" Z" I2 F                                rgManager.nearestFreeStation(@,track.~);
+ d6 ?6 l% B& N0 C$ h' E8 A  T3 m                                newDirection(@);   
$ `! O8 S# O, E- Z                                if @.Destination /= void then
# C0 Z* V; B  Z0 o# h                                        @.Destination.NumReservation :=
8 E: k& |' L5 d! n, u0 o                                        @.Destination.NumReservation + 1;$ Y) A: n/ s: m) I. @
                                end;1 G# }" P2 |% Y$ q. S2 F
                                @.CurrIcon := "drivingHome";( o' ^, U: I1 g0 c
                                @.DrivingHome := true;
% H1 p7 [: r% `: w. q                        end;
% `  W2 _4 [; F- r0 K/ B( ?                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 G( T9 w- B! H$ Y% r' Q                        part := @.transpOrder;
% y, A" [, a+ I  y* V' @' x" W% Y0 n                        part.move(@);-- load part
, i3 x" V8 O# z# x. ?6 ^" Z" X# M# q! |                        @.CurrIcon := "load";) H/ ^$ o# W9 p) z
                        GlobalDistObj := part.globDestination;
4 H5 P  O4 ^4 t' ?+ |                        assignLObj := rgmanager.rgAssignL;
. E: s8 ~- J* ?) f4 x3 t                        row := assignLObj.getRowNo(GlobalDistObj);: Q5 {/ s/ r3 w4 P
                        if Row = -1 then -- since 70, b& }1 j$ K4 Q2 F6 v8 U
                                if lan=1 then
7 K' m- [5 r8 n+ t: y                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
" ^0 i- f0 E) r2 g9 P* U1 e! O                                                to_str("in der Andockstation: \"",?.~.name,"\""));" B' \$ C/ l7 R/ M7 ?) n8 v
                                else, a" s0 z' k$ l9 Q- h1 @
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
6 Q, \& m) P& {2 Z% Z3 r                                                to_str("in docking station: \"",?.~.name,"\""));                                / U8 @% ]/ X5 J
                                end;
# r6 ]: S& x. [4 o: R/ N                        else
, v6 U$ D: ]/ Z0 D3 W+ a/ y/ h3 J6 j2 f                                @.Destination := assignLObj[1,row];3 D: E! Y0 b( j+ W
                        end;                        ) ^% H# S1 |/ c; L/ c
                        newDirection(@);
6 w3 ~! [. b6 a- K: `  E+ O                        @.HasOrder := true;9 y  g; _( ~1 Z
                end;4 }3 a; m# K- K6 b  t' K) y2 Y
        end;+ b. A$ G1 ^) f0 @& [: y. Y- n: B
end;        -- of the method4 u7 Z4 ^9 w5 D3 G8 u+ V5 a3 e
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 6 I& W" r( k3 `; c4 ~
7 `0 a' W1 |$ W9 O: F" |- t$ |
这是AGV_putin中arrive的method。
2 o( v6 o# r: Z, b; D$ \( X6 l) c- K
当到达物料速度越高时,这个报警更多,. |( w+ l" u' }# D3 `
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。- d; M; R0 c9 u# b' ]" X
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?& l1 a  N" H* T  A

: q1 J1 G7 B. ]# `+ K% w/ E( x另外一个小建议,就是move,所有的move都可以这样4 v0 _! s5 C& H" P
if not move() then debug end$ y0 f# O5 {" k7 y
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。3 u% ?9 k3 W" F( N! U) m: |$ C, D
plant simulation中的free libraries有AGV模板,
  M- B! D& G6 ?+ v  \6 z: A4 A里面也有案例。
% k" a$ C* ]3 T7 z. \, q我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。/ C2 o8 x% }* C' d5 f- f

' b( o0 T: C" H4 Q& H, N, p" {我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
2 y) `% B' n6 [" r8 R! {) Z# ~; L- f# z% z6 N0 q0 r3 T2 y2 @5 K* Q( \
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 7 P6 P( q: `" a, M. \5 F( L9 r
这是AGV_putin中arrive的method。
: \1 n+ W/ A+ ]( a/ T
) R5 f, n8 Y+ N; ~- `2 u, c当到达物料速度越高时,这个报警更多,

. e8 s# S, X7 A另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-24 01:51 , Processed in 0.023637 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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