设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7252|回复: 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'
" X0 }) O  l/ l) y*/% H* K9 r9 M( s' U5 ?( _+ ^
is
; T) }8 n) L8 K* |        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
8 a- y( l4 Q0 _8 O3 q4 N' Ido
# \& s5 x$ B: H/ _0 D        Lan := rootfolder.Internal.Tools.AOLlanguage;
/ \9 `9 W# }( P$ C- Y        if current = @.Destination -- else return) ]( E  {' w8 z
        then/ @! G6 n- G1 l
                @.Destination := void;- o" T1 D6 U$ p
                if @.occupied then
7 O0 I0 }1 A  b                        part := @.cont;
( Z9 m3 g! F- s/ W7 }                        @.transpOrder := void;$ e  V# j6 `! @5 c- F
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) z) I. @( x: B                                @,root.eventcontroller.simTime);
8 t+ _3 {' m" Q5 v) r* d                        @.HasOrder := false;
1 @* q& T* z: }7 f                        @.DrivingHome := true;
2 U/ X# S5 V6 J4 M                        rgManager.tryToStartTransOrder;
9 M: @% a! k0 p( A% r4 ?                        if @.Destination = void
' H# d! B, [9 B! C                        then -- no transport order for vehicle @
' @# m# M* Z9 [+ M0 O, x. \4 k                                @.Destination :=' t8 r3 @" V) v% X
                                rgManager.nearestFreeStation(@,track.~);
" L* M  M0 B# n5 q' j! ~                                newDirection(@);   $ b2 ~+ I" @# ^
                                if @.Destination /= void then- a5 y( h" ^% ?' K
                                        @.Destination.NumReservation :=0 `7 k: Z. u( S: S
                                        @.Destination.NumReservation + 1;1 ~8 [- X, t( v1 `
                                end;
6 }$ p3 z0 ~% d6 ?: w$ l+ J                                @.CurrIcon := "drivingHome";% J- n, r4 f' P8 a
                                @.DrivingHome := true;
; o: N/ S, y$ o2 e! R/ ^. X                        end;, o( S( {5 V( D/ F
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
8 g+ I  C. _" Y; l0 q$ s5 X; Z                        part := @.transpOrder;9 q5 A9 t2 ?% n. c4 P
                        part.move(@);-- load part
$ }  |+ B* s. m& K; O: m/ @                        @.CurrIcon := "load";) s7 |2 s% |- Q( T% [
                        GlobalDistObj := part.globDestination;3 m" S4 s% r. T: u  f# K
                        assignLObj := rgmanager.rgAssignL;
* K  {/ ^0 H3 N  V; [/ j                        row := assignLObj.getRowNo(GlobalDistObj);
7 Y- i* s* Y* {0 k0 _                        if Row = -1 then -- since 70% V6 ]' V& @! [' A& U% j, _5 O
                                if lan=1 then" I: v( c. u9 U8 q! t/ r
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# Q& E. @* P9 F" v- p2 u3 \
                                                to_str("in der Andockstation: \"",?.~.name,"\""));  ]; E6 u* R, D+ t
                                else
: h3 N  H/ X, Y                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
8 R0 H6 v/ h* I# l                                                to_str("in docking station: \"",?.~.name,"\""));                               
: V" @; E7 s% p4 W" i8 j4 }                                end;
3 M: Z! j7 k* F9 ^' h, U( U6 O                        else
) E' ^3 m; o4 n! l                                @.Destination := assignLObj[1,row];
5 f, J) L' D0 y/ [+ P1 u0 @                        end;                       
/ z7 Z& q+ Q) K% G$ {+ B                        newDirection(@);
" j, l9 g% _" H% Y                        @.HasOrder := true;: T8 _1 U4 ^1 ?# M. ~
                end;
- P' f( |1 S4 a        end;
+ Q2 t2 p8 ^" x: B: C2 [end;        -- of the method' |: ~  [3 ]$ T' [
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 ; g3 g9 Y& l, ?5 d1 p

& s8 W& F6 x% K, T9 L! t( j这是AGV_putin中arrive的method。
) C) a( j3 v" y6 M5 R: S& }  P/ t. L$ H0 x6 W; n. b- L3 D  v
当到达物料速度越高时,这个报警更多,
% \, g0 t6 d1 O1 o1 l) Y" k可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
8 P! _, R" o* n* m: N程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
% r, U, T% s+ r! P2 H3 L6 q+ t9 n- c1 f
另外一个小建议,就是move,所有的move都可以这样
8 M$ I+ j% J+ E6 R0 V4 a3 Pif not move() then debug end- x+ b* f9 n/ z% F
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。6 K! d& Y: N7 Y( I% O% g0 }
plant simulation中的free libraries有AGV模板,
4 n. Q) q; U+ B  C2 {里面也有案例。4 u: E  Z8 E5 |& a9 a& b
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。' J7 ]- r* `3 t& T1 N% H* X! J

. |! Y: Y* Q) }: W$ n5 |我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 - \4 M4 b8 M' d

% d7 h# T- h( s6 H5 K& M0 c那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 : Z2 }! F! p. T  ?7 A6 u
这是AGV_putin中arrive的method。2 b+ b( H7 L7 E+ G7 R

) i/ S  i  [! J- f$ f- B6 X, K& Y当到达物料速度越高时,这个报警更多,
: T% F: U. J. L( d, v8 G
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-30 18:10 , Processed in 0.020390 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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