设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5171|回复: 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'
: X8 o  Z3 y5 H# t  p; U*/
+ Q' |5 X" A5 o% G3 O$ b! _# ^4 Ris3 g: x. t8 y! c5 b+ j- X
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;' W8 ?4 c9 R! t( Z9 U' D( K% y8 |8 N
do7 @% q) c! g1 Y2 k
        Lan := rootfolder.Internal.Tools.AOLlanguage;
' d& n3 s# `) Z  l$ ?        if current = @.Destination -- else return
# t: ]( R$ t* ?0 _        then: K4 E3 b* K2 C. q: {2 n
                @.Destination := void;
; U( H' P/ ?; E( Z. ^                if @.occupied then+ f5 W8 A! Q) B- h
                        part := @.cont;
5 t! E) b8 s2 T. ^; t8 q                        @.transpOrder := void;# S6 |5 E' a! T: ~+ C# W* h
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 z( g2 j' t7 q6 S# T
                                @,root.eventcontroller.simTime);% D% b' D2 ^: P% j5 L
                        @.HasOrder := false;( e0 E  x  q/ I& j+ `% F
                        @.DrivingHome := true;
9 F# P: e  K+ t% b3 [( f4 U                        rgManager.tryToStartTransOrder;
1 |% b! r/ I. Y4 y5 c( [1 l* }                        if @.Destination = void
* q7 n2 w1 k1 y  o9 X% o5 j                        then -- no transport order for vehicle @1 O& T* I+ x6 _% `& ~
                                @.Destination :=
4 D9 D' ^4 ^0 Y* T% |                                rgManager.nearestFreeStation(@,track.~);$ i! |6 `) j8 \8 ^7 ?. U
                                newDirection(@);   ! ?* H" }' n0 w" G$ f
                                if @.Destination /= void then
3 o2 |  k, f' X. R. [' V                                        @.Destination.NumReservation :=% p; }# B6 T" F/ Y3 f
                                        @.Destination.NumReservation + 1;
7 l/ Z* o% p1 @4 G                                end;6 C% \, d1 H3 a# _* y
                                @.CurrIcon := "drivingHome";
; t6 `3 I3 U! X& E4 l/ `                                @.DrivingHome := true;
, b  `9 E# A& o9 e% J9 Z                        end;
( T7 M* I( v) i6 b7 |7 h                else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 N. I5 j' y: s0 ]! U& t
                        part := @.transpOrder;( G& i! L7 S- p  h  `1 x
                        part.move(@);-- load part
7 N  S! m7 i9 n1 d4 b5 n* @0 y                        @.CurrIcon := "load";
% z1 P  m1 V( N5 o( N0 j/ B: P                        GlobalDistObj := part.globDestination;
* k$ U! v6 J- x1 e2 \( b9 |                        assignLObj := rgmanager.rgAssignL;$ I7 i2 S/ Q6 u; L
                        row := assignLObj.getRowNo(GlobalDistObj);; x: a8 H1 `" W( l
                        if Row = -1 then -- since 704 Q! s# p* T( q( Y3 W
                                if lan=1 then- \! @7 \4 ^4 g, O
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),' W5 L( s5 I$ V. m3 m7 E$ y
                                                to_str("in der Andockstation: \"",?.~.name,"\""));5 v9 Q( w2 L) s& c; t+ M# L
                                else
8 p) z# |% j( G& L" K                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- D5 b+ [% t) {4 b# E                                                to_str("in docking station: \"",?.~.name,"\""));                               
8 l  i# c( N1 R                                end;( k, m# x5 Y2 U. o
                        else
) {) t+ J) I8 Z) S; G+ m                                @.Destination := assignLObj[1,row];
' z9 s3 S% n% c  R; D9 O& \+ C! O                        end;                       
$ A$ q5 t: p0 ]0 t                        newDirection(@);
8 P: }$ A3 Y, w9 {8 |7 V8 T                        @.HasOrder := true;2 F- C" n! L$ z6 `7 C$ Y
                end;
: Q0 R2 S0 c8 _' s' X  E        end;
9 z" A$ z5 m0 ]3 aend;        -- of the method
. Q( v0 x+ Q# ~- g8 q3 T
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
9 D5 T, O2 J# _* ?% R- o
% @- s6 Y" B* B0 O* ~/ V这是AGV_putin中arrive的method。
( B6 d, f/ ?) I
* Y, ?8 s1 k* r4 x' s7 Y当到达物料速度越高时,这个报警更多,
9 a+ l* ~5 }8 f$ g% V可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
- T/ ~* f8 k+ g程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
  ?4 m- S7 r4 D- o' d6 x9 L2 a6 ?2 k
另外一个小建议,就是move,所有的move都可以这样
5 K0 A7 `' A& b/ V$ g1 N. j% ^if not move() then debug end
! k1 n9 o! F0 p3 @" a这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
# s. L$ [" m' Qplant simulation中的free libraries有AGV模板,
2 L! ]6 b' @5 Y; D: z4 z里面也有案例。$ j. O8 K1 F% k
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。* c- k- [0 M+ |% {- s

% V/ t3 z, }: y. q/ F. N. h我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
8 x( J' V! p. k/ D
7 u1 }" |2 L" m0 o$ b) ^那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
1 Q- G+ V! e: ~' |7 i+ L这是AGV_putin中arrive的method。
% u9 o3 n$ z- q$ F7 ^  U
, A  F! G# D0 x; _& g当到达物料速度越高时,这个报警更多,
) K# p3 z4 X, ?: e
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-10-19 15:47 , Processed in 0.025574 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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