设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8195|回复: 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'/ x8 v3 x7 K. Q+ h" A4 t/ N
*/. a8 g& m8 I$ }7 N- R
is5 V9 t* W5 m  \7 Q! T2 _0 X  Q
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;* D2 i2 R0 H5 \4 H+ d) M: h; |
do
! f' K4 w1 ^% s$ m        Lan := rootfolder.Internal.Tools.AOLlanguage;( p! d: P  c; S2 ~
        if current = @.Destination -- else return( e9 v( W/ S  g$ L4 ?
        then
& Q+ a) D' R6 L; n/ ]1 ~                @.Destination := void;
3 ?& L, F9 |% l: Q& E# |                if @.occupied then
3 a( O( s! l$ i% }% p/ B/ }* e: l/ s                        part := @.cont;8 X1 {/ n: D3 S7 |
                        @.transpOrder := void;
( h) D, L8 y& e" j                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
# ~1 F) t$ B& |$ ]( b                                @,root.eventcontroller.simTime);' P8 H% I2 e: p) K2 U7 R# }) X5 [# n
                        @.HasOrder := false;2 J2 K" _( R7 B2 _
                        @.DrivingHome := true;
( a3 p- z9 J( G2 O: G: h                        rgManager.tryToStartTransOrder;; N+ I* Q6 J+ L( G$ }
                        if @.Destination = void
: p3 ~# S5 H. ^9 y& P) C                        then -- no transport order for vehicle @, Y6 b" T% {3 ?! Z: I
                                @.Destination :=
3 ~% h2 s6 x$ i) t+ A                                rgManager.nearestFreeStation(@,track.~);
/ s, f! u. D" l7 x2 R+ i                                newDirection(@);   " u; [  l. }# Y, k  q" O
                                if @.Destination /= void then
# B6 W+ c. Y# ]- z                                        @.Destination.NumReservation :=8 @8 L& C& ]( k1 Q/ F- T! A
                                        @.Destination.NumReservation + 1;. e; H, V8 g$ p. a3 }
                                end;+ R8 N/ C5 w0 b6 U
                                @.CurrIcon := "drivingHome";. }$ U4 o% N: E+ z
                                @.DrivingHome := true;3 h8 M3 c, T# C
                        end;
! e8 u- X: J6 J+ |                else -- the vehicle @ is empty, both vehicle and part are in the same dock station+ z- j6 z" e0 }8 S0 D
                        part := @.transpOrder;8 K+ U, w/ ?+ O7 I
                        part.move(@);-- load part% c0 `3 l1 }# T. O6 Q4 W0 W2 k! c
                        @.CurrIcon := "load";1 |" _4 Z4 t9 Q/ t
                        GlobalDistObj := part.globDestination;4 i8 k" D4 G# ]( M+ h! L. T% c
                        assignLObj := rgmanager.rgAssignL;
% L5 H7 F: J) T$ x- G$ d1 |8 b                        row := assignLObj.getRowNo(GlobalDistObj);' g8 ?) Y! h) j/ x2 X# n: [
                        if Row = -1 then -- since 70+ Y, K8 u7 @2 k
                                if lan=1 then+ o  g  {; Z  u2 e+ h
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),. {) ]; r1 a2 J. h% f
                                                to_str("in der Andockstation: \"",?.~.name,"\""));9 M! U! e% N4 R! Y; I5 i" l
                                else3 {; B4 b/ {- e3 v& K; Z# C9 u* k
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),/ b! Y6 m2 {' k- Z/ N; R. ^
                                                to_str("in docking station: \"",?.~.name,"\""));                                : G$ w/ q) P+ d5 K
                                end;, A3 M: J2 h/ a: O, K
                        else( s' a. E& h0 N$ V" ^" P! x
                                @.Destination := assignLObj[1,row];$ P/ l/ U' L+ I
                        end;                        8 N) W! s; l1 W. f/ U" m
                        newDirection(@);
: m( T, I; @+ u5 X0 ]& z, ^4 C                        @.HasOrder := true;
1 ?5 r  D. k, x" n  y( Z1 S                end;
  r/ I7 [$ T+ s+ g. \9 D/ ], A% g% d        end;
2 _8 T, v! @6 _8 w: Rend;        -- of the method' [% p. ]% e# V. k- k# S% ^
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 " \2 n% N; n, _! z+ u

0 K4 C/ t+ R3 X4 {1 X: c* i2 d0 G这是AGV_putin中arrive的method。1 Z% U0 O5 t: I) @6 R) F* C, V  Q
4 o4 [8 o; \+ T+ g1 _
当到达物料速度越高时,这个报警更多,
9 _  f5 }* y2 x4 R9 L" v可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。" J0 V: X$ q! }. g0 l
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?+ a& Y5 ~6 m% U% t% Y
. w1 O) c& W; c
另外一个小建议,就是move,所有的move都可以这样
  a% W) ?0 i* j! K4 d: ?if not move() then debug end
4 w4 i5 ]7 L6 i# k这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
4 x+ m1 p- G( _plant simulation中的free libraries有AGV模板,
. b: _5 {# k0 m2 h% u. a3 |* G( {3 {& l里面也有案例。
- R" o( W9 T4 W我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。3 ?  H! b- K4 K: O7 [+ X

+ g. q8 U" Q0 M3 @  A7 B# I" N我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 ) l: W: t4 |- z  J' h$ C

3 K9 u3 K! N4 y8 i& v7 f2 S那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 6 d" ~, w  U+ t  C  @; d
这是AGV_putin中arrive的method。) e- H% z9 ~* J% ?$ c
# a/ N9 E; d) Q( V
当到达物料速度越高时,这个报警更多,
- x+ G# L8 F" [* m4 a4 |  `. G" l& }
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-20 04:50 , Processed in 0.037112 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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