设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8193|回复: 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') _# Z& a0 N% ~: O2 d4 P$ n
*/! U( y# g) q% t7 T2 G. H
is+ v5 W& z9 j* E$ @
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
  y$ X! f: O1 u  Sdo" \! R8 }* l  C" o( Z! l
        Lan := rootfolder.Internal.Tools.AOLlanguage;
7 z" \' d! t# |' o0 y9 T        if current = @.Destination -- else return
! t" Q- e( P! G* O3 n7 b0 }7 G. |+ F        then7 w, L  G% m% e" K- c, L
                @.Destination := void;
+ {3 F5 f3 p8 b+ k                if @.occupied then
+ U4 B9 O: `3 t" v6 {                        part := @.cont;
. L  P1 H  I9 R. W" c                        @.transpOrder := void;
* `! @( I$ @9 X                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,. b6 n8 ~% C- e
                                @,root.eventcontroller.simTime);
3 u' t( G& e8 y/ n& D/ P                        @.HasOrder := false;
- _1 {1 p# X) z, Z! t- L1 E                        @.DrivingHome := true;  r5 V9 M+ g, ]1 |; a6 c
                        rgManager.tryToStartTransOrder;! l# z7 M7 I6 _# ]! L% F# x
                        if @.Destination = void1 M9 `, @- t" b# v# z& g
                        then -- no transport order for vehicle @
" G' f" I: k1 ?) v! F" Z                                @.Destination :=
! K6 q4 @5 t: b( n) v                                rgManager.nearestFreeStation(@,track.~);
$ e& p2 z8 I' b1 ^& C                                newDirection(@);   4 E0 m6 x! J6 P
                                if @.Destination /= void then
* P1 ^* S/ V0 f0 f# w" P                                        @.Destination.NumReservation :=6 a: X% S' P% B4 ^/ u. [6 u
                                        @.Destination.NumReservation + 1;- {: [) K: f; e3 W, b
                                end;- g% p& z( P$ M$ v3 k% j3 n5 I
                                @.CurrIcon := "drivingHome";; L$ J5 A& ^2 w; t( I3 q
                                @.DrivingHome := true;# c1 S8 [! G- ?- F
                        end;
6 [/ H. G4 A4 {- @& j, ]                else -- the vehicle @ is empty, both vehicle and part are in the same dock station$ {5 O+ G% e3 f, D, s
                        part := @.transpOrder;' H! r5 ~2 R% ^3 |7 n
                        part.move(@);-- load part
% a1 `2 ^' c9 @: m' u% U; \                        @.CurrIcon := "load";. P/ U* l% ]) k& ], R
                        GlobalDistObj := part.globDestination;
8 L) B! w% R8 b" ~                        assignLObj := rgmanager.rgAssignL;
2 f# z1 r+ i+ b6 }9 Q3 R* ~                        row := assignLObj.getRowNo(GlobalDistObj);
( T$ x0 q; _) H- d* f1 F. }                        if Row = -1 then -- since 70' ^$ l. ?+ @: @/ a
                                if lan=1 then
1 X/ z8 U% i! ^9 _# i8 c% N                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),+ ]9 S8 C3 @2 T. m& a0 M# T9 X
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
2 D. f* r& T& S$ Q: E                                else
1 e7 t  n! A/ o7 ?! h                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),* o7 q' C/ Q- Z1 p; c8 S" c
                                                to_str("in docking station: \"",?.~.name,"\""));                               
3 b/ n& S/ R, j- A( t4 p& d# H                                end;
# [6 i  }6 x5 H                        else
4 _# ?3 l  j5 u( F, T) H                                @.Destination := assignLObj[1,row];7 F$ F% `, ~, X' g! K
                        end;                       
9 W+ `2 _0 k1 E( t" i0 R7 V' @                        newDirection(@);
( ]2 W9 d- i# B/ k  w                        @.HasOrder := true;
* u$ v2 ~% S) ~* I) j2 u9 o, v+ U                end;. P/ u8 L, k- R! L- o8 ~- G; E+ _; x
        end;
' X) M- h5 P- m6 _/ fend;        -- of the method
4 @2 Y( U9 D$ G. O! l5 U2 z
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 2 b1 C: D" P) m8 o
  R! m2 N% a3 I0 x
这是AGV_putin中arrive的method。& u$ \! R7 [8 x$ ~, H
: p  x  @2 j( c9 B2 v- o
当到达物料速度越高时,这个报警更多,8 ~, b- c# A4 W$ U
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
! x- S2 l" U' j# ~程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?9 k; V) Q- ^% }( S  n" D
  F' k: o! ~5 H# Z  Y3 J  H3 M
另外一个小建议,就是move,所有的move都可以这样# Y# s9 E5 p2 w5 n- W% a
if not move() then debug end
+ v% m% L1 j0 K% A8 V" x9 K这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。6 e" H! i8 }7 t) M# z  c
plant simulation中的free libraries有AGV模板,
% l- w/ S* F6 @里面也有案例。5 M* ^, }" W4 d- Z& w
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
, F$ N, X, E/ k( a8 |1 p1 g7 {: c' V. s) F/ O  R" ^* J: c
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
' F  k  n4 y5 V) H% n+ n
5 h  u# t7 `9 r& J6 d) f! u那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 / @2 u/ [; T5 r! Y- U0 e
这是AGV_putin中arrive的method。7 @2 l/ x. m/ y$ f- k* O/ `0 H
4 m* `& v; g: z$ X, {, z# k+ y& }
当到达物料速度越高时,这个报警更多,

. q$ ]3 u+ W2 a另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-20 02:35 , Processed in 0.023259 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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