设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6178|回复: 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'1 a& |, l0 ]* r" Q# K9 Y
*/
/ T8 _2 I& w8 C& K2 V3 J0 ~% h! wis  f2 E5 U& t* ?9 x- x
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;: e2 _; S, T4 ^; V/ U/ `
do! E3 o6 o& K0 P  Q
        Lan := rootfolder.Internal.Tools.AOLlanguage;& o- g4 y5 Z3 ?2 A% {
        if current = @.Destination -- else return
3 [& K% I: z$ Q. @3 j        then
$ G. g- M3 r% g1 F9 {% S  C" g                @.Destination := void;2 I" P! f& [/ F
                if @.occupied then
4 a9 w! C- E/ V4 ^. x  B+ \                        part := @.cont;5 y8 Z5 `5 K) ^, y: f
                        @.transpOrder := void;* h2 K; X! o2 u2 H2 j: x; P/ j# l
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: {4 C* n/ t& B' i0 I% }( P
                                @,root.eventcontroller.simTime);1 B+ V* s# D' ~9 y, ]
                        @.HasOrder := false;8 F- O7 A( g* l2 x
                        @.DrivingHome := true;
7 v; N" W: E8 w( Y/ k* R8 T                        rgManager.tryToStartTransOrder;
) i* o3 A) \% m% ~, F                        if @.Destination = void
0 a$ l# r( y5 F$ G9 A, L$ W                        then -- no transport order for vehicle @* Z1 y3 V; A9 ?
                                @.Destination :=3 ~' Q% H2 T8 [. @& I# }
                                rgManager.nearestFreeStation(@,track.~);
5 N$ X' f3 w- I  r                                newDirection(@);   
2 R& {/ h4 ~+ i, ~; a                                if @.Destination /= void then
2 ]6 F# p* D: ?3 K/ L, d                                        @.Destination.NumReservation :=% p$ X' ~# i0 b: G  R
                                        @.Destination.NumReservation + 1;. ]$ Z. n/ ~/ w
                                end;
. c/ v& r, h/ Y5 ^+ }                                @.CurrIcon := "drivingHome";  U1 @4 l& K! k5 d+ `
                                @.DrivingHome := true;
1 K$ R  `8 G! V! U; q' M                        end;
+ _! |, }0 T& [6 y1 m                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 q$ m& K) L4 b- a                        part := @.transpOrder;
9 k4 |1 `1 b  F2 b                        part.move(@);-- load part4 T- z5 `6 Y& M3 B
                        @.CurrIcon := "load";; a8 N3 Y# _1 k: S3 P+ V/ q
                        GlobalDistObj := part.globDestination;* G5 Z( F+ H3 i' L5 t' n
                        assignLObj := rgmanager.rgAssignL;% |6 r; t' E: J" A
                        row := assignLObj.getRowNo(GlobalDistObj);: S" W; A3 B  S# F% n5 o& ^: q
                        if Row = -1 then -- since 704 d$ F& j$ O0 y6 r! ^5 @* C
                                if lan=1 then! X6 c; d- u  W1 F$ l7 {8 E1 f8 [* X
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),, T# |; {3 U# f2 Z- j' t6 Q
                                                to_str("in der Andockstation: \"",?.~.name,"\""));  _8 }1 d+ T# ~7 x8 e; f* s0 ~
                                else9 B1 J) s# j( T' B6 J* U% Y: H. J
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),- H1 W+ B; n3 t7 Q0 ]5 c2 x9 o
                                                to_str("in docking station: \"",?.~.name,"\""));                                - U. {* M' g5 o4 j* ?% T
                                end;" T) Y/ v% k  {0 P
                        else
+ R# P1 L& g( T" X! @2 [- ^4 j                                @.Destination := assignLObj[1,row];# u- l' h, \' \9 }) F% A! N
                        end;                        - _7 d0 ?# e. }; w( i( M$ x
                        newDirection(@);
1 I9 J+ Z9 }  N+ V# x2 q' H) @5 D% B                        @.HasOrder := true;+ G! y0 C! d6 _; Z6 P: Y0 V$ h! H
                end;7 s* _3 s# x9 a# X6 h9 g# x
        end;$ d3 a. S; _% K! k
end;        -- of the method
6 {$ i6 B% ?) g" m7 A" ]! E
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
* x2 l, m! g6 t" A8 h
  b; _- j/ k2 O9 I8 ^1 Q这是AGV_putin中arrive的method。" G  D- A0 m) O, S* s1 a3 A0 O6 M
: g2 ~3 @; _$ ]. P9 g. K9 `
当到达物料速度越高时,这个报警更多,
, C; I. p! W5 n1 R可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
) y9 V( k, p+ w& }程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
9 D# c. q# K0 G4 b1 A1 K8 t# Z
% k, e5 |9 M# F4 f" {另外一个小建议,就是move,所有的move都可以这样
6 E. t; d; R4 @' v$ G  c/ Sif not move() then debug end" o& u. E% `9 i, a1 T
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。5 D% p5 `; S) k$ F2 G7 h$ {7 ^+ s- R
plant simulation中的free libraries有AGV模板,
: R1 O3 j6 c) o6 }) b里面也有案例。
* r8 @/ i; R. @+ X) ~- F0 E我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。- f# K3 T' r" o0 B' [+ ^: E
5 ~+ a$ Y5 @% _9 ?5 S" N! X
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 2 l1 z4 L# @2 U- F) R' F( B

) Y" x1 z' B2 z% N9 ~那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 5 W1 \( A$ K' w1 G& O+ J* u+ n( g
这是AGV_putin中arrive的method。
. T4 k, M' y  G* f$ o2 L& C# X
5 f' p) f0 R; R& V" q* \当到达物料速度越高时,这个报警更多,

+ f  G# B" Z: T" D7 |( h另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-1-23 02:21 , Processed in 0.021127 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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