设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8150|回复: 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'
3 G9 d5 Q: k  q1 J*/
+ n% M' q2 `# S; C6 Eis
) }- L5 C) H6 R7 q( o. P- `        part, GlobalDistObj, assignLObj:object;row,Lan:integer;1 b( {8 U$ S0 R
do# D( {0 [# H6 P% z8 b
        Lan := rootfolder.Internal.Tools.AOLlanguage;5 i  n( ^" G! l) Y# ^7 J" P" Z. J
        if current = @.Destination -- else return
" M2 u. Z/ k& R        then
9 v1 v: O7 G" }5 N, O1 d0 k                @.Destination := void;
2 R* A- _" r  @                if @.occupied then
% i/ \) Q- I5 Q: Y5 ~                        part := @.cont;
7 d; H9 s+ M- E. {5 ?# {/ g6 Q3 u                        @.transpOrder := void;
4 c( {7 X9 k: w" S" E! a                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ b9 y" S, o8 I  g                                @,root.eventcontroller.simTime);
4 W' i. R: h6 n! c( F' @" u                        @.HasOrder := false;' D) h+ Y6 c4 Z. }
                        @.DrivingHome := true;
* E7 E5 d- o( i, O4 z                        rgManager.tryToStartTransOrder;
7 s; z, i4 I0 h9 o# }0 Y) |                        if @.Destination = void
! j7 H6 I& v7 G% B* ~" P. u* c                        then -- no transport order for vehicle @
1 G" t7 o3 O5 H6 o                                @.Destination :=- x3 B1 a7 _0 [( V+ u3 T3 T
                                rgManager.nearestFreeStation(@,track.~);
, q# m6 v  t  S/ K. w8 c                                newDirection(@);   
0 Z. Z/ M$ P9 `* M/ K                                if @.Destination /= void then1 @& Y. {- r; x2 F1 O: s3 d3 p
                                        @.Destination.NumReservation :=# z, W5 A. O, L
                                        @.Destination.NumReservation + 1;
& x' y% @3 ~# {4 x; z                                end;
9 r- A; z# L1 s! C! }) @0 g9 f                                @.CurrIcon := "drivingHome";& c& \" H9 J0 F" `: q
                                @.DrivingHome := true;
. Y" v; x; ~4 @" {/ A1 A                        end;" w9 ?, s% Z+ A3 q
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station0 U1 T& X6 H6 L
                        part := @.transpOrder;- v5 w0 ?: z8 L2 n# k
                        part.move(@);-- load part
% T2 F% y1 S& J, n; d% {$ W: q3 C                        @.CurrIcon := "load";  {) Z! p2 B; F& ]+ ]- R
                        GlobalDistObj := part.globDestination;7 c* A8 d8 w+ u1 a9 a5 K) {# g
                        assignLObj := rgmanager.rgAssignL;
2 y1 t$ y9 U! v$ N; M                        row := assignLObj.getRowNo(GlobalDistObj);
3 _- k% A# ?! ^& N$ `: @- h0 i; K5 o                        if Row = -1 then -- since 700 e, d1 G, Y5 m; S2 G9 V
                                if lan=1 then7 E  X" I/ R6 i/ `; F
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
% Y+ u) g- y# K' N: @9 x/ D/ Z9 c                                                to_str("in der Andockstation: \"",?.~.name,"\""));5 f( w% w1 @6 I! h* {
                                else
, |9 z2 v: \8 @4 u+ e8 i& o0 ^" B                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 u" y/ J5 O$ V" ~; I& P. J                                                to_str("in docking station: \"",?.~.name,"\""));                                ! H' e9 Y) Q6 ]
                                end;
3 p0 }, S0 e6 P" q+ X* d1 B                        else5 z+ I. W/ n& {' q( E" S+ L( u
                                @.Destination := assignLObj[1,row];  H9 e# F1 {1 M/ g  o: [
                        end;                        # C( G9 Z& z" Z. P* R4 N- Z
                        newDirection(@);  P! U1 y. _% k0 h; v  s
                        @.HasOrder := true;
0 S# u7 C1 d' T  M' m& [                end;
- y* L6 G% j! S! L# E  D        end;
5 g. [, P- l5 |end;        -- of the method6 F  M- K+ M% S8 G  m- \  z
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 : f" e+ [* y6 y
* t) t3 D% Q( T! o8 i
这是AGV_putin中arrive的method。4 [/ x5 p5 q7 z( f

1 r+ o: l; o$ l. p. B$ M7 O+ S+ Q当到达物料速度越高时,这个报警更多,
0 V1 y+ v# h( p+ x可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。( e5 T( k. G- D9 Z8 N
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
' t5 y5 O/ l) V8 I6 E8 w' d6 f" e# V8 D
( b) @1 \. B+ L9 U另外一个小建议,就是move,所有的move都可以这样
0 U' ~2 A5 Z) ?8 |- l5 ~if not move() then debug end
$ O, ]$ c( |; h. j这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。( m& o8 z2 r& p$ X
plant simulation中的free libraries有AGV模板,/ `. m! |/ Z& ?' l3 d4 s
里面也有案例。: ~. Z  ]* P4 Z2 a6 b
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
! h5 w# G! B8 K( h. D; O$ X6 n1 N! {, g/ ]4 d- @# L0 [
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
% L, L0 s4 k9 s3 p* U8 u; _2 n" y" S- w( B5 }
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 - Y4 Z! b2 f( v5 z5 F
这是AGV_putin中arrive的method。. G; v! q) T& v9 D, }1 {( A
6 j# D; o2 x& u% G. [" }
当到达物料速度越高时,这个报警更多,

+ M: h* c3 L; Y另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-17 15:23 , Processed in 0.020976 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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