设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6457|回复: 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'
5 Q" W! y$ J5 g6 m& }1 u*/
0 N, u( o! A$ P+ y, ]' Ais1 B) |7 `( n; U
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 T; o8 f) ?$ U2 k' H
do
) i& E* O$ ^% C- S- e; D! Q        Lan := rootfolder.Internal.Tools.AOLlanguage;
6 U2 o& d( c6 d! s# ], ]9 D# H# X        if current = @.Destination -- else return
2 g( b+ @; m  ], C' g( }, W        then! T/ ]; b* }2 o
                @.Destination := void;
+ l2 T/ O* n& c3 `. s& B  p0 k                if @.occupied then2 d2 u' t7 e+ q
                        part := @.cont;
, j& c" Z; m! k3 z7 e                        @.transpOrder := void;
7 A: C" l$ f# z. f8 Q5 B/ u                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
4 ?: _5 F3 ?+ _' I/ s3 C! p                                @,root.eventcontroller.simTime);
- M" r: }3 L/ P! j2 g7 q' n                        @.HasOrder := false;
& _6 T* p# {1 K% w8 C                        @.DrivingHome := true;
% _' P: k( O( G: E' ]7 a0 u                        rgManager.tryToStartTransOrder;
6 G/ @+ ?6 m' Q7 }4 N! {" F                        if @.Destination = void, |8 \& p% |; L* c
                        then -- no transport order for vehicle @
* Q( {/ G1 J: a9 b+ A                                @.Destination :=
$ m1 d7 `* Z. h, I& v+ M7 X                                rgManager.nearestFreeStation(@,track.~);" a  x, v+ P4 H. q1 T" Q, n' n1 G7 X
                                newDirection(@);   
0 `+ D5 Q% k, Z( K7 v# w                                if @.Destination /= void then
- u: c2 m; K+ O# v0 A                                        @.Destination.NumReservation :=
, m) v" `  m4 k7 c8 T3 j                                        @.Destination.NumReservation + 1;
5 |, j! Z' p$ j/ g& a# R2 ~                                end;
3 [" Y0 t, y: m* e# O                                @.CurrIcon := "drivingHome";
, }, y5 i1 }' @4 `6 g# C                                @.DrivingHome := true;
8 \, @/ A" ^; j- Z9 P0 [                        end;
9 p/ c- m4 g/ T3 {% ?" v$ X! l8 I                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
$ w% g. U1 |& p" o& h                        part := @.transpOrder;
& y! B9 l- Y1 t" H. t8 y5 c, v                        part.move(@);-- load part  t* n  y7 l0 ], c& ]
                        @.CurrIcon := "load";0 M. ~! _2 ]' l# A0 |: Z" w0 D" h
                        GlobalDistObj := part.globDestination;8 j/ F% Y: F  ^& d/ r/ g
                        assignLObj := rgmanager.rgAssignL;* x4 q& \& s/ {8 b0 G& x9 Z
                        row := assignLObj.getRowNo(GlobalDistObj);
1 U0 ]: J* J. W, G4 Q/ E& ^" P$ U                        if Row = -1 then -- since 70( P5 h! R. l/ y. `( }+ K2 W
                                if lan=1 then
9 D4 u- A# F8 T( a- Y9 [  i7 N$ X                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
7 F- U( b: N3 H: a! G* E                                                to_str("in der Andockstation: \"",?.~.name,"\""));$ y% B! ~9 P! x2 z
                                else
4 _: N! H; Y7 A9 r% Q5 n& q                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
8 F2 s* u8 W+ `$ ~/ t) k8 ~: v                                                to_str("in docking station: \"",?.~.name,"\""));                                ; f9 [. H# p/ [# G8 l% ]7 q" q
                                end;# G$ M+ @3 Q5 l* Y& W  \
                        else. _4 U8 w$ U9 i+ q: r0 _0 c
                                @.Destination := assignLObj[1,row];
# D* s- P3 U# @9 Y* h( P                        end;                       
6 o) ~( Z5 K* J7 c8 t1 t( m                        newDirection(@);- z$ m& Y8 M7 |
                        @.HasOrder := true;
- ]5 ?  s9 j: y4 A                end;7 z# O0 U$ L" d1 e
        end;
$ x3 t- k2 Z1 nend;        -- of the method
  }$ d" j  _- C) ~
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
% t6 s5 Y& [2 W
1 K* g% L/ q6 I  l1 @) F这是AGV_putin中arrive的method。
1 `. _0 ]0 s$ f  S3 Q1 R8 t4 o9 M1 ]' K  I% M( R
当到达物料速度越高时,这个报警更多,& M2 e* h: C# w& e
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。1 B. v3 _% p. d$ q3 J% z3 z: G
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
! J' {2 R% ]5 {& b- v# o* Y  B0 E4 e" q8 U7 V; y; T- {& z
另外一个小建议,就是move,所有的move都可以这样
% k2 W0 u: a! n# `if not move() then debug end
, O5 V4 H5 O* i& J7 Q$ \# Y- r, f这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。9 F6 ~! M0 G  w( \# n  G. z
plant simulation中的free libraries有AGV模板,
& o* n  h9 T8 l% V) ^4 A: H, c里面也有案例。
7 l6 Q+ |4 }0 t* F6 A我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
6 @  h, b3 Y4 z, }+ C$ ^4 T6 R5 b; J! ~3 N# \$ _$ z
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
) d% f8 w+ k9 M  W& D: h% p- u" M1 ~$ @# }( h
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
7 [1 l% b) b- v, s" R3 \这是AGV_putin中arrive的method。
$ O  ~$ ?; b3 P% A+ ~" C9 j% q( r- S) R3 _. B3 ~
当到达物料速度越高时,这个报警更多,
* w- Z3 V, K4 r9 B7 ~2 o% L. G
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-7 20:47 , Processed in 0.022057 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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