设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8436|回复: 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'
. G2 c+ E* c( y& R9 n: s4 J7 v*/4 f% o! A, S! ^8 J7 Y
is6 Q2 H, G! {8 n$ L$ O* C; D4 x0 G
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;' W% u6 h" K& @& c9 V- n
do
7 q8 Z# `" ]9 q- H( F: N        Lan := rootfolder.Internal.Tools.AOLlanguage;
6 i- u2 R/ S$ y4 s7 R        if current = @.Destination -- else return
# ]7 Q' c' B/ x$ a4 W, C        then
' I/ s0 z! Y* K0 p                @.Destination := void;. ~: N# w+ M; @$ {2 d7 ]4 W
                if @.occupied then
  p7 G' f, A' b/ Y                        part := @.cont;
7 N# O3 S/ e) |6 {4 c                        @.transpOrder := void;
$ }# P8 Z5 a! G+ J, D; x                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ x2 p% ]; h* y8 W                                @,root.eventcontroller.simTime);
, a, z$ e! S! ^7 ?" d! P                        @.HasOrder := false;
0 T0 v1 {- O  O                        @.DrivingHome := true;
4 t% _: O! b" g0 A- v! F0 T6 f                        rgManager.tryToStartTransOrder;
7 ?7 G3 ]& r5 K                        if @.Destination = void
3 h  Q/ b4 B* N; k4 P9 A% ~                        then -- no transport order for vehicle @$ ~# S8 b) Z% m5 e
                                @.Destination :=
: Z- s, {. P1 L% X                                rgManager.nearestFreeStation(@,track.~);* }; K+ w9 n7 r! E7 H
                                newDirection(@);   
0 `1 n6 L6 k- k1 F5 ?7 _                                if @.Destination /= void then! ]+ Y, W) N9 Q7 {0 C$ m
                                        @.Destination.NumReservation :=2 \4 q6 ?/ g4 P* d( P0 c5 q
                                        @.Destination.NumReservation + 1;
9 l: {( s: X4 [" S                                end;0 A2 m9 Y' ^2 M( A0 H1 F
                                @.CurrIcon := "drivingHome";
! Y( i0 W/ f: J. @( J2 T% n- I                                @.DrivingHome := true;$ S* p2 Z5 ?& L& U
                        end;
' \" ]% N  K! F8 O: X+ {5 i# N                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
" `6 b5 x3 |2 ~0 p' j8 h! f                        part := @.transpOrder;( }4 `3 T1 p0 G% A' J  F" n- |
                        part.move(@);-- load part4 o/ a8 h) N: l9 K7 l3 S8 O( E
                        @.CurrIcon := "load";
: q! V- v9 z2 U6 n. A+ n                        GlobalDistObj := part.globDestination;
9 i- a- Q% m) h3 L                        assignLObj := rgmanager.rgAssignL;0 `/ p( f# n2 E- x( L0 Y( |
                        row := assignLObj.getRowNo(GlobalDistObj);/ a% e$ K$ a: }  n6 T% F! [
                        if Row = -1 then -- since 70
& a. m- B' P6 ~9 P% y( R& F* I                                if lan=1 then0 m" A! c5 w: f! Y# ~! D; G
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
7 Z+ c6 R+ ^: U8 o7 E7 ?                                                to_str("in der Andockstation: \"",?.~.name,"\""));# _+ N& J1 O5 i* D7 d- ]
                                else( Q7 ~! R8 V$ ]1 q, h2 M
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
* e% ?% N$ p) H5 H- N                                                to_str("in docking station: \"",?.~.name,"\""));                                4 H2 b& X6 R, N/ E, X1 b& e2 }
                                end;
. C! B8 l# X( p) s, f                        else! W7 H+ M$ V0 @* S" u2 b6 g
                                @.Destination := assignLObj[1,row];
9 q: O9 H3 ?( h4 V$ h                        end;                       
: [0 U3 y+ G" ]% R0 \                        newDirection(@);
# `* D' r! J& c                        @.HasOrder := true;& x9 D. M# }- K3 Y
                end;  A7 q2 n. x" F  e
        end;
9 w$ W* R# F  k9 [end;        -- of the method9 M& m  l- t) ^, p& B6 p. p
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 1 _9 M% M9 e1 N7 P

: U$ y) t: R+ {' s5 u$ O这是AGV_putin中arrive的method。
- m# j) s2 w" y' |$ J$ \' V0 r2 F! d
当到达物料速度越高时,这个报警更多,( Q% x" ~0 U2 f
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。) E+ j( l! F/ e
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
# F) Y1 d- |: `) |* k- }3 q( j& i8 M/ m/ y# z
另外一个小建议,就是move,所有的move都可以这样
: X6 v+ I3 I5 hif not move() then debug end4 g+ v6 f1 K. K" ^1 S. j
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。7 x3 D, F" a" C- O' E8 x
plant simulation中的free libraries有AGV模板,
! c/ D1 g/ k: ~3 O' B4 @' k里面也有案例。
% ?) n: v! C4 q! @& D- ~* {我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。$ N2 U! d- O6 G$ G

% Z; m! G4 {# Y/ T我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
0 E/ W& C; I) Q! Y5 o$ q
( Y, ~, ~$ V3 B, a/ `* J那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ( i& u4 B3 z& `6 y
这是AGV_putin中arrive的method。1 F  w8 i7 A! a: C! d, J
( \& z$ }% P+ K
当到达物料速度越高时,这个报警更多,
: p0 x# ]- w8 y9 R
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-3 20:22 , Processed in 0.016133 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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