设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7883|回复: 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'
* D: Y- x- [  s! W- B*/% W" I1 ^+ b: w  z9 [
is$ N4 U( \' a) P  s, C/ |# m
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
; I/ s7 ]) C  r% d$ A. b; r5 x! W' ido
8 u; c) Q# A" O( ~        Lan := rootfolder.Internal.Tools.AOLlanguage;
: I& t+ x4 Q- l( M$ ]        if current = @.Destination -- else return3 k. v6 A$ I& V9 m( H8 G9 i3 p
        then
8 v" w5 D4 N7 c& m                @.Destination := void;, o: V+ d/ c2 Q
                if @.occupied then
; H& a& z+ X) r3 U! K8 ^1 X9 f                        part := @.cont;
! v1 `" X- R$ ^; m, h+ E1 Z7 @! v                        @.transpOrder := void;& h* g. X( N2 y8 J
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# x; P3 I$ C! v+ }# d4 ]
                                @,root.eventcontroller.simTime);( b2 [% _( L9 ?. }
                        @.HasOrder := false;
4 p$ Y) V) A" T% {                        @.DrivingHome := true;& n7 t" J6 W1 r
                        rgManager.tryToStartTransOrder;
, R1 F( v) @5 w# T) m* q                        if @.Destination = void1 p" B. r7 N2 j# [- O
                        then -- no transport order for vehicle @
6 Y% q' o$ p7 }( Z' k. i                                @.Destination :=! n& ?* I# `' i3 U) Q: L6 ^3 d2 d
                                rgManager.nearestFreeStation(@,track.~);) \; l3 E$ H" T' z
                                newDirection(@);   
' c, {2 z5 c, y- K7 w% F                                if @.Destination /= void then
& ~3 _' z) b: [3 Q                                        @.Destination.NumReservation :=
3 S# X" T$ t3 B                                        @.Destination.NumReservation + 1;
3 j( e# [! O, p2 _2 c8 _5 t                                end;
! N) M; f& T# k5 n4 J                                @.CurrIcon := "drivingHome";8 U! C( ~$ G6 h8 l" l3 `, J8 {
                                @.DrivingHome := true;# J* X  i2 d6 [' |
                        end;
% q. w" z1 k) @/ h9 U  o* d1 n' t                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
" Q- x* k/ N2 f& P                        part := @.transpOrder;7 v7 \2 e* n; Y8 ?' G' Y
                        part.move(@);-- load part  C7 p: z( v# e, L7 K% p
                        @.CurrIcon := "load";9 A- X& d7 M( Q& j8 H$ ]0 G9 K
                        GlobalDistObj := part.globDestination;
) \/ J2 x: L) [: r& \                        assignLObj := rgmanager.rgAssignL;
$ W) _5 b! z, @                        row := assignLObj.getRowNo(GlobalDistObj);% \4 h% D1 G5 `0 b9 X0 ^
                        if Row = -1 then -- since 70& g9 Q3 `( Q$ }9 }  v+ J
                                if lan=1 then
' m8 W1 B2 E6 h                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
, o) U: S( j' Q3 a& Z9 z                                                to_str("in der Andockstation: \"",?.~.name,"\""));
1 R' I" J8 v8 K                                else6 r' x, r0 R) e9 c
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
( `/ C8 _# l  e* B5 [+ r; h                                                to_str("in docking station: \"",?.~.name,"\""));                                0 Z  a% X3 u0 ~" o0 Y
                                end;  w: C( W+ t! Y( C
                        else, x7 ^; E; ?$ Q2 g4 U! w
                                @.Destination := assignLObj[1,row];
( H# B( u4 n1 t7 f: q9 x                        end;                        5 z7 ^# C  E. O% n/ c5 @/ ~
                        newDirection(@);
" \. W2 S8 B4 I0 a! L3 o' I                        @.HasOrder := true;* e  m) [; V5 {4 L/ d* ~* I8 d
                end;7 D4 W* X. a5 n. m" l, d
        end;: P" ^9 |( q, z2 `( |
end;        -- of the method
6 ?4 k; C$ v( Z" L. ]4 O) r+ c
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 ) X7 r9 E3 P8 P% W+ l

5 |! \; h: `7 R- V- a这是AGV_putin中arrive的method。$ ^" z  J- r4 z7 V8 a

+ o, G$ y; ~& K3 i* o当到达物料速度越高时,这个报警更多,; }1 [$ ~! _; g3 z7 Q8 Y7 @
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。" K: l. H  w* c3 v, h* Z- }) F
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
! q/ I- o- k- f3 F% G2 g7 `; ?: X( I
另外一个小建议,就是move,所有的move都可以这样
5 r3 i0 [% C; s3 Mif not move() then debug end
: I& v$ V. `9 k& T这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
; j) q3 I& ]& ]plant simulation中的free libraries有AGV模板,
6 T/ S$ l. i; p4 f1 s# G; ]+ p- T7 z里面也有案例。$ X: F: k) n& O7 r! Z/ g9 y0 U7 `
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。; p1 ^. M& C& v# d! `: c
& O- M" @  f6 X5 K  D" e' z
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 1 [9 r+ U% |9 I! m8 q5 |! [

% {4 b( _7 i# C6 D那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 # Z$ M  h9 {* F5 i- T
这是AGV_putin中arrive的method。9 j) x. {" v0 C6 V

1 L( a+ L* b; i$ |% I当到达物料速度越高时,这个报警更多,
3 c* }! }  f6 T" a
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-3 08:21 , Processed in 0.022374 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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