设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6689|回复: 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'$ X) n  \9 p4 q; v: q- j
*/
2 H$ t" Z' \& T! L# p& kis$ C( V& n) T8 O2 ?/ S7 \' c3 U
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 i* T5 A+ J! Y" t% I- p, C( P
do7 ^2 j2 o4 z7 ~; H+ N- g; }% a
        Lan := rootfolder.Internal.Tools.AOLlanguage;+ ?+ O% l# v$ I! q) s; ^/ T1 K3 p
        if current = @.Destination -- else return0 g8 n0 b$ d' Q6 K* T  D8 {
        then
* w. t; P( }1 d7 K. }; N2 o6 `- e                @.Destination := void;
5 t! Z( O  E# m; ^0 `, v                if @.occupied then
6 M) f  }+ V4 `6 [9 [8 u2 ^( K: n                        part := @.cont;7 I9 c* ~" C5 }" ^* B: B
                        @.transpOrder := void;
* l7 M' k8 y+ L; k; G+ N) s4 U4 c                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," |9 s- j+ b2 ^5 z
                                @,root.eventcontroller.simTime);1 V# f$ o+ o4 H
                        @.HasOrder := false;/ C& `; t( b' b; U8 J! x# H
                        @.DrivingHome := true;5 \, }" G) h( {
                        rgManager.tryToStartTransOrder;
( j4 o6 Y4 {  ?( \$ ^                        if @.Destination = void
, m4 ]) c7 n1 f. A" F! K+ D                        then -- no transport order for vehicle @0 m: F% J* \  W0 n
                                @.Destination :=* m5 w; E1 ?  s2 O& a4 U. d9 G
                                rgManager.nearestFreeStation(@,track.~);
; ?& S& S  v& F* Z                                newDirection(@);   3 K# i" [; k( N% o0 t2 s. j# Y3 U
                                if @.Destination /= void then9 ~6 }3 e! e# U
                                        @.Destination.NumReservation :=- x  l! ~  A! J
                                        @.Destination.NumReservation + 1;  K7 S! r+ z9 C
                                end;
  d& a9 u8 j5 u                                @.CurrIcon := "drivingHome";
+ h; |* f4 y! P1 R6 J                                @.DrivingHome := true;* n) @) f- g1 h; C
                        end;  i( n6 ?$ ?$ n3 y  A$ D$ C
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
+ g3 d- f% Z! n) B; M$ {                        part := @.transpOrder;% G4 V5 \( N5 Y# Q3 B9 [
                        part.move(@);-- load part" y% B; W" r! U' g6 w
                        @.CurrIcon := "load";4 S- J' v2 C8 _) y5 G( \
                        GlobalDistObj := part.globDestination;
4 O1 B1 f. w  L# s                        assignLObj := rgmanager.rgAssignL;
+ ]# ~3 ]0 Q( t* _6 g6 L0 M" M                        row := assignLObj.getRowNo(GlobalDistObj);
% p3 Z7 n7 m4 T: ]: J6 I% `1 A                        if Row = -1 then -- since 70
! `3 K+ T# O" H$ \) E& e1 i                                if lan=1 then
( N8 L0 H1 d: [8 h' ?! N3 g                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
6 v  _5 w. A9 h) ]4 j: }- |                                                to_str("in der Andockstation: \"",?.~.name,"\""));
# m- I1 ?$ e' C' a3 `3 t/ }                                else
7 W4 F) |8 C% S. o5 A. D                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
" B" x! \+ _  t3 k                                                to_str("in docking station: \"",?.~.name,"\""));                               
# R9 s% P. y) t1 ?7 N5 ~                                end;7 [$ |! n% r  p, l
                        else1 H' y: D$ g4 F
                                @.Destination := assignLObj[1,row];
) Y  y' g  y: w& O) K                        end;                        ) Y2 l8 s3 O8 b9 u
                        newDirection(@);3 U7 R2 c  X5 g! Q% K3 v; h
                        @.HasOrder := true;
& \* J; E- J+ v3 O* m* ^3 s3 x- h: V7 I0 g                end;
, U: \, R0 F1 R5 |7 m2 U! ~4 q* ~        end;7 O1 ?; V5 D  C& D0 j0 U
end;        -- of the method: @3 p! `/ A' M: _% d$ W" B
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 3 }9 ]8 ^) y  `! I

$ \4 T6 ?" i3 X  ]! P- z- v1 o这是AGV_putin中arrive的method。
) Y  ?4 q: n: S+ v9 ?1 h& R3 O8 Y) Q* V( \5 Y
当到达物料速度越高时,这个报警更多,
7 E. \% g  C( {' F5 h可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。1 z$ V2 K8 f& W; ~# Y
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?3 P. w; n2 B( c6 v( @& [: w
; |$ l& e8 r+ B# F
另外一个小建议,就是move,所有的move都可以这样" P" W1 W: d& ^/ E
if not move() then debug end0 N. E: F2 L5 ?  V: k5 x9 T( k
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。* f! A! i! }4 T1 ^/ x. W* L
plant simulation中的free libraries有AGV模板,
  g, u* Q/ C+ B' G) C7 G7 {里面也有案例。6 z: v5 v: w6 @4 ^0 B
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
- D) V) B# g5 X. ?' @- ^* T8 i9 s1 Q5 R% g8 E3 Z! X1 T' [: u
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 7 e$ j" J6 ?  w4 _3 r& a) L) z

1 t, |2 @. B+ X& x4 ^6 u" ^" B那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
$ Q- Q3 M3 O; @0 q8 P. I. ~5 i这是AGV_putin中arrive的method。
7 w" ]8 Q  r) A2 Q/ v" X) Q4 ], S3 b8 R5 |# F. N
当到达物料速度越高时,这个报警更多,
" s$ R# c# S" Y2 z. q: S5 H
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-21 03:09 , Processed in 0.019705 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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