设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8574|回复: 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'
( ]& a2 m) J; B*/3 w; g: T5 [" h4 ?
is  n+ F8 o1 N5 ?
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;# a' G" H9 m% G0 b6 r* `& J( q
do
* a$ |. U' D) }4 T4 ^4 o1 i        Lan := rootfolder.Internal.Tools.AOLlanguage;
3 u0 t! G' S- r/ E/ p. V) @1 g; F2 Z        if current = @.Destination -- else return' I" h% x. y0 ]) q
        then1 Z' c1 f; ^  V0 k) n* A9 \
                @.Destination := void;
0 J( ^" L" T; E" N! S/ \, T9 Y                if @.occupied then
! _( Y2 E3 a) O( _% u                        part := @.cont;  {* W" M$ |/ p! T1 C
                        @.transpOrder := void;
6 y6 B% l) [0 S/ p                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
& n& t9 S$ y/ s0 m0 }                                @,root.eventcontroller.simTime);
4 C7 M2 E6 T7 r% a) I8 V/ @                        @.HasOrder := false;
0 Q( @1 h. Y( O: K7 s' k' P" ^+ Y                        @.DrivingHome := true;0 R3 Z! Z- O( r4 b8 c, k
                        rgManager.tryToStartTransOrder;! ]) {& D1 @3 |2 T1 N2 d) k
                        if @.Destination = void
' R$ b% T2 J9 {7 g6 @8 W3 @                        then -- no transport order for vehicle @6 j' W4 I, [- s2 L
                                @.Destination :=
( m4 T* P4 c" ]3 q                                rgManager.nearestFreeStation(@,track.~);
' E" k3 \5 w1 [& I8 j' t' W5 z                                newDirection(@);   6 c% ^# o* p& b# v, V
                                if @.Destination /= void then
6 s5 M& g" G# f3 E% l, r                                        @.Destination.NumReservation :=1 N3 o/ M+ V5 @# ]0 ^* |: Q$ ~7 i
                                        @.Destination.NumReservation + 1;3 u3 u, p$ F' @
                                end;
8 n" @3 Q' \: U                                @.CurrIcon := "drivingHome";3 f% f- Y& F$ p- F7 G7 j' x: E) D
                                @.DrivingHome := true;  D& `& c/ k" @* x# m
                        end;* [" O3 |) y/ U5 K( N, h
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
' I* R# ?' l2 g" a) A5 G                        part := @.transpOrder;
6 U1 M& l4 Y+ N; H                        part.move(@);-- load part
9 z4 w% t. O9 Z0 V8 B                        @.CurrIcon := "load";5 ?' R. L4 e+ G4 g  @( V% w. h
                        GlobalDistObj := part.globDestination;
% W6 c$ b% M' c4 d. ~% L! p" w                        assignLObj := rgmanager.rgAssignL;' h3 h5 ^; J# E) X0 r2 w
                        row := assignLObj.getRowNo(GlobalDistObj);4 i( _. x. C; T. |+ J( r. c: e3 y
                        if Row = -1 then -- since 70  `+ N( d6 @! w/ x1 j( V4 ?$ i
                                if lan=1 then/ S7 p. w( @( k. C/ z& D6 P
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
  t$ \9 e. g8 `  C+ i* Z# _, u8 ]                                                to_str("in der Andockstation: \"",?.~.name,"\""));
% o) |8 ]6 e# t% @1 ^: e7 _* \9 h                                else
5 o2 i# X/ E: `% r& ~2 I                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
$ j& q; h* D1 o( c4 S                                                to_str("in docking station: \"",?.~.name,"\""));                                , v  H4 i. V! a. L  }0 a$ O
                                end;
, x0 ]5 Q& D& H; L4 k1 s) d& s$ u                        else
- |$ b( C) d0 [* n( v3 n6 g                                @.Destination := assignLObj[1,row];
4 e& `( b( Z$ `9 r' _7 [7 @                        end;                       
' @& V5 ?2 m, H: Z6 i) f                        newDirection(@);
$ O" o5 M, F1 ]' T, v, S9 v& D                        @.HasOrder := true;- g+ V" F  p8 f7 \! ~! \$ h. \
                end;! E$ F% l/ G- [$ u
        end;9 o  }. n0 b* P6 u, q$ ?$ a
end;        -- of the method5 @; V/ k% t% s2 k, P0 z( l
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 % [" S+ M& L% u# O: [" r* X
/ F+ |% e; J# [; D0 L7 \
这是AGV_putin中arrive的method。- @2 X, u4 C  G2 s

# o. s  V( P) {& D当到达物料速度越高时,这个报警更多,
  ~7 Z. q1 L# J, N: l可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。+ w# P/ ~0 a7 F5 r: k0 g8 V
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
' ]! J2 w- ?$ ]! S% L3 Y- T
% q+ q1 O4 t7 R* ]. k另外一个小建议,就是move,所有的move都可以这样
' b/ Z6 H0 |3 ~4 oif not move() then debug end' {5 y7 q5 }1 {% F+ t
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
0 }# o% h) y! ^; Wplant simulation中的free libraries有AGV模板,
  j; S  i6 G. S3 e" B/ Z里面也有案例。4 _) D7 M9 p9 v. _3 {$ o+ u# H9 L
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
# M8 O! e, R9 c7 G  }5 w& [, i- h8 Q8 L, h
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 ( K7 ~' ]1 p( v0 i
! D( }0 c5 ^& N7 S
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 : W- Y9 i2 r  f8 I0 I5 C/ D; }
这是AGV_putin中arrive的method。2 [/ G  b, l. h/ B; v4 s2 X3 A% b

0 d0 N. H" S! f- ?: O2 g0 y当到达物料速度越高时,这个报警更多,

; U. y# L1 c5 i4 r* M另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-12 21:38 , Processed in 0.016418 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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