设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9575|回复: 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'
" D* Q& m: g$ Q+ h8 j*// e# C1 T+ b6 D4 O
is, \1 r7 x! q2 O: u' O
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
- f4 a  U/ ~' Wdo. m( i# }2 _# O! X
        Lan := rootfolder.Internal.Tools.AOLlanguage;
4 T6 D, |1 m* g8 D/ B! w        if current = @.Destination -- else return: a9 @+ M/ \$ ~
        then+ w" h7 h5 m! B" c2 V
                @.Destination := void;
) I6 c6 v8 i1 d" ^; W! U                if @.occupied then, |2 {% G, f3 s  I
                        part := @.cont;, |. X% U# J! O5 k9 D, O" h+ c! s
                        @.transpOrder := void;, h. i- t' u5 q$ [$ z0 Z/ C0 o
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 d& w, ~; i; `6 z  _  T                                @,root.eventcontroller.simTime);
- y/ s8 j& J+ m& V                        @.HasOrder := false;
+ t: i+ K$ u7 V                        @.DrivingHome := true;
- F- a" r: u* ~7 f& K: e                        rgManager.tryToStartTransOrder;
( C, `8 u1 C7 G: d* A# D1 Z! o7 |. f                        if @.Destination = void9 e) d8 p: G; Q- w3 T; f
                        then -- no transport order for vehicle @: G' o) M- ?+ }# _9 W, {
                                @.Destination :=8 i! r& |/ a+ g% A3 _& X
                                rgManager.nearestFreeStation(@,track.~);" E( g" r1 }. U, G( {+ [2 s
                                newDirection(@);   9 n$ B; I3 c& [" F& ?' N7 r, S
                                if @.Destination /= void then
/ J% f4 b4 y# w4 e4 I2 R                                        @.Destination.NumReservation :=
; N, n$ f. H2 w  r# C5 B# d                                        @.Destination.NumReservation + 1;
$ g% H8 R. v# ?1 a+ C                                end;
4 X7 C& W1 i9 U4 V8 {                                @.CurrIcon := "drivingHome";( l; w% m( Z" z8 a( V% {1 R3 `# O, j
                                @.DrivingHome := true;
/ G0 L/ \- E& b4 _! E                        end;
. c  K3 B. B9 F0 \) a/ ?7 P                else -- the vehicle @ is empty, both vehicle and part are in the same dock station) u3 C6 P) P& x: o! h& _8 i
                        part := @.transpOrder;
) M: }, h9 {" o, I6 z                        part.move(@);-- load part
- G8 S2 w, E+ d5 d  r                        @.CurrIcon := "load";
: d. z0 i6 \6 x( ]5 P4 ?: N; ~                        GlobalDistObj := part.globDestination;
% |$ L& {" P4 Z7 w" U; r7 ]; a                        assignLObj := rgmanager.rgAssignL;1 |+ D$ b  K" f: c
                        row := assignLObj.getRowNo(GlobalDistObj);, |' [2 p6 o. G' x  N9 Q# A% G4 E
                        if Row = -1 then -- since 70! s* ?; ?" a/ k
                                if lan=1 then0 W* `+ n, S7 @2 c, e5 [, c7 i
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
% R+ U" z" e% h3 t$ G1 @                                                to_str("in der Andockstation: \"",?.~.name,"\""));
: A8 m+ k% K; ~* c                                else
0 J/ n' s" f: c8 u, X8 i                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),' B- j' T( r5 z$ w$ ~0 v
                                                to_str("in docking station: \"",?.~.name,"\""));                                * n, A& ~/ F. ?+ Q  n* X+ P
                                end;
+ a, \! r2 {  p- C8 C9 n                        else
# ]3 y& ]$ t- {( A4 K8 i                                @.Destination := assignLObj[1,row];
$ V8 W: L% n  q6 a( ?& O- Y                        end;                       
8 }9 E7 t) A+ V. w/ Q  Z  I& t                        newDirection(@);8 }' S' ?( Q0 a4 k' x2 _
                        @.HasOrder := true;: n' t7 J4 k. h; X! ~- j
                end;
1 y% B6 T* K) p* l! B        end;9 ^# G9 ~3 J  [: s4 @
end;        -- of the method6 T# w$ [0 q! {2 [/ r
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
8 ]( M# m( m7 d' C7 f/ b/ \3 t- b. `7 _+ Z. ?3 B: Z. L; j1 r
这是AGV_putin中arrive的method。
; A7 f, M) ^1 B! m7 z8 N. ^+ j0 s, A# u) L& B  C
当到达物料速度越高时,这个报警更多,( x: _& l( X  D+ F
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
6 e4 _  s7 c- E- ^0 H程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
7 I" t, i) j7 N% }6 Y4 N! [) q4 F5 b4 E1 X& l$ ?2 s# U
另外一个小建议,就是move,所有的move都可以这样
+ i5 u, E, ~; t( y- u+ ^0 Yif not move() then debug end
0 Z+ K) O4 ?7 {" K4 \& y. O3 T这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。8 x5 F7 X5 D$ y1 `- H) a# A
plant simulation中的free libraries有AGV模板,
  m/ w3 L5 s* Z  U6 F里面也有案例。: L; b9 j+ {- {" D" B' `8 @) @
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。2 f2 m: v4 J7 \3 F6 Q
9 ]! h* L* X9 U7 Y
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
+ X1 p3 I6 |8 u. J2 ^4 D' T: X# V
* s6 K/ p% l* V" }( o7 u那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
' c2 q0 W( M( \. i9 X这是AGV_putin中arrive的method。
" s# t0 \! ^2 ?( E- b7 t
; X$ h5 b* W2 M, f0 ^# Z% S当到达物料速度越高时,这个报警更多,
$ t+ a- p$ Z5 O+ Z" {
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-8-9 05:19 , Processed in 0.031790 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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