设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6492|回复: 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'
4 \3 K) A/ i( w- ^; x7 t*/  J% o0 K8 |* R( {8 D3 {4 V2 O- ]
is) Z7 F% Z8 d! f# ^; v* U4 b9 I' q
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 W2 Z  ^5 i% @" Mdo6 f2 d/ l- @9 F1 [3 e& h7 {) _6 ~3 t
        Lan := rootfolder.Internal.Tools.AOLlanguage;
% o1 B, ~0 ]! z9 A6 V        if current = @.Destination -- else return( k  o) {$ _! u% O! w1 z* Q1 l
        then
3 n& _' y3 N. ^# \& @4 Y                @.Destination := void;
# h' N3 ?/ m- Z! u6 k0 w4 X                if @.occupied then5 o+ ]/ G: f7 T
                        part := @.cont;1 K  ]+ G3 N) |( h
                        @.transpOrder := void;
9 I9 `& a+ N9 r/ n- c                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 z# u1 U( c7 G
                                @,root.eventcontroller.simTime);' s( F4 K( n6 E$ c
                        @.HasOrder := false;1 M3 c* @+ e  b
                        @.DrivingHome := true;
" U5 W) H6 J. Z4 |                        rgManager.tryToStartTransOrder;
/ ~% W; t1 X) x0 ~9 z  t                        if @.Destination = void7 ?' @, x  I5 D6 \3 \; K
                        then -- no transport order for vehicle @
% i% d" g" _* O                                @.Destination :=
8 U4 q+ I  Z8 L6 n: P4 |                                rgManager.nearestFreeStation(@,track.~);
7 b$ m7 [, N9 g/ z                                newDirection(@);   
! o- y0 t' U" g5 }( O                                if @.Destination /= void then" F2 k' A3 b9 N9 W( u
                                        @.Destination.NumReservation :=
# k9 \- D, A, Y: d4 Q( J                                        @.Destination.NumReservation + 1;
; j: ?0 R: W0 E) i+ e8 g                                end;
2 Y- q5 F0 T" n1 d0 o                                @.CurrIcon := "drivingHome";
; K6 b# G. D7 @6 @6 Y* a1 e                                @.DrivingHome := true;3 v: v+ W2 i  \, l' D
                        end;; N9 x# U* h' A8 q. m
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station$ E7 }+ {( D$ m8 x
                        part := @.transpOrder;* j" f) G2 W, c+ g3 ?
                        part.move(@);-- load part
7 a" {' y, }# j4 O# m                        @.CurrIcon := "load";
/ i  l0 Y7 F/ }! `4 A& p' s                        GlobalDistObj := part.globDestination;
1 T  h7 c. h9 g                        assignLObj := rgmanager.rgAssignL;) ]1 A0 H) T7 y* O
                        row := assignLObj.getRowNo(GlobalDistObj);& Q2 N9 ^, d% T  J6 s% R
                        if Row = -1 then -- since 70: V( W5 N2 D' x' F7 @, N
                                if lan=1 then
9 Z) t5 u  k. V$ p                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),+ {' Y/ W4 V$ g& d2 y& Y" s
                                                to_str("in der Andockstation: \"",?.~.name,"\""));" p% F+ |. B" u; Z
                                else
8 d- y7 m7 X1 `+ e                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 }+ H7 |, L1 k$ _' `. B; @                                                to_str("in docking station: \"",?.~.name,"\""));                               
& \  k4 |/ ]! g                                end;6 M0 f2 g, f- R# U3 `4 F: C
                        else
2 T6 f7 r  e% ~, C# J, _6 L. z. L                                @.Destination := assignLObj[1,row];8 Y! Q7 |# e* X. L
                        end;                       
* [$ b# w; [6 _/ k/ }                        newDirection(@);
  y3 h6 b# o1 B' _' `                        @.HasOrder := true;3 m9 ]. B% c3 |% @" q% Z
                end;) \, U& I  n- R& M1 Z; }
        end;+ e& n9 s0 W4 u& n
end;        -- of the method
% X5 e4 F1 V" b
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 1 U8 ?: O! K( L) f& _

3 R! f7 ?, w" R4 V& I这是AGV_putin中arrive的method。) z8 Y% Q5 b" s% |. A+ e: P

  K. L( R5 O% p( }* G6 l4 w1 Z/ U" y当到达物料速度越高时,这个报警更多,
* K  P# {) x# ^1 M, c5 F  s可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
. E4 k( J$ L; d- c8 v程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?" o9 c; M% |+ J

/ u. h, M, l& ]4 k' m3 J# \另外一个小建议,就是move,所有的move都可以这样3 N( _6 y! a+ m+ g% V& S
if not move() then debug end3 y  S2 I5 f' ]9 I; }: }1 F3 j  \
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
- p1 W/ h. a* P% @& m( L, m6 Y; Yplant simulation中的free libraries有AGV模板,, z' X5 Y8 n3 }7 N
里面也有案例。
9 q% `" x2 T! N  }3 G我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。4 K, F' x8 N& [* [; z8 T! Y" Q4 P! h; Q
: Q. @+ ^( U* }0 ~
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
2 d# \) L9 i7 T: ?2 z5 \- X) D( K, }# R% V# m! Q- R2 I
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
1 B) c8 w5 b2 g( c1 q4 B/ b! U这是AGV_putin中arrive的method。8 Q0 W  n1 F' p( B6 A  R, d
+ v, K1 g: w# `1 I. c  O& G& P: Q
当到达物料速度越高时,这个报警更多,

5 `: ^+ k* s% e& ?) c0 Z3 N  G另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-9 13:37 , Processed in 0.016573 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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