设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9085|回复: 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') G1 X' S: W5 F% Y
*/
6 i& E* }6 U8 l+ V- B) {+ e' M0 N" Tis
) D5 o: }3 e, ?* j; X        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
! `+ P! V! m. w0 j) ]+ qdo
) D5 j% ^% t$ o% K8 P! w% n7 q1 _9 }        Lan := rootfolder.Internal.Tools.AOLlanguage;
1 d( M7 v6 {6 t0 b" x        if current = @.Destination -- else return" R8 X  n! b1 @: e
        then
% Z% a$ ^9 A( i( D! s/ a. E                @.Destination := void;
9 M7 p3 W: C( \" H; A$ `/ i                if @.occupied then" ~8 Y6 Z1 g/ {
                        part := @.cont;
* Z. s, h+ V2 ?4 {                        @.transpOrder := void;
" E5 J) K, u  |- l  B3 S+ ~( S, v                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
8 {3 }  U4 W/ u- V  H; \                                @,root.eventcontroller.simTime);2 x8 b, t9 }/ E* J, Y, D
                        @.HasOrder := false;
  l! y5 ^/ Z( F                        @.DrivingHome := true;
; L. |! F* S( P# }& r                        rgManager.tryToStartTransOrder;% e) K( v% i7 j% e' D5 h- R# `9 S
                        if @.Destination = void
  Z* c: Q9 B: i9 H( d                        then -- no transport order for vehicle @
6 q& [" b2 `, U/ j8 t" C                                @.Destination :=* S3 h1 g( E+ n3 B
                                rgManager.nearestFreeStation(@,track.~);
) p4 y& `$ A( q) Y2 e* n7 `                                newDirection(@);   1 P5 A( U8 o- X% M
                                if @.Destination /= void then
  w8 w0 g9 ?. |( A: u$ @                                        @.Destination.NumReservation :=
# S. ?1 P% @2 e6 k0 D6 x: }* r                                        @.Destination.NumReservation + 1;
) e& m2 }3 G+ A4 y$ l* C9 |, O                                end;- ~* S# T: z" X, `3 o+ Q8 z; w
                                @.CurrIcon := "drivingHome";
  }5 c9 ^$ a3 y! p+ n                                @.DrivingHome := true;8 \5 H9 S+ U; c) W6 y" F
                        end;
' D3 `, C$ M+ }' J7 S( b! G                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% @6 c8 Q5 X0 U7 ~* c. u                        part := @.transpOrder;  H* j/ [* s  @
                        part.move(@);-- load part
! T5 c; F, E! B) h5 w- u                        @.CurrIcon := "load";
& K9 B* S! r) I0 \9 ?$ _                        GlobalDistObj := part.globDestination;0 p9 e1 C& h9 [' i% D& |. Z
                        assignLObj := rgmanager.rgAssignL;+ V6 v( B" B3 H& Y
                        row := assignLObj.getRowNo(GlobalDistObj);
0 ~6 ]$ y2 @$ a( k6 A# b, |0 K' E                        if Row = -1 then -- since 70; |( A+ E( z9 w5 t% O! H' K( \8 ^
                                if lan=1 then3 x8 V) h+ d8 b8 N6 O7 \: ]
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),' @1 o# X4 @! M" x* i2 T0 {
                                                to_str("in der Andockstation: \"",?.~.name,"\""));! ~# O. \7 S, a3 \" T: p: \
                                else
* f; h  `7 J0 z6 C& N- `3 ^& C                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),  `2 k' S' M' C1 E
                                                to_str("in docking station: \"",?.~.name,"\""));                                & R$ u( b$ g" h, w) i. n! [: e
                                end;4 ~) R7 I5 q+ [
                        else
: |) ^' ?  y1 m$ S( E7 G                                @.Destination := assignLObj[1,row];
% n& B" Z$ ~- j8 g- A                        end;                       
% L; P9 Z& H4 [' ?                        newDirection(@);' W, n4 ^6 p0 B5 h: ~) w; v$ T
                        @.HasOrder := true;
& _9 z0 C" T" u; K8 q' n/ ]                end;" v9 G9 {* s7 I, \' W; N# f0 q* K
        end;! O# M. @% }; h8 n' a# J
end;        -- of the method' G% J/ D+ \# F; Q
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
0 s- y! J2 E9 L+ i) y
8 q' Z# s6 j$ g- O# F这是AGV_putin中arrive的method。
( v; D9 N" H1 x" W; q* e$ _& m0 t+ ], g! B/ L5 i+ K
当到达物料速度越高时,这个报警更多,
; a6 I( U' t  _# X) G7 L( ^6 q可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。, j4 e9 E( {( U! h7 z
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
# G0 q; O) A" ^5 r1 e5 w4 R4 G) Z8 M! Z4 J
另外一个小建议,就是move,所有的move都可以这样
/ i+ K8 _$ J( d6 A$ R1 G$ Tif not move() then debug end
! k$ ~+ ^# g( @. g这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
: U9 Z5 _) y$ U3 }3 `plant simulation中的free libraries有AGV模板,
* [/ R! W  d' U里面也有案例。! E# r. z9 ^7 V2 M. a; f! |" I
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。" f6 b3 I, o  k. Z
+ ^7 y5 x- U) W. G6 X& @
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 2 M& V7 P  W5 }/ e7 F* h

0 \# A$ @* F! S  h' k* k那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
$ [8 o2 K& ^2 Q. D这是AGV_putin中arrive的method。
+ S) ?& L' G( L+ ^- p
4 ]" J; H' j1 [5 a) _# @当到达物料速度越高时,这个报警更多,

) z3 h6 `3 r: b; P# c1 d另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-12 17:06 , Processed in 0.017407 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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