设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5588|回复: 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'/ ?5 c* p( D6 i( l
*/
4 o9 C" j+ {0 c9 g" d1 C6 vis$ X8 s8 T- `. R& |
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;  T2 z6 J, H  D5 S
do9 l0 d1 ^% {6 Z( B
        Lan := rootfolder.Internal.Tools.AOLlanguage;. \: o2 ]8 l) T9 Z# E
        if current = @.Destination -- else return
4 J' x: }+ @) u" n9 M- x& I. O        then, C: k: `9 Q( e5 `$ ]* e! T
                @.Destination := void;/ h; k& `8 ^8 Y( O( q( z
                if @.occupied then
9 t" n5 w* Q" G! p                        part := @.cont;
2 U+ e" c+ b% r: b6 T' I0 T2 M                        @.transpOrder := void;! d- k7 E+ h2 {* d5 u5 Z
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
4 d& G0 O6 a3 o3 o                                @,root.eventcontroller.simTime);
5 O' N. \4 [+ B, ?' X  \0 V4 E                        @.HasOrder := false;
9 D" Q0 U1 ?6 I& S" Q                        @.DrivingHome := true;
" J  g% F8 I* |- I- E                        rgManager.tryToStartTransOrder;
; n8 A+ U3 u* J                        if @.Destination = void& R3 m  X$ Q4 K: d
                        then -- no transport order for vehicle @0 H% S+ u# o! j9 H) _, d5 O
                                @.Destination :=
; R( {8 Z, d8 O; ?) B                                rgManager.nearestFreeStation(@,track.~);
" y5 @$ z' Z0 ]& F) q( J                                newDirection(@);   & J2 P& u% M  w/ X
                                if @.Destination /= void then
2 I9 k  e* [8 g3 y# O, q& ~) E                                        @.Destination.NumReservation :=
. v5 _8 M* ]; O' T$ K$ n                                        @.Destination.NumReservation + 1;
3 S* s& I, h" v: J; ?                                end;" K# I& F$ `1 x1 U" E& \" Y
                                @.CurrIcon := "drivingHome";
* D1 i2 p- \4 r  c+ H$ ~( {                                @.DrivingHome := true;
" H# h5 ~* S; Z7 F+ p                        end;
1 N7 r% K; v. `3 Z$ {2 t                else -- the vehicle @ is empty, both vehicle and part are in the same dock station6 p' ?0 ~3 Y" P0 _9 ]
                        part := @.transpOrder;
# D) a8 T% i4 L4 H- ?: N8 a                        part.move(@);-- load part
7 o; P" _6 Z! k9 ~+ @+ V$ M9 U                        @.CurrIcon := "load";  w, V& w3 r; D; i$ X
                        GlobalDistObj := part.globDestination;! N1 D- P5 V7 U, E3 X1 L! x
                        assignLObj := rgmanager.rgAssignL;
. J6 y3 n' l8 c. ?1 Q- {                        row := assignLObj.getRowNo(GlobalDistObj);
2 W; z, y1 O0 M4 `                        if Row = -1 then -- since 70$ |2 ]/ y! M( s& b& o" C
                                if lan=1 then' H, a! U7 |$ J
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
" H4 l$ _- j3 @7 m% ?                                                to_str("in der Andockstation: \"",?.~.name,"\""));
+ Y2 I: Q7 O! y5 R. D/ Y                                else
) m; S; _( X/ E/ w* i                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),' I' m; ?8 P% d1 u4 H6 C! P: }
                                                to_str("in docking station: \"",?.~.name,"\""));                               
& @% S4 |; W& t6 k/ e7 z                                end;$ B4 r: w' D6 |$ Q! T0 X
                        else! t" |& J! }5 C0 w* v
                                @.Destination := assignLObj[1,row];
% A+ f, }, {3 Y9 X1 b                        end;                       
, `( W; H2 V8 D# t& E+ W3 ~                        newDirection(@);
/ R5 P- n8 |- K# i0 ?' ^                        @.HasOrder := true;
9 e/ g  x: c% i& @9 ?                end;: r0 h( G% U. z3 {5 Z( S2 U
        end;
" Z& _, p) e' K5 \9 oend;        -- of the method% x& u$ L+ Z7 k" f: h- B
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
$ y+ k: I0 `/ f) F2 c- d; w
2 N1 I7 |* K  l% y: ?这是AGV_putin中arrive的method。
+ _# W# [. A/ U9 T% l  `' A( C. K+ Z5 }- q' J
当到达物料速度越高时,这个报警更多,
- [! M( a2 u2 C( X可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。& \8 h1 L+ U+ h  Z) |$ M3 `- B
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
5 d+ u$ ~3 d9 p+ D) o" l
$ o8 G( T) J6 A4 u; U/ v5 g0 Z' Y另外一个小建议,就是move,所有的move都可以这样3 q7 G  e9 o7 `4 F$ f
if not move() then debug end' {+ S) W3 q8 z6 ~& V% \- g
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
# B! G, S' n8 {5 k9 o7 c! f+ E% Qplant simulation中的free libraries有AGV模板,3 f' r# |1 z$ d8 [% S# W7 }
里面也有案例。' h/ \- s( ?2 O8 u+ c
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
& s# _2 H- ]0 Q- `1 w. b9 z
+ |; O6 d3 ~0 y我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 , V9 T$ G& L5 l$ N% V( i7 q
" e- x& z2 K; h
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
  g; B, n0 q/ e  M) x0 j7 O这是AGV_putin中arrive的method。
! t& ]1 w/ }' @2 N, e, S* g- q5 e/ ?0 O% x! ~4 R* s% X
当到达物料速度越高时,这个报警更多,
& s$ o. D6 V/ c- N# J. n
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-12-7 12:55 , Processed in 0.020065 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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