设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9531|回复: 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 V! _: P6 J  }" ]
*/
' v- ^3 _7 G+ E3 x: E$ T0 pis1 m# ^8 T/ x1 L+ F+ }3 x4 E! P
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
( ]5 p4 r( `+ d! @  N6 |do' q/ U  w& X; S% w9 g% {
        Lan := rootfolder.Internal.Tools.AOLlanguage;5 M9 w$ ~$ M) ?" g5 B
        if current = @.Destination -- else return1 \. t3 I  D1 G0 L+ ~
        then
3 Q  ^1 i" F% @2 Z% L' T" O' J! C                @.Destination := void;
% N+ T) K5 A" e                if @.occupied then+ S! ?9 t- d- ]6 n$ `
                        part := @.cont;
8 m) p* ?6 m2 \& m3 N& q                        @.transpOrder := void;- @! V1 l; P$ w9 N
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) ]  _0 |# D  E: Q                                @,root.eventcontroller.simTime);, x; o& [/ I3 p) b, E5 z
                        @.HasOrder := false;( M* t; ?2 y( W
                        @.DrivingHome := true;! I- u" ?$ J$ M# u
                        rgManager.tryToStartTransOrder;
: P; r$ |6 J" P: s                        if @.Destination = void
- D; C! f# N+ F! V6 d                        then -- no transport order for vehicle @1 ]; ^6 s% p' J. f* \
                                @.Destination :=
: P7 X3 x+ r. e% C                                rgManager.nearestFreeStation(@,track.~);% u6 w) i8 h+ B: A. W
                                newDirection(@);   ' S) e) g+ I+ l4 g& Q& @
                                if @.Destination /= void then
# i5 K5 R; Q+ R4 ^3 a- L                                        @.Destination.NumReservation :=
- h; U. t. x3 R' J                                        @.Destination.NumReservation + 1;9 ?: E9 Z7 r% p- U: a
                                end;
9 [# @2 r% M. N2 r7 e                                @.CurrIcon := "drivingHome";
$ c6 I& O  `( l" h) ]5 \6 u9 ^% H                                @.DrivingHome := true;
9 D& S! V6 T9 V( [2 p) y( t" M                        end;3 @8 B: q' s9 E3 x: e, p
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station* ?% w; }/ l7 i8 r8 `% L4 E
                        part := @.transpOrder;
1 K  k9 o7 {4 T                        part.move(@);-- load part
2 p, `0 s5 s7 a! e$ g" U% W                        @.CurrIcon := "load";
+ r- F$ o6 R" V3 Y) q                        GlobalDistObj := part.globDestination;! ~, N/ c1 |/ C# X4 v* Y
                        assignLObj := rgmanager.rgAssignL;
  h# E, j9 _1 A' D+ y' V; [                        row := assignLObj.getRowNo(GlobalDistObj);& }0 [: ]( T1 e, P
                        if Row = -1 then -- since 709 F9 n6 o; t) I+ z; U
                                if lan=1 then
( @' Z( \2 d  N, m& @# D  R3 c. v* k                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: d4 g9 Z7 `8 c- S( L' t% S                                                to_str("in der Andockstation: \"",?.~.name,"\""));
+ U/ _/ I5 t# \! v) W& n9 Q& C                                else; L7 J6 {5 _# ?) Q  C
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 H* C+ ^5 z# }, }2 a, S2 `                                                to_str("in docking station: \"",?.~.name,"\""));                               
6 b7 u/ S4 Q7 A) p1 A                                end;9 h6 L- R) K  ?9 R
                        else
9 V) h! a6 Z; s* k6 h3 n; w                                @.Destination := assignLObj[1,row];
& {3 V6 B9 Z+ m3 ~& T) n                        end;                       
# H, l0 x* Z/ x                        newDirection(@);
3 a4 h5 P, n* k/ o' b' g* n                        @.HasOrder := true;
% {" s- n( ]3 Z% @                end;
0 C; A& n& q- Y8 C' F$ D: y" g1 F        end;5 J  \$ o; k' Z
end;        -- of the method
5 F. Q; @& ^. c/ t
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 # }$ W5 _% W  |- u& e
6 o& i; M' t5 v* @
这是AGV_putin中arrive的method。% D, c( F; w1 l! j% G2 M9 x) ]

' P9 g8 Q6 f5 P4 J' Q当到达物料速度越高时,这个报警更多,
8 s9 h2 `, T3 m; r. W7 [可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
. V1 n2 j2 [$ l2 ]! `2 ]3 j4 h程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?3 e! `$ V8 C; x, A: R9 w- A& D2 `9 a
6 _# K5 b! k  k9 G
另外一个小建议,就是move,所有的move都可以这样
, S1 K9 X" C0 B( L0 ^1 Yif not move() then debug end
5 }( s% @0 j& L" w1 `这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
3 E$ `) B! _+ [% c7 Kplant simulation中的free libraries有AGV模板,
% E/ d/ c* \2 ?+ x0 q6 \  E. N# z% l里面也有案例。
) d* c+ P0 W: l# t7 O9 }9 ^! O8 \我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。5 W6 a& s9 E5 j) ]; G0 b

4 c" W+ Q8 f) N% {4 |我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
' M( E9 i+ [" ]4 |, L4 H; O
4 r/ t. w- N5 w$ b那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 % s3 B% `% [! q; e( [$ V' \& k
这是AGV_putin中arrive的method。
% ^. ~. O6 Z- S; E! L/ `8 A& ]- q
( j& Q+ X8 _* ~; z* M# }# P& I. M2 T当到达物料速度越高时,这个报警更多,

8 G! Z9 t5 T# p, O/ u8 A3 r: r另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-8-6 12:08 , Processed in 0.017825 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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