设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6938|回复: 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'
- g$ g, A9 v! h# j6 |*/3 F, B7 P' V/ g" p6 I- S0 n3 N
is+ N9 r% a6 z% Q
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;# C7 _7 Y) M5 E5 ^
do/ ~# y" L: ?7 U2 ?
        Lan := rootfolder.Internal.Tools.AOLlanguage;# @" }4 p6 y. n8 x& E
        if current = @.Destination -- else return
+ T  I" J# M! x& S& o        then0 ~$ g; w% y& l" N6 T  d
                @.Destination := void;$ L$ v; B* m) J8 N- ~
                if @.occupied then2 P# ]  T" j' @
                        part := @.cont;
+ V7 F& U+ c' e2 l; _                        @.transpOrder := void;
# ?9 w' y5 o4 {" c7 S2 V; b                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
; M9 i8 u4 }  [' {' r/ Q                                @,root.eventcontroller.simTime);: p" B" G: x1 B/ J
                        @.HasOrder := false;) P4 c* J6 w/ [" k& N: U& U
                        @.DrivingHome := true;( r3 r; w1 {. R. ^5 h
                        rgManager.tryToStartTransOrder;/ ?# S) T1 `6 S) Z; u$ U4 W, C2 ?7 X
                        if @.Destination = void
! S" n- Z: O+ Q4 V! b. v                        then -- no transport order for vehicle @" ]7 F6 s6 g4 q1 }; ^
                                @.Destination :=
4 z& X) B( T5 s8 I( H" h' ?. q                                rgManager.nearestFreeStation(@,track.~);
6 l7 u) k( {, u0 J! C  Y9 K                                newDirection(@);   
% ^! J, s5 O# ?" h* A3 ]                                if @.Destination /= void then3 Y# H' ~2 l- ~% ^
                                        @.Destination.NumReservation :=# q3 s8 ]- C8 q' ?
                                        @.Destination.NumReservation + 1;
' f& ^2 F0 @9 X. s  `, n2 Y                                end;* q3 S$ ~  Y( ~* U
                                @.CurrIcon := "drivingHome";
0 S' Y7 Y$ T& _/ I8 b4 c# k* ]                                @.DrivingHome := true;
8 r/ W, E2 b2 `! I% j  j! X                        end;
6 ?' u5 P' u+ D/ c, c                else -- the vehicle @ is empty, both vehicle and part are in the same dock station% q7 X( j/ Q. Y* S& a
                        part := @.transpOrder;
4 A- V7 w6 S2 H, T' P3 C; v) B                        part.move(@);-- load part  |' R7 ~9 W' `% F4 }% }
                        @.CurrIcon := "load";
$ T9 W# [6 ?" m                        GlobalDistObj := part.globDestination;8 E# F  ~5 J6 m
                        assignLObj := rgmanager.rgAssignL;
% ]2 l8 ~+ z" u  N                        row := assignLObj.getRowNo(GlobalDistObj);
, n8 M1 ?) v% _2 A6 H# D                        if Row = -1 then -- since 70# b1 d$ i( v" Z
                                if lan=1 then$ @: N  \9 N6 r$ F/ w" Q
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# N& @: z2 `  ^5 y8 W3 e
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
' T2 q: z0 G2 P8 c; P0 ?: p$ @# y5 D                                else" D% L: [3 L9 K7 \
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
  a1 |1 {5 t( d2 l" C9 I* g. @' ]1 \2 h1 c                                                to_str("in docking station: \"",?.~.name,"\""));                               
5 G5 f) T8 E6 x4 j- {9 |                                end;
8 Z9 g. C# k+ P9 D/ J                        else
. q: r- c6 Q" i3 y8 c( }7 U                                @.Destination := assignLObj[1,row];% {' S$ t* a4 T2 \
                        end;                       
. B0 |7 A+ a/ ~% ~: g' E- f                        newDirection(@);
1 D/ R% ?" e  t  g3 P  o                        @.HasOrder := true;
- j) s, n) n9 Q" n. O                end;
, P! e6 o, f" Z4 q5 W: r) L# _) K( c" o        end;
9 p' J+ |- @4 m( [# ~+ rend;        -- of the method" ^. U; j5 m& @+ E' P0 M+ s2 t$ B" w
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
" P( C6 I6 ?, ^; _; `- K- C" a* |. n5 |# N( }5 u
这是AGV_putin中arrive的method。' W3 W4 g8 M/ G) E$ i
/ ^! n" R5 H: g. h5 E, O
当到达物料速度越高时,这个报警更多,
* p9 a0 a/ \4 f  G  g" S. k可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。4 r% h3 o. B2 Q1 u6 J$ s" E7 n
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?# U1 Y( b# ?( b% R
% c. ~( H6 x" @7 J# v( B
另外一个小建议,就是move,所有的move都可以这样
; u6 r$ @, ~1 }& M* {- r+ W& dif not move() then debug end
5 _+ P' }, A! M% D. E9 d5 W这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。: {5 o, K+ P  K3 T* L8 T# d
plant simulation中的free libraries有AGV模板,
9 g6 \, ?8 [) h( K6 L% M里面也有案例。
9 `8 _* y, w: }. _0 K2 }我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。( K4 D( Y" J, ?8 g+ {
1 f! i* L4 C5 ^
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 2 t; o: T$ I8 w

" I7 N! N5 D0 F. f那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 1 C; |* x9 R' x: [4 V
这是AGV_putin中arrive的method。6 @7 D, k, a% L' _' a

1 R! ^2 g3 R9 ?! D$ `/ i当到达物料速度越高时,这个报警更多,

# |7 u) g  N" e! D8 e另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-7 13:35 , Processed in 0.016409 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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