设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6104|回复: 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'. C" m% ~/ L8 @3 O0 [+ A
*/
# z2 J8 M7 N8 |8 ~$ i5 H7 ]is
! s1 [" f" A7 u3 M% R, z% n        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
! \0 b" Q8 Q* }! o- O) Hdo7 g' S- R3 z2 |8 h  s  v4 `/ f
        Lan := rootfolder.Internal.Tools.AOLlanguage;
" [3 B# E5 e0 L  U        if current = @.Destination -- else return$ q1 P) h+ j6 {( q+ }! {0 V" U
        then
+ t7 e1 f/ \* h" v6 C                @.Destination := void;0 D8 p" q( U2 ]4 v: d! F0 j0 ]+ e- y% B
                if @.occupied then" @( g" e% L: z$ _, Z3 h- W
                        part := @.cont;
/ n7 Y4 r. ]! s# }8 K% N0 w                        @.transpOrder := void;
6 {% C. G5 Y& Q                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
% r+ }' \4 G( m( u& ^, @                                @,root.eventcontroller.simTime);
+ X0 A& M" H" J6 Q                        @.HasOrder := false;
0 }5 l1 x1 a; ]                        @.DrivingHome := true;
6 ]; S0 F( P1 `+ g0 X                        rgManager.tryToStartTransOrder;
  J- N4 n' f# v: K3 C4 B' x7 ?                        if @.Destination = void+ V2 O! E- J7 T  {% H7 T5 P
                        then -- no transport order for vehicle @
" ~) N/ |3 W. x; c: L                                @.Destination :=, X1 _0 F/ r) S( c  |
                                rgManager.nearestFreeStation(@,track.~);
/ G* B( q' k! L* k8 y5 _" z, E                                newDirection(@);   
- D% S+ Y- n6 P% N                                if @.Destination /= void then6 U' S* u/ L5 B; l# B
                                        @.Destination.NumReservation :=$ J4 h& T/ u; {3 p+ a( X8 e
                                        @.Destination.NumReservation + 1;
' z; J( z. O& @5 B" u                                end;1 ^3 L2 B, L3 a7 S2 q4 `; n, U6 W
                                @.CurrIcon := "drivingHome";7 V' t' ^# i8 m5 N" ~
                                @.DrivingHome := true;
: w/ |$ k. D: T) @, b! R                        end;( n  u& b1 ~8 c5 K4 A+ S
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 c( D+ ?" S) D5 |/ [2 I+ d                        part := @.transpOrder;
. |2 q0 k( w. `& M/ g  ]                        part.move(@);-- load part
/ Z  c" U4 I. _$ r" E7 m                        @.CurrIcon := "load";
4 P( _- O% P0 L5 U7 M% c2 _/ F0 p                        GlobalDistObj := part.globDestination;
: q. U4 H8 W9 z% X5 k/ O/ z7 @                        assignLObj := rgmanager.rgAssignL;: q3 U# L5 V3 d) ?! g+ E0 R. [  n
                        row := assignLObj.getRowNo(GlobalDistObj);
4 V0 ?* y& w6 s# L                        if Row = -1 then -- since 70# E! G! S" k' H! c
                                if lan=1 then$ v" d1 G( h0 `  n* c# [
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),9 L1 a& s# i6 C9 H% t# i
                                                to_str("in der Andockstation: \"",?.~.name,"\""));% J! K9 z  N4 I% C, U
                                else- p! W- h4 G1 t* ?1 L4 }
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 @# t6 P) x  M                                                to_str("in docking station: \"",?.~.name,"\""));                                ! w/ V% y) \, j% u! n: S1 x
                                end;+ F2 J5 g7 G8 O3 ^2 x; B
                        else
1 T' `, i+ b( {5 D" `5 b) W                                @.Destination := assignLObj[1,row];0 A, {) \% t" y- ?$ c
                        end;                        - D( \, K- A0 j8 [1 T) z) X
                        newDirection(@);/ I2 Q6 Z3 u/ \6 a, Y4 I3 o
                        @.HasOrder := true;4 j7 L% h3 V& `0 ]; G
                end;5 A6 `) P) ~9 M4 |8 B! ]
        end;8 G' z' ]' l, o
end;        -- of the method5 ?; k. r/ W, ~+ y) r
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 2 m$ I8 b$ I" `' n, K
& Z4 |  d2 K! g) j$ B
这是AGV_putin中arrive的method。3 q2 m! f% w6 X3 _$ |5 {

+ @# o$ ?! ~' L! `$ o( @) G当到达物料速度越高时,这个报警更多,
& M0 k/ K7 f, Z! \3 E! T可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。* R& B& V. q$ c5 H
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
7 h7 r" C! R# C' X4 g- i& t6 m9 p! X& N
另外一个小建议,就是move,所有的move都可以这样
! ]4 H8 |4 h5 f6 {9 \, ]$ q5 m+ @if not move() then debug end% I  `7 I" |' c% ~5 s; ]8 J. f6 E
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
9 t. \# w9 X. A8 l! m) mplant simulation中的free libraries有AGV模板,, ]" W6 A' E6 Q9 @/ \# l7 F
里面也有案例。
# _( @+ n$ B; x, f! @2 ^$ @我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。1 |: @, k/ j! }" d1 o% E7 N4 w
. Z- n8 w0 [5 T! j  s
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
" [) b0 t3 z0 T9 ]' O1 f0 k. }- N9 b* a; F
7 [, C' o) H2 d/ }0 Z  T那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ) ], y$ `- m4 d
这是AGV_putin中arrive的method。
3 |5 i* k9 V5 F3 Q) K9 y5 `+ X  O5 |! Q% F3 j) e6 O) {, O
当到达物料速度越高时,这个报警更多,
- `3 C4 e# p0 @0 e* \
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-1-18 19:22 , Processed in 0.022309 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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