设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8734|回复: 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 J* w6 ]8 A3 S  k6 P
*/
, l. M! s1 S4 m! i- m3 V( Lis9 P5 d; G1 r$ O7 o( R# T- F
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;. B+ n) j3 O$ e, ?! @! O
do
" c" _* C  m4 |, E        Lan := rootfolder.Internal.Tools.AOLlanguage;
, T( l% C  }0 Y        if current = @.Destination -- else return* O1 ~6 n. Z# ^) |
        then. U4 l& Q$ h4 S
                @.Destination := void;
: l+ v2 G! Z* O. k: H, I                if @.occupied then
7 {, ~$ G/ L) v% K: h                        part := @.cont;
. u2 |) l! ^  ]9 a  [( U6 I4 ^                        @.transpOrder := void;
# L% E# }6 Y2 E8 C                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 U0 |3 d+ T4 l( @$ o* g# g
                                @,root.eventcontroller.simTime);' R: E; q2 p! T$ i/ M
                        @.HasOrder := false;
+ |% |' v* T5 F3 B# |' Q: A5 g" C% ^                        @.DrivingHome := true;& z; C4 p  G& K2 Q2 \
                        rgManager.tryToStartTransOrder;
$ z9 s8 \2 V7 A( B) @                        if @.Destination = void
- O9 t' J; s0 G$ A' _: W1 C                        then -- no transport order for vehicle @
$ F+ N" M/ x4 ?5 j1 D% F4 f( u                                @.Destination :=
6 _+ |/ n$ ]$ _                                rgManager.nearestFreeStation(@,track.~);
/ P# _: P  T* R' g9 \4 I+ d! u                                newDirection(@);   
3 m3 q) [* R. l6 u% k+ t" ?, ?2 U+ Y& [                                if @.Destination /= void then; ?' ^* e1 z! a6 Q, m
                                        @.Destination.NumReservation :=
2 w( u2 s$ @; c* O                                        @.Destination.NumReservation + 1;$ b# n+ E. {6 c& R- O  {! {: f+ V
                                end;( K( f8 O: H8 q  @' C
                                @.CurrIcon := "drivingHome";9 V: b- x* |1 ?3 c* H
                                @.DrivingHome := true;
$ _' L- t# {( ~# ]                        end;- ?! p; x) Z% k0 ~, d0 Y3 L5 U. O, @
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station* T6 P9 V, S6 L. H
                        part := @.transpOrder;7 Q$ f0 A- K" l
                        part.move(@);-- load part
9 o0 V2 c' B/ D1 a7 Q4 _4 t                        @.CurrIcon := "load";, d) r7 U  a: G. q+ t0 f4 u. M
                        GlobalDistObj := part.globDestination;  O( {; `* _, F$ \4 c. h! u
                        assignLObj := rgmanager.rgAssignL;# O7 }" P0 I- y" B; L6 ?
                        row := assignLObj.getRowNo(GlobalDistObj);( ^8 U7 `% V9 @3 w+ r2 g! r
                        if Row = -1 then -- since 70. F0 d8 m3 F' N% o3 n
                                if lan=1 then
9 g  p2 m) E; S8 l  `                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# n; R" ]* g3 C0 @" p
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
6 Q& k. }; k6 T& n. R( G" p                                else6 ?$ M$ ^* ?$ `
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),6 u9 k: N; M% N1 b
                                                to_str("in docking station: \"",?.~.name,"\""));                               
! U7 w6 r. f% T# g/ G' d                                end;( F! a+ N1 y' T! `
                        else0 Z. ]: c7 I+ I5 X1 g
                                @.Destination := assignLObj[1,row];# _. V' C# B0 {! R( h# j+ F. t( t, l% o
                        end;                        ( I- |/ ~5 z2 w
                        newDirection(@);
; m% F: S+ w4 ^& N0 q1 O) B: W( |) p9 @                        @.HasOrder := true;( r# j+ y. D2 a+ i. M" u
                end;- O1 C: L/ I! m$ C  ?4 p
        end;6 W! s6 K4 L1 O% ^5 a. B: I: j! [( n
end;        -- of the method% S+ U, X; x: Z: e
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
0 \- m9 d; c: o. k+ s/ z6 M' S
1 T1 O& D! [  j; |) E1 }, }这是AGV_putin中arrive的method。
+ {, n1 T4 C6 q
% j7 ?- T% H0 M4 T3 e当到达物料速度越高时,这个报警更多,
7 w, j9 H1 W' k8 C% w# h7 V可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。( J. P8 I; y3 M3 \) n' {
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
9 P6 u: j/ U- ^
) k" M  @; f0 l  i, _, M7 s' a0 Y另外一个小建议,就是move,所有的move都可以这样6 H: _/ ]7 O6 z2 D) ~
if not move() then debug end! o/ ~9 {' G) Y5 q  J! c; Y
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。$ m; S4 Y. B+ u9 ]
plant simulation中的free libraries有AGV模板,
; o: p. B% ^3 G' g9 H. a% T里面也有案例。( ?. L7 q: w- T
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。' x5 s; E0 P! l( ?- |+ B9 Z( C0 ]

. Y5 A% A% o4 J6 f) o我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
2 u* X8 \3 O8 Y% D3 P9 y0 e
9 C( @% R; L  O3 H  o  O( C2 t那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ; P1 [2 _  ^3 P( f3 p
这是AGV_putin中arrive的method。
( V0 Y$ r4 o: B3 f& @9 q! I4 {2 k( a& B! W' Y7 u
当到达物料速度越高时,这个报警更多,

$ ~. D/ r6 d/ Y$ n5 a: L另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-23 08:27 , Processed in 0.016813 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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