设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9365|回复: 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'
* e3 t5 t  m) X: G  A2 [% e- T2 L*/
+ c: M7 @$ i) l. q8 a& c6 Ois9 Z6 q9 q  x4 g4 J
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;: Z. M# q. N- h: N0 P
do/ }: K6 f1 A$ [3 b
        Lan := rootfolder.Internal.Tools.AOLlanguage;( h! _9 v! G7 Y0 e
        if current = @.Destination -- else return3 p3 d; _! _1 M1 }' [; [/ H
        then
5 r$ p6 e& P. M& v                @.Destination := void;! r9 e: [" c  \" u( n; E
                if @.occupied then
* D6 e' V2 m: O* P' G  l                        part := @.cont;3 n! M8 g+ r1 X0 r. R  H
                        @.transpOrder := void;
/ `7 Q% y$ O# P                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 c2 ?' Q" b$ V9 }! I2 X4 P- S4 W$ P
                                @,root.eventcontroller.simTime);
6 o( a; \2 L1 B4 v                        @.HasOrder := false;
! ]3 ~: I! {5 L4 s4 l                        @.DrivingHome := true;
; t0 P- ?" f: Z                        rgManager.tryToStartTransOrder;. j8 I. \4 m' Y) O  H( _. f* {% a! H
                        if @.Destination = void5 D0 n4 s1 o+ {8 M. N! M! Y
                        then -- no transport order for vehicle @
# z3 H  _7 M) I+ D                                @.Destination :=6 a5 A/ b* Z3 U  {- y' G5 j
                                rgManager.nearestFreeStation(@,track.~);
+ d, K  E$ U. k- `9 E" v. a8 ?                                newDirection(@);   
7 D0 r" P1 _' h0 ?1 n                                if @.Destination /= void then
: C) @; C, Z# Y; {- }: J/ V5 P                                        @.Destination.NumReservation :=! X, h5 {3 ^- `- H" \  t
                                        @.Destination.NumReservation + 1;
6 R0 {/ V0 c0 z* a( ~                                end;: l3 f. @. e( q5 {
                                @.CurrIcon := "drivingHome";
: \* G7 |9 t" t! s                                @.DrivingHome := true;! Y1 b9 |8 Z0 }; s8 T6 U+ Y
                        end;$ J6 z/ Q& M4 A* T
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station9 c, ]+ Z/ ]+ i) Q$ ?& m# [6 ~9 _# \
                        part := @.transpOrder;
+ {! }' C% ~7 w- M  v                        part.move(@);-- load part6 a# W' U. m5 z% ]$ |
                        @.CurrIcon := "load";: i  l! t2 d/ Q9 j
                        GlobalDistObj := part.globDestination;. P* J. i. I3 a8 Q, f0 |& g
                        assignLObj := rgmanager.rgAssignL;
( Z# b' A1 y' o                        row := assignLObj.getRowNo(GlobalDistObj);1 t- p; g6 \0 z. i( h+ p
                        if Row = -1 then -- since 70
4 ?: {% M* |$ p8 C6 u                                if lan=1 then7 I4 F' ~: [8 J0 Z: \
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- G( e& g2 L+ P% {                                                to_str("in der Andockstation: \"",?.~.name,"\""));9 K. c! ]% }& M
                                else. z2 _, g4 I+ i( B7 f6 g
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
' E5 i0 e! }- y. @( G/ n3 T+ w                                                to_str("in docking station: \"",?.~.name,"\""));                               
+ C& k$ \. f. R5 q* Y& _                                end;
: J! ]. X, `) l! p7 X( L! Z, s                        else& Z& c9 o, Z, [' d
                                @.Destination := assignLObj[1,row];, T/ f/ i; J9 F2 o9 Y
                        end;                       
- i1 i" a6 U4 r7 c! w                        newDirection(@);+ q0 e' {, P2 [* k3 }( b
                        @.HasOrder := true;
( Y" h- `2 A% H# _' H) Z# m, c# m' R                end;- q( A7 `# I: `. Y5 o
        end;' v; u$ P( T/ F+ L) M4 T
end;        -- of the method: ]$ O( y6 }. _7 b
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
/ L7 d# z: }# B# M3 |3 p' l( l2 u7 x8 j6 E0 p
这是AGV_putin中arrive的method。) y+ s( g* y4 H0 z
( Q+ Q" ~1 R6 d" `; f
当到达物料速度越高时,这个报警更多,
! X7 m# z8 y  ~$ R% }) J+ V- X可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。2 G) \: r0 U# b" y
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
' h( G! H5 \; C: a: A! y' H5 k# C4 T8 u* B) d3 v& U$ ?
另外一个小建议,就是move,所有的move都可以这样
% f4 n6 V3 L. a! m$ W% Eif not move() then debug end- Z' c8 ^' B$ \. j: h
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。) Z% G3 g5 L  C* v8 M
plant simulation中的free libraries有AGV模板,$ @" s% ]  y: d/ \' G0 c
里面也有案例。
7 f( z4 D% p# |' @! I- }2 b7 L我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。* g% B" z+ y$ c

  e7 z1 j1 ^" ^4 n我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
" c: B  q, R# v1 j6 T
, w  `: X% }- r那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
1 G  r; N- v+ }" z; a8 }2 L- e: G这是AGV_putin中arrive的method。
- R% k' v7 I4 E3 |8 H
8 p; q: B7 I' s4 T. T% `当到达物料速度越高时,这个报警更多,
8 R: F4 I# I  ?4 O: V  r
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-28 01:47 , Processed in 0.015930 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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