设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9038|回复: 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'
1 O/ k8 B' d& ^' N+ ^' P% x*/
% k9 U# P0 `% U% Y6 a& ~0 Zis: |, m) p" G1 S/ k9 }7 M+ f* q0 {
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;, R# t) k, l& v: D% R+ A& `$ c
do
& C( v6 o" ^) z" H        Lan := rootfolder.Internal.Tools.AOLlanguage;  j2 g) V* y+ F0 y9 L
        if current = @.Destination -- else return4 Q* y( \0 J+ N2 v
        then
" ]& o! B* u' A* p" l                @.Destination := void;, |3 [# J' K! ?* ^- u
                if @.occupied then2 Q+ ^9 E1 n; }1 d) {/ Z6 Y
                        part := @.cont;" p2 P8 |! t; W8 X
                        @.transpOrder := void;/ e1 Q  v) p) A4 P, Y+ B% p
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# L+ L% M/ D4 X/ b: L' h: t6 E
                                @,root.eventcontroller.simTime);% G( o" @$ u% V
                        @.HasOrder := false;
) r7 b7 I3 W& \6 |5 k                        @.DrivingHome := true;) W! @# R0 {$ j5 L
                        rgManager.tryToStartTransOrder;' T2 Q8 p" y! [+ Q. i' L
                        if @.Destination = void7 r' H2 u+ U9 w6 D  @  o  B
                        then -- no transport order for vehicle @
# e! A2 u9 j" [$ L( H                                @.Destination :=0 E& Z4 p" ]2 Q+ ^& K# @) E
                                rgManager.nearestFreeStation(@,track.~);& B, u8 V  M( I* Q
                                newDirection(@);   9 K) b: q4 O1 p
                                if @.Destination /= void then
2 Y7 c  H% o- o6 p" [% {                                        @.Destination.NumReservation :=% q$ }$ l  I- k
                                        @.Destination.NumReservation + 1;
+ O7 C8 {. R8 W! H                                end;
, ?2 a# Z, q& {% H: r1 o' J                                @.CurrIcon := "drivingHome";3 n! i. G" }2 L& B$ J- n, U/ ?
                                @.DrivingHome := true;
3 }6 l" V( b# u. B. q; w                        end;
' x9 j2 |& Z# n8 w                else -- the vehicle @ is empty, both vehicle and part are in the same dock station1 _2 e9 N8 G+ ?
                        part := @.transpOrder;
) |  ]8 e) r# K; n                        part.move(@);-- load part7 |- K  e; d% l$ A8 {/ ]8 J. f+ ^
                        @.CurrIcon := "load";
5 g) W- u2 J1 I% \* ]. g                        GlobalDistObj := part.globDestination;
) Q8 C. j- R& U                        assignLObj := rgmanager.rgAssignL;/ O3 ]+ g2 d* J0 \/ R# T
                        row := assignLObj.getRowNo(GlobalDistObj);
( o: l- n: ^  B# `                        if Row = -1 then -- since 70/ m& x7 H" E' w. u
                                if lan=1 then
0 J$ T; |/ f- t9 y/ w( o$ `                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),  Q- T# e1 u" }) F* l7 A
                                                to_str("in der Andockstation: \"",?.~.name,"\""));  K" x5 A" \0 S& Z5 C
                                else
5 u& H6 Q$ F# f9 Z7 a                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
* v4 L0 {: c) i* `, f" Z3 o) l                                                to_str("in docking station: \"",?.~.name,"\""));                                ( ^! a8 l* @- G* K# z
                                end;
$ C; L. u2 j3 [/ C                        else) f( ]& w0 q: [7 t0 r3 Z! ~: ]
                                @.Destination := assignLObj[1,row];
2 e' ~7 \$ k5 U0 H                        end;                        $ z4 Z6 a& ~& B' C; X
                        newDirection(@);
) P. Q" @# s* Y8 ~9 `                        @.HasOrder := true;
$ x% D2 D' p( m) i8 H                end;
0 b- I3 t% F7 `2 h- R5 `1 x        end;
1 P. w: u: U5 Xend;        -- of the method+ t' E5 ]- R3 Q6 D
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
- B, O' X0 {3 E2 m9 v& {1 m* N* z
这是AGV_putin中arrive的method。, Y3 ?9 ]' c: _3 Q! X6 n" A5 s8 O
4 w9 f2 [+ P3 Z& z
当到达物料速度越高时,这个报警更多,
& B( ?" r/ e2 `1 V* B( v- ~0 i可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
, d1 f) v4 @- i; V, P4 a程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?3 T" ^4 Y4 e3 N/ M

2 Z; G: Q8 B3 a" y" ?. [另外一个小建议,就是move,所有的move都可以这样0 Z  ~! A% K( `3 v% ^
if not move() then debug end
4 R6 H. n: o/ [. x- K" C  f+ ^( o3 Q! d这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。, {7 a1 l" N/ m
plant simulation中的free libraries有AGV模板,
7 i6 ^$ k4 X) `, P( R# }- @里面也有案例。6 _( K$ ~1 \5 n. H& H) D9 J# t8 v
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
% w# G8 N: h6 R
7 `- z1 K0 U' ~0 u5 ^我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
2 a" v  `, X# _/ w/ }
* U/ l/ F/ ~) Y7 I; i: y$ a+ a那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 % P6 w6 ?5 M. }9 A9 t0 T2 N, Q1 D$ Z
这是AGV_putin中arrive的method。
6 ?& v5 E. c* F. U0 N& J. P
# I. r* t. O! J2 Y5 S! V- l当到达物料速度越高时,这个报警更多,
2 g4 C! E$ {6 u7 O$ t" s6 p& A" h
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-10 02:51 , Processed in 0.017433 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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