设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9464|回复: 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'; e& N  m. s: C. G' H
*/
7 M2 Z1 k/ P7 O. Q' ris9 {; t8 y# X# E1 p
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
! A* n3 O+ `. d/ A: S6 {do: s( l0 n+ o" P/ h3 n& C1 s8 {
        Lan := rootfolder.Internal.Tools.AOLlanguage;
" J) {' c0 t5 v+ Y        if current = @.Destination -- else return
: C/ o' y5 T! k8 B1 I! t        then& @; @3 \6 J3 L$ o/ D
                @.Destination := void;
/ T6 R4 d- R  }$ j                if @.occupied then+ B6 U  ?. X9 a- D' F
                        part := @.cont;. J0 |+ ?  x" f/ ?; x$ l, s0 \( C
                        @.transpOrder := void;
) \1 r' `# l$ K$ o$ [! a% a                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! T& ^! _  l2 X, `) N( k
                                @,root.eventcontroller.simTime);2 @' ~& l9 Y" ?
                        @.HasOrder := false;7 {7 j- S  N6 K  `5 o  U
                        @.DrivingHome := true;6 R6 P% u# \- G% i( m& ^
                        rgManager.tryToStartTransOrder;/ k. h* }) d3 n) U, @* [/ w2 E
                        if @.Destination = void
! q: A/ B0 J* j& U3 g/ r. T                        then -- no transport order for vehicle @+ l) g9 ~0 ]+ F, T$ ~
                                @.Destination :=( L6 V$ _; ]+ P1 R- o- i# D) X
                                rgManager.nearestFreeStation(@,track.~);/ b5 {& z  B* x
                                newDirection(@);   
7 L# j  N9 k; c$ ^2 @+ d6 @0 t  f$ D& a                                if @.Destination /= void then
! J6 {6 d$ ~& N1 H# C8 _, D                                        @.Destination.NumReservation :=6 _" l: b9 H. i; l8 A2 G1 `- a( m
                                        @.Destination.NumReservation + 1;, _" q9 ^8 k4 W( _0 [* C
                                end;4 g: m" L6 c1 f
                                @.CurrIcon := "drivingHome";5 n% ?9 j4 N0 A! [/ w9 ?
                                @.DrivingHome := true;3 r& Q: }6 p% O; Y
                        end;
7 h- O1 h2 @' Q  @# i                else -- the vehicle @ is empty, both vehicle and part are in the same dock station" h" x& P+ M0 y: q* n! f
                        part := @.transpOrder;0 V% z4 w: _, d2 q  {+ |
                        part.move(@);-- load part" ?1 f. K+ z0 r
                        @.CurrIcon := "load";
1 ~7 @) A: V% C                        GlobalDistObj := part.globDestination;- a* q* K! {% A2 e/ D
                        assignLObj := rgmanager.rgAssignL;$ M1 y* C" j+ i
                        row := assignLObj.getRowNo(GlobalDistObj);
% A: n) y: ^. s; w0 g0 @                        if Row = -1 then -- since 70
$ X7 L$ O( b  O/ B) q& I, H                                if lan=1 then
( H4 ]+ {: D( u                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
/ f2 }+ y  E3 @4 i                                                to_str("in der Andockstation: \"",?.~.name,"\""));
" {0 Y* i" A& E                                else
! P0 X& q# A9 P2 r$ i2 H* {! \' T+ F                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 Z8 B8 e  N0 s# c! k                                                to_str("in docking station: \"",?.~.name,"\""));                                + ]" y! b3 K# f" y! D
                                end;/ X/ L, ^; _0 [$ b
                        else6 U  W7 L& u" I+ N
                                @.Destination := assignLObj[1,row];
" {: L; o! T0 ~                        end;                        0 T7 E8 q' P4 a/ G# h# y
                        newDirection(@);. s0 H$ C. u# e9 U8 s$ [
                        @.HasOrder := true;7 S# _% y6 j% ^  x
                end;+ v9 b' f% E3 x
        end;1 j. S; h: l+ N  L. e$ N! o
end;        -- of the method
- t- g9 T- |) z, D& b2 ~+ @
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 3 G$ C3 `" @' T6 |
. M& ^+ X1 j+ V! K$ i* C3 V+ U8 N
这是AGV_putin中arrive的method。2 U( _1 g. K8 _4 w9 d+ Y

0 H# n0 u8 ?. \# s当到达物料速度越高时,这个报警更多,! O9 t! R/ _- w) U  p
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。( S4 F4 q0 S, n$ s6 r0 G6 i" C! [
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?" |2 A/ |, B5 X, r2 {
3 s9 `0 ^3 a9 O9 ?4 d
另外一个小建议,就是move,所有的move都可以这样
% G* [6 D6 `2 u$ nif not move() then debug end
" @' b, W: T, }这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
+ w# h0 X5 \# _0 Z/ K5 {  Lplant simulation中的free libraries有AGV模板,  V/ \2 v3 _' w) k% R1 A5 I8 S( `  [
里面也有案例。! {0 z2 x; G1 A! x5 e* D1 F6 G6 \! {
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
6 Q1 ^8 S0 `. D
8 D7 I5 {% Y$ u" R+ C, `我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
. g0 z  c2 A: K) |9 u4 B) I6 {  q3 y8 L% K* {/ Q% p
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
8 }# }, M7 o5 I- l这是AGV_putin中arrive的method。
9 w' X- o4 J- {1 R
: q! o7 z) V( [4 n7 F& G3 `# H当到达物料速度越高时,这个报警更多,

! d$ Z4 D( v: q  x3 @4 W另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-8-2 08:55 , Processed in 0.023864 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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