设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6332|回复: 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'
8 U& }, N: P& K, c+ Y* {% @- ?, y*/' B8 M4 ~+ r+ ]! J
is
6 d! b, W) _0 O* _3 V& m" a        part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ @  l& Y" X) x4 p
do4 r! e2 z& O$ A  I* v
        Lan := rootfolder.Internal.Tools.AOLlanguage;
* z: h/ T! W0 z0 [7 C        if current = @.Destination -- else return* Z9 \! Y5 |4 N% P
        then- p! O( T6 Z+ [3 U3 {5 B
                @.Destination := void;
9 @! P! i' l1 c7 Y1 G% F                if @.occupied then
3 P3 P7 H1 v, f; P7 N4 x- a  f                        part := @.cont;
2 }; i9 ?& J9 [                        @.transpOrder := void;
. c/ O; v  [% S) y# q* T                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# I5 {* C: u0 \+ l' ]
                                @,root.eventcontroller.simTime);1 I6 |" Z3 u: V8 C0 G& r: L6 ]1 J
                        @.HasOrder := false;
, ?. p* _  f- `. v2 A! V                        @.DrivingHome := true;
; j% m" [* V1 Q8 d3 v                        rgManager.tryToStartTransOrder;
/ a. C0 r( a; D; \; b5 x                        if @.Destination = void, J5 U7 k9 Q+ |4 g/ J6 @9 p
                        then -- no transport order for vehicle @' E) X7 ^9 J; d) |
                                @.Destination :=
+ W" y0 J$ n4 b                                rgManager.nearestFreeStation(@,track.~);/ @/ K; A9 q3 r& {
                                newDirection(@);   6 }- d; g  ]8 k# o! f1 U
                                if @.Destination /= void then
5 A# n$ q" ?3 R+ x; j4 S! U  t                                        @.Destination.NumReservation :=: |' Z7 Y- I8 H" n, d# p6 f3 Z
                                        @.Destination.NumReservation + 1;$ Z, [2 m; s; T% b; L$ d7 w: O
                                end;
( m* U3 ^; ]5 L                                @.CurrIcon := "drivingHome";# {& G4 U. R- A, g; E8 ?
                                @.DrivingHome := true;) ^2 g- ~# P7 D9 I. L" e0 G
                        end;
( H. B6 I, V/ g* E/ R) n                else -- the vehicle @ is empty, both vehicle and part are in the same dock station: n" k) ?% m# {* r3 L. l9 c& {
                        part := @.transpOrder;
! {8 E/ Y# a8 a                        part.move(@);-- load part
7 K4 k7 A: V; U- S) u. M                        @.CurrIcon := "load";0 x, i8 v5 X1 C% \" ?4 X5 {6 O
                        GlobalDistObj := part.globDestination;
6 @9 M/ |0 b! x                        assignLObj := rgmanager.rgAssignL;
0 @& ^8 [7 z- F0 a                        row := assignLObj.getRowNo(GlobalDistObj);& F2 ?, R* w+ U! m  r% ^! Q
                        if Row = -1 then -- since 70+ @1 t3 U& O  l# d& j* M
                                if lan=1 then
! U( f0 I/ P. R& I9 }+ D$ n* \                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- G7 t2 N9 y5 I" O  p( E" C) M1 k- Y                                                to_str("in der Andockstation: \"",?.~.name,"\""));* \1 w. l0 L* Z# z5 b% k1 h1 V
                                else6 Y- r$ }- u( k! _5 V2 A# }3 k
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 u! p% o4 _; u. {                                                to_str("in docking station: \"",?.~.name,"\""));                                0 p" T6 E& j7 a+ h  S0 r
                                end;
; S- ^# U0 O  G6 A0 h! K! w                        else  c0 T" ~5 P5 c# ~* D' K
                                @.Destination := assignLObj[1,row];
6 c, j( e2 d& e9 Z                        end;                       
  O9 L. Y; p. Q& V. k                        newDirection(@);- c0 T, ]6 B6 i9 e7 n( B" _# F5 h
                        @.HasOrder := true;
$ Z! K, {2 x8 t9 w                end;* i3 ]( d; z( J+ U6 Q6 X* @
        end;  j4 w  T2 V1 @8 l* u  f
end;        -- of the method; E9 q+ o  D% A' u% b
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
; w0 O  U  ?5 A
- F. z' X, D: t# C) P/ Y这是AGV_putin中arrive的method。' ~6 l% A4 a$ C

3 m* y. J( T3 ?+ m$ {# Q当到达物料速度越高时,这个报警更多,# Y% V$ M6 N; B
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。  E& m! h: r- T$ h; q. q
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
7 B9 \$ c& G4 U' }- ^, c
' @& ~. o6 S( Z5 O: Q  ~  }另外一个小建议,就是move,所有的move都可以这样
$ A( P; I4 |" e0 A0 J! dif not move() then debug end+ J3 J; G. X2 r  I: d" U: G4 t6 z3 L2 s
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。5 T6 X( j1 F- n  W- U
plant simulation中的free libraries有AGV模板,3 T% I; j8 p1 w( J$ t2 O. {* I
里面也有案例。2 g" ~' B6 E1 p! r$ ]1 y! P: o
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。$ c* B6 _: @) n$ ^( E
7 W( Z: R* C3 A  y( ^
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
9 p( T  h5 I. G9 R2 z% ~) O; q( l0 L' m' E! _' a: ?
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 6 \1 |' P2 t, `# y
这是AGV_putin中arrive的method。5 c5 p' k, u+ P; x

% }+ h* }& m7 Z# H/ y; _" y当到达物料速度越高时,这个报警更多,
$ f) T$ w  y" `1 Q* G  I7 e) `
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-1-31 09:36 , Processed in 0.017670 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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