设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8556|回复: 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 M  X  p, K& U/ ?
*/$ \$ f, f5 g) Q$ V) X
is' }1 N( Q  }/ D& R  G6 r
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;0 m  d$ H1 P% t. y; }
do  k9 o7 K# N5 h& ^& c& r' r8 a
        Lan := rootfolder.Internal.Tools.AOLlanguage;+ e# i2 h+ j8 d" ?$ e. ^
        if current = @.Destination -- else return
* E: D) t6 `8 v2 g; R# O/ m        then. _4 @; W! s- S7 F% S
                @.Destination := void;
& S+ D  l. ^3 q, ^! N' }                if @.occupied then
& {( c5 j1 P" g+ [$ D                        part := @.cont;, r9 L( p* {) G
                        @.transpOrder := void;
# F' n2 o' w* a8 k                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,8 ^+ m! l6 j) t6 {+ m7 }
                                @,root.eventcontroller.simTime);' h9 s5 M, e- N) o: O% N
                        @.HasOrder := false;' l, r+ D4 e$ f
                        @.DrivingHome := true;  d. f0 N) |5 Z5 Q7 K9 m
                        rgManager.tryToStartTransOrder;
- t1 E1 z% {9 Y! J0 D                        if @.Destination = void
9 |0 T& H) g9 \" B7 F" `" u                        then -- no transport order for vehicle @
: ]* {$ g0 {- i' D" ~$ O& }$ o                                @.Destination :=
. q# y% c0 K, u9 p  K* G# @3 e                                rgManager.nearestFreeStation(@,track.~);
) d* G5 W7 v0 j+ O9 m: M                                newDirection(@);   # E3 D8 U' Z8 X/ f
                                if @.Destination /= void then
0 }, a5 O$ C7 h4 E1 }; Q                                        @.Destination.NumReservation :=
% h( j0 ?8 b- z( Z                                        @.Destination.NumReservation + 1;4 s0 T8 E' Z. m5 C& S( N
                                end;
% ~1 m- e  y9 J; E                                @.CurrIcon := "drivingHome";
" T9 g  o+ O& q9 V/ |                                @.DrivingHome := true;! @6 J. n! M- z  x1 p7 I) y
                        end;
3 T( L: @# ^; ?3 O3 w                else -- the vehicle @ is empty, both vehicle and part are in the same dock station2 U, s( y' s/ e  @/ w  u3 N) Y2 ]
                        part := @.transpOrder;( g* ]: i* }8 ?% L/ B
                        part.move(@);-- load part; R# g6 b$ u- E. v
                        @.CurrIcon := "load";
7 L$ L$ l3 R4 H2 i" C' _5 E. r                        GlobalDistObj := part.globDestination;
* A7 y# w3 @; z; @$ r                        assignLObj := rgmanager.rgAssignL;
* j% B: c/ x8 }* K! k: E+ N: H! f                        row := assignLObj.getRowNo(GlobalDistObj);
" Y$ k4 v3 i6 q% }) a% V                        if Row = -1 then -- since 70
- s) s& M; E/ u5 Q  E                                if lan=1 then
9 U3 b: c" v& B- l& d                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),+ S  w1 x3 s5 C2 o1 a
                                                to_str("in der Andockstation: \"",?.~.name,"\""));+ N% e8 I7 r  a
                                else- i( n( y+ U: T" j( w) ~+ u
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
9 `6 \# }: G1 N4 [/ E  W$ E                                                to_str("in docking station: \"",?.~.name,"\""));                               
) O8 h8 e( E" v% J                                end;
& q1 D/ i5 G6 a1 q2 |- ~. W                        else1 f. ^/ f8 S  t
                                @.Destination := assignLObj[1,row];
+ K3 \- ?8 `5 N( F                        end;                        7 s; l( Y% k. n& z, j8 U, `
                        newDirection(@);: \/ X% P! s2 d% [
                        @.HasOrder := true;% f8 l0 V! [4 t, ~
                end;
8 B, T0 q1 v- d4 E' O+ }        end;/ C& N- t, v: y% r
end;        -- of the method
7 I1 m6 \* H. O  ^; B
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 0 p  v. Z1 g8 n) G9 R
1 w$ j- y: q( C- I$ B/ V$ A
这是AGV_putin中arrive的method。
& m1 N. H& A; u$ O$ G/ D! p
6 [! R) T0 G9 [当到达物料速度越高时,这个报警更多,5 C3 i) u* y' k; H
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。* o# D; r! m7 V0 o) N, ]( {
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?, D6 h. ~, o* E. Y
! S) x; f/ Z; i2 Y
另外一个小建议,就是move,所有的move都可以这样
2 W( \* T, Z6 r0 \5 A6 p7 Nif not move() then debug end5 H( e+ |( B! R  d: A- F) c
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。& w3 v1 I7 q9 I  j8 q$ x
plant simulation中的free libraries有AGV模板,3 C& Z3 J- a4 d1 W! E7 X
里面也有案例。5 P6 J, l  Z5 I5 b) M% O% C5 ]
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
/ y" ^: i/ X  \, ]  W% p1 A/ l4 h9 T- i$ W8 D
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
9 Y% H  q' c, L9 h4 _( M# ]9 X+ D& ^0 Z
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 " T$ y2 B5 B$ ?
这是AGV_putin中arrive的method。
3 T$ r1 ^  y  o, s
  |6 w( _3 l  n当到达物料速度越高时,这个报警更多,
" h, k+ V1 ^$ Q; q2 I8 K2 B, Y' x
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-11 13:55 , Processed in 0.016412 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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