设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6629|回复: 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'. V, E+ [- M; g1 {( i7 N
*/
$ ?8 `5 U2 I* E9 _7 T& Z& _" xis/ P* Q9 O1 ~1 h7 d- Z2 O
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
" a. F: S$ T  [2 [$ ]do
7 p1 F) [# Z1 c6 {, K/ k$ s        Lan := rootfolder.Internal.Tools.AOLlanguage;3 M5 `' v  K# V  J9 u4 O+ R
        if current = @.Destination -- else return
* |5 g: C# {5 \; i        then
6 K  F4 N; I( c& w9 B                @.Destination := void;/ I1 u. J5 R3 M+ U) @5 i
                if @.occupied then& a( C6 a; B9 i
                        part := @.cont;
& f5 U4 U0 Q4 p& e- d2 Q1 L                        @.transpOrder := void;; }0 V, {  T2 j  o- _+ ?* \# }
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
7 j9 ^, w! Q1 a& P4 ^- w( v$ w                                @,root.eventcontroller.simTime);
5 L% D9 K' B* d( {/ ]                        @.HasOrder := false;0 \. v. @5 \# [7 t
                        @.DrivingHome := true;1 J% B6 C5 [# B( F/ j# G
                        rgManager.tryToStartTransOrder;1 M! |+ a' I8 R' t: }' ?
                        if @.Destination = void
5 c7 k6 V7 a# x  g* w                        then -- no transport order for vehicle @  h# T$ W+ G  k, K
                                @.Destination :=
# x& S3 U" l& ]) k                                rgManager.nearestFreeStation(@,track.~);
  [% m6 {4 q& `7 A+ p                                newDirection(@);   % A2 k* `8 }* X/ s7 F/ Q( r& e4 t
                                if @.Destination /= void then
: l6 w0 R, m' h' J. H  `( Y  |                                        @.Destination.NumReservation :=
! _$ h; u, k4 a; o, d" d+ F                                        @.Destination.NumReservation + 1;3 n5 e3 {  \( A7 U- u: d- x9 U
                                end;
) b4 ~; ~* G' p                                @.CurrIcon := "drivingHome";$ K; w. o# r9 v: \8 E; P
                                @.DrivingHome := true;
+ B5 g5 c* J& r7 Q, y& @                        end;
7 r7 l( L' k' ^0 @' c3 d8 X% U" U                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
2 B% k# R9 G8 s. B                        part := @.transpOrder;
* I) |5 T; I) C' h3 ]                        part.move(@);-- load part7 M6 ]6 {" _, a& X$ |
                        @.CurrIcon := "load";& T3 s0 W# n$ {/ P9 [
                        GlobalDistObj := part.globDestination;; {$ \& @$ k$ h% k  F3 g4 r  F
                        assignLObj := rgmanager.rgAssignL;0 `, v8 O5 i) D1 x; _5 U9 j
                        row := assignLObj.getRowNo(GlobalDistObj);* V$ u" f& l* k
                        if Row = -1 then -- since 70
# w+ Z1 {2 \9 m- s  S7 G# a                                if lan=1 then% b* j$ \+ z+ N: R
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),5 M) {2 B5 v) p7 x. T1 Y$ L
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
  {0 @3 m7 r0 p1 a6 u                                else5 u7 h' r! J2 ?" j
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) C) i$ S) @6 B                                                to_str("in docking station: \"",?.~.name,"\""));                               
$ ^, q, q8 E5 M1 i2 y' v* y                                end;
  D- F* y9 |  ~/ Y+ \9 D                        else" D: q1 H  ?) Z
                                @.Destination := assignLObj[1,row];0 o5 B' G/ \0 a& n
                        end;                        . u9 O: n' H' B. W' I
                        newDirection(@);
, s. s+ _- b9 B/ L0 f# q7 ~2 b1 ~                        @.HasOrder := true;5 t( y& T2 T3 o7 X9 S
                end;3 L  q0 \7 e8 [% ~3 z' X% L
        end;9 s* Y/ b8 z: {' l8 X
end;        -- of the method$ P8 r: Q" h  T; \' \  f& E5 M
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
6 I1 q4 }7 x& l2 N
: H2 P( I# J6 m8 Z' c0 b这是AGV_putin中arrive的method。
& W. o& R% ~# Y9 H  X1 a$ ?) K
" ?4 Y; K& X/ G3 o2 c当到达物料速度越高时,这个报警更多,6 q) T6 U4 X) f
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
  c, j' S+ r6 ?7 I8 l; Y程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
+ u6 J& @  h: K$ P( ]* |, O: M! C
另外一个小建议,就是move,所有的move都可以这样
9 y/ Y4 r  R, M% {( Iif not move() then debug end
0 z: u; Z4 Q0 s4 E( \$ f( V这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。0 n0 }( ^) n; i- u' C# i: v! q
plant simulation中的free libraries有AGV模板,
7 c2 A/ a7 }; Z8 G/ q里面也有案例。' H# f/ ~! X2 o6 p* @0 \
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。1 S3 v% U1 a  s. `1 R3 Q9 k) ^

5 @! I/ R' K+ C( x  J- X我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
5 }! ~  t1 P5 G8 Q% A
# w6 f; g/ _6 v3 B! A7 Q" g% s那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
( D* S" v. ^( O; }" {这是AGV_putin中arrive的method。( R+ X  E5 t5 v% K  t
/ m% z, e( {  Y- \: R3 k
当到达物料速度越高时,这个报警更多,

- c7 B; |. I; W) ^另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-17 07:13 , Processed in 0.025435 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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