设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9494|回复: 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'
3 w( }6 y# H% ~*/
3 s0 U3 t$ K4 x6 Qis9 F3 Z/ X9 ]2 }7 `. T
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
% e. W" u) \% R* ido" Q  ]; m8 q/ L0 ?# T
        Lan := rootfolder.Internal.Tools.AOLlanguage;
0 c! S/ J1 e- i  n' D& }# c/ V! L, U        if current = @.Destination -- else return
: w, Q& P" s; P$ o) o" c- H        then+ |( ?" f: Z6 i8 R  {
                @.Destination := void;1 v/ R  J0 v7 k. z/ n8 L9 [
                if @.occupied then
& N' o0 T- K/ A6 p                        part := @.cont;: `. `9 o3 K+ w* L8 E* U! C8 g
                        @.transpOrder := void;5 z+ v/ c/ a) I# J  S' e
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
' Z) }( T: c  F9 }- _1 n                                @,root.eventcontroller.simTime);
; Z1 U% o" Y& p  ^1 B" t8 W% r2 K                        @.HasOrder := false;
6 D/ d2 u- t, p3 o; s; @$ c$ [                        @.DrivingHome := true;4 G" f- B0 D1 L' ^# A
                        rgManager.tryToStartTransOrder;; A8 i* h0 Z5 m2 N& b
                        if @.Destination = void+ L# n% Z% l7 N
                        then -- no transport order for vehicle @1 b3 y0 g( _2 ?$ D# l$ p7 @2 }
                                @.Destination :=
  {( C- a+ P6 c  B9 a: `% k3 _                                rgManager.nearestFreeStation(@,track.~);
% B, j8 ?" f' t" }5 O, i                                newDirection(@);   
6 o/ H# K  L# j+ S- x4 u! L/ X                                if @.Destination /= void then
4 O4 b# r0 f* A9 M, i6 ^2 X# q                                        @.Destination.NumReservation :=
1 g, a- }. M: S# s/ _                                        @.Destination.NumReservation + 1;
9 {' p0 `0 G, |9 H+ ?                                end;
; v% j( Z0 }8 k; H$ S6 q+ g                                @.CurrIcon := "drivingHome";2 q: S* q: e$ F& E& P/ T9 s( T% l
                                @.DrivingHome := true;5 U0 D: p( M$ K# x+ L: H5 l
                        end;
, D3 _- {* @; L' y5 A7 o8 K: X+ K                else -- the vehicle @ is empty, both vehicle and part are in the same dock station* r3 [% L( I) g8 B
                        part := @.transpOrder;
7 g6 a; @* k& w# W( O                        part.move(@);-- load part
3 f% p8 _" w* O$ U/ D; E                        @.CurrIcon := "load";
& A5 A/ ?9 v  V$ t# P( f                        GlobalDistObj := part.globDestination;
) n2 v3 v7 w3 m) y$ m                        assignLObj := rgmanager.rgAssignL;
: \1 f( g; r5 [0 G' }                        row := assignLObj.getRowNo(GlobalDistObj);
" D* o5 O8 O4 Q                        if Row = -1 then -- since 70
) J# @1 \' Q- _! S, I                                if lan=1 then
; [; C2 x' m: g( {                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),1 i+ ]* r. m! q# Y' y9 ~
                                                to_str("in der Andockstation: \"",?.~.name,"\""));& u) J( f5 A6 V3 f. e% f
                                else' R6 a8 L" u; \9 p2 g
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; j  w2 d, C/ ^# [
                                                to_str("in docking station: \"",?.~.name,"\""));                                6 J7 \6 y/ D, c9 w4 D
                                end;
* X, ^% @5 s( M( f0 D, o$ _- l                        else7 `# [/ n9 h  V( G" A& |
                                @.Destination := assignLObj[1,row];6 O6 x; e. A: g( s" ?! F
                        end;                        , v8 e. |; n, F6 ]- R7 c# R8 Z: w
                        newDirection(@);
. L! U! W! C2 U2 a7 H                        @.HasOrder := true;" L5 u- D1 ^* A
                end;; I" b# m1 }& @* ]: V$ W" Z
        end;
0 T" F4 V+ E6 h$ Gend;        -- of the method
1 w7 V" [% f& {2 n
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 / g" W6 D) v/ M( c7 G
% _1 J2 f7 i7 I& `- G2 K$ h2 B, ^
这是AGV_putin中arrive的method。
* _( X8 I6 N, e& G* _. L
9 e' a/ N- J1 t; @4 |# C  j当到达物料速度越高时,这个报警更多,9 _0 Q) W9 m4 z6 p: D
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
/ o# v( [% C1 t) x$ z* ]3 V程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?" u. v. h" M9 t. H" C* W/ A2 p$ L

  h: [. R( A- B7 s+ |' a另外一个小建议,就是move,所有的move都可以这样
+ ]  d" m6 V0 L5 t. s; q( Hif not move() then debug end
2 l. c. u1 q5 b8 U这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。: {6 x0 U8 D, T: x
plant simulation中的free libraries有AGV模板,7 e! ?  f/ G3 F
里面也有案例。
! a" i4 F! \( N, j2 c1 C我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
' U, `. o  Y. U0 X. Q4 d* F/ q4 K7 ?/ h9 u- S" A) M. F* @
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
% b# \) `0 ]' _+ J* s- G: `* w  v  ~% n% ~" A% I
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 % B/ w) I& m7 \3 w3 r
这是AGV_putin中arrive的method。
& D3 y' {1 D" x% j9 e, a, m: N: ]' `; d/ @
当到达物料速度越高时,这个报警更多,
% ^( Z' ]+ y, a) ?9 |% I
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-8-4 06:38 , Processed in 0.022157 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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