设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7346|回复: 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'' w! {+ g2 j) {4 t6 B: f# N
*/, M" a1 ^$ ]! Z$ l3 \+ R
is# c9 i- Q! R. T8 F
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;$ h" ]/ c6 N8 Z
do
( a% h' y& F; U) Z/ e6 J: \        Lan := rootfolder.Internal.Tools.AOLlanguage;2 t: d: }% K6 g$ H
        if current = @.Destination -- else return
+ E/ v+ a* V( R: n6 U5 O        then2 ^' o( ~* H. l/ P# k) S+ L
                @.Destination := void;
4 f  r. l1 D1 B3 a! z$ b9 M1 @: j                if @.occupied then
& p: P3 y" i! Q/ {& M2 X, M$ E3 Y                        part := @.cont;
2 X) ?. [* ?5 P; n: }% r                        @.transpOrder := void;6 ]( ?9 Q4 L4 k) f1 h6 @9 A4 s% U& H! w6 c
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
  N1 J% ^% |$ k6 V  d. a                                @,root.eventcontroller.simTime);+ C% k8 L7 a* H6 w
                        @.HasOrder := false;
9 Y! [& U) b$ b* T                        @.DrivingHome := true;
, N& e" X8 _3 p, f. u0 [3 s                        rgManager.tryToStartTransOrder;
9 q3 R" u9 O+ v1 X2 z$ L& b                        if @.Destination = void
$ T. y* t: R) n; A4 h$ u% T                        then -- no transport order for vehicle @" c: ]" X0 l& u1 x) m, G# |
                                @.Destination :=. C; N" B+ o) ]/ v0 c8 j% ^+ |
                                rgManager.nearestFreeStation(@,track.~);% b  A2 P2 B% f$ B7 Z$ n2 H
                                newDirection(@);   . @2 W6 Y% N! m, q, B( y; w
                                if @.Destination /= void then
2 C9 B2 V" ?' k; H5 f, `& G) S                                        @.Destination.NumReservation :=) Q8 ~$ g/ G- ~
                                        @.Destination.NumReservation + 1;% M7 G; i3 W" T, ]
                                end;& g/ X: h5 u  y( ]6 e7 ]
                                @.CurrIcon := "drivingHome";
/ s$ k4 e  v7 t2 k) y! G                                @.DrivingHome := true;! r; G* J" l: @5 o" ^" i+ C1 d
                        end;
( \% d) i7 P' W% s- p% r- {                else -- the vehicle @ is empty, both vehicle and part are in the same dock station- u7 l1 {$ w$ ~8 H1 K* Z. O
                        part := @.transpOrder;
; B/ c8 X" c' @1 @0 @! g+ W                        part.move(@);-- load part
5 q" F/ T* }) u1 p7 R                        @.CurrIcon := "load";
" g. t( d) @. _. u5 r; \. X) \' O; J# |                        GlobalDistObj := part.globDestination;& S( {% ?) [9 l6 Y
                        assignLObj := rgmanager.rgAssignL;
& u$ Y4 O' M4 j* i5 |; c# b1 `1 M; d                        row := assignLObj.getRowNo(GlobalDistObj);/ d# y. Z$ r# H. }
                        if Row = -1 then -- since 70( G, H' z& A$ Q( E; q5 `
                                if lan=1 then& l& ~, \2 R9 g6 d! [0 C% @) F
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: a8 _4 H" X" a! I' O) G* {) i                                                to_str("in der Andockstation: \"",?.~.name,"\""));
& R. P7 V3 v8 c                                else$ c% H# h" d# N  r, Z0 I
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
& i1 b6 W0 _; t/ J7 _( d8 h# O                                                to_str("in docking station: \"",?.~.name,"\""));                                8 z8 |$ L9 m) r& ~( Z8 W
                                end;
1 x, V! a% l/ ^5 {1 m4 }! I                        else
8 T$ u2 @" X# G6 u1 M  L                                @.Destination := assignLObj[1,row];' I# R; G: J! U. l& \( v
                        end;                        ( l8 F2 Q6 D8 p1 N$ h5 K' i
                        newDirection(@);
4 n$ i/ m' @" n' _2 g                        @.HasOrder := true;( g0 b. G# B! x: r
                end;1 X7 F! p1 J3 o- g% M2 U! I
        end;3 H" U" j' N7 d' ~4 j& _5 e
end;        -- of the method
/ B' W, T1 v' m' C0 m
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 . M% W, Y( A, w: N9 Z1 `

( E6 U4 `1 s% `2 ^3 d- p! v这是AGV_putin中arrive的method。1 A" B; m! h- `* f7 M2 x8 Z2 V8 @
! R" }- A  m7 t$ r. E3 A8 s
当到达物料速度越高时,这个报警更多,2 c+ i" R4 P- P: w. o4 }0 ~! l
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
. H# I7 m; p+ Z1 ?$ t) U- j程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
; |0 r: X0 f+ p  m4 Y' R' B: {
5 f3 Y8 `- T( V2 ^) {" [2 e8 |3 `另外一个小建议,就是move,所有的move都可以这样
% n% K4 h3 D' Zif not move() then debug end7 f% N" v- ?3 t7 Q  T9 K+ Q' i2 v
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
! I3 t$ r% m- y. _plant simulation中的free libraries有AGV模板,9 I% x" a0 Y1 O( o/ q2 d  _0 e
里面也有案例。
( s+ D+ {5 d7 [8 }- I2 N1 l5 }% c我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。0 k7 U& a6 r; f
7 J2 j' z8 x& p% w; P
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 7 i1 p- [5 v* ~% g4 q5 a" o  c
& \5 S( @8 p! k. ]
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
: ?! \- t- [# p0 ~* ?这是AGV_putin中arrive的method。% K: k, W( K% o; t2 p9 S- ]; @
$ B$ u0 g6 d3 D- F& i  ]. f0 ]" C
当到达物料速度越高时,这个报警更多,
  T) K* w$ x" h, h+ V7 S
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-5 16:00 , Processed in 0.024961 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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