设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8997|回复: 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'
% y( B. |* [, Z" ~' G*/
. l% Z3 m7 l) @; I. S& o/ W' Jis0 i8 W  P0 ]) n: G
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;. a; A6 K% \- F
do
/ n# D$ o0 k- |4 Q        Lan := rootfolder.Internal.Tools.AOLlanguage;8 C/ C. q& V  u+ t% F
        if current = @.Destination -- else return
/ P  b/ K: e+ s# A- _' N$ H        then
: f- t' G1 P: y9 [% y                @.Destination := void;
: j2 L6 ]. R) ^; _$ E4 @                if @.occupied then
6 I% q& J( E7 t, ?) V& ^. ~4 A) T! `  d                        part := @.cont;
1 ]% O3 J$ M- u9 f: E                        @.transpOrder := void;1 J- {) X+ ^) Z
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: ?7 H; J0 |0 S1 a                                @,root.eventcontroller.simTime);
3 d) r: }: G# N! L4 a- M                        @.HasOrder := false;0 O) r& I+ k$ _8 M' D9 a
                        @.DrivingHome := true;
7 t% H9 I0 J) I5 a5 `% J4 u                        rgManager.tryToStartTransOrder;
2 j* C3 N( W1 k4 c  _3 i$ ~& n; I                        if @.Destination = void0 T6 G8 n4 m( {( t, [9 \: u
                        then -- no transport order for vehicle @9 h) J8 F1 y# `  h
                                @.Destination :=9 Y- I# e8 a$ H$ V( ?& {
                                rgManager.nearestFreeStation(@,track.~);
+ J8 U" A5 I( Y& \                                newDirection(@);   
- k9 e2 Q8 ?5 A9 Y( x  N; j( R                                if @.Destination /= void then
% L+ A; U2 i, n" |8 f                                        @.Destination.NumReservation :=
' r. f9 P' Y' ]) ?5 e                                        @.Destination.NumReservation + 1;
- U& _2 w& e4 T  V/ e& M9 b                                end;/ G" Q# k$ ~' Y. u2 P; O
                                @.CurrIcon := "drivingHome";. i+ g6 J) N3 M3 o! e, d
                                @.DrivingHome := true;
8 D8 e2 j& r! X! r* P' b                        end;# r& H' U% e$ d! b0 p
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station" g. s2 I& p/ N! k' ^+ H1 k( l, n
                        part := @.transpOrder;
* _: {" A$ c9 j7 x( x$ J- ^                        part.move(@);-- load part) o( `& [- a3 I% d. _+ g
                        @.CurrIcon := "load";, D4 Y% V7 D- G2 U- c3 k! f
                        GlobalDistObj := part.globDestination;4 Y0 f3 q( o6 |5 R
                        assignLObj := rgmanager.rgAssignL;3 c( @6 N6 q, c3 s. `
                        row := assignLObj.getRowNo(GlobalDistObj);
" ?8 K* e9 g2 Q  a# ], N                        if Row = -1 then -- since 70
3 L6 S: t8 q# `1 [                                if lan=1 then
# z7 t7 @8 S/ U* `) Y$ h                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- m. M( l* m% V1 M) s                                                to_str("in der Andockstation: \"",?.~.name,"\""));
1 V: b$ @( ]) \                                else
# E' G3 P0 a4 b$ }  ?                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),5 D% M0 S$ ^8 G6 _
                                                to_str("in docking station: \"",?.~.name,"\""));                                ) o- l0 ~& G8 l1 o0 t- }9 |% y
                                end;; f' g& {6 q  n
                        else9 O9 l& y2 P% a
                                @.Destination := assignLObj[1,row];
5 a" V9 y+ h& V) Y" S6 d3 o                        end;                        $ C+ W1 g  H, o4 |8 P/ O$ ]& C8 {
                        newDirection(@);9 e: I, w+ S* {( B; X
                        @.HasOrder := true;; O& D' H+ J) h6 A9 ~  S: d; W
                end;( Z7 Q* c' m; w8 l
        end;7 i6 r1 u* X1 Z# U  \1 q
end;        -- of the method8 U* S( t+ h9 p4 g2 ~7 M
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 ) k5 k; K% V9 G! n3 I! r! \

& H* f; @% f4 A2 X" e+ c这是AGV_putin中arrive的method。
. y1 W; C, L3 x/ }4 q4 a. z: x* G6 z; M$ a
当到达物料速度越高时,这个报警更多,$ g5 Y% E# w6 \0 k: v. L
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。9 N- j) Q' O7 s  l. P. E
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
# y) {7 c1 \; t0 J9 l& \
, s0 l" S1 ~; x" w/ S* B" V) K另外一个小建议,就是move,所有的move都可以这样, U, P3 u. F3 d5 z3 t" V/ i+ ^# E/ ]- V$ a
if not move() then debug end" o. s- y% Z* K' Z
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
0 ]4 g3 N/ e* @! E+ cplant simulation中的free libraries有AGV模板,( W) b+ X5 w% Y- S8 ^
里面也有案例。
+ [/ V4 X) S7 e我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。+ X+ d4 f- Z8 ~: U8 U

: v9 r7 M2 {/ j' C/ J/ _我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
% j8 N7 J' X" _( W9 {' G1 l$ U" Q# p3 \  q) R
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
/ L! u8 B" L+ K: P2 b0 b8 Q这是AGV_putin中arrive的method。
! H; _* a. i" w* Z2 I
0 N' T7 G+ }" D3 e% K% h; r当到达物料速度越高时,这个报警更多,
# Z( a; x% `- r; |
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-8 08:06 , Processed in 0.014703 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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