设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8739|回复: 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'
  h7 V, J( D& l1 _" L/ j*/# v- E. l% T, q" v, _% k
is
% k5 M* [4 k! Z        part, GlobalDistObj, assignLObj:object;row,Lan:integer;# }; V) z5 F; [$ w/ d- e4 O
do
% W0 l6 K+ i" v2 Z( o        Lan := rootfolder.Internal.Tools.AOLlanguage;7 W$ \* D8 y4 M+ J1 m  H
        if current = @.Destination -- else return
% {- Y- O8 O' S3 M- I/ d8 ~# ?) l1 M        then
0 B9 B% R9 n5 \  [- t) i% }- F9 c! l: K                @.Destination := void;( `3 a- @0 l" {4 f
                if @.occupied then
: o+ v7 R, ^* _+ @/ J) Q/ t8 |8 v                        part := @.cont;
3 [! n4 c$ B$ b* @; _9 q2 j                        @.transpOrder := void;2 z# i+ b3 P, ^+ l# p& h+ C  ?" f
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,) B& H. ~8 E- z" B3 e6 q! J, L
                                @,root.eventcontroller.simTime);  C. h6 [$ c/ B  _# i
                        @.HasOrder := false;
6 M8 X( ~* y9 B) B! R! z                        @.DrivingHome := true;
: Q+ s* `. ^* P. Q6 H                        rgManager.tryToStartTransOrder;  L- S2 C! V6 J$ w4 y) I7 {
                        if @.Destination = void# F/ ^, {. m: g" K3 @& C$ o: ?
                        then -- no transport order for vehicle @
& L+ I: N# I( D1 z- J                                @.Destination :=
) y& `6 c) u9 n9 Q* ~6 q2 L6 W2 i                                rgManager.nearestFreeStation(@,track.~);% ]8 V  F. n/ Z( Z1 }1 g% |
                                newDirection(@);   
* W- Y% N$ |% _1 R) b% i1 p                                if @.Destination /= void then3 W4 R# x6 D! ^" K4 r8 t: n
                                        @.Destination.NumReservation :=
2 s( i" L6 W6 {1 ^- F/ j( T                                        @.Destination.NumReservation + 1;; _2 w' E  C6 g
                                end;
+ o2 v4 Y' w$ f                                @.CurrIcon := "drivingHome";4 ]0 R* \1 J" e
                                @.DrivingHome := true;
8 J; g! d: t! r! y                        end;
+ j$ q3 ]! N+ j( O2 l! e                else -- the vehicle @ is empty, both vehicle and part are in the same dock station! `, m' c' S8 S: ?% O$ m
                        part := @.transpOrder;; a, x; ]2 e$ ^2 Y6 ^8 K5 M( m  y
                        part.move(@);-- load part  w' B" M5 Q4 B$ I
                        @.CurrIcon := "load";1 e  U1 g, x6 r- ?. R
                        GlobalDistObj := part.globDestination;
, ^' w. D3 e& Z                        assignLObj := rgmanager.rgAssignL;0 Z5 C4 G& |$ R4 j" `7 P8 b' ]8 n
                        row := assignLObj.getRowNo(GlobalDistObj);& F' w. F2 }+ V
                        if Row = -1 then -- since 705 ]3 ^: |6 I* l! J' @: Q: s# k
                                if lan=1 then0 t9 S' d* i: U
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# a( T9 p% D3 o: l# {
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
, V" h1 o: [8 @9 k6 t                                else
1 n2 v7 p, x2 T2 I3 D6 Q$ X                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
8 q+ e. n. L! P! _" X% S0 H+ V                                                to_str("in docking station: \"",?.~.name,"\""));                                1 V( O4 V, H8 c6 P
                                end;  D  W- c  W- J2 `" W! D
                        else
" j% ]1 _  w& B* s" t# T                                @.Destination := assignLObj[1,row];
* t  r) h% c6 [( L4 F9 M% b0 h                        end;                        ) r* X+ ^, h/ _6 [- x+ M! _
                        newDirection(@);$ M) U' b& O# m0 x7 P0 o
                        @.HasOrder := true;
7 m- w% `3 J1 Z: X8 H                end;2 _% |+ i2 f  F+ U  y) }: ]
        end;
: r% f( e( y, vend;        -- of the method
  n! d  b8 e0 p5 I! j$ B7 \
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
6 y  W3 [! g) v1 T3 o
0 R$ c9 Q4 l( R& W7 U5 k9 m这是AGV_putin中arrive的method。
) G( L& r+ o! J
2 g4 }# ]7 B1 G当到达物料速度越高时,这个报警更多,5 v4 b/ a1 c, H; S" e
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
. _# W2 }2 H% W( D* ~7 u程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
( i6 H2 M- o3 r) h7 R+ Q" T  M
4 D- x3 R8 z6 K0 L* e8 E另外一个小建议,就是move,所有的move都可以这样$ O2 J/ O8 u  R" K- b# d
if not move() then debug end
1 }/ d; n7 c3 d; P7 X这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。1 o7 r& c6 K( g9 }$ J
plant simulation中的free libraries有AGV模板,
) v; L% D, q5 R$ e, t, f  m里面也有案例。
9 f* N7 p2 p- F7 E, l" z# M* P4 q我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。# H3 {% ^; U* h0 _8 {
9 e! F* c5 t1 K0 n( Y3 Y
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 + f6 j, M# F5 k6 Z, o* i

; o+ ^+ }3 D+ F那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
4 b: A! s8 a2 m这是AGV_putin中arrive的method。
' G8 z1 r+ j+ W5 n
# Y! q9 \3 o4 U7 Y& B当到达物料速度越高时,这个报警更多,
) a0 P4 {& b) `  _, }0 I5 j
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-23 15:01 , Processed in 0.014142 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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