设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8812|回复: 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'0 }3 w- N$ O% p
*/
& q- c3 D) w$ his
3 M) W8 X/ _1 j" l, y  @; t6 y  H        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
3 {' C# L- \+ s  A6 e; d3 sdo
/ ?  Z) p- T) g2 S8 J        Lan := rootfolder.Internal.Tools.AOLlanguage;; i4 \5 |' }4 Z* \
        if current = @.Destination -- else return: T4 ~0 \. T( y8 n( D1 C
        then; i  A. X$ g6 S; V  Z8 y0 l  D$ W
                @.Destination := void;
6 [6 G5 p; Q$ T8 I; Q1 ]$ r+ l                if @.occupied then
3 s% t, G* B* W% {! c& z) {4 R                        part := @.cont;9 y  @" \7 ~( y* h5 _! L2 e
                        @.transpOrder := void;: m5 C  {# P0 E. k$ o3 `5 C$ }
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,/ d9 |4 a/ i0 X, }6 e3 X
                                @,root.eventcontroller.simTime);
2 U- j6 O( l9 r                        @.HasOrder := false;6 X% ~# Q) u5 B: p5 n2 H
                        @.DrivingHome := true;. L: h6 N& n5 I2 X0 _
                        rgManager.tryToStartTransOrder;: K* U6 G8 t* T( g0 f0 _
                        if @.Destination = void/ X2 K3 K- ]* Q7 l$ H
                        then -- no transport order for vehicle @# W9 U! l4 ]: G- T% ~6 P3 [
                                @.Destination :=
5 R8 I! f& S* T                                rgManager.nearestFreeStation(@,track.~);
# O( }$ `, a4 @4 `                                newDirection(@);   : S1 c1 I1 m/ S4 e0 {
                                if @.Destination /= void then( O* E* T) q" H: h. C
                                        @.Destination.NumReservation :=
4 B# U9 d1 s3 ]6 Y                                        @.Destination.NumReservation + 1;
% M: B9 N( T/ L4 X6 L( ?  o6 g* Z                                end;" X0 k( A) e: d3 M, g
                                @.CurrIcon := "drivingHome";/ r: u, u- O& u& r* l' Y# f# [
                                @.DrivingHome := true;" S; _8 H; T+ k; h
                        end;8 p! `; Y5 q5 i! P& X
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station9 g8 U6 k' U- n6 p& J$ Y+ O$ f
                        part := @.transpOrder;& n: I2 N: B: s& u& V
                        part.move(@);-- load part
* s; a) x. f; z* |& Z                        @.CurrIcon := "load";4 X- r* U, B7 l7 C1 {- C) c& K1 w
                        GlobalDistObj := part.globDestination;
& r* Z2 T8 [# h                        assignLObj := rgmanager.rgAssignL;* b. Z' o% k% x
                        row := assignLObj.getRowNo(GlobalDistObj);  D: w0 l% @  n- y4 D! C
                        if Row = -1 then -- since 709 p8 ?, [  p" _# j! z
                                if lan=1 then
% |; h+ [" n! R; l4 N1 j5 `                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- V! U% P. c9 {2 d9 j# m  l
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
3 b' Z7 E4 `/ R+ i                                else
- R  M) E1 k/ Z5 G% O  t  w                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
9 F. Y: u+ D, i6 f                                                to_str("in docking station: \"",?.~.name,"\""));                               
6 T8 H1 W* c% i  h0 v9 X) I  v                                end;
% Y+ t/ G, \. r6 B6 {! }                        else/ y& {# Q& T7 O0 }; X
                                @.Destination := assignLObj[1,row];% c" N  L- u& c: l2 C" g2 ~& Z& N
                        end;                       
" P' v. r1 ]8 r# }, ^% M' q                        newDirection(@);
! j% `8 B* d4 ?  a& H( P  x                        @.HasOrder := true;; ?0 p8 z) T! y) ?
                end;
5 X8 W, z0 A; D/ }        end;2 I6 B& ?9 ]' X4 s% N; @' D6 j' W' ~
end;        -- of the method; F, J# p! ]0 b5 m" r
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
) A! f& w+ h9 k- e4 Z4 I3 z. C2 P4 A. |& q9 g. h/ x' h
这是AGV_putin中arrive的method。
5 v$ d# b( |6 B- c# \
; U3 u4 J+ y8 k5 r/ A& ]7 E" L0 r2 b( `当到达物料速度越高时,这个报警更多,
* G9 W5 B& o3 W* `: u可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
' n+ c3 `6 A; ^: x) }5 M程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?$ C/ r4 F6 p, W

- L6 M$ U9 x6 Z" a7 |8 a另外一个小建议,就是move,所有的move都可以这样
! c/ R3 {- q2 z  {: p" @if not move() then debug end: W: b" v. W: n  A* }; @! h  c9 S
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。4 K+ U1 ~) m! A3 [7 a
plant simulation中的free libraries有AGV模板,
" w& J1 u) x0 o5 G* ^. y里面也有案例。+ F. v+ p" D6 w0 E7 K& ?$ `) ]
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。3 V1 |$ d. R! g+ m' [

7 d/ b% x' R( x/ }# K我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
7 s0 f: [6 I3 ]$ O. y0 D* L; F/ M; b2 d: {' X) e
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 * _1 ~. j8 x6 O1 G& J" _9 n
这是AGV_putin中arrive的method。
8 \5 q0 R* }9 B* _  {2 j- l
/ T  n( I+ E0 _: q1 F4 y当到达物料速度越高时,这个报警更多,

% W/ b# T  z) v5 f& @& \4 S另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-27 19:39 , Processed in 0.014322 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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