设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7106|回复: 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'
2 H) P1 A4 N$ F: E*/
- r% K! P# z/ l% Y" Yis% f1 q* q7 V+ A8 ]/ |1 d" \, ^
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
& }9 t& l8 O4 h9 c( Jdo
/ ~+ z/ S2 C5 G9 i$ s        Lan := rootfolder.Internal.Tools.AOLlanguage;/ M* K! ]. p5 [8 o
        if current = @.Destination -- else return3 v. [$ W  b8 w9 j" W7 W
        then
/ s8 v) V9 {+ K$ i8 {0 h5 A  i. B                @.Destination := void;0 \! g" K2 X' t! ~1 n
                if @.occupied then
, ^* C- x* X# `# \1 }# m; J* F- X                        part := @.cont;
1 u$ W+ W  g" U+ i) L                        @.transpOrder := void;
4 |, [7 O( i7 e* L% @+ `  Q, ~                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 K% T7 \6 i0 P, f+ V
                                @,root.eventcontroller.simTime);% {2 M) n% C" n' Y
                        @.HasOrder := false;
8 A$ R- `0 F4 ^$ n( M/ p3 e; Y                        @.DrivingHome := true;/ p+ ]* U2 q) b; X$ S( _, H
                        rgManager.tryToStartTransOrder;
/ H+ P$ F' F( B- p$ |8 K                        if @.Destination = void
$ e5 O7 }8 R) g" ~                        then -- no transport order for vehicle @4 R1 R! [) f; o* m( g
                                @.Destination :=2 a& y; }( Z/ H
                                rgManager.nearestFreeStation(@,track.~);
7 u" Q3 |3 H2 @4 K5 U! Y                                newDirection(@);   6 r/ B: K# r, ]) t( t) j0 b5 Z
                                if @.Destination /= void then7 ^2 }+ T- j& h
                                        @.Destination.NumReservation :=
+ _8 r0 B+ w' h. L; k                                        @.Destination.NumReservation + 1;
" ^+ z. R) L$ J. ?3 _9 ]  B  f                                end;
- g& R; B# H+ B0 n; W( N: P                                @.CurrIcon := "drivingHome";
+ d+ }: X- P% r& {                                @.DrivingHome := true;) t" C  A; }1 p6 `  z
                        end;2 ^9 ]* x, V4 `# r4 d# N% ]
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station6 M# ~3 J$ ]1 u8 W* \' |+ O
                        part := @.transpOrder;/ B5 Y* _5 L$ J
                        part.move(@);-- load part: W4 p4 q- Q4 E( o$ ?8 `
                        @.CurrIcon := "load";
5 H7 {! A" l7 C                        GlobalDistObj := part.globDestination;
8 e- ]2 w- @7 c. V; a                        assignLObj := rgmanager.rgAssignL;3 l& f' ?5 a# a2 A
                        row := assignLObj.getRowNo(GlobalDistObj);
6 L4 v: C+ h. Z+ V+ y4 G, }                        if Row = -1 then -- since 70
. W( x4 a, Y- c/ y" g                                if lan=1 then' m' I" U, D* y
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),! @- U: K0 t- t( Z: k4 t0 [
                                                to_str("in der Andockstation: \"",?.~.name,"\""));. v4 ]: c+ Z* U/ y& x" u3 d
                                else
0 P  l9 h) B7 L/ c( A0 y                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 ~: z- |, A# Z: H' [" T7 V, a3 ~
                                                to_str("in docking station: \"",?.~.name,"\""));                               
% d6 i1 u8 L2 F- u& K                                end;  c1 T0 u! X* P3 A  h
                        else
/ O; K/ P7 J' f! I% {                                @.Destination := assignLObj[1,row];$ H5 H" C3 b, L& B: }' y
                        end;                       
/ i1 Q' g$ G: H7 H* `' V: b                        newDirection(@);
( f7 G8 d- g1 L' ^' N                        @.HasOrder := true;& e/ ~. |. Y0 E- C$ h
                end;
) Y3 B! q/ t/ d& T# F7 Y; m        end;- y0 M  M% q) G% P) U# |* g7 u
end;        -- of the method
' f) c! s! Z$ x. G# n, a0 _
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 ) d  h9 P, G& ^. H5 N/ W

, P* j! X( I3 Q% ?这是AGV_putin中arrive的method。
' r8 Q% ?& n* y! Q: [& w$ h& t% I$ _0 {8 a, d9 {, w
当到达物料速度越高时,这个报警更多,
6 T# j& S& z& @; q/ ]! I可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。. O- n+ B, j5 p, M
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?: B4 p# ?: T4 n6 A+ U
4 E- ]/ S  C0 c# `2 I" q
另外一个小建议,就是move,所有的move都可以这样
1 Q+ m2 ?, v( `5 g7 Pif not move() then debug end( B2 ]  M8 _* Z
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。* h7 V& i' S2 w$ e; }/ K
plant simulation中的free libraries有AGV模板,
- C3 V% y# P; }里面也有案例。
$ `& ]: ?4 [5 q% ^( ?; d我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。- F8 \( q+ X* B/ r( m' @
9 R4 M# l# P7 J! r
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
: Q# C( Y3 i1 O, v, k
( r( Z" P$ @* l5 N9 m* d/ o那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ( ~7 h+ I( h2 z( z* _3 v' g
这是AGV_putin中arrive的method。  \- r% Y1 W, g
( U8 W8 @, f" H
当到达物料速度越高时,这个报警更多,

. y( j5 W. v4 Z. W/ a) z! B( o另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-18 17:32 , Processed in 0.018270 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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