设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7789|回复: 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'+ U* ?0 y( {3 T
*/" |$ |& c  k) o$ p$ }- T
is! Y, K) Y) b0 d) ?" c6 M4 |$ Z& Z
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) S: M6 \9 U) m0 R9 v3 ndo
9 \. T/ d. z, Z4 z# c        Lan := rootfolder.Internal.Tools.AOLlanguage;
& l6 z% E0 F( W5 l# ]  v        if current = @.Destination -- else return7 E  `- d' j7 q$ S
        then
1 @& E( ]: {1 M% Q4 c, K                @.Destination := void;
# X8 r0 `9 x) Z0 P' A5 e6 ]: E                if @.occupied then
; Z9 F5 e) y0 U2 B5 I# x+ F                        part := @.cont;3 O* p% z  F9 z! g5 e7 c+ ~$ G1 f
                        @.transpOrder := void;
5 N0 k& m& w7 @5 ^8 K8 g* A2 ]                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
2 y! \# x6 |" n: k7 V4 N2 y" t                                @,root.eventcontroller.simTime);% t" f8 T0 ^; z& D" T  _2 W% D
                        @.HasOrder := false;! y6 _2 e9 Q" j6 e' I6 [2 Q! D
                        @.DrivingHome := true;
( [, h  m- I( Z$ \' T, i. Z                        rgManager.tryToStartTransOrder;3 b0 r4 F% a: a/ w# t
                        if @.Destination = void4 N  W* w" F7 C  C! V
                        then -- no transport order for vehicle @3 o4 ~: a7 w2 r
                                @.Destination :=
6 G9 i1 J6 O+ m# |                                rgManager.nearestFreeStation(@,track.~);* d- k7 y( k  D4 D3 F
                                newDirection(@);   
$ {% }& q/ u% v8 Y! e                                if @.Destination /= void then
  D' N. G( y6 i                                        @.Destination.NumReservation :=) b. ?  u- M/ a4 `7 a" h; u9 v0 b( i
                                        @.Destination.NumReservation + 1;
9 f9 y; d4 E+ R4 y* n/ g5 z                                end;* M/ ~3 U2 ^% W2 Q* r6 L4 }& y
                                @.CurrIcon := "drivingHome";
+ t7 F2 R) d7 H$ Y7 ~7 h                                @.DrivingHome := true;. |7 z: i/ v3 A+ J
                        end;
) w! R& i4 r% N! J                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
1 y0 j( w5 |+ H3 E7 y! o                        part := @.transpOrder;
; V3 R$ {. ^6 \& W1 r8 [                        part.move(@);-- load part2 K& r5 v0 \& m6 M" ]
                        @.CurrIcon := "load";
2 H, L+ D0 P+ e* {/ U4 x/ k                        GlobalDistObj := part.globDestination;/ `( B0 R3 u8 g  M7 V' u! y
                        assignLObj := rgmanager.rgAssignL;
3 S4 E( [( w2 I7 H                        row := assignLObj.getRowNo(GlobalDistObj);- ]) R8 K% c/ O
                        if Row = -1 then -- since 70
. N/ [& e# A5 O7 ]4 r                                if lan=1 then8 R) e; N& I: q/ s
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),9 T8 n# W. G8 v& f
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
5 ]" @" f( C! `0 |8 U0 E  F5 x                                else
5 j" }: R" X. [5 M- h                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- j- @* {/ q& T  u, q9 u! `. ?                                                to_str("in docking station: \"",?.~.name,"\""));                               
/ l+ D& I* R/ Z* d                                end;& N4 N& C* Z6 c, r
                        else  {/ v3 E0 j+ \
                                @.Destination := assignLObj[1,row];
, n  G- Z# m5 ]. H% @( w" h1 R                        end;                       
' b- W! O9 J2 L0 q5 x  r2 n8 k* j                        newDirection(@);: k, s8 e, L# M0 @1 ^1 O+ N6 Q& M) y3 }
                        @.HasOrder := true;6 }) c; m* E( \! c  U1 z0 M9 e7 z
                end;
$ m6 r- v$ Q& l; F2 `' j        end;4 H# t! [6 n0 `. t
end;        -- of the method
! s7 Z& }8 x+ V: b1 _, {  q
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
: u! o( _7 T+ V. |% k/ r
1 B3 t: K4 y1 e3 d! [, r' X" n" M* o这是AGV_putin中arrive的method。
) G8 Q! z' y- H7 Z* K5 \' ^1 E$ `8 ?/ f- R$ V& b* p# _6 ^
当到达物料速度越高时,这个报警更多,: ^( A& C- S; t+ G* I* u( K
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。# T7 t; P4 [% p
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
, I. R/ k7 b3 |( {3 o+ K) E
/ o/ r& |2 m. `9 d+ W1 b另外一个小建议,就是move,所有的move都可以这样" B& @, }4 x9 Q8 T; K
if not move() then debug end/ X2 A: W6 G9 Z' `5 {* I3 ~
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
3 J% e2 [; x; M4 [# r! Xplant simulation中的free libraries有AGV模板,
/ f, R$ H# ^" j* x) @里面也有案例。6 [2 s1 B7 z6 {7 x1 S1 Q2 ^
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。; [- _6 O. Q) U) ]! ^, ?! k

6 b! q: b  f+ P我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 . j9 I3 k3 e. Z
+ f# G+ |( }  B$ P* g1 i
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
8 `$ s8 y0 i( Z4 ]& S: }这是AGV_putin中arrive的method。
9 }  i; ^+ \& Z  B- h7 \3 c1 X" R
) ^+ ^0 ^$ Q& X% Z+ \当到达物料速度越高时,这个报警更多,
" }6 V8 Q' d9 w: ]& J
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-29 12:25 , Processed in 0.014990 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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