设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5778|回复: 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'
: S0 `# M( b  t2 m5 @$ d*/
+ k( Z: @0 u  ~5 ?! pis; a7 \0 J# Q* z6 _
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 e( m2 s, o& N+ l1 \- q9 Cdo' _6 C5 {. B% _" P; R; O' e6 m+ i  @  q
        Lan := rootfolder.Internal.Tools.AOLlanguage;8 c/ k! _5 M. |
        if current = @.Destination -- else return
- d7 K4 b2 D: B0 p9 H1 L8 e, }        then
& @9 p  T4 w; \2 r                @.Destination := void;) O" M0 t8 E  ?/ [
                if @.occupied then# A( w  A$ N/ b+ y
                        part := @.cont;% ~: y0 [$ }) |3 S" O2 x
                        @.transpOrder := void;1 j! F& Z9 Z: V9 p' M( [- f5 n
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# R% R$ Z* F6 _( D6 P, G
                                @,root.eventcontroller.simTime);
. @% l* ]+ x7 [1 d                        @.HasOrder := false;! Y, P+ {+ [) g, i" f3 N
                        @.DrivingHome := true;
) p: A# H8 @4 M" k1 T( h                        rgManager.tryToStartTransOrder;# ]- C0 ]- T. T3 a. h
                        if @.Destination = void7 d- t- N, O0 ^9 e) C, I
                        then -- no transport order for vehicle @: j+ P4 I5 Q6 n/ s- t
                                @.Destination :=7 u6 s- @3 @& e0 z4 M
                                rgManager.nearestFreeStation(@,track.~);' \- i9 ]0 R, P
                                newDirection(@);   5 Q! q+ D1 C0 {6 d, N, q7 K
                                if @.Destination /= void then+ x7 b5 P; l( k
                                        @.Destination.NumReservation :=
7 I2 \* l: I: V                                        @.Destination.NumReservation + 1;
- ?" e' s& f% n' r2 h! _                                end;8 s2 y; f! z* W
                                @.CurrIcon := "drivingHome";
" R, u* E  @2 f- t/ v  i6 s                                @.DrivingHome := true;" I% K5 C. i4 a9 S% O+ q
                        end;
$ s$ p. F" V6 {- M4 T                else -- the vehicle @ is empty, both vehicle and part are in the same dock station7 S1 x0 |3 a$ s) g2 p8 j  `3 F: I
                        part := @.transpOrder;
8 G# i% l/ y4 U5 }: u                        part.move(@);-- load part, _  L7 K6 G" Q$ E' G
                        @.CurrIcon := "load";
7 E* W0 H& E% w- i/ J. b                        GlobalDistObj := part.globDestination;
& Y$ a2 W2 a. r- D* T6 O                        assignLObj := rgmanager.rgAssignL;
# `, K  t+ ~4 Y# A2 g                        row := assignLObj.getRowNo(GlobalDistObj);0 ^- X7 b: b$ Y1 p4 Y& |
                        if Row = -1 then -- since 70
. j3 }3 G0 |4 p5 q1 z* f                                if lan=1 then+ s" O$ v. |( t( c
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
) m( z( A3 L6 c( L* k, f: K' ^                                                to_str("in der Andockstation: \"",?.~.name,"\""));
; A3 B7 W4 E! P5 U                                else! _8 }! i( N0 K, S/ U5 i3 c
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
3 `' F, D$ s+ r. M$ X                                                to_str("in docking station: \"",?.~.name,"\""));                               
. S# b8 Y) D9 i2 _/ Z" J                                end;3 N6 F. w+ ?1 z/ ^
                        else
1 h/ `# @: S. y" e                                @.Destination := assignLObj[1,row];; j/ ^; t% l: ^
                        end;                       
* h/ T& W5 i6 @. n# X                        newDirection(@);
& \5 |9 [2 `( o% q$ D0 \  d                        @.HasOrder := true;
6 K: B" \. `( T* W9 A                end;
# S3 i5 M5 S, y( e+ U        end;* i8 A) j; O" N) }; f( @* S& K
end;        -- of the method/ _1 I" L7 `1 t3 u" o! m
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 7 @1 P" b6 d& S( e
3 z3 C$ Y* k6 s4 [& C/ M
这是AGV_putin中arrive的method。
1 K( |) G  z% _% O+ ?" u/ J) Z( s1 n+ G' E' l  @) \$ a9 |
当到达物料速度越高时,这个报警更多,
9 g9 F: Z2 O# V% E4 f可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
/ t& V: j1 u) O9 M4 `* x. i' M4 \7 ?程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?7 |7 U  q7 ^% A2 V, n

7 R6 R( a1 D' G  I+ O另外一个小建议,就是move,所有的move都可以这样
2 o8 V# e9 P$ ]' Tif not move() then debug end
6 }, H1 h2 E& G& U1 F. {这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。0 b; I3 x& K0 L2 b0 a
plant simulation中的free libraries有AGV模板,$ f( b5 S1 i4 D6 p: l9 _) s' V. ?  E
里面也有案例。
& y1 N9 B! [! A( a' }# q4 N* T我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
& r; D( n# C! w3 d
- s1 l" E% X! ^6 J我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
7 G' l0 g( v' j" m- _
; g9 j1 b$ m4 h/ T那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
+ Q) \5 c# [: [. R' z5 N% {这是AGV_putin中arrive的method。
- w. F- t# w" N6 X! ?  E/ L; J: l
: Y' _  O5 t" w: R3 h) t# M当到达物料速度越高时,这个报警更多,

- }+ w# X0 \8 v& M- c另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-12-19 22:14 , Processed in 0.020195 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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