设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9517|回复: 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', O2 j( s+ e$ B
*/
7 y' }0 b* f) `0 ?1 E; w8 Sis
" g0 c+ g. S9 X& m- v2 X. r        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
0 d' o' K7 c! ]8 [/ k' Xdo# ~  a8 s' B, U' X: F5 U( }
        Lan := rootfolder.Internal.Tools.AOLlanguage;. H, F1 J* f6 {5 [+ F9 ?8 A/ A/ b
        if current = @.Destination -- else return! J( J  o! H1 W, `6 H
        then
5 R# I2 R5 z: U$ J( s, h' G6 D# j6 h                @.Destination := void;
% s  l1 L  r0 X" {$ c                if @.occupied then
. i% y8 \$ l* n9 Q. c2 a                        part := @.cont;: V% _- V# z4 R: }8 a
                        @.transpOrder := void;
4 N) }, ~" q9 M2 ?                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
% e. `& n2 _1 \* q                                @,root.eventcontroller.simTime);. w; W+ S) d% N3 R6 f8 O
                        @.HasOrder := false;/ e5 s" @, b$ N8 }
                        @.DrivingHome := true;
# V1 x/ P1 |* R0 V( U4 H; r                        rgManager.tryToStartTransOrder;  \! c. O/ O, _3 V9 p; Z; P
                        if @.Destination = void
" `4 T; f( x8 N# I+ p+ \3 t                        then -- no transport order for vehicle @$ P. P( [) B# t2 K( p  j8 J
                                @.Destination :=, }% {& g/ O, r8 ]
                                rgManager.nearestFreeStation(@,track.~);
: |) K+ a) Y& v                                newDirection(@);   
" @* r  x2 E* i                                if @.Destination /= void then
/ j7 _3 f" Y, C4 A0 `' k                                        @.Destination.NumReservation :=" Z8 c7 g8 F, ~; x( J/ g
                                        @.Destination.NumReservation + 1;
! a2 n! j% m: K( h$ U3 v                                end;" i+ A5 O1 ~8 x* D, b
                                @.CurrIcon := "drivingHome";$ g# u* I! U* p( b1 F$ K- [
                                @.DrivingHome := true;
, a( h% [$ Q2 G- {$ }" M                        end;
" [+ H- u; M) k* K* W5 \/ h( D                else -- the vehicle @ is empty, both vehicle and part are in the same dock station* u( n$ n( m$ F4 U+ h! C# r) a
                        part := @.transpOrder;- a: d- Y: C. g9 S2 g
                        part.move(@);-- load part9 d. [4 L- a, o* n4 R3 i2 P
                        @.CurrIcon := "load";
* O8 l* U; s; g& f/ w7 g8 h                        GlobalDistObj := part.globDestination;
/ M* g( x0 p' @& i  Y                        assignLObj := rgmanager.rgAssignL;
( ~# a$ W; c! p% i3 K                        row := assignLObj.getRowNo(GlobalDistObj);4 ~6 U# \' T; b  v5 \
                        if Row = -1 then -- since 70+ }( _  [# J+ r7 q: H9 L
                                if lan=1 then" c# u  M5 n: q
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
" ]: C- W3 x7 h/ N' k0 g                                                to_str("in der Andockstation: \"",?.~.name,"\""));
2 z" G' r& X0 h; c$ V% a" B                                else
# ]; Y' N$ ?0 S  ?                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! O1 G; E2 i; q5 M0 i8 f
                                                to_str("in docking station: \"",?.~.name,"\""));                               
: N. g, c% K  ?& }                                end;; v/ e0 a2 u1 X9 b+ @& q) Z1 X
                        else
! B7 N( z6 g* D                                @.Destination := assignLObj[1,row];) t& p) f) \7 r2 H; e& _0 [, E$ X
                        end;                        # d$ [1 X1 k4 X
                        newDirection(@);0 ~- R& ]# f% h: e2 E# o1 e/ Q
                        @.HasOrder := true;! `+ G8 w1 }. w* D2 K
                end;* V; C0 d. W' X* }: e
        end;# N' z/ I9 W- V" \6 x  D3 b( p
end;        -- of the method8 L5 o* p( E; e) F
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 1 U6 q) c1 A: Y2 \2 w

3 @1 A5 U1 x+ t7 Q: l( b这是AGV_putin中arrive的method。0 `& L& h2 b: I+ o% _9 W
4 c: J8 _; H  U+ Y
当到达物料速度越高时,这个报警更多,
5 k/ K* s7 N* F+ K. b& _% Z; Q可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
/ j+ w/ M' }' N& R程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
# s* ?% _' y1 j( h
3 y% G3 x8 N+ ?+ i8 \0 T% G# v- e) H- g另外一个小建议,就是move,所有的move都可以这样
4 ]: q& A7 S9 T: Eif not move() then debug end
+ x. O+ x" }1 f" r0 R: `这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。6 r3 B6 L. C+ c
plant simulation中的free libraries有AGV模板,( ~7 r! g" u' m/ t, i8 Z" r5 @
里面也有案例。
7 Y! ~# f- o& Y我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。4 _' r/ M& ]7 s# q; |3 F

7 d; ^6 C  h0 B( L" ^0 n我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 , D9 m1 [: B" h% f: Y4 X0 _
3 D5 P+ X' d, d3 P) S; V  o  |
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ! E" d6 \) [, B8 u! j0 Z
这是AGV_putin中arrive的method。( G) c! G" q, d- m
3 V5 O8 K' C( h+ \, s  @
当到达物料速度越高时,这个报警更多,

+ N( [; L. M1 n* [" f$ I另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-8-5 15:16 , Processed in 0.017703 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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