设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8027|回复: 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'
' s/ N- o/ C, j/ f; G$ T  c- M% A, ~*/5 A" F% Y* e3 s0 N. @: R
is! M2 p* z. d: i7 p* Q! K  x
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
  G; j3 @+ z6 w9 o7 x6 R. ?" n0 Cdo: e* U: R0 ?+ u  V6 e
        Lan := rootfolder.Internal.Tools.AOLlanguage;
4 K9 P! ]# y3 ?- S( I  v; s        if current = @.Destination -- else return
1 m( a! y" a' _% |) L$ g2 e, m        then
7 u* k% p& t4 L) r# i0 r0 t) W( N7 Y                @.Destination := void;
$ V. Y, \: q) X                if @.occupied then( S3 Q1 R7 j$ J) x$ A
                        part := @.cont;% L" {0 x/ }9 k) s- V( K) |
                        @.transpOrder := void;
* ]) A8 x; h: \                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 `- ~; }& x$ O' ^. k
                                @,root.eventcontroller.simTime);
" d- ]+ W. N& P1 O8 z: k* b) s                        @.HasOrder := false;: ]  A$ [/ v& S2 [" m; [0 G
                        @.DrivingHome := true;
, R6 A7 G8 k3 r6 ~+ F0 T) W                        rgManager.tryToStartTransOrder;
$ t* F/ v+ F% S& z, K. c) d                        if @.Destination = void; J; @% J' n$ t8 s: h6 w/ ~6 _
                        then -- no transport order for vehicle @
2 o/ O) j( m5 A% d1 h+ S$ L                                @.Destination :=
( z  M1 D+ d1 `& G- I                                rgManager.nearestFreeStation(@,track.~);3 t1 |8 O6 w' l7 p4 D" A
                                newDirection(@);   
2 c% [: I  g' V( N4 z4 k: {. b                                if @.Destination /= void then
  \. X! C; V7 X' G( K                                        @.Destination.NumReservation :=( h" `5 ~5 [/ R/ D
                                        @.Destination.NumReservation + 1;5 r) B; a% Z+ R& w: ]2 M/ l
                                end;# ]9 c8 E- ?. V5 P  c5 W
                                @.CurrIcon := "drivingHome";
% ]; d# e( E' V, g5 j: h                                @.DrivingHome := true;
; x. ^6 M% J" x& I* \/ ^) \: X( A                        end;
! N6 M/ U$ A+ `+ b% c- H  c4 v                else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 u0 D* o, v# Q- n/ a, b( m
                        part := @.transpOrder;0 ^6 E- g, U  G4 g+ y/ V
                        part.move(@);-- load part
4 p5 u$ g$ l, N$ [                        @.CurrIcon := "load";
; a/ t& U! K( k3 @1 Z* S$ d                        GlobalDistObj := part.globDestination;
" r5 ~! w5 ~0 b                        assignLObj := rgmanager.rgAssignL;
' G6 n# z5 ~2 B) E, X8 g                        row := assignLObj.getRowNo(GlobalDistObj);+ Z+ C- c9 x( R' `) M6 K
                        if Row = -1 then -- since 70
9 j# f+ j0 `$ N, i! N$ t  z( g                                if lan=1 then
% Q; w9 x$ h6 l, D4 N, d                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& @" f1 R6 T, V, M9 e+ k
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
: R, o0 N9 }7 H' L; ?) d                                else
/ Y7 \9 H& J7 I6 ]- F' Z9 ]) ^                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),' ?# @& k# A: `0 E! c
                                                to_str("in docking station: \"",?.~.name,"\""));                                6 r' a% M( C; h
                                end;: d  U1 [; r# A4 x( i5 d
                        else7 S* ~( X3 z, b: Q' s# d7 F
                                @.Destination := assignLObj[1,row];
" m! P8 T* [% o2 Y  Z                        end;                        % N2 M( k8 A1 U" T( v/ @
                        newDirection(@);
- k" ^! R  `) U+ h                        @.HasOrder := true;; L- J2 a) h- [! c7 V9 g
                end;0 z4 ~8 f5 Z% R4 w6 |5 Z# a
        end;
* E; b. h# r: x; tend;        -- of the method
3 s! v( b3 x. E- v
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 5 K. f6 o7 s& w6 J* ?6 l' m
- D7 I6 \- v  K9 s. L
这是AGV_putin中arrive的method。
4 M9 x* z7 \! Z+ Q+ t$ H: j' y2 k+ [6 o- G% W) c% C
当到达物料速度越高时,这个报警更多,4 Q* a' G( i9 C' n2 f
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。1 Y6 [2 K6 G- T/ s1 q! u( R
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?4 U2 l" t) z! p1 q' R6 A$ X
# D# R( I+ f. `& n# i
另外一个小建议,就是move,所有的move都可以这样* F& S: H& B8 A- G4 E+ t" g) H
if not move() then debug end
. M! J& {* ~% W% |& H$ l这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。6 q! o) m$ ~5 u9 Q: T5 W3 o2 u8 z6 I. u
plant simulation中的free libraries有AGV模板,
, D; ^; k, R- S: O) T: k& |里面也有案例。2 c7 Y, N  B: }. j6 u1 m, k
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。  s. n. v4 S: ~' Z
3 S9 d& j/ Y! Y+ }
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
8 E  D1 e; ?( |7 ]5 v4 t9 i
- A  c' ^' H' W  X: k那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 $ a( _4 T. {2 ~$ Y* M. F2 e* ~5 K
这是AGV_putin中arrive的method。9 a2 I% q- M: L( X4 N) x$ {

1 Q- f, v7 z; Y) J" _当到达物料速度越高时,这个报警更多,
# Z7 N9 J5 i/ i6 r
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-11 13:47 , Processed in 0.022965 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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