设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5766|回复: 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'; o; s, k# V) b1 d' U  S3 E
*/& e1 T3 r4 x0 i  G6 M" a5 i. s% a
is
- ~2 I: ~* F# O3 H  d4 ^        part, GlobalDistObj, assignLObj:object;row,Lan:integer;( _; C9 n- K$ T- r! v
do! U9 _+ G8 A3 k1 E2 z/ u9 R
        Lan := rootfolder.Internal.Tools.AOLlanguage;+ r1 H) r+ I8 J% X( v8 i0 ?  A
        if current = @.Destination -- else return, `8 S5 v! S) u, I+ w, h! X" }
        then) t2 ~; n: f) y2 p  _
                @.Destination := void;% K7 f  }! w' r% a2 X9 V+ ^7 v
                if @.occupied then
% f( T' w, f. N                        part := @.cont;# z2 V2 d4 {* |+ m
                        @.transpOrder := void;
$ i8 B1 l& F8 ~                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,7 T- C7 U* B4 j! m$ |
                                @,root.eventcontroller.simTime);/ b- C  Y( N0 N- p: x- v6 U
                        @.HasOrder := false;
/ R$ M6 R. R" d                        @.DrivingHome := true;% \  ~  G1 z1 m3 H. Z- V, y1 k
                        rgManager.tryToStartTransOrder;
* C3 }  b6 }) F                        if @.Destination = void, I  i9 a. ~  m9 _) b
                        then -- no transport order for vehicle @0 l8 i4 f4 @3 l8 P9 T' b9 d; {
                                @.Destination :=0 }+ ^0 D+ b  D9 r7 X
                                rgManager.nearestFreeStation(@,track.~);
- Z0 [6 _* n; q4 l                                newDirection(@);   & }  s. h& o' s
                                if @.Destination /= void then
1 F$ O+ r, f; P( H4 X                                        @.Destination.NumReservation :=( n6 _( ^6 C# y, l7 I
                                        @.Destination.NumReservation + 1;' l$ e: S% Y# }! H
                                end;+ m) }( e# r/ ?% e
                                @.CurrIcon := "drivingHome";* n# T2 r3 _) {+ q6 S
                                @.DrivingHome := true;# |, Z+ C  d' B7 J$ N
                        end;
( ~7 P; M' `4 |" r: x/ U7 N                else -- the vehicle @ is empty, both vehicle and part are in the same dock station1 D! U* c. u( z* S( _- {9 ^
                        part := @.transpOrder;. P. l  ~$ k+ L
                        part.move(@);-- load part
( W  I1 ^7 R! y3 ~" x% v; e( y                        @.CurrIcon := "load";
# a5 M, u! `$ d$ q4 X! D6 u1 `                        GlobalDistObj := part.globDestination;
9 D1 B1 i4 F4 z- r: h, q                        assignLObj := rgmanager.rgAssignL;
: m) K$ E& G+ D1 d$ ^                        row := assignLObj.getRowNo(GlobalDistObj);
8 `9 n/ Y; a/ B( j1 g                        if Row = -1 then -- since 702 x" F) b+ i5 C/ d
                                if lan=1 then
! x( s* [( o9 N+ R" z1 ]                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
. r* a8 B/ j5 S4 r  k7 _3 V2 r" V                                                to_str("in der Andockstation: \"",?.~.name,"\""));" ~/ C' R2 h* a
                                else3 |- s9 N6 L! F0 N6 j  P
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),& l" o+ c. m6 y8 |8 S2 N' A, G) I
                                                to_str("in docking station: \"",?.~.name,"\""));                               
# `* a8 t* P1 y3 N. l                                end;# `$ h# j, J1 j9 `0 U
                        else
- F# r; V9 F0 w1 e) q5 s6 \* y                                @.Destination := assignLObj[1,row];# [: a, _) q3 |. `7 u" l4 x1 t; E1 O5 L
                        end;                        ; V; B% A3 r9 _$ t0 g9 R: l
                        newDirection(@);7 ?, b( P/ t+ F- g9 }) o1 H
                        @.HasOrder := true;- J0 W2 @0 Z0 B7 u: I
                end;
' _& a  d4 p1 I2 ~        end;2 I: e, n7 {7 U7 x/ u
end;        -- of the method2 U  q' p- }( [1 L$ {
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 / x# m! V7 C' n6 x/ ?$ m* i& O
1 k- s- ?  h: F4 q/ F1 g
这是AGV_putin中arrive的method。9 W# w. n/ _1 }

2 ^; E& L5 A* c+ ^1 ^% k当到达物料速度越高时,这个报警更多,
% H* x* `* H6 q& z可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。# B+ z& c" K3 n
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?; `) X4 U/ `4 w$ _' K
# N" t# r( Z, C$ p
另外一个小建议,就是move,所有的move都可以这样
0 g0 P% X7 J: V% s6 X9 x( L5 Vif not move() then debug end
) g% `  Q2 {/ O, s这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。! Y% r; n. ?1 p- r$ f5 i1 ^
plant simulation中的free libraries有AGV模板,: R2 z9 [4 |* U1 ]1 x
里面也有案例。. L( T& p6 S; U3 L" |" `2 d4 w
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
' W' m/ J) [+ n$ d3 I4 u
! }) W. V- E" a我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 ( k8 p' A# ~* x3 m" [
4 s/ @+ P6 ^. k: c3 X: H% p
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
- r+ B4 l9 m/ k这是AGV_putin中arrive的method。
2 n; E1 D# ^2 X6 \  w8 |5 S; K! `& {! K7 Z0 {6 C
当到达物料速度越高时,这个报警更多,

+ k: t- `) s5 ]) |- X( y另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-12-18 03:48 , Processed in 0.020200 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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