设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5623|回复: 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'7 b/ l- T  e+ l1 t& g
*/6 G1 ]7 T: S. H; `& \
is
9 l0 T+ M; J/ w4 `1 U. M7 ?        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
% ?: \0 w9 R2 z- |4 I% Udo
0 \$ G3 `- r; |" M6 J! m        Lan := rootfolder.Internal.Tools.AOLlanguage;
7 A* ~8 H; P: M3 b- r        if current = @.Destination -- else return
4 ~" V1 Y5 R4 N# W; p% _        then
- @0 @2 u# n! N2 z                @.Destination := void;1 q. s8 a, V. h/ S  F, P" b! [
                if @.occupied then
7 H+ }/ H- I- W1 W                        part := @.cont;
  G; A' i7 e2 P$ s                        @.transpOrder := void;
+ }& q, K% X" U, _" a2 v2 _                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
, l  J: F$ O2 K. z# m6 Q9 G6 F                                @,root.eventcontroller.simTime);) I( w# Q0 v; b& |" [+ c
                        @.HasOrder := false;
) g& S9 X0 b5 `& B/ G; X5 K                        @.DrivingHome := true;
' v. k/ F) @8 h0 H1 [" i  ?                        rgManager.tryToStartTransOrder;
7 c7 e, G) j$ m$ E                        if @.Destination = void
0 }# x3 i6 \* \. |4 v& Y* }6 L                        then -- no transport order for vehicle @' ~3 `, m! e7 G/ m/ w
                                @.Destination :=( O# U& q& S9 m3 m: m+ Z+ _
                                rgManager.nearestFreeStation(@,track.~);& i& s/ l, v0 L2 B
                                newDirection(@);   # K+ D" T5 F7 A* [7 @% v6 V
                                if @.Destination /= void then
1 B9 c0 u8 I/ h1 c- C0 f% _" |, y' e                                        @.Destination.NumReservation :=
) ~: w% R# x$ t' ^6 {4 K! d' S; [                                        @.Destination.NumReservation + 1;* i$ ~$ {. S, r( ]. ]
                                end;
0 G1 d- @( d/ ^$ U$ Q+ ~                                @.CurrIcon := "drivingHome";
. `0 r* L0 c. Z8 Q3 ]% O. e                                @.DrivingHome := true;
: X0 G* D3 D* v, l                        end;8 g: R! ~) B2 i) S; h3 b( B
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station" Y) R, V0 T, c1 G+ X$ [4 c% c
                        part := @.transpOrder;
' K# A! i3 M/ j, `" i                        part.move(@);-- load part# m$ t, f9 f7 `( K
                        @.CurrIcon := "load";
) N$ i: l9 A2 \4 D$ t                        GlobalDistObj := part.globDestination;
1 Y7 k$ i/ x7 P- R0 w) ~1 B                        assignLObj := rgmanager.rgAssignL;
4 B7 z8 G9 z* z0 @/ J                        row := assignLObj.getRowNo(GlobalDistObj);
% o: H: s* p0 z$ T9 d                        if Row = -1 then -- since 70
, S2 J0 o, a1 k+ R' A5 ^                                if lan=1 then; G; [- g  j8 v# g6 g4 x
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),' ^. j! f/ T% n" p
                                                to_str("in der Andockstation: \"",?.~.name,"\""));) K& ~) g) W3 z, g. S
                                else, l, U2 |; p6 ]- Q; ~) k4 O/ H
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 Y: a0 o) k5 Z9 q( y$ Q                                                to_str("in docking station: \"",?.~.name,"\""));                                - ^4 I# F" Z# s2 ~- U5 t1 `
                                end;* l0 V  J$ G8 y  j( b
                        else
0 K  ]) {8 Y+ e7 t' b                                @.Destination := assignLObj[1,row];+ t& Y- E3 f+ I% Q, w2 J/ C
                        end;                       
- s" [9 Z5 ?; \                        newDirection(@);
5 s( m$ d( U* p                        @.HasOrder := true;# J% X- s4 k9 F) p& s- N
                end;- j1 _* L2 O3 |, W! n
        end;
( U% O7 C; s; n. q  tend;        -- of the method
+ X' ~6 h# ]" l. `
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 8 P2 v# T/ \9 `6 Y. p) X

* ~1 N: j/ C7 T; n' D7 ?7 e( D这是AGV_putin中arrive的method。
" T+ T, @& ^9 S' i  V( U5 h3 d( X$ \: P$ K
当到达物料速度越高时,这个报警更多,3 T+ t. e# ]2 S4 n/ [. x
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。5 M% w! \3 x3 A4 A* N. M
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
" h) ^! @1 y8 z( }" n; l$ b0 a4 r
另外一个小建议,就是move,所有的move都可以这样
# P' c9 A- t8 r* L+ zif not move() then debug end
* H, R7 u1 _' N. E这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。+ T. P& P5 a4 X
plant simulation中的free libraries有AGV模板,
! l$ T; v5 U' s0 t% l1 M1 T里面也有案例。
" A9 h; m4 v0 \1 M& |我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
5 ]3 |) ~+ H" l* H6 W' D
2 m; A9 R6 O5 d0 I我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
  g0 W& t0 ~0 V* ^8 G7 Y
- T! {9 u1 O/ ?# x$ w那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 0 n9 F; r, V) D9 q* ~4 c
这是AGV_putin中arrive的method。# s4 n/ G* v# v" A% U+ U

, ?) n1 E7 d9 G3 M当到达物料速度越高时,这个报警更多,
$ y1 m8 Z5 u+ z" [
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-12-9 21:08 , Processed in 0.020692 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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