设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8503|回复: 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'6 u8 V* ~. c( C0 b- H9 h2 U
*/
1 ^- H) I; Q, Wis
8 {% n( l6 S" l3 X  E        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
! f( c* f% ~6 C# k0 p; H% Rdo2 |0 k' o4 y: T
        Lan := rootfolder.Internal.Tools.AOLlanguage;
6 _: a  _7 n: F        if current = @.Destination -- else return6 h2 D! G9 r( D' o
        then
3 r5 m- V2 q& ]# Y& I4 P6 I                @.Destination := void;
$ S6 ]% x: U- P/ ]0 M- z: [7 s                if @.occupied then" r; ^$ q1 U  D, N8 I: w
                        part := @.cont;! i# }  b/ n3 ?
                        @.transpOrder := void;
8 I2 E% L- M  q                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,; \0 R0 t  y7 |6 I$ }
                                @,root.eventcontroller.simTime);
! I  {* F* T- Q6 _  _/ x$ S# r7 x$ M* D                        @.HasOrder := false;; V: H5 X# u* s- M) x9 G
                        @.DrivingHome := true;
% `7 z+ K# V2 u% T, q                        rgManager.tryToStartTransOrder;
7 K0 i2 W7 N' L, x                        if @.Destination = void
3 J; d6 q2 M  s7 D2 p3 U                        then -- no transport order for vehicle @7 a! d( P; D4 B: Z6 Y% H- g
                                @.Destination :=
" {, W6 v0 v* C                                rgManager.nearestFreeStation(@,track.~);
  n$ ?( V1 q* \  h' w" @+ v                                newDirection(@);   
; V" p% [+ M: r: I8 B, Y                                if @.Destination /= void then
9 O6 c0 k1 P* H( ^/ \8 t* T0 j3 y3 w" `                                        @.Destination.NumReservation :=9 A) @, Z, H4 d* y' e
                                        @.Destination.NumReservation + 1;8 f4 Z2 c- q! U$ y
                                end;
. G- D6 O4 V4 e) [( p) G4 e                                @.CurrIcon := "drivingHome";
+ J9 K* I# w' R: X                                @.DrivingHome := true;# ^3 K. ]6 q+ D/ C; X% }
                        end;
  a' ]" |7 P% C* A0 P1 }" J                else -- the vehicle @ is empty, both vehicle and part are in the same dock station: z8 ]9 _, N# w& u4 w' G
                        part := @.transpOrder;+ E) u. ]) i9 T& _; d0 e
                        part.move(@);-- load part
4 ]9 x$ ~8 e* h: u6 _) G% I& b: s                        @.CurrIcon := "load";
& t! b, t0 |5 q6 T                        GlobalDistObj := part.globDestination;8 Z+ |3 L, ?7 H2 M8 h: J5 s* ^
                        assignLObj := rgmanager.rgAssignL;
% M2 H  o" G  p* D. ^$ k& @9 D9 z                        row := assignLObj.getRowNo(GlobalDistObj);
, c: S9 E5 z  p5 \! C                        if Row = -1 then -- since 709 y$ T3 _) E& F
                                if lan=1 then7 u" v  F9 O  j
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: ?6 S& J3 d1 l/ N# [                                                to_str("in der Andockstation: \"",?.~.name,"\""));# U. q. g$ k+ F2 D( Y! N8 k
                                else( c$ k! o4 }0 \& B6 F
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) {# [. ]' a# |1 r/ C" {                                                to_str("in docking station: \"",?.~.name,"\""));                                : h# N' a8 k/ u9 u: u; w
                                end;
6 V% l  U) Z# [$ U3 j5 ^3 J                        else9 v' j+ ?' O# _* i+ S6 I
                                @.Destination := assignLObj[1,row];% j- C0 H, z: I( A
                        end;                       
/ ^% b2 I4 _' q4 {2 X                        newDirection(@);
; S9 W, ?) Y' {( y! Q$ e5 R                        @.HasOrder := true;, ?, ~8 S. d5 M7 N: B
                end;0 O  D1 Z' O% G1 I& R; W
        end;
+ P; V, U8 a$ _$ mend;        -- of the method; s3 u! _& w4 A' O$ C; S. a
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
8 @  w9 c7 N+ @2 r, P  G4 S$ ?/ o* E7 c4 A! g7 r$ C% P' c3 T; Y8 a
这是AGV_putin中arrive的method。
/ i/ R- W9 b: l2 I- B/ p9 E
& T. H! O3 o3 W  S) Q当到达物料速度越高时,这个报警更多,
% Q& I' x% e4 y可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
6 p6 }6 H2 T- a, b8 P4 a& |& V  H程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
' w% u$ D/ g8 K' B5 w7 \0 `/ Y7 n! _3 u: U  F& ?
另外一个小建议,就是move,所有的move都可以这样/ ?9 P# j! }8 {8 w
if not move() then debug end! U1 m2 }, ]: z# j: t8 d
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。* B! n4 f4 _; c
plant simulation中的free libraries有AGV模板,2 h# h# u4 C% x! h0 U# ]9 c7 n
里面也有案例。
4 m; ^6 \( |$ a% @7 ]+ w我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
& N1 |7 S/ F- a, f! }5 U/ n
) @3 g' x" k' m* G我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 $ x- u3 w5 c# J: Y/ ~

- J. Y3 E1 h- L( o2 {# }+ O% |那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ; p/ X% f" N; ~: }6 P2 \4 w
这是AGV_putin中arrive的method。+ o, ]6 q  b2 f5 u8 I% {& b

9 v% S5 K# c6 h7 {当到达物料速度越高时,这个报警更多,
. c4 p" T- o: L- p$ \
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-8 00:12 , Processed in 0.015038 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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