设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8538|回复: 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', R& \5 i3 i% [+ O2 D% b
*/' m1 \' @2 B; h6 a0 Q8 y
is
1 M# |/ y% j8 p6 p% o2 ?) C        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
& E' T& r. a! ?% e8 s+ Z# T; vdo4 M# r; J2 e; b- w" w4 X
        Lan := rootfolder.Internal.Tools.AOLlanguage;5 w. C" k4 {# {( T" G
        if current = @.Destination -- else return
; G. B3 Y& D$ q6 H9 V' E  N* i$ C* W        then; T$ R- K2 W" B# C) O7 Z/ ]
                @.Destination := void;- D; u( y' E; T  B$ i6 ]4 E
                if @.occupied then
  S4 N, H5 m7 z( D                        part := @.cont;
6 n3 k, K/ t9 G. u/ E  a. d: i                        @.transpOrder := void;
$ }" z8 V( }# \                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,7 P$ I3 A9 z* f/ D5 U
                                @,root.eventcontroller.simTime);# Q3 n! w/ }' ^2 F/ i
                        @.HasOrder := false;# D9 e3 t' Y6 \$ N& R& i+ p( \
                        @.DrivingHome := true;& M. m* d0 o& g+ L$ U
                        rgManager.tryToStartTransOrder;! N  T% b4 Q: o
                        if @.Destination = void
. D2 Y4 {  h* U* P' y, {                        then -- no transport order for vehicle @
4 T  k$ b( a7 Z' D$ _& u2 c                                @.Destination :=9 l; Y8 f) _- E  k6 @& h; m
                                rgManager.nearestFreeStation(@,track.~);6 J7 f" Z5 I7 J) v. T/ y
                                newDirection(@);   ( \6 `5 B5 T" _
                                if @.Destination /= void then/ E4 W! M( S9 o- o5 N
                                        @.Destination.NumReservation :=
7 a7 x7 ?2 k9 U: f1 H                                        @.Destination.NumReservation + 1;5 w$ P* t" }- L  a
                                end;
$ x  _. W- S2 \7 {' Z% z9 y                                @.CurrIcon := "drivingHome";
3 k% d+ }  t0 m                                @.DrivingHome := true;* x& {/ P5 I( U- a6 c
                        end;7 P' r) p( Z2 \& _' S
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
) v) t4 Z7 _' w/ k+ c& o' _                        part := @.transpOrder;- P9 S$ e2 D7 V
                        part.move(@);-- load part. C* H' V% [) a. ?" M5 _
                        @.CurrIcon := "load";
* I7 B' o8 u$ H, q6 k                        GlobalDistObj := part.globDestination;
3 L7 h1 f: v" v" U& [' C+ h7 q                        assignLObj := rgmanager.rgAssignL;
+ F/ [. N, m# v" E( r                        row := assignLObj.getRowNo(GlobalDistObj);
  K. t0 y2 S( M9 T) k                        if Row = -1 then -- since 70- P# t4 x4 U: [: r4 m4 n
                                if lan=1 then1 }# p, x) {. z" y
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: E% }# A4 o6 V8 S
                                                to_str("in der Andockstation: \"",?.~.name,"\""));. @- }: J3 _9 Q. D$ q; K, M
                                else
# ^1 T+ |- i' J                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; K2 ?& v$ x5 W/ t- M$ M
                                                to_str("in docking station: \"",?.~.name,"\""));                               
/ A0 d3 E" a6 Y5 Y) H7 R                                end;) f3 Z, c$ e3 C% a; |
                        else
  L- }9 |8 c* e                                @.Destination := assignLObj[1,row];
: @4 [( a3 I( L5 D8 S                        end;                        $ i. j9 O" ?: c. r- k' m
                        newDirection(@);# H' s# B8 r6 K' M
                        @.HasOrder := true;2 J' M# ]( P% e9 A1 d# D
                end;
- Q2 W. V' Y- h5 ~+ i        end;
+ z" i# g, Z, l- \' ]3 ^. J4 oend;        -- of the method7 A- {% P  [- j+ L
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 ) n8 |6 |' n  J

! @, V6 ]& M% P% I" }" F这是AGV_putin中arrive的method。* Z. |7 f# j) D

; p6 g4 {" `) U2 O0 V) i当到达物料速度越高时,这个报警更多,0 N' D0 O7 t" r% I1 \0 J6 R
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
8 a- G& Q9 B$ C3 T  D$ N% t# F程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
" m+ u$ d* ^6 J( u' Q' }' y/ ]% G, w$ x/ O) y- V! b9 ?% F
另外一个小建议,就是move,所有的move都可以这样
9 [% W- q: @9 G9 |if not move() then debug end
8 X0 _* f7 S: P: C* m# R9 E这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
. }: U' W% T8 W# u* Aplant simulation中的free libraries有AGV模板,
6 I+ z& z5 U2 U+ v里面也有案例。+ \/ z9 d# H  L2 s- `# f! p
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
; @/ R4 P( w" [; y! i$ z0 m" J/ b; ^' R: W
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 1 S3 I' z" b# ~/ j

& v3 x. w9 e+ }3 d8 W. k那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 7 a: i5 O# ^0 j; K
这是AGV_putin中arrive的method。, \5 a1 e2 l4 _; J' A$ D1 N

' `" F6 L( {+ B. B当到达物料速度越高时,这个报警更多,

7 \) \! x1 }' u" S- n另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-10 00:56 , Processed in 0.020123 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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