设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5912|回复: 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'
* s! q$ s: M( H1 w*/
& K; Z" f0 r0 J* Sis
: u7 {8 r$ n4 B/ J& l; _        part, GlobalDistObj, assignLObj:object;row,Lan:integer;" U9 m! W: x1 `
do
( I, x' ]  u5 Y( `/ Q$ i- z7 e        Lan := rootfolder.Internal.Tools.AOLlanguage;. h* t- I. t) T* x9 l: U
        if current = @.Destination -- else return' @' l/ y) C% b3 d0 N
        then# w8 o2 i0 p! w
                @.Destination := void;, U; q2 G3 I9 J$ j/ n9 v
                if @.occupied then
0 K# B/ K' @2 j6 ~2 }1 G  e                        part := @.cont;
# Q( a. J: v/ x6 j                        @.transpOrder := void;
" A) ?  u0 A/ Q5 J1 i4 F$ F3 w                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,4 R! M8 u% ?# u1 w
                                @,root.eventcontroller.simTime);
  ~0 K3 S# ?8 T7 J$ F! y                        @.HasOrder := false;
+ ~5 S! F+ q7 q6 X; E; K) l                        @.DrivingHome := true;# w  S# s! p0 e' \$ B
                        rgManager.tryToStartTransOrder;: M* |5 q) N, b( d4 Y7 K; b, n
                        if @.Destination = void
9 V  E7 t. A# L0 J8 s7 v                        then -- no transport order for vehicle @( _1 B4 v+ K& l7 Y! \
                                @.Destination :=
' q+ S0 R6 b. Y7 H" k                                rgManager.nearestFreeStation(@,track.~);: `) T" T0 x: M' Q
                                newDirection(@);   
. i# T; k1 b0 E1 x                                if @.Destination /= void then9 o5 N3 J6 `$ Z: Z/ K0 }# V
                                        @.Destination.NumReservation :=
$ j/ ?$ s& p; t$ F& x                                        @.Destination.NumReservation + 1;
. R$ `, B: }* v7 }7 I; ^                                end;  U7 k2 g) K4 q- ^1 ^$ }
                                @.CurrIcon := "drivingHome";* M( p9 E, _# T+ p2 H6 J
                                @.DrivingHome := true;
5 S4 A6 u' \  O8 ?; j& ]                        end;% q; _! N. `4 ]3 \" Q
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
, N# b. u- g7 E                        part := @.transpOrder;' Y" T! C3 S8 g
                        part.move(@);-- load part
' w4 u- H* }! T5 b9 S  `" P1 w                        @.CurrIcon := "load";
% k" E. a4 r& f                        GlobalDistObj := part.globDestination;
8 R; [0 R' ~/ h0 f                        assignLObj := rgmanager.rgAssignL;5 a7 k/ I7 a2 R- [
                        row := assignLObj.getRowNo(GlobalDistObj);
& R  b* X2 e/ N! a4 d/ C% U                        if Row = -1 then -- since 70' n8 P3 p- R: d, W# ?1 N
                                if lan=1 then
8 S+ ?- A. h* s0 i: O                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),% R9 A: n+ P' D2 [" n4 G
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
: q' C: `1 ?' H2 j. W! h                                else
- G0 A2 C# A1 k  Y# M7 N, s4 t                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
, _2 x9 U6 r1 H, R9 I! [+ b; F  v                                                to_str("in docking station: \"",?.~.name,"\""));                               
8 N0 U% u/ @6 a8 O4 w  m; P" Z                                end;2 U4 f' S7 w2 R) d/ K1 ^
                        else+ ?5 ]) n, b/ ]" `# Z, Q
                                @.Destination := assignLObj[1,row];
& U: h3 X0 B4 j# m2 Z4 l                        end;                       
% p8 Z5 W8 k& d) ^8 S* O                        newDirection(@);+ I$ D  t: [2 Y! K: |8 O1 ?
                        @.HasOrder := true;8 B6 e6 l4 }; D' }2 K2 x; e! S
                end;
" L' F8 k5 q) \- d- S        end;
  c# w" _- [; }7 _( W4 b  iend;        -- of the method, t  U( P  H. w( |8 I
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 # @1 @+ d2 R" X# B% c7 h, Q
) ]2 R( V+ |  D
这是AGV_putin中arrive的method。
4 [9 D1 X4 c) M- o: V/ C! D2 Q; @
+ @4 Q' i9 j; c; A& O7 }当到达物料速度越高时,这个报警更多,
5 X3 ?( a8 j7 p可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
8 J+ Q, s; B3 `% o2 R& r程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
; Y% S( b" S$ s6 ~  i; C* [8 K" C7 Q7 U
另外一个小建议,就是move,所有的move都可以这样
. R) d2 J# M6 Z7 ]) t, Bif not move() then debug end8 D- B  _9 |3 Y- r9 G8 J
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
) h; K, \% t2 d! y& l2 `& W% Hplant simulation中的free libraries有AGV模板,
' l9 _0 ?5 J) C# H里面也有案例。
0 Z9 x$ Y3 Y1 j  l6 c我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
. t( L* s2 h- @/ V2 N
' j' N* T; c1 u; z) o我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 ( Z( K3 J- b+ P
( P4 [* V: ~  p; z
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
# X, {& G9 L4 Y  `& |+ m8 w! k* o这是AGV_putin中arrive的method。/ f' S1 W4 E3 E/ M! B% ^. Y8 q7 W

* p/ X, ^$ }: M# {" Y当到达物料速度越高时,这个报警更多,
; z! M. U* g# i0 ^" @$ c, A# M
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-1-1 12:23 , Processed in 1.829006 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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