设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7385|回复: 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 g3 r: e- X/ U! i: m9 [
*/! X3 z! p8 x; l- e
is/ r0 p* q7 W! {0 c) `! p" w
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;$ m9 z6 d- C2 r; x# r
do
  M  l: i- Z' ^4 H        Lan := rootfolder.Internal.Tools.AOLlanguage;
4 ]9 N7 G; j4 Z        if current = @.Destination -- else return
- h2 r4 F# q& ?: A5 r$ M1 T, q        then
. q. U- d0 f& l$ ]2 [                @.Destination := void;
6 H; G) m( {( M! T                if @.occupied then
: s" U! }  D5 E, j! f2 X                        part := @.cont;
0 Y( g, K) T. C4 j8 ]                        @.transpOrder := void;
) y; W) Z9 B% D( P  ?. E- l( D                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,8 O( o; ~( s* E% _6 U3 ~
                                @,root.eventcontroller.simTime);2 s$ F# _% Q3 ?7 e  l! T$ G# H
                        @.HasOrder := false;
) ^0 ~# M) ]% i/ ?2 O$ r; a, U3 v5 J                        @.DrivingHome := true;6 h% X! m! D, c- C3 w
                        rgManager.tryToStartTransOrder;1 Z+ `; t/ y. w, k! A: `
                        if @.Destination = void
) f. J6 Y. l( [( S6 C/ Y+ H                        then -- no transport order for vehicle @
& M" K4 A5 H+ _  h2 Y                                @.Destination :=
9 o: O1 m) N; w' J0 O                                rgManager.nearestFreeStation(@,track.~);
3 X7 B4 O; m4 n" z# K2 S, ?3 J. H8 I                                newDirection(@);   
! b0 x1 l3 G& U2 a( X                                if @.Destination /= void then+ C0 J) G' b; y0 N# O" W+ c
                                        @.Destination.NumReservation :=, O6 _+ _+ r8 V& I
                                        @.Destination.NumReservation + 1;- c  Y' V- ^0 ^8 {: e4 J. \+ C
                                end;0 W8 K$ |( f% C
                                @.CurrIcon := "drivingHome";! Z( a' Y8 H9 f3 e' e2 M: p3 \/ g& ~$ ~
                                @.DrivingHome := true;1 I0 R7 z! \+ m& q" t
                        end;1 q/ d1 Y9 F, Z) P6 Q
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station; o8 k  p$ |, O, n( T  b9 \
                        part := @.transpOrder;
7 p# ?; t+ E5 [3 D                        part.move(@);-- load part3 }7 ~9 X& k8 U' U# Q$ E. L
                        @.CurrIcon := "load";
7 h2 e) T5 q6 d& _5 b3 N                        GlobalDistObj := part.globDestination;5 i" c3 x1 u8 P0 K3 [
                        assignLObj := rgmanager.rgAssignL;
4 l0 j( R2 d' J3 U3 T% N                        row := assignLObj.getRowNo(GlobalDistObj);4 t7 U: Q$ v2 ^+ a8 b; J8 |
                        if Row = -1 then -- since 70- f8 O& K9 r, @' K; r
                                if lan=1 then
5 T/ z9 e+ @9 Y# o                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),, |0 r/ r# b9 Z, l4 T8 w
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
$ L1 {4 _8 q5 [4 l9 k) b. A                                else
) Y% G! k5 l5 W5 g4 g  X: ?                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 k2 }7 @/ a. _
                                                to_str("in docking station: \"",?.~.name,"\""));                               
, Z0 z* r( b( _' n% f                                end;: G9 y5 H( V- _/ ]
                        else
/ d: Z, _% E+ s* g. K                                @.Destination := assignLObj[1,row];9 c, H( s# G6 G; Z9 Y5 D
                        end;                       
& [/ ], q' z! ?  v8 r                        newDirection(@);
' H. r) k3 F, q) c) K                        @.HasOrder := true;( V; H5 Y. A; W; [- J
                end;2 K2 {% x! S: |" [
        end;$ t9 _1 I" C, J% C! Y5 ?/ M
end;        -- of the method
  s( N1 [! i1 G" f& |: y9 a
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 - _! R9 J1 _' m6 q& A  Z+ f% Q  p
( S% t3 {5 W" M
这是AGV_putin中arrive的method。% t6 q3 B( o, h

$ e, B% n7 f/ r/ c: d$ o当到达物料速度越高时,这个报警更多,$ H$ {6 J! v. }. I
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
3 I5 a+ N7 \& v, i0 c程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?/ _+ ^1 h; l+ [) |) ^8 a* Q
& y/ d$ G% q/ K- c) o! J
另外一个小建议,就是move,所有的move都可以这样% t% z! h: }9 i8 l* W
if not move() then debug end
8 s# u2 P5 N% M2 K* G2 z7 W) ?这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。% O0 c! \9 W2 O0 @6 j
plant simulation中的free libraries有AGV模板,% H, R1 `; d- L& B5 o8 S5 p( S1 r( v
里面也有案例。
) `4 Q3 n, v' B4 m( z; m6 X+ a我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
/ l3 C1 }8 ~( v4 g$ S* Y) a) n, `4 N8 m* Z2 j) M8 d! m' e$ O
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
4 F: n) O% L6 r
  _& U* ^+ G4 u: c8 D' v那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
! ~  n! w$ F) w( d这是AGV_putin中arrive的method。& k1 i8 g8 a, w  i% Q* B% X

9 w3 f7 U/ M3 J% u% W1 R当到达物料速度越高时,这个报警更多,

3 K4 G1 `$ c, s7 T/ Q  N4 q另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-8 21:54 , Processed in 0.021715 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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