设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8835|回复: 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'
. i# j8 `; j8 q, c- l0 d" l1 f*/  k8 Z; P; V2 y* Z: E3 }* G8 z
is0 l: W7 i. Z/ _6 j
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;  W* E+ W5 Y2 V0 x8 W
do* n( `# b& ^) b$ v7 D% M
        Lan := rootfolder.Internal.Tools.AOLlanguage;3 a! r. M9 l' D. @% u" A5 A
        if current = @.Destination -- else return
. z7 y" M  x  C5 y" v' v        then1 u% ^; i/ t2 E2 _9 C8 h. b
                @.Destination := void;
) n1 R6 W5 W! m* E7 {0 W6 X7 P                if @.occupied then: b! r( h: A! V) z; I2 X
                        part := @.cont;
" @- j, E8 _2 e8 A( F! H  o                        @.transpOrder := void;: E8 A1 H* ~" J# f+ D3 m
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
7 z1 |) x1 E: R+ l0 I' a                                @,root.eventcontroller.simTime);. x* K+ _" ^, n( L
                        @.HasOrder := false;+ k* L: V; `) h6 x, {
                        @.DrivingHome := true;+ r1 a; [9 ]+ v' a8 T4 o* J
                        rgManager.tryToStartTransOrder;2 B7 g+ f4 u+ c
                        if @.Destination = void
. d/ p" W  q7 \# o                        then -- no transport order for vehicle @* u3 A1 w& q$ `6 o5 i0 }5 k" f
                                @.Destination :=: V( P5 V( F; P: g( P- f2 f
                                rgManager.nearestFreeStation(@,track.~);
/ E: Y$ g! s$ ?1 I' h  k. u- z9 A                                newDirection(@);   9 @" F5 E& H: K( y3 p- N
                                if @.Destination /= void then, M- E; C6 N. \3 j% h" X* G
                                        @.Destination.NumReservation :=
: h  D$ o( L- P( m% \  t% L2 U                                        @.Destination.NumReservation + 1;
2 K5 O9 o% {& ~" `. ^                                end;' y% q5 b/ A. i3 v7 f
                                @.CurrIcon := "drivingHome";1 G2 J' h! u( t& d8 m5 F5 s$ C6 J! M
                                @.DrivingHome := true;. S; Z7 U4 p; {
                        end;" R8 L" t8 y& e. Q9 o1 n
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station% |8 [8 P, c8 i7 ]) O/ H
                        part := @.transpOrder;# O' N/ R4 q0 C
                        part.move(@);-- load part
7 S$ Q: Z0 z$ Q- }' O8 L                        @.CurrIcon := "load";
+ x0 H& L, {. O' r                        GlobalDistObj := part.globDestination;+ ^7 C0 n$ j# c5 E) j7 a5 m8 v+ H% j3 W
                        assignLObj := rgmanager.rgAssignL;
* U6 ?5 \2 ?: R4 H                        row := assignLObj.getRowNo(GlobalDistObj);8 M$ S; X; r6 f
                        if Row = -1 then -- since 70
# J: j+ ^; L8 q3 E! }7 u, l                                if lan=1 then
5 n+ p: o" C( K; |4 b- g                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),2 N, S) ]# B! r+ y8 d
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
# \0 H0 k0 j# D+ R/ a6 M- v                                else# {2 N; G2 u1 ^( q8 J
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),- a: s5 X2 y6 n$ t) Z( @# d3 v
                                                to_str("in docking station: \"",?.~.name,"\""));                               
" K4 V1 Y' U/ E, W8 q9 c2 Y1 ]                                end;3 u$ B. A$ r' C+ n+ C& s# a
                        else) N* }/ G# U* A' C* C
                                @.Destination := assignLObj[1,row];
8 k# }# N/ O& X9 z' o- M; A' x                        end;                       
$ M# l' l, S" Y5 T                        newDirection(@);/ G. l7 m7 y& B$ o% Q" I
                        @.HasOrder := true;) [* [- }4 X- l* M" |
                end;
1 n2 q/ O$ D/ N$ T( A        end;
! d2 E' }5 K9 G, _8 U5 cend;        -- of the method
* I9 k5 w" ?3 f3 n, W3 }
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 : x& s% {) Z. ^9 ^
: U1 m5 a% l" N5 M' [
这是AGV_putin中arrive的method。: U5 r3 v$ w4 i' ]2 U3 o* M

, |$ m& |" j+ J当到达物料速度越高时,这个报警更多,# |& `3 |& v4 t. ^" H; f
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。4 e8 u: N5 G: W. y- x! K* `6 m
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?$ \, g! B/ h9 i
0 y) C) D( C$ c; Z
另外一个小建议,就是move,所有的move都可以这样
6 R( l+ J/ b* y* h( r$ hif not move() then debug end* d8 m  o4 H# d3 s; X$ E
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
. M' p+ y+ W2 _plant simulation中的free libraries有AGV模板,
' J$ g9 @6 q1 G8 n里面也有案例。
3 V" A# t" m9 x' q3 f% j我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
" ~8 \/ \0 `, c; t% t
9 N( F5 I' p# I我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 + N2 ]" T. E  x
8 K: U4 Z* l# O* z( ]8 Z
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 + g8 Y0 q' }8 S
这是AGV_putin中arrive的method。
! v/ q# Y' n% I! b- L$ ^' P. q8 w- P  |, B
当到达物料速度越高时,这个报警更多,

0 o7 r4 \! m# Z7 I* R  H4 Q另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-29 02:27 , Processed in 0.017514 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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