设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 10206|回复: 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'4 D) c( G5 D7 w/ i; a2 k
*/
2 c' ]9 O# u2 {# b- s' tis
4 E" Y/ X* o, ^, R        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
& _/ {: h# |, f: b- ?! a1 ldo( v- n+ `( T5 t8 Z, Q; O2 Y
        Lan := rootfolder.Internal.Tools.AOLlanguage;
( c) H0 u# J6 ^" o8 i        if current = @.Destination -- else return
8 {8 H6 C9 `, V; K, t' e. D) N        then
( e( ?+ y5 r8 R/ F# ]8 w4 n' T                @.Destination := void;
% ^. O4 h) u) V                if @.occupied then9 U5 k- Y5 O5 ~( _
                        part := @.cont;+ T% F; b* G! J7 l! s
                        @.transpOrder := void;- q* @0 d% m: V
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,& G5 r, H# U5 N, {$ Y. {# |
                                @,root.eventcontroller.simTime);
1 J+ G8 P: g0 h( Z                        @.HasOrder := false;
8 ?: U# t% n( I' b+ o. M; S- B                        @.DrivingHome := true;  z/ |. H( i2 B4 U% D) ?- G
                        rgManager.tryToStartTransOrder;
2 z0 d: i9 o8 E1 d. D7 t                        if @.Destination = void
, {. V9 V7 B2 W                        then -- no transport order for vehicle @  y  H" G, U0 C: s- W
                                @.Destination :=( e- N2 |8 [4 l4 n: l
                                rgManager.nearestFreeStation(@,track.~);3 b- R3 q" G+ A1 D
                                newDirection(@);   
% `0 L5 t9 C. N; B' {                                if @.Destination /= void then
0 a8 M8 F, Y, j0 A2 t+ d2 ]3 d                                        @.Destination.NumReservation :=
! Q9 }1 Z+ ]9 `                                        @.Destination.NumReservation + 1;( W9 v& d6 f$ i
                                end;5 D9 W' s  c0 ?* y/ V' S
                                @.CurrIcon := "drivingHome";
1 E/ v- r+ x/ ~/ k. Z                                @.DrivingHome := true;
2 Q9 O  u# Z8 {  A4 i* Z                        end;- z4 o3 ?' b" `+ v9 v2 h
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
2 h8 d% J/ s  g) s                        part := @.transpOrder;
' b8 z0 }) h& O0 y# C; ]1 X( r' G                        part.move(@);-- load part7 q3 ?; M% |# z9 ]( [! I$ @+ a
                        @.CurrIcon := "load";
  N! A  |2 I& Z/ l" z                        GlobalDistObj := part.globDestination;! W  L; q/ A0 W! n- I3 W$ e9 B
                        assignLObj := rgmanager.rgAssignL;: f1 y5 B4 |4 ]
                        row := assignLObj.getRowNo(GlobalDistObj);
& g/ ^& J) c" L$ o                        if Row = -1 then -- since 70# g- N3 L) T( b/ {
                                if lan=1 then- z4 d! \4 F5 r* [: V$ }7 q
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- O1 v8 B2 V3 c8 B' w' |; Y
                                                to_str("in der Andockstation: \"",?.~.name,"\""));/ P* d. v) |# u: ?9 k7 i( [( m5 ?* f
                                else/ ^( }" G6 p( e2 R1 z( y& b7 a& ^
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# ]" |, @% ~/ Z9 l3 H                                                to_str("in docking station: \"",?.~.name,"\""));                                : M7 n* C( s# X: Y- c" Q
                                end;6 t  y2 v* T" d7 A2 u
                        else, ^' O3 H: \  f6 Q: o' \& e
                                @.Destination := assignLObj[1,row];+ P6 u* Z  p& |! o5 ]' F
                        end;                       
9 E8 x; z, i4 ]) E9 T/ n& q  b                        newDirection(@);$ j( x. j- k* S' F8 d% i
                        @.HasOrder := true;
. I9 Z4 R* k' v                end;& q0 z: `3 B( m6 G( `% ^: u1 R. h
        end;8 S, Q) B  {2 x
end;        -- of the method
) f  z0 R/ X; I$ @5 p
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 $ Y9 l7 X; S7 W% b  z

4 ]. C# E3 Y4 F5 |( V这是AGV_putin中arrive的method。( L) g. [4 \+ \

& L* q' D2 n* R1 K# k5 W- D+ ]当到达物料速度越高时,这个报警更多,1 D; {/ F1 \' F: @4 r. `
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
6 R( V  C$ a" y% }8 |" o, B$ y5 S程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?" A. ]- v: Y, i3 ]7 Y
7 C4 Z$ w' b1 E' i* K
另外一个小建议,就是move,所有的move都可以这样( B: F- s) Q; C1 J, H
if not move() then debug end* m% C8 h! G/ \: D, @3 s! q
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。$ b7 Y5 h5 c2 Q, t- x' L
plant simulation中的free libraries有AGV模板,  f  a& ]% y! C: i. f
里面也有案例。6 A* V% V9 w, J" x
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。$ L8 y8 c6 M1 ?$ O: S8 A  x# [
" N' J+ x& X  l. H* O: r
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
" K. U# ^- C/ R7 E2 S( t) Y# `
) D/ V# U3 h& J% S# y那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
( b4 c% c. L/ x7 W! @+ |这是AGV_putin中arrive的method。
" Z! x# ?% z- c* E4 C) o' _' n7 ?& f5 y( i, F+ ]4 |& Z* W
当到达物料速度越高时,这个报警更多,

/ ]5 o# ^4 `1 A! N另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-9-20 04:06 , Processed in 0.018237 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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