设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6723|回复: 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'
6 @# ^3 W8 w& A*/) S" U) t* F4 `1 j6 ^. o4 n4 F
is' K$ y1 D, D0 P6 I
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# h  v' q6 `. m5 M8 _0 Z; Edo5 Q9 F4 c& V7 b' E9 ~) I
        Lan := rootfolder.Internal.Tools.AOLlanguage;  x4 p" ?. f6 w# T- V+ [! q
        if current = @.Destination -- else return
* B/ z2 F  a; ]! c2 I        then8 y- c- a7 A$ v4 \. {
                @.Destination := void;9 q0 k$ l! t- E3 U
                if @.occupied then
. p+ |; y; @* J                        part := @.cont;
+ |8 E1 @4 j4 s7 K. ~, O2 R                        @.transpOrder := void;1 ]* Q/ r, r7 \, J( q8 F% }2 x' d6 N; v
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,. Z: Q- G( Z* ]& O2 v: y
                                @,root.eventcontroller.simTime);
# l- e) E; E4 t! t' f8 u. ^                        @.HasOrder := false;
+ ?+ a/ I9 U  B% T. M                        @.DrivingHome := true;- n; U# x& S# W; j! c1 e
                        rgManager.tryToStartTransOrder;' _8 I: {' ^! |& o& t
                        if @.Destination = void, s* p9 k0 ]9 ?8 d( j
                        then -- no transport order for vehicle @
2 s6 L( G2 k/ X5 w8 Q4 A                                @.Destination :=9 t" q! c( \: E' ~# }7 @8 w
                                rgManager.nearestFreeStation(@,track.~);  E) c0 q$ {, l+ D
                                newDirection(@);   1 |" r) Q7 L0 ~( o/ C# K
                                if @.Destination /= void then. e5 X0 N" W( P% ?6 ~
                                        @.Destination.NumReservation :=
( {0 S+ T( B6 k. B5 }# ?                                        @.Destination.NumReservation + 1;9 u1 e5 F/ K1 k7 ^& A- ?4 @
                                end;
0 f  z8 w3 u+ s                                @.CurrIcon := "drivingHome";
( {8 V4 I8 m5 N! j9 \2 M                                @.DrivingHome := true;) Z& p5 r1 f( v
                        end;1 ~$ G* Q: r5 q7 j8 z
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% ~0 h% D' u. p. H0 A9 q- B                        part := @.transpOrder;
. h# M- Z, m/ X# I                        part.move(@);-- load part: s% h3 y' N4 z# A( |
                        @.CurrIcon := "load";
5 a! Z( M. ]" G9 a5 Y                        GlobalDistObj := part.globDestination;
9 S/ X2 S* h/ K% I2 u5 W                        assignLObj := rgmanager.rgAssignL;+ T" g3 `, `% d4 J, Z
                        row := assignLObj.getRowNo(GlobalDistObj);
+ `+ t/ W& z8 D0 a. |7 `4 P0 q                        if Row = -1 then -- since 70( Z5 P7 p- Q; ]3 u- |$ F( Q6 Z
                                if lan=1 then
; G) E: H1 n7 a! j3 u$ c3 Y                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),9 B* V2 D+ W9 J6 t/ S3 t: L. B# V/ e
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
6 S: {6 T5 h7 |, S4 M3 D" _                                else7 b1 A4 j8 r& M/ \' q
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; D- k0 l7 f% }8 O; ~& K' i
                                                to_str("in docking station: \"",?.~.name,"\""));                                8 O, H! s1 a4 Z& _6 ~( \8 K# H
                                end;
! a  |6 Q! V6 O" ^+ q0 J                        else
8 D7 z8 j  z/ g- q% |                                @.Destination := assignLObj[1,row];
4 O5 n1 K6 A" {( x                        end;                        ' h) f1 p8 J! b
                        newDirection(@);
* h5 l- W& X2 e! a% X                        @.HasOrder := true;2 a1 [* J2 t/ m1 z/ r3 T8 N
                end;6 |, a3 q8 o1 G
        end;
  c" I% ^* E, t7 ~end;        -- of the method
" g  D" ]0 Y3 x
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
5 M% @4 \0 Q, K" i3 B; q* F0 ?
( [7 V* w. M2 i5 @8 U这是AGV_putin中arrive的method。. |8 }& d& F# k+ n0 D: K7 c

$ ]. G9 ]% R! Q) v6 q4 {当到达物料速度越高时,这个报警更多,# H  h& t1 U' P) q3 k
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。1 K& F- }- F1 A# @( w+ l! j
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?8 L4 q0 ~& l. r' V$ {
5 b" U2 c! }0 c. E
另外一个小建议,就是move,所有的move都可以这样
, {; s& J( T& @; j; Y8 |if not move() then debug end
& q9 Z2 Z2 g( {7 H这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。: Z" m1 d# J$ V7 B, a) Q0 E2 T
plant simulation中的free libraries有AGV模板,
! L3 R" b" o; a6 ]/ r1 F* b9 i里面也有案例。
8 L/ H: i( q4 t7 c0 B  y* n3 G* z' t我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
5 L, t$ }: B4 r- w* ]* P
( `  [' A. i  I. {5 M9 R我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 6 v: `/ l$ `0 \% Q

, w6 B! V) s. j5 p4 i# L) a那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 3 B0 l5 @" R  T- W! W0 `
这是AGV_putin中arrive的method。% H: ^) ~9 P% p1 c- J7 X6 c

7 }( ~( ]! k( w8 U* \当到达物料速度越高时,这个报警更多,
7 H' i7 G! D$ b, @5 E! }
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-22 20:09 , Processed in 0.019815 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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