设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9299|回复: 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'- s' X2 d/ |/ m$ H
*/5 e: @! \- q" v0 |+ p  G3 E5 D
is
) d  f2 n0 K3 r* j  ^4 J        part, GlobalDistObj, assignLObj:object;row,Lan:integer;, f3 a7 x  R: M! t# d, ~
do+ H2 }8 Z+ ~! y% E  ]! o! O" F
        Lan := rootfolder.Internal.Tools.AOLlanguage;
7 K) j2 U4 f$ h/ ~$ c# l* y        if current = @.Destination -- else return  ?$ H+ ^0 O% G2 L. _) ~7 f
        then) s7 ~) o' I0 z: L" a7 t  A
                @.Destination := void;* s1 S0 g& w% w
                if @.occupied then0 c, T7 N1 @* F9 f; M
                        part := @.cont;$ R! A" c1 z3 w- M$ p+ N
                        @.transpOrder := void;
* q. j" d4 W+ f, G- b' t                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
2 P8 i& I8 z! E                                @,root.eventcontroller.simTime);: ~+ b  m2 U, Z  A
                        @.HasOrder := false;$ Z: @, i1 i7 l" g
                        @.DrivingHome := true;
7 [- j6 h" Y0 c  g                        rgManager.tryToStartTransOrder;9 ^( A* n; z% i
                        if @.Destination = void
, O' N! P) a& U0 f" e( ?/ `/ |                        then -- no transport order for vehicle @
1 b3 x- [% E' f2 H# t  {                                @.Destination :=  B- W7 E/ `; d$ S" b% H" @
                                rgManager.nearestFreeStation(@,track.~);
2 y& U' L5 T* |- o                                newDirection(@);   * ?" t! ~0 g7 I: V
                                if @.Destination /= void then
# o& ~( U  a1 y) s                                        @.Destination.NumReservation :=" }& P9 B2 [) R8 ]" Z( e
                                        @.Destination.NumReservation + 1;
  M4 b* i. z( Y                                end;
$ \6 h  ?) S. c1 y4 a  F7 {                                @.CurrIcon := "drivingHome";
) D! u6 ?9 Y2 E: B) Z                                @.DrivingHome := true;
3 Y  o6 Z! S, J9 L' j                        end;$ R- ?# g2 @, L" p6 G
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station% B7 W0 x1 G- R8 g6 ?8 j
                        part := @.transpOrder;
* m9 |, q2 W& N3 V) _* G                        part.move(@);-- load part
# y# {2 C& S4 U* Z, l" g0 K                        @.CurrIcon := "load";, B/ z9 c0 \! j$ o! a+ a
                        GlobalDistObj := part.globDestination;
* K" L8 N, m5 a' |                        assignLObj := rgmanager.rgAssignL;+ N( I$ p+ P  `; V8 s9 [
                        row := assignLObj.getRowNo(GlobalDistObj);: r0 U% M+ y5 i2 i
                        if Row = -1 then -- since 70
+ B: N( B) B1 z& L3 P                                if lan=1 then
( ], _6 p/ X" }, f* p, m                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
% h. X+ f& v: l( _* [3 X! v                                                to_str("in der Andockstation: \"",?.~.name,"\""));& f, F3 ]. A9 e6 j1 E) B
                                else0 z, W. j# y8 p3 \7 t- |; e
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
  ?  O  h; X' k, o$ g                                                to_str("in docking station: \"",?.~.name,"\""));                                ; l& }  w& O, a2 @4 W1 E2 g
                                end;
( g7 X, X  t, p% ~$ ^; o' O1 F                        else
4 L- r' S. O% O1 t2 {2 e4 n                                @.Destination := assignLObj[1,row];
" Y0 {% G2 Z8 U' F                        end;                       
$ F. @% N5 T0 S$ w6 v                        newDirection(@);
4 F7 j2 U4 G7 p                        @.HasOrder := true;
* |# ^  |8 R3 ]  S7 ~' j# ?6 V                end;
3 H4 ]/ E! {1 o6 u  h. P        end;
( S, ]' ~) x8 C( L4 i$ hend;        -- of the method
* {. u) M2 Z+ S$ {& H& |3 E: k
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
5 J( S) C& p( ^" u0 t0 ^7 p7 |$ \3 q) o7 j& j+ u
这是AGV_putin中arrive的method。
8 W- P8 D4 O3 t
) |1 `4 C. c% Q$ n; n当到达物料速度越高时,这个报警更多,7 c* `% \1 a# ^! V0 n9 Y) i
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
$ w  O" V& C  M( J" C- t# K" w程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?4 r/ W' F2 k* l8 b

7 y- w; P) r1 h0 Z- F8 h5 a+ ]5 M另外一个小建议,就是move,所有的move都可以这样
) l$ p, n3 u) m/ K1 gif not move() then debug end5 j! \  _$ w6 _) s2 L( t, {. E
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。5 K. ?# u: a: D1 q
plant simulation中的free libraries有AGV模板,  n3 O' M0 p& n0 i" h- v
里面也有案例。
$ o0 ?' E' C4 [& a# {; E# z我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
7 f2 u" e# b* {+ v
9 z' r0 k4 e& L- p& k* }4 m我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
/ j" b  H# L( W( r( e% \6 l7 F( ~$ y. y6 m% q
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 1 {1 B  g: V4 _  B
这是AGV_putin中arrive的method。
: [! _7 T: s  M9 ^1 n. u" ?; U$ \& F; q7 a2 e
当到达物料速度越高时,这个报警更多,

% a- X8 K' `) x* B; o0 l另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-23 18:36 , Processed in 0.019370 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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