设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6813|回复: 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'
$ ?9 W5 j1 E# w) @& ^5 S+ d*/% [9 g0 T" b3 ~1 j
is
- C3 ~. R7 c! A$ \& ?* X        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
% O: v6 \0 W& `+ A9 {do
6 L: |' A  _3 u        Lan := rootfolder.Internal.Tools.AOLlanguage;
% A8 O' S" ~, y$ q) v3 P; y9 z        if current = @.Destination -- else return
+ Q- w- M5 S+ K        then
# E( W8 Y5 }! [3 V! C                @.Destination := void;
: _: o# e, N2 B5 X% f+ Y2 ~                if @.occupied then& t/ N8 {6 S* y5 t7 f
                        part := @.cont;0 P$ c3 }! ?$ T$ g3 k7 ?/ D
                        @.transpOrder := void;
+ R0 v& V8 v( `* o! B                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
, C$ ~. P% a+ A5 ?! L                                @,root.eventcontroller.simTime);: {  J: a7 W9 e, [* m
                        @.HasOrder := false;3 k; w# m% V: k
                        @.DrivingHome := true;
/ @! M: f! M  n' o' l# e                        rgManager.tryToStartTransOrder;; {3 n8 X; B2 R' l1 m) E4 l
                        if @.Destination = void6 n( {( R- F0 `  r9 _
                        then -- no transport order for vehicle @* c6 P  c% _( o' Z' s, O& H
                                @.Destination :=
, F) j$ h% |; j4 g; O% V' G1 ]                                rgManager.nearestFreeStation(@,track.~);5 r8 e, O1 V  e9 D
                                newDirection(@);   
# o" y" m% b5 o4 g; h) y9 V8 w2 G# S                                if @.Destination /= void then5 Z# P% e) [) H& D+ O3 B$ i
                                        @.Destination.NumReservation :=
  p: Q$ l. @$ c' Q& H& ~7 Q                                        @.Destination.NumReservation + 1;$ P( N" X3 v2 @, _
                                end;2 N1 B  t- m6 `4 Q; q
                                @.CurrIcon := "drivingHome";. I4 D+ u7 Y- {: p, F/ p
                                @.DrivingHome := true;+ [4 Y7 Y; ?; \, p" H; I4 A
                        end;6 {" F) S5 t- S0 E4 f
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
( u% p+ [& n. ?2 w% c                        part := @.transpOrder;
) S& a: O* O; c5 |                        part.move(@);-- load part9 _( e* N% k, q4 u1 l
                        @.CurrIcon := "load";
2 M7 X* S7 M' }0 ?" b: q5 g                        GlobalDistObj := part.globDestination;
; D$ J- j0 X1 c3 j1 u# }                        assignLObj := rgmanager.rgAssignL;
. ~% p' e* X5 ]1 D( S9 s3 `                        row := assignLObj.getRowNo(GlobalDistObj);
: z# u+ f5 h* W5 J" z0 p                        if Row = -1 then -- since 70
. \, u, d/ D, t" @% Z$ k  S( H                                if lan=1 then) [8 p7 e/ R1 d. @
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),4 m  c$ b& ?. S; G
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
; P9 A/ O' ~7 L( c$ a  t9 t                                else
2 k+ N+ s2 e' u                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),' q4 }! B; L0 i) c& L
                                                to_str("in docking station: \"",?.~.name,"\""));                                  b. @3 C# ~$ L  O/ z1 {: h
                                end;$ H6 |# L: c+ r8 |1 ]
                        else
5 M3 C2 a: A! G4 u9 K+ E                                @.Destination := assignLObj[1,row];- c/ y7 X5 t7 [( r
                        end;                       
  {6 Q" V1 I9 r1 ]# O% C( I1 I                        newDirection(@);" ^" k7 t) G9 M
                        @.HasOrder := true;
6 R6 w8 p5 z" }( G2 }& Z6 \* A* ^                end;) q+ _! r8 P6 o& D6 f: P
        end;
1 F+ O. A9 G' E. `# Y8 iend;        -- of the method  B) z+ z2 G/ l5 @/ f' L0 _: }* g
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 9 c3 z% |" W% O8 Y
6 v7 _& @8 v( f$ X1 c
这是AGV_putin中arrive的method。
- `0 f; M  ^7 d" m+ |+ Q' D: L, f& i5 m2 @! U9 W0 c
当到达物料速度越高时,这个报警更多,
- n9 B9 y& u- i7 T可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。6 h3 l% X; j+ o* s* W+ }
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
/ U4 T* D6 i0 q3 C' r' o1 m' v: `& D+ k, m/ b& e& H: n
另外一个小建议,就是move,所有的move都可以这样" F" S* n( g, P: e, J
if not move() then debug end
' @: h, P! K+ ?/ \5 u这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
5 x  p# \# {, H4 j9 v" i% ~plant simulation中的free libraries有AGV模板,7 R. N! I4 Y3 l2 J' q' P5 H
里面也有案例。
5 p" c$ R! ~" C$ `! n7 W我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。) L) ~/ A$ G8 r# R$ ?& A9 C# o/ |+ p
9 i' l9 O3 k5 |9 {2 B/ `- Y7 h; W6 f
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
7 D4 x% U8 g' u. l# R' d/ f8 a* r- z' w6 m  z' Z) W: p7 o
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
7 l5 k2 h! [& x这是AGV_putin中arrive的method。
8 W" e( o$ }# L- f  d1 G
& D! R8 Z. x: i& t. i当到达物料速度越高时,这个报警更多,
4 _3 c( A. r! f* N# n9 V$ s8 u  `! V) d
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-28 04:29 , Processed in 0.016598 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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