设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8577|回复: 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'
0 n4 H# h8 X7 |$ I5 c. t*/+ g4 J& |' l+ L1 V; e; x4 b/ A
is. r9 w) h5 i) ?, ^( {, k0 c& {% Y! a
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;1 S, W& C7 u3 E" U1 W& {) W. Q6 C# g  W
do
0 c0 E* _7 _5 O& j% X+ \5 `! z8 D: K        Lan := rootfolder.Internal.Tools.AOLlanguage;
# y( P1 O/ F: ~        if current = @.Destination -- else return
" S  _3 |; ]) Y. _; H        then  l2 e9 X5 ~) z$ ^- n
                @.Destination := void;
# m+ m4 X: G2 T3 Y1 W1 O& A                if @.occupied then# _1 d. i9 F, ?! j$ Q
                        part := @.cont;
# B% v8 F/ y+ m1 N                        @.transpOrder := void;  o2 W" m6 ?: y8 t- u% Q1 l
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,7 N0 B2 a" `1 }2 r: b$ J
                                @,root.eventcontroller.simTime);
& Y% v% Q9 ~5 j( N) o                        @.HasOrder := false;
, H/ W, d* z- [0 K                        @.DrivingHome := true;/ W9 y6 `8 k( L  T$ N8 J
                        rgManager.tryToStartTransOrder;7 R9 J' ]7 d" c9 E* R  u7 ?5 N
                        if @.Destination = void/ u$ _8 v. G7 `4 O
                        then -- no transport order for vehicle @
/ \/ W7 H4 L) B7 _! N1 S: A; f                                @.Destination :=
& k! ]4 O  P% P/ L$ j5 q& N' m3 |                                rgManager.nearestFreeStation(@,track.~);6 e- {1 j$ N9 K7 H3 ]9 a
                                newDirection(@);   ) ]7 d* p# L7 Q, a; ^+ O! S; @
                                if @.Destination /= void then: j7 T! N4 ?* |% Q- Q
                                        @.Destination.NumReservation :=* I5 Z, Q2 k$ h0 \6 l& W# h
                                        @.Destination.NumReservation + 1;
9 \& ^: s" h% J% s5 T                                end;
% t! E$ |+ M: ?2 a# {5 E6 k                                @.CurrIcon := "drivingHome";( }1 U. t% ~% Y- `4 B/ Q
                                @.DrivingHome := true;
; c& {8 Q. Z( W/ h+ g, _5 _2 S                        end;/ X+ }7 {, X' Y# c6 ~% X2 u7 k' V/ O
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station/ C/ e9 y" k1 u' N2 m/ L( X
                        part := @.transpOrder;' d- w: k7 D+ G2 Y# M& ~) a
                        part.move(@);-- load part" X6 L9 |7 u9 W$ `2 J% k4 S: \! i
                        @.CurrIcon := "load";! [: E0 e4 u2 F7 v
                        GlobalDistObj := part.globDestination;
: {! V0 C5 s' q2 M. l/ }9 @                        assignLObj := rgmanager.rgAssignL;. t4 y  @/ J- C! {
                        row := assignLObj.getRowNo(GlobalDistObj);
/ W  a4 `6 w5 S( \( O9 i/ C' F                        if Row = -1 then -- since 70
! u. r  }0 G* @; Z4 {0 k6 T, z                                if lan=1 then+ U& s4 k; T3 e. ^
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),2 b* p! S, V% b4 a; g/ e$ h
                                                to_str("in der Andockstation: \"",?.~.name,"\""));* c& ]) r* s4 s& |5 v
                                else
' S$ a: Z- Z( K0 P. J                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),+ a4 a5 z/ {0 I+ O7 @0 }1 G
                                                to_str("in docking station: \"",?.~.name,"\""));                               
' _, W" M/ }7 }& \5 J                                end;7 y$ K( g  d$ l% n" p5 L0 ~
                        else; c5 ?2 M) [* X/ b
                                @.Destination := assignLObj[1,row];/ O% a. _0 }; K: E  T- x- K
                        end;                       
  O+ z, l+ ]/ Q, Q$ g/ V+ u                        newDirection(@);* x" K. H3 ]9 w1 s
                        @.HasOrder := true;- I: Z5 Q6 \$ H3 X: x/ z
                end;
7 L3 f/ \9 C; L) q/ q7 m+ x/ F4 Z+ O        end;
& J1 D. {- s$ P8 q% r6 S8 Aend;        -- of the method- l! {; E9 Z) u5 ^, |# j
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
8 G5 i4 N0 @9 ~# l
0 G5 j0 B: ~7 B4 p* C5 W  d这是AGV_putin中arrive的method。
/ T+ E2 j) K7 o$ A1 f5 y! x! _8 }6 P$ l# P1 O" U% {, T( n, [
当到达物料速度越高时,这个报警更多,( D% M2 k3 ?! H) a4 U1 P
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。9 U/ M* X9 D+ A; k5 V
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
) I3 t0 Z1 n0 K9 {$ A1 j+ v7 r# F; g( ]: Q% n; x
另外一个小建议,就是move,所有的move都可以这样
$ d( ~# K# _, Rif not move() then debug end  L+ D9 I( R- l0 C# l
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。* H7 q& d9 U0 p3 y
plant simulation中的free libraries有AGV模板,
+ |2 A, L; d$ I7 H" M5 P里面也有案例。
1 w: g) w2 S5 f我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。3 S$ d1 \, ~7 a+ x! r- o
( f- T7 e1 m- {
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 8 |% @7 v; k( |( N4 s
* g: S! T# b0 o- t% \! ^: X# u
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ' \  v7 G* Z5 {. Q2 V3 `$ r, K$ n
这是AGV_putin中arrive的method。
0 H, X; t3 ]' S1 L1 Y: @2 l, w7 h' F5 z6 J8 _) q! K; [
当到达物料速度越高时,这个报警更多,
) u: a- E& l+ Q. N) A/ l! y
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-13 02:37 , Processed in 0.016260 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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