设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7452|回复: 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'2 K: `/ A/ V7 J, ^' c, X
*/7 l. b" _; @7 d  \1 v
is0 Z7 j0 t1 h% M+ K6 T
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;( ]  k0 q  P4 V
do! S8 r1 ^1 v5 {0 C
        Lan := rootfolder.Internal.Tools.AOLlanguage;
  U* [1 L8 q  Y. q3 t2 g3 @        if current = @.Destination -- else return
* _$ W4 P" u2 @( S        then
+ `! p% k  ?/ r+ B                @.Destination := void;
+ o4 z- i* |- `                if @.occupied then
) L# U1 A9 V# _4 J: ^                        part := @.cont;
0 u& u: G1 J0 w                        @.transpOrder := void;
4 `; P& o# P. C( G5 R& y                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
" ^3 ~% n3 L1 v' v& O( o; E                                @,root.eventcontroller.simTime);  [: Z" F$ E. {7 k; i3 e9 t* V) V
                        @.HasOrder := false;
2 _* J+ V0 R' P0 R; O4 G                        @.DrivingHome := true;
9 \5 g# C9 Z4 M                        rgManager.tryToStartTransOrder;9 j/ _& k7 X% Q8 t+ e
                        if @.Destination = void
  {9 _' @8 m" r6 C                        then -- no transport order for vehicle @
5 ^: C7 H# L% ?7 l2 \* z                                @.Destination :=1 A$ C" @7 C* ~7 e+ F
                                rgManager.nearestFreeStation(@,track.~);+ p, s. F) W, i
                                newDirection(@);   & a/ k' S- D8 }) I% l" p4 h1 `
                                if @.Destination /= void then
4 D; M' }9 u" `. D. [6 x# k0 A' C                                        @.Destination.NumReservation :=! p4 f$ Z8 I7 d! |+ {2 h) \
                                        @.Destination.NumReservation + 1;
* |% x7 u. g8 U5 R/ v                                end;
' G. Z  Q5 Q# \9 \                                @.CurrIcon := "drivingHome";9 j& j$ f  d0 Q7 T' f  r  P. \( {0 _
                                @.DrivingHome := true;3 Z4 f9 Q  P/ V' s- ]
                        end;6 P  R: B( G4 d8 m7 I0 `
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
! k5 }) w& t- N/ h! `                        part := @.transpOrder;) A$ X  }# G; P, P' s! G- c9 ^
                        part.move(@);-- load part0 M2 L1 Z6 b" y$ N9 e1 B" X- V
                        @.CurrIcon := "load";
- A% \' n# i% g$ z                        GlobalDistObj := part.globDestination;
2 g2 l. a5 @) e+ z2 {) O                        assignLObj := rgmanager.rgAssignL;
3 a$ v" ^1 V  q9 ?/ D                        row := assignLObj.getRowNo(GlobalDistObj);5 B3 W5 A0 |/ C! Z! K3 s2 H
                        if Row = -1 then -- since 70* ]1 f$ O( L; n: C$ F& F+ C8 L( Y3 X
                                if lan=1 then
$ i9 ~2 x) j8 K/ R1 u$ W                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),5 `. J# U& q# m7 w* M* v
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
/ t( p3 J1 p. E" t6 g9 G                                else: {+ R& T8 M: V1 X% Y2 r3 B" \
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),, ~# S% }# J" N& P
                                                to_str("in docking station: \"",?.~.name,"\""));                                7 Y# P' d3 y9 E8 w+ b9 r$ J
                                end;# q1 k+ w7 `. f5 s
                        else
' x% M% a& Z0 @8 q9 [                                @.Destination := assignLObj[1,row];1 ^. b0 X& x' |0 ]! j2 R: ~
                        end;                       
" m8 u1 d" {" I* Q$ Y                        newDirection(@);
- @+ Y6 n( Z8 P/ V$ e                        @.HasOrder := true;" ~; ^/ k5 l: w; I+ i, d  k. ?4 q% u; ]2 L
                end;
% o: L6 Y( Z* [6 R  W6 p1 v        end;' K" j- C9 o' o! I8 z9 l
end;        -- of the method& J% v( {4 B, d1 k- U
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 ' T0 }$ m. p$ v* z1 L  P2 x
9 I# `7 @3 v! J8 B. z7 D2 J
这是AGV_putin中arrive的method。; i8 ]6 a5 Y- `& K2 P6 o& u* S
3 e' k* V! d& U9 \) ]6 g: i
当到达物料速度越高时,这个报警更多,
% ~* r; @0 b, C可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
% z5 d2 A& {  d& J$ I程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?9 {9 T! ^" E' n) W1 V5 t0 Z4 N

. ?  W* N4 q7 Q0 V8 L+ Y另外一个小建议,就是move,所有的move都可以这样
/ ~8 b1 R8 r7 N" {+ b3 e- f6 j+ ?1 z  oif not move() then debug end+ h9 c! Z- l2 |5 k8 n. H
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
- u- N) L3 a  `# ]plant simulation中的free libraries有AGV模板,
, l. o- k5 Q7 j( l5 I里面也有案例。
3 }7 B, q6 Y0 o" L我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。/ r, u3 O& C: \
1 I1 z% a& ^" E7 \: s0 F
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 + G2 \1 f. ~2 y. T

: \8 `4 E* `% _% J; N7 A那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
4 V+ @" m- n4 d7 s) @, H这是AGV_putin中arrive的method。8 Y8 ?7 ]1 [  L. v; }/ h" {

6 B/ C! X) Z6 G0 n5 e当到达物料速度越高时,这个报警更多,

3 y6 Q! t! H; p; V3 H另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-12 06:36 , Processed in 0.022114 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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