设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5854|回复: 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'% O9 ~+ t3 Z. [5 b7 ?
*/
4 i" e5 @- q: R  x+ his# k+ ^( G( p3 X$ u8 V
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;+ ~0 D+ A% i$ M; Y. _( g4 r
do
5 s% K9 C1 W* }5 \! _& c; |. Y% ~        Lan := rootfolder.Internal.Tools.AOLlanguage;
8 z& G& |! i  H        if current = @.Destination -- else return
! I7 H' W) c! v2 t        then
9 o/ h& L/ @4 v* E4 Y) l3 V6 K8 R                @.Destination := void;
; S# E5 U" w/ ~5 {2 a                if @.occupied then
; t' C4 s2 T% t/ H                        part := @.cont;4 P! K6 B7 o9 ^1 s. ^2 C: ?+ h
                        @.transpOrder := void;
) y" N0 V; Y5 q: R3 b. m2 n7 J                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
8 ]& ~# C- `& M& P" z                                @,root.eventcontroller.simTime);7 m9 ]5 A3 Y  e4 e" Z
                        @.HasOrder := false;( ~# n* @, Y) ~8 A: H# {: {( B  b
                        @.DrivingHome := true;
! T7 t5 Q9 E6 i                        rgManager.tryToStartTransOrder;
! q+ u  _0 R8 j0 M8 @                        if @.Destination = void1 r3 g1 l7 A& U+ U" |% n
                        then -- no transport order for vehicle @
# P; u- c. M( B2 J" e                                @.Destination :=$ t# a. a8 ~4 J" D1 G+ q/ s
                                rgManager.nearestFreeStation(@,track.~);
. `2 D$ M' c, G$ r/ w                                newDirection(@);   
/ T! Z) @  q0 x                                if @.Destination /= void then" j# A# e6 w8 M+ J- I
                                        @.Destination.NumReservation :=
- q: `" X' \. c( j1 N: }4 }8 r                                        @.Destination.NumReservation + 1;
( v6 x, S$ H$ ?5 y5 r6 W5 w( @                                end;  Y3 }) a5 U6 z% o( n
                                @.CurrIcon := "drivingHome";& T2 p; `% L# `9 t( I8 ]  Y9 D2 T
                                @.DrivingHome := true;0 r* B0 ~8 r: Y- ~4 O% |6 B2 f5 j
                        end;
& H( k: T5 _/ z6 s' P& y1 u. Y                else -- the vehicle @ is empty, both vehicle and part are in the same dock station& w: h" u3 N" O! }# Q2 q
                        part := @.transpOrder;
9 L# d  e: [8 N* [                        part.move(@);-- load part
* R8 \! w5 T5 {  P. b                        @.CurrIcon := "load";7 |) A: |/ B$ {- V
                        GlobalDistObj := part.globDestination;
8 Q) L$ J3 X: K9 P( \/ V/ m0 P                        assignLObj := rgmanager.rgAssignL;
& r7 l# ?  _& N) N! o                        row := assignLObj.getRowNo(GlobalDistObj);5 ]1 n/ x! O& _8 g# v
                        if Row = -1 then -- since 70
+ d$ d3 l3 F9 h9 @* y; V                                if lan=1 then
* s/ T' i3 @4 V( B7 t( z# e' t                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& C5 f) Q9 X# i& E                                                to_str("in der Andockstation: \"",?.~.name,"\""));
- b+ z& [" P3 S" M  R  i                                else6 N1 K0 x. n  m! }6 x9 k
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),% ?) B( X, H! }: m! G/ @
                                                to_str("in docking station: \"",?.~.name,"\""));                                4 _- `3 U$ c3 M- m
                                end;
: V7 C" t# d4 a' E% S3 Z( E                        else& }. K8 T: ?, y' F% m$ u
                                @.Destination := assignLObj[1,row];) ~  g, B! N( j
                        end;                       
# N) t0 ~7 K' ~$ s: \                        newDirection(@);% y, y, P# J7 V  f, x7 j
                        @.HasOrder := true;9 p; z- H# ~0 N6 \  N; o
                end;
, J9 C" z& g- {# ~6 G% j* W        end;
5 ^% l2 |" F4 @5 ?4 C2 k0 K  L0 Rend;        -- of the method( S' s* @4 m. S: l2 b9 _
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 6 X0 b6 O# t; Z/ W% y' d& @6 ]
+ ]' F$ B9 O9 S5 v6 D
这是AGV_putin中arrive的method。
. j5 d6 H" h! m/ }2 B
& U  w$ ?- V. p! L( {当到达物料速度越高时,这个报警更多,
8 _8 {8 S. m8 h6 e' x; T! S6 Y可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
( g4 \9 L# X$ V3 t" X3 w程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
; @6 J9 h6 Z9 l  G
6 |! r0 p6 M- O* ?8 `0 b% ~& m! s另外一个小建议,就是move,所有的move都可以这样3 N, ^  S/ U6 s+ O+ G  }; X' @- R6 u) }
if not move() then debug end
2 v2 b/ [5 S) y6 R) x3 _! a这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。  A4 g+ {/ q3 t6 H
plant simulation中的free libraries有AGV模板,7 v; \0 K! N1 ^+ Z% S
里面也有案例。
( E9 Y0 o1 ~7 G7 T8 H: `我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
( A$ y. s6 ~9 m- r( w& d
) N" }* V) O6 F( j: U我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
# y2 g) y0 F+ P7 C$ M& ?9 L8 J% \' Q# B7 ^5 o* Q+ G
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
* K* }2 z/ C' {" e1 i3 }这是AGV_putin中arrive的method。7 |6 ]  e3 R( P( {9 J" f' P' W4 O

% ^6 g4 f+ Q2 _: O# q) m5 X( [% O当到达物料速度越高时,这个报警更多,

, Y8 O: E! n6 t7 v6 n/ v  Y5 A另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-12-26 21:09 , Processed in 0.017610 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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