设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5888|回复: 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'. s# }  ~& n5 n
*/3 g8 w1 R9 M& e! Q7 J) f9 M. f
is% e! }( o( o7 ^4 I
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;% w9 n) f: i% l: L0 ~, X/ z8 F
do6 ^5 {; d! x( r9 @
        Lan := rootfolder.Internal.Tools.AOLlanguage;
6 [' K4 R) S& j4 p3 x/ B% r8 }6 E        if current = @.Destination -- else return
7 {( j4 Y$ |3 j# E( [, y& U        then. k& y0 I! n1 f; ~6 u8 R
                @.Destination := void;
" B/ x6 q6 h: W4 B* i- r. b6 k                if @.occupied then
! O* ]6 B  Y  ]                        part := @.cont;
3 a: p( G  Y7 T+ ~: X: V5 q7 w                        @.transpOrder := void;
" |+ g, c) B9 G. @                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 t; D2 `+ a, j0 s' g% A+ P                                @,root.eventcontroller.simTime);
, y# q6 Z: \3 _( t2 P                        @.HasOrder := false;# g& _( ~8 H& i* `' u% U
                        @.DrivingHome := true;; K0 R$ o3 R, x  w& D
                        rgManager.tryToStartTransOrder;3 n3 b1 X- U+ @6 E0 T
                        if @.Destination = void" K" P$ F6 t- q4 y
                        then -- no transport order for vehicle @( p7 ?  |: E; j0 w) ~9 q
                                @.Destination :=- M& ?( S, N) ^
                                rgManager.nearestFreeStation(@,track.~);
; B$ V  R; X* y4 _# r" u$ s                                newDirection(@);   5 h' A# O( w! ~: c0 f8 v6 {: G
                                if @.Destination /= void then% |& a* I  D5 y' S8 O  n
                                        @.Destination.NumReservation :=) j5 z8 B0 V# m0 ?4 G( j2 d
                                        @.Destination.NumReservation + 1;3 ~& f4 o3 `2 I1 Q: R
                                end;
+ d, c+ I  n/ |4 V* }( R9 Z& ]                                @.CurrIcon := "drivingHome";
7 \; C* Y& s% u                                @.DrivingHome := true;8 N$ f. c2 h1 G( ^4 i' L& ]
                        end;
) @1 {! Q4 d) E! m$ F9 ?                else -- the vehicle @ is empty, both vehicle and part are in the same dock station0 Y8 y6 O5 P7 ~$ k7 X8 T
                        part := @.transpOrder;& a6 j4 A' v8 A- `0 G5 y
                        part.move(@);-- load part5 c! R, D7 Y( @) L5 \1 D5 Y& b; Z
                        @.CurrIcon := "load";
0 }6 |% i9 f* `. N% @8 L                        GlobalDistObj := part.globDestination;* T0 X$ F# Y/ Y
                        assignLObj := rgmanager.rgAssignL;. U( W: ]9 j/ N1 T5 N0 Y5 W
                        row := assignLObj.getRowNo(GlobalDistObj);
% u- x( e# K8 p" P2 A. b' C                        if Row = -1 then -- since 704 u5 a$ h7 G* [5 [
                                if lan=1 then
: S3 W0 M5 O1 h' G                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
, d) i4 O% X9 C9 @( ^" k- _6 J                                                to_str("in der Andockstation: \"",?.~.name,"\""));
; h7 r1 D+ H0 ]" o( }6 x9 C                                else( @  x% F8 Y7 s- S/ y0 }
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),/ t( o' q& V' g8 y$ S5 w
                                                to_str("in docking station: \"",?.~.name,"\""));                               
. X+ m3 w* J: [* h                                end;) o: ]. ^3 S- q$ ]& C  T  g% y2 o
                        else
$ s9 ~6 r% `) b% c0 r' c% a0 Q, c                                @.Destination := assignLObj[1,row];1 A6 t+ X/ Q1 [
                        end;                       
9 [* U: E  b, @* Z                        newDirection(@);
0 T9 {* c: e- \: p                        @.HasOrder := true;
8 T; D5 B5 n( o" f                end;
+ c: }' ^$ t4 |* W        end;" s4 N/ \2 b# ~9 H, _
end;        -- of the method
3 b7 ]1 |8 @# h* Y  K
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 9 @% H( N% o( a' s/ @. \

( ?3 m% ]) i- G/ K9 C( A7 `9 h/ X这是AGV_putin中arrive的method。
( g" s1 f( k& ]( A( K' \  A! [* C, G
( F# T( k) b6 W1 I! ~/ k1 a- v6 v当到达物料速度越高时,这个报警更多,- _' C; e8 I, z6 k
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。8 I; Q" G; Y0 y! Z6 j/ \
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
# K0 \: K* T# l; H8 p+ p9 r# E7 ]" h4 h. ]& n/ p
另外一个小建议,就是move,所有的move都可以这样
! P" D& m' p- Z5 M$ Sif not move() then debug end! K) [* v# Q; q2 ~8 n* J2 s. j
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
, l* Q5 D% M2 z4 z) m+ {plant simulation中的free libraries有AGV模板,$ D# x# O! b! N& ~+ q
里面也有案例。
! A. p9 I% A8 A8 K我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
, J$ O# Q; ?# ]1 I: ^  g0 R8 k
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
2 ^% x/ Y" L) F+ h; m' J) h
( X7 N+ |5 v+ a' w! }那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 6 h  Z- h; f+ o; G% g
这是AGV_putin中arrive的method。8 Q" k: ]9 h) g( J
; W0 T5 L2 C6 Y' [
当到达物料速度越高时,这个报警更多,

- |( g/ s) f5 A3 g$ @. H0 ]1 h另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-12-30 03:31 , Processed in 4.163511 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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