设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6191|回复: 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'
: l. X' {) X. j0 G*/9 Q; l0 i: [& N/ M) B
is4 }8 c" u# b6 A; j
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
5 n4 Q7 H7 n: W) _0 t, w8 ddo$ q5 G5 \, P) N8 [' J5 Y7 d
        Lan := rootfolder.Internal.Tools.AOLlanguage;/ c4 [; ?, W, G& [4 ]& E
        if current = @.Destination -- else return4 s% |1 p' o. z+ d: }! [% \, f
        then5 T+ \3 Q8 H$ _' b& I: Z
                @.Destination := void;
& a( z& F- _5 T, i1 [& z                if @.occupied then
( \+ V* H9 T/ i  @+ i( y  b3 @                        part := @.cont;
; c( S: l  p% f7 r4 }& S7 e                        @.transpOrder := void;
  C+ S4 d3 B/ w7 b2 E: X                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: J, c+ S) L  D" d1 ~. I& g3 B                                @,root.eventcontroller.simTime);. H# b/ l/ K5 y" V* _5 M
                        @.HasOrder := false;
. C* H% N. n9 ~( Q) U1 `: u                        @.DrivingHome := true;
1 W2 @5 m$ C1 Z! ~+ [8 q  C                        rgManager.tryToStartTransOrder;
- `5 ?7 O) h, A: @6 }                        if @.Destination = void
. u5 r& G* f" \1 L3 L                        then -- no transport order for vehicle @) n  C! `( U8 T2 J, Y
                                @.Destination :=7 U, M' W% X  s9 N) E
                                rgManager.nearestFreeStation(@,track.~);3 x! `/ h/ V& V, c& c7 V+ }
                                newDirection(@);   
$ P# a( u3 |8 j5 \0 h5 l+ f7 G                                if @.Destination /= void then
, v! j4 j! J7 a9 k! c# S                                        @.Destination.NumReservation :=  S' h% |: @* }& E( q2 W
                                        @.Destination.NumReservation + 1;
, O9 Q- o( Z, s7 m: h& g                                end;) S& M( R; @% K! K
                                @.CurrIcon := "drivingHome";
+ y8 |. G0 K/ D& y                                @.DrivingHome := true;
1 D6 G" P7 q* {, g- l0 X& b$ p                        end;
- _. K' G' A3 M; ]6 w& L, p5 _                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
  I4 U" c* z% A. a  Q! U                        part := @.transpOrder;
4 e0 m9 v6 r; I* m                        part.move(@);-- load part# [2 A1 m2 w1 r# u1 u% G) W
                        @.CurrIcon := "load";
1 ~; J+ U! r6 d( N. `5 M+ m1 f                        GlobalDistObj := part.globDestination;
' {  S" B8 Y. _' n9 t% K% x& D* F                        assignLObj := rgmanager.rgAssignL;! [2 S3 r8 a  o! j
                        row := assignLObj.getRowNo(GlobalDistObj);
+ {3 |  W3 a* [( g2 K                        if Row = -1 then -- since 70
3 X: `3 K3 C* r% W                                if lan=1 then
$ t) n( Z$ z7 u7 |5 h                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- }, H7 @' Z5 T
                                                to_str("in der Andockstation: \"",?.~.name,"\""));' ~8 i+ n% G6 f* n7 x- L; V
                                else, G( D7 j, Q/ n1 |! B
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),0 K0 i" \2 v& V7 `% |5 }3 Y  \: ]  l
                                                to_str("in docking station: \"",?.~.name,"\""));                               
& W- J4 F# p& `                                end;
1 `; e  Z; D7 H# u% K4 [& I. U; d                        else7 `" l* C( W4 N) m
                                @.Destination := assignLObj[1,row];
' X* g0 y, m. w! J. s7 Y                        end;                       
% P" ?2 w0 F) A" M                        newDirection(@);
% c# i: u! b( k                        @.HasOrder := true;) x2 ^, C, S% w% e# U
                end;
7 Y0 W+ v) s  b# a        end;
7 x$ U& l* x/ b3 R4 p# K, \" ]end;        -- of the method
# b/ _$ R2 r" F0 |% Y7 P7 s4 p
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
2 O1 ~7 p: q  C/ c" }
1 |& k/ j6 z' n& C7 |+ y% d( @这是AGV_putin中arrive的method。
2 ?# K* `$ C1 h  I/ C1 G" r, F5 g( K& b% H
当到达物料速度越高时,这个报警更多,; {3 Q! w4 O4 D$ U
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
8 z, m( _8 O: ^程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
; |; ~* j: R7 _# w& j& A% u9 ?. Q: y& H* Z# x9 A, J
另外一个小建议,就是move,所有的move都可以这样
- `  x+ j. ?5 ~9 t9 pif not move() then debug end
4 K* q* k( w  n, c7 x5 _这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。* L/ o3 @: m5 `4 s6 \& I" q. v
plant simulation中的free libraries有AGV模板,, h) K$ E/ R' w
里面也有案例。
& x1 G" l/ v  E' Q; i我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。3 b/ D# _- B8 C, z# A

4 w! C* N2 t6 p+ V; U我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
" h* r2 Y% ]% a- @' S# C% c
+ Y+ i$ E' ~- }, a那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 & a& @! W/ G3 I' ?' V/ G/ ^
这是AGV_putin中arrive的method。$ ^8 r4 N5 [% O  a" v# j
( F+ f  E; Y) x4 c
当到达物料速度越高时,这个报警更多,
7 k+ q+ C/ ^! f; j
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-1-24 02:43 , Processed in 0.022994 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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