设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 10295|回复: 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'4 Y  G. |% _5 _6 H- q9 `
*/% |) Q2 ?1 }, N! `
is
4 w5 b. V4 |% Q. U' t        part, GlobalDistObj, assignLObj:object;row,Lan:integer;+ k8 j9 q* O" a0 I7 G
do
( c9 H, m- B' P3 ], P        Lan := rootfolder.Internal.Tools.AOLlanguage;1 {5 I- m! U- |, e
        if current = @.Destination -- else return
5 S+ U. ?/ L4 a9 b        then3 K9 X: s, R/ `, j& c$ i5 m
                @.Destination := void;
: x6 R" G$ o. E/ x                if @.occupied then
/ y+ z$ k4 Q+ B* A3 E/ z                        part := @.cont;
8 V2 K) V2 E; ^+ y# b9 P' `( g3 N                        @.transpOrder := void;+ t- m0 `- D4 L3 s$ u9 |1 p
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
; l: \/ ~; Z) M- a2 r                                @,root.eventcontroller.simTime);
2 {* u% N4 n( C( N- d                        @.HasOrder := false;
% c* W2 n( a, s$ M) y1 O$ E                        @.DrivingHome := true;
( \7 n! A1 Q+ |/ B9 A9 l0 v9 H                        rgManager.tryToStartTransOrder;
1 _  M* F& l) B6 O4 N0 t, G! a5 c( i                        if @.Destination = void7 f% A+ S* v) h
                        then -- no transport order for vehicle @* K; E" w4 e+ y
                                @.Destination :=+ g* u6 o" P+ ^9 \
                                rgManager.nearestFreeStation(@,track.~);9 s; b6 P2 v, L9 ~& V! C* V! L( P
                                newDirection(@);   
5 I! q3 n2 [: q8 b1 l! t9 H" d. Z                                if @.Destination /= void then
& }9 \6 E% L/ M  z7 g                                        @.Destination.NumReservation :=" x2 l2 @8 m" ?4 L9 c/ |
                                        @.Destination.NumReservation + 1;
! P3 l. r5 q$ q                                end;
1 D5 P' |0 G! b5 f3 F8 ?3 r                                @.CurrIcon := "drivingHome";1 p1 K! o# M0 W3 R1 m/ `
                                @.DrivingHome := true;/ @7 R, Q- q* A) i- Y# n
                        end;) a, L6 T9 P* H3 `$ x
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
$ L* T" I/ s# {! J( K                        part := @.transpOrder;9 ^. U7 Q% K0 S. a
                        part.move(@);-- load part2 c: c. c& v7 P. `5 o( ^, u( K1 H
                        @.CurrIcon := "load";
  }; Z) Q9 o+ A' }                        GlobalDistObj := part.globDestination;: m% J) {$ S4 \5 x4 C6 k
                        assignLObj := rgmanager.rgAssignL;
0 C) n$ J; L4 L+ y' C) A                        row := assignLObj.getRowNo(GlobalDistObj);. R1 l( b1 X% O" |# w+ a5 ]/ \
                        if Row = -1 then -- since 700 A4 v. P9 S* x5 Y! z
                                if lan=1 then
8 [; C  t& q. s5 [& k                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),, ?; a0 a5 Y0 a' U' {
                                                to_str("in der Andockstation: \"",?.~.name,"\""));5 Z3 z; E: g: v( N$ V) ^  G, n3 a+ S
                                else
0 V* l. A, K- B, |+ ?                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
8 K* t1 g' M4 G* w) j/ E' R                                                to_str("in docking station: \"",?.~.name,"\""));                                % I0 O  ^: P6 ?5 T; {
                                end;+ f! Q! ]9 T9 \; H$ P
                        else: q' a0 T( a" [' t" s5 }; G3 j, J
                                @.Destination := assignLObj[1,row];
5 H" C# M+ D% Q$ Q                        end;                        3 n1 V5 E: p, Y+ g9 o& V
                        newDirection(@);  t8 K) R1 R- t# }. r7 C# z& `2 O: m
                        @.HasOrder := true;5 P6 C+ T& K, w: {( C  b8 X
                end;
- X& X# T# U2 Z4 Z2 q. [        end;
- h- B' C. h) P6 F- K4 Hend;        -- of the method
3 C% Y* J+ Y9 Q7 v! \! C6 b- t8 B
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
+ M* p6 h; M6 ~+ p* L9 p$ D: S4 ]! W& f: }- H$ o- w
这是AGV_putin中arrive的method。0 |" M* H8 r+ [* ~

. h% D5 x. d+ f2 d  {当到达物料速度越高时,这个报警更多,
# N: b1 t$ s) X$ K2 a可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
% s+ [' s7 F6 l程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
- U: a' x# l1 W) C: l
7 |2 K$ t( z7 L2 L* m另外一个小建议,就是move,所有的move都可以这样! T; }; s0 }- j' l7 q/ H. ]" J* \
if not move() then debug end
5 n. n9 K' y+ c( \) i- u, l这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
; |/ x) W( I% U5 L4 K9 `, kplant simulation中的free libraries有AGV模板,
! h5 k' x1 ~: h) ?- n* W' o里面也有案例。
4 @) R' l$ n, K$ S$ L0 ~. r7 O我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。3 ?* V  ~) L. S9 U0 J
8 t/ r  ?/ E. H. J" w
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
1 d8 \1 p# B4 T! [% U8 m, V* B
, ]) u: E! n1 F# m1 j* g1 T8 J那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 6 {  w5 k' o% w5 p; b" B1 z
这是AGV_putin中arrive的method。
1 R8 i- |# J1 d% e4 L0 @+ P% D8 p& X! [% \
当到达物料速度越高时,这个报警更多,
% i: W% i) G$ u" u( S0 ~% e( I
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-9-25 07:18 , Processed in 0.020871 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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