设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9882|回复: 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'0 v# H5 |0 U$ ?0 a7 ~! g
*/5 s* l+ o8 m. k- ], f; u) f
is9 r9 d6 D% S8 U) I
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ z1 ]1 K9 Y# Y, K5 k
do# Q7 }6 g6 O( o( g6 O
        Lan := rootfolder.Internal.Tools.AOLlanguage;6 p. j3 d; }; O1 d
        if current = @.Destination -- else return( B, i$ `3 Q6 {7 H3 E8 \1 E2 ]! v
        then$ w: X  \6 M% R4 L. Z6 m1 G; D0 E
                @.Destination := void;# j. @0 ^7 p. ?* m5 g' K9 h0 u
                if @.occupied then
' }3 ]- k( S6 \, g; I! K( q! y                        part := @.cont;! L9 l6 R. f" L$ w( b* I
                        @.transpOrder := void;( c( Q6 i2 Z+ X# s9 e, j8 f) ~
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: ^1 k; S% [/ a5 J
                                @,root.eventcontroller.simTime);! q/ F+ K( U8 m9 Y2 C
                        @.HasOrder := false;
# B8 N0 _, L  n" X                        @.DrivingHome := true;
$ R. G' m! }( f( o                        rgManager.tryToStartTransOrder;
0 b$ a, t* }- X+ X                        if @.Destination = void# x( S2 S# x9 g( m: t
                        then -- no transport order for vehicle @
! j: E8 V; Y! y7 I/ A                                @.Destination :=
) X- r/ ?- t- V) x: V                                rgManager.nearestFreeStation(@,track.~);
. ]0 _, ~) `& G3 {                                newDirection(@);   
! [2 \! q+ X* d. C                                if @.Destination /= void then
$ ]- I" B& ?5 F. P& J5 ~  B4 z- C                                        @.Destination.NumReservation :=
+ N8 A" S0 G, ^' C7 ]% g$ S3 w                                        @.Destination.NumReservation + 1;% l3 D# g  I$ O8 }" R& M
                                end;) o3 h  R% y8 k" L  z: U% r, h
                                @.CurrIcon := "drivingHome";) R0 b. K3 _' x; f6 f
                                @.DrivingHome := true;( g0 @7 q& g# O- e2 w4 A
                        end;# N3 C" ~7 V) B2 Y  v+ R6 R( V
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
# O# {" \9 a: s) B2 a7 y* Q: s* G                        part := @.transpOrder;0 p" G$ h" u2 |$ O" ]/ T9 _( K
                        part.move(@);-- load part. h8 c2 M* S& v2 d9 C+ v
                        @.CurrIcon := "load";9 w: ^7 R% ?/ J, Y) _, t) M7 ]( p
                        GlobalDistObj := part.globDestination;
0 k2 c; u( ]  l1 q. u' Q+ d                        assignLObj := rgmanager.rgAssignL;8 N$ N+ w8 ~. m5 H  R1 U. A
                        row := assignLObj.getRowNo(GlobalDistObj);4 y$ T- R8 m2 |
                        if Row = -1 then -- since 70
4 ]# h: @+ h: `: p                                if lan=1 then& R9 C" j# W. R. L" }. ?
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," u6 j! d2 s/ [  q$ L5 |7 s9 E
                                                to_str("in der Andockstation: \"",?.~.name,"\""));% R1 j+ E% {  F
                                else
0 x* W9 y+ Z0 h$ ?- d6 C7 |                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),( b( d& _  C0 j# z
                                                to_str("in docking station: \"",?.~.name,"\""));                               
8 f9 \: [7 o! I2 l0 T$ t                                end;# `  N' X; Q& E4 M
                        else* h7 q* T6 @# \  Z3 X3 L8 q
                                @.Destination := assignLObj[1,row];
: y% {" z* i  @, T* Y; W                        end;                       
; L- H. x& p  K                        newDirection(@);
) S, {* s/ j1 Y0 H9 o                        @.HasOrder := true;
0 R. B" B# j. o0 g                end;/ m. M2 x5 C8 ]" B) X/ b
        end;7 Z+ l$ M5 X' G# `  p
end;        -- of the method4 |: U9 a; S. j. K# Y- _  x
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
- R* I( p5 X) ~& M2 a
/ ?3 ^( j1 {1 G9 [& I这是AGV_putin中arrive的method。
/ B* ~% f5 }2 I6 ~2 U$ }( X! @1 N7 {1 M1 {
当到达物料速度越高时,这个报警更多,
7 l4 c/ a8 z; j# e) q3 p* t可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
: C+ s* p- u; O2 \* y* D程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
: {. [: E  S. q: [& ~
' f! A3 v; ^/ [* y+ G另外一个小建议,就是move,所有的move都可以这样
, w. H; x- c5 T& oif not move() then debug end3 J+ `0 B7 {# h6 @- i; ]! K/ H
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
: |7 ~; }3 y( K2 Y  |plant simulation中的free libraries有AGV模板,! F: c- i! s% z
里面也有案例。6 Z" p0 |/ B6 f, P# b% E
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
8 N" `+ y/ m7 h: V  A; \$ ]  Y( E  q) h
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 0 ~) W+ o) o9 _, N- D5 P% j

  D5 u) v' m8 b9 ?9 \那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
+ ^( x5 |$ T' k) q: P这是AGV_putin中arrive的method。
0 K- V& A) Z4 p' Q! ~  E! p# U) e1 Q! R- k  v& I3 H
当到达物料速度越高时,这个报警更多,

' |4 I# {& `: K另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-8-31 07:43 , Processed in 0.018062 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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