设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6537|回复: 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': n1 [+ Y% g$ l" t+ M. b
*/$ |6 j# m; \/ g- _- x1 F
is
+ ?0 f  T- I2 ?, D* K        part, GlobalDistObj, assignLObj:object;row,Lan:integer;% z" ^/ k( s2 C# C4 Y8 h8 K
do* Q1 r: `) G1 _
        Lan := rootfolder.Internal.Tools.AOLlanguage;! N' X9 @9 q/ N  B5 y
        if current = @.Destination -- else return
7 h" R/ M- \- v# Z2 G        then0 d$ A) s3 g1 n! I( S
                @.Destination := void;
) t! [5 z2 A# @+ G% q% a                if @.occupied then
5 y( d+ E4 J' Q4 ?. h; B                        part := @.cont;
+ S$ u5 o. S) e  f0 N4 ?# _                        @.transpOrder := void;
  O6 {8 T4 i* H' G, V1 P% c                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
0 Y+ {( _( V& |6 t; z                                @,root.eventcontroller.simTime);6 |) @! P# N/ W, `
                        @.HasOrder := false;2 D& }) Q& y& _+ }! F2 m
                        @.DrivingHome := true;* t0 X& n: z/ F: G
                        rgManager.tryToStartTransOrder;
: N+ S9 n9 q/ j' `$ U                        if @.Destination = void
. S8 q7 |+ U; X9 C2 f5 x% C                        then -- no transport order for vehicle @
. E9 K# L- f0 W, `                                @.Destination :=
" U/ w8 M9 ~# Y! @                                rgManager.nearestFreeStation(@,track.~);
0 o. t; z# a8 T) [) ^                                newDirection(@);   
. X7 q" r) ^: B  w                                if @.Destination /= void then; M/ r) i- |0 _5 k  K+ l& O
                                        @.Destination.NumReservation :=: H4 V, D8 p- I1 s! F( ]; U
                                        @.Destination.NumReservation + 1;
! o- p9 v# y$ \" m                                end;8 q- M& d5 K5 _) x1 `2 S. g
                                @.CurrIcon := "drivingHome";
& g% l+ ~# Q" d5 ]$ y! G2 B+ d% y                                @.DrivingHome := true;6 D, K/ i* m+ H$ g2 V) c$ l: |' Z
                        end;# K6 Z0 C$ |( A* e" |1 I8 H
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
5 {0 {7 ^: ]( `! \$ V* Y                        part := @.transpOrder;1 Q/ c6 |' B7 y2 u! ?
                        part.move(@);-- load part7 \6 o* @0 ^5 V3 T
                        @.CurrIcon := "load";0 m' {+ w" S+ \0 V; k  G8 D  a7 l
                        GlobalDistObj := part.globDestination;4 F8 E8 E# ]- ^4 Z( W2 I
                        assignLObj := rgmanager.rgAssignL;
* v1 L9 G6 D( h, e/ p+ z, L                        row := assignLObj.getRowNo(GlobalDistObj);3 K  A. b' e# S
                        if Row = -1 then -- since 70* T" T  x- Z9 \, q0 h; v, x0 H
                                if lan=1 then6 v4 H6 x2 j/ ]% g- d
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
$ k" R1 K6 W; _2 l* ^3 Y: r% n                                                to_str("in der Andockstation: \"",?.~.name,"\""));
- a$ S3 o) @( \6 a                                else' [1 _' J: d% t% ]5 n- b; m% x
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
& c( k; p5 B% `                                                to_str("in docking station: \"",?.~.name,"\""));                               
! {) C& G2 `/ e                                end;
3 l4 o- k) Y! z7 _# `7 S* }                        else3 a- H0 T. w/ j! `, a
                                @.Destination := assignLObj[1,row];
- g- E& Q$ Y3 j$ ], U, Z* H/ G                        end;                        , r- Q( H  p; H0 T7 A+ u0 C
                        newDirection(@);5 R& G% M- X: [- e
                        @.HasOrder := true;
% X& ^, {1 I& {, E) R* ]                end;4 V- x2 Y& J2 b# C3 e6 F" h4 j6 @) w9 w$ K
        end;
+ p9 J$ e% [" u, F- Zend;        -- of the method. W/ ~" t6 y# c0 ^1 G7 n
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
" L- k5 D# j& V& i# x; X7 g" [! _9 z0 U) i$ F+ z( i$ d
这是AGV_putin中arrive的method。. X+ W1 e5 |' y
5 I9 d2 q' y- A4 T4 p: j
当到达物料速度越高时,这个报警更多,
- h2 u) d3 s( P+ ?/ S* ^! }$ k可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。9 g' R% J! ?5 g! {" `! @
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?5 K& m6 ?' B" B; g* I) `7 P

% o2 p  |7 X4 {" l+ v% F& A另外一个小建议,就是move,所有的move都可以这样
0 [% g* ?& [9 z5 wif not move() then debug end
8 S0 @1 B& b. I) I1 J$ h3 d; c这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
# h& l; I0 ]" F: p) kplant simulation中的free libraries有AGV模板,7 n: X7 g4 ~( Z, }  `7 L' V$ e# c
里面也有案例。, r6 E1 a" S6 \' p, U! @" n
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。  z: A/ c7 t! J( U2 ^5 ~" c

" o) Q9 Q0 V0 _9 f! Q1 H. ?* v我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
" e1 _$ S: c, P! a* ^/ U0 s) C6 T- k. i* v9 ?
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ; g# E* G) k7 W: h6 v$ }9 E
这是AGV_putin中arrive的method。9 Z4 Y1 S% ~1 ~! c8 A: V4 o

3 V- X5 T0 S+ A% o1 {! w当到达物料速度越高时,这个报警更多,

, Q! {: E1 l9 d0 w! P) {8 k5 E' i另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-11 15:43 , Processed in 0.016839 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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