设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9084|回复: 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 d+ N8 d' {) _  Y1 C$ n*/
3 _' P" b& o9 W; R% ris
6 X& w) P1 ^; v+ K; k        part, GlobalDistObj, assignLObj:object;row,Lan:integer;* R& M" _( ~+ Y5 y4 O. c9 a& I& `! X
do; U5 h* J% n8 O  S% C9 [
        Lan := rootfolder.Internal.Tools.AOLlanguage;
0 z4 }9 w, o% G* Z8 k' s. @2 _        if current = @.Destination -- else return
0 U& i$ c" ^- t" o6 k        then5 R1 R4 X& i# @/ x3 G
                @.Destination := void;, t- L' t, P8 b* b  e
                if @.occupied then
+ n- @4 E' g% ?( {; `! ~                        part := @.cont;
8 R8 M$ b" A2 g6 i1 e                        @.transpOrder := void;6 o0 r" U. \/ }; J3 c
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
7 W) }% `8 `( z                                @,root.eventcontroller.simTime);
- |9 J( F2 A& U- h                        @.HasOrder := false;
4 q" A; l. O/ D9 A( Z# V& X                        @.DrivingHome := true;
# A' a! e) [6 I. a$ h/ P7 O                        rgManager.tryToStartTransOrder;
- P6 b) W1 o  P! }6 U                        if @.Destination = void; Y* ~. L# M" h, s5 D' m/ \
                        then -- no transport order for vehicle @1 ^* E+ r9 M) Y% f
                                @.Destination :=
9 g# m2 z4 r" R3 \                                rgManager.nearestFreeStation(@,track.~);
6 d4 \3 v5 X2 m# \& v5 w2 x                                newDirection(@);   
) R+ i; C5 c7 o% V7 z6 T) t4 ~                                if @.Destination /= void then" m% D1 X4 H, r" I- S. v$ Q5 P
                                        @.Destination.NumReservation :=
0 F5 i0 b" ~4 \/ X1 f1 Y- y! x% ]                                        @.Destination.NumReservation + 1;3 V6 [/ s+ S& J6 ]" u
                                end;
0 M9 b. Y9 H0 x! S9 a- p, n                                @.CurrIcon := "drivingHome";8 q6 g0 H( u( O
                                @.DrivingHome := true;
4 r% F) p3 Q" p; G0 @                        end;( M, u/ m& C# c9 P" [- T
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station6 j, D3 o8 c6 `8 b! G0 D
                        part := @.transpOrder;
; v  [: Q  b; x8 D8 W                        part.move(@);-- load part) R. X5 j4 u2 A- [4 ]7 p/ M
                        @.CurrIcon := "load";4 N! O% `! j  P# P. j! a" a+ H1 v( B
                        GlobalDistObj := part.globDestination;
, }# \4 f) D. B* o" l2 I1 k9 S                        assignLObj := rgmanager.rgAssignL;
3 d! @* g& ]# v& ~( k                        row := assignLObj.getRowNo(GlobalDistObj);
* y% k: X' z, n: u7 L6 A                        if Row = -1 then -- since 70
) G; e) w- c, v                                if lan=1 then/ X; Y8 y1 B. ], q
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
4 c* b! G  m+ g  {9 c! i7 f, t  z                                                to_str("in der Andockstation: \"",?.~.name,"\""));/ H6 q) C& Q) A/ H+ r, \  G
                                else
1 E; }/ }4 a' s) Q. t/ c: W                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
1 w9 m; v; M( v2 _* L2 ]                                                to_str("in docking station: \"",?.~.name,"\""));                                ' j+ b; A* j' C8 ~
                                end;
) ^0 f4 e" A+ i/ P                        else
. R' v! N% U& V; A# j2 g, m' ^                                @.Destination := assignLObj[1,row];
7 z, d0 N" }3 J! B7 v( ?0 h                        end;                       
- r) A; k9 i  O% I5 J8 h1 y                        newDirection(@);
4 l$ }. E3 H3 ]- o                        @.HasOrder := true;, H4 r( l/ h" ?2 Q! v+ n* |, O
                end;
. S# [% ?) g) \8 m! E3 v+ m- ~        end;
/ }4 W  U+ E% h0 i7 dend;        -- of the method" F3 P, U! O" b& C" C9 w
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
% p% r0 Q7 J; E0 ?6 }3 _- J# [0 d# B6 n; ?
这是AGV_putin中arrive的method。
5 V" e' K( S! L; E6 X7 V4 B3 C+ v: J  Y9 S. |
当到达物料速度越高时,这个报警更多,
6 Z) ]& ^& K0 l+ Y- f; s可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
' d) b$ C2 J* r: ^( v% J程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
8 d4 w6 H# c! _; B- ?1 p/ a# ?: O- ^1 M$ O' c) W; j$ O
另外一个小建议,就是move,所有的move都可以这样
& D  c7 Q2 H8 k9 v- ?3 _: \if not move() then debug end* @9 i$ B; z# f. p9 A) K; y2 v; }
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。* |& t, E/ x8 |. ?( }, k; n* `
plant simulation中的free libraries有AGV模板,
6 H4 w8 x. g6 v" n0 o里面也有案例。, a" U8 e' {3 c, c1 `8 ~# I) z
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。+ K0 G) t8 C: e) k/ Q( [  |
1 E( M, J0 u* T& W0 a; c# q
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
! j% H& `9 R  r) G+ h1 W
) R. M* E/ @' Q那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
" Q; W; K2 ^; P& J这是AGV_putin中arrive的method。
% w0 Y5 _5 C2 [6 e1 l- a4 f
: d; t% P5 z4 k$ f: O+ j) f当到达物料速度越高时,这个报警更多,
  X' `1 z3 f7 a8 ]( t  H
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-12 16:06 , Processed in 0.015536 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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