设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7123|回复: 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'7 v$ V  c/ T% t0 ^; p* a
*/
7 H; ~, t' V$ V' _+ p& s( z/ Nis& @/ v8 X$ u8 u* d
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# i: `3 t$ v7 H; Q3 p/ R/ Cdo2 N: n" r8 a- Z8 x/ G) d
        Lan := rootfolder.Internal.Tools.AOLlanguage;
$ g: b; y# `. y* g        if current = @.Destination -- else return
7 L- j0 ]- T$ g- C) `        then
0 b0 X4 X3 R+ b/ }* g% S                @.Destination := void;" ?3 N* ?+ v5 }* s0 m, ^
                if @.occupied then6 T/ F  Z, B+ W
                        part := @.cont;
( x- i# [1 M+ @7 [, f  c                        @.transpOrder := void;
+ x/ l& ]$ N4 }5 Z$ ]) X* B3 i                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
1 j  K) L- I3 E2 M7 P                                @,root.eventcontroller.simTime);
% P4 _+ ^$ I& H/ j+ ^. g                        @.HasOrder := false;
$ H. l, M& x3 m( T5 x  k                        @.DrivingHome := true;8 A% |3 t6 l" F4 n$ X
                        rgManager.tryToStartTransOrder;
: v! s# E' v8 o2 \                        if @.Destination = void1 |* `( L, L& ^4 \) {
                        then -- no transport order for vehicle @: W( T% e4 M0 @8 V' ~8 C8 y* R
                                @.Destination :=( E" ]8 v4 f4 a3 E3 Q* i
                                rgManager.nearestFreeStation(@,track.~);
6 }' {1 \+ |9 ^# I- ]  r6 g7 ~                                newDirection(@);   
) [& \, e5 E& L5 `  {! Y0 b                                if @.Destination /= void then) x; V" g6 j& G; i. j, v; H+ Z
                                        @.Destination.NumReservation :=
5 j: S! Q2 f0 e' B$ x+ m                                        @.Destination.NumReservation + 1;6 c: R9 d/ ^8 o  j" r$ A7 U: C! |6 K; N
                                end;6 t! {: _8 n( T  m4 M
                                @.CurrIcon := "drivingHome";
' F' R* V( Y3 _; b" a; ^                                @.DrivingHome := true;
& f0 y- V9 f. [8 S! c, E                        end;
* f$ g* \; }& d$ B3 Q8 J0 Y% g) M                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
3 g; h( i9 J$ e3 i, u                        part := @.transpOrder;) w' B6 u2 X8 ~3 h2 r" ~
                        part.move(@);-- load part4 m. r+ `; b6 Y" R2 o8 b) S4 @
                        @.CurrIcon := "load";
% j# [! K$ T! T+ s                        GlobalDistObj := part.globDestination;: P' d9 z- y4 L7 n% [) ?
                        assignLObj := rgmanager.rgAssignL;
# w$ C9 J% Z8 Z2 i+ ?8 \0 S8 x4 C: ~' _- C                        row := assignLObj.getRowNo(GlobalDistObj);, b: s2 A+ @- F; U
                        if Row = -1 then -- since 70% p! C/ Z8 B- _" f0 Q, q) I7 p
                                if lan=1 then: }2 X# y' i4 d$ ?% @
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
; L  G3 A0 ]" S* s3 \3 h                                                to_str("in der Andockstation: \"",?.~.name,"\""));
5 o' k1 ~! L$ M9 m$ O                                else. X3 P( L. X5 t- T2 y& t( C
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),$ Q3 N7 @0 b/ d9 ]( P- W8 _& L( @
                                                to_str("in docking station: \"",?.~.name,"\""));                                % s- s# g/ Y" q# W8 w
                                end;
1 O2 @6 G5 R8 X7 S& Y. o. D6 l                        else
* m* u1 T2 L1 M                                @.Destination := assignLObj[1,row];4 u- x% {: x, c+ q& Q& }( y5 B
                        end;                       
3 |! R$ e1 w) t% l; F                        newDirection(@);
( U0 w5 u+ x# t- C4 ]! x3 l                        @.HasOrder := true;
5 R: \5 r" l. k& M                end;$ `- ^7 L: |7 i. |
        end;3 t) G# M5 Z' I* \: T
end;        -- of the method5 U8 G  C) @! b: s- P# O( v
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
8 o! V! @1 s# D/ l& n4 q, a" ]
/ X/ H7 _+ N1 @7 X8 C1 |  H, G这是AGV_putin中arrive的method。  X$ o- F7 Z4 g" t3 u

* G8 ?# ?; L$ ~3 V当到达物料速度越高时,这个报警更多,: _! W& y* N4 S' p
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。% D- c9 a! g0 C1 O- b
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?/ t" Y% `0 {. Q) U

/ u8 ^2 }; l  v! b( c$ O' h另外一个小建议,就是move,所有的move都可以这样
+ I1 ^  {$ B) M; A4 B3 N/ k! nif not move() then debug end
* S4 v+ M2 l( t/ L5 p. K3 S2 |这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。/ n6 R' p3 R9 ~8 ]; _" c2 N
plant simulation中的free libraries有AGV模板,4 Z6 ^6 ]& u; G' k* I& T
里面也有案例。
+ z& X( E+ L* e% ?3 e6 J我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
  p  w& ~4 C8 E! R' m4 ^, K3 [
* a7 h" k; d" Z* r# w) K) J$ |我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
6 D% J! u+ X2 {) P1 ]
0 M$ }+ n& O# G- b- I6 N' S2 m7 T那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 * Q# i1 ?) e5 \0 p9 r2 R
这是AGV_putin中arrive的method。
9 {+ r4 Q$ P/ c, U- j% @  b3 E" i3 k
" M1 F/ u. O& X( [  O: K3 V; R当到达物料速度越高时,这个报警更多,
% @6 s* l6 F% r: u9 K
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-19 21:49 , Processed in 0.017715 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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