设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 4626|回复: 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') e( S& |8 ^8 f- p
*/0 K/ ~; _3 T& [4 ]- [* ?
is
# M( S  K+ |/ s3 N  @5 z        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
2 ]5 U( N- s9 P6 Ado3 Y" S, T+ Y- ]9 i$ R- A
        Lan := rootfolder.Internal.Tools.AOLlanguage;: `8 \# T/ @. e5 {* a2 ?1 u3 b
        if current = @.Destination -- else return  e9 j3 B, ?; \+ Z. f8 r% i
        then4 N7 @2 O9 I: o( N8 J2 D  N
                @.Destination := void;" e6 C* ^6 x" ?0 a2 q4 F
                if @.occupied then, M: D/ {3 H, r& z1 x. |. Q/ W
                        part := @.cont;" U  B7 k" a7 f/ H' v( p
                        @.transpOrder := void;
1 ~, W1 _& ~! Q1 Q' Y7 x) l+ g$ n/ _$ D                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,6 [4 h. R0 \1 q/ G. Y8 @% z4 O
                                @,root.eventcontroller.simTime);+ E, M! \0 K; u+ z7 D% s' Z: `* V; Y
                        @.HasOrder := false;, p" V( t) ]) z- j0 u
                        @.DrivingHome := true;
9 a$ L  M7 y3 L0 f* D( z) U                        rgManager.tryToStartTransOrder;
* i" ~: y6 k, l                        if @.Destination = void
4 r6 z* m# K0 K# x# E9 Q                        then -- no transport order for vehicle @  B: {" g! K; `3 @3 V
                                @.Destination :=, q6 r* f, O! g6 q
                                rgManager.nearestFreeStation(@,track.~);
2 _' v* i# y/ q% A$ _4 c1 I3 r                                newDirection(@);   
0 V4 z  ]+ C7 {4 ]                                if @.Destination /= void then8 R6 n; J5 ?8 y1 o# ^
                                        @.Destination.NumReservation :=0 B2 u$ J' V* `( ~; |( V) A: w
                                        @.Destination.NumReservation + 1;
' d$ r1 p* i) v1 J9 C, w                                end;3 W) P$ f/ o0 q/ }
                                @.CurrIcon := "drivingHome";
1 M7 q( S- [4 X& ~% [" @                                @.DrivingHome := true;
/ S& x0 N+ T6 n6 D                        end;; Y; `% e+ e" O! P7 R
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
0 ~# @' W' a+ x' d6 L                        part := @.transpOrder;$ L: J4 f7 ^/ L! M- ]; o
                        part.move(@);-- load part
" S$ R0 h/ L8 B6 b% E                        @.CurrIcon := "load";
% x( a3 m% t5 p0 W' a8 K                        GlobalDistObj := part.globDestination;
! n7 h3 `) e) L                        assignLObj := rgmanager.rgAssignL;6 u6 d' y) k+ B2 o
                        row := assignLObj.getRowNo(GlobalDistObj);( I5 t, W  O! d
                        if Row = -1 then -- since 70
4 L) R) |+ W5 P                                if lan=1 then
2 ~8 G; D+ p! l# [/ a8 \- `                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),; Z0 A0 y9 Q: y6 Q7 i) }3 _
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
. m) [" R% y9 A  C- O                                else9 S" A2 Q7 b) b: Q+ m+ F
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
( {5 t' e" g* f2 d$ t                                                to_str("in docking station: \"",?.~.name,"\""));                               
; T' W; U7 S  B                                end;7 I' j: M  J" e. @2 {0 N
                        else
* Y* ]/ ^1 k6 k! b  D                                @.Destination := assignLObj[1,row];
$ N; j0 N6 f' h; s6 z5 q* f, U+ Z                        end;                        6 r* H# l, c: T! p( A* s( N' t7 c3 g
                        newDirection(@);
. y; |( Y, L' r4 M/ r/ a% I                        @.HasOrder := true;
! t& T$ _! a1 o+ ^                end;
! E3 j- }' g' S" Q1 O% q        end;3 j: c/ d& l7 s( K
end;        -- of the method: R# C4 _0 |6 m& t) p
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
* J3 Q. r& @" A6 S" Y# j( K
- \. p& @! ^+ W9 B5 |% }7 M0 [& v这是AGV_putin中arrive的method。
# @7 W& M9 j+ K+ F  Y3 N7 S) E6 M- u  F- n8 g$ }% L/ v$ T
当到达物料速度越高时,这个报警更多,
$ `! y+ _' b0 L  g4 K# W+ P+ C9 G可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
  Z/ G! v+ o! s! T; Y程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
  _+ g+ b* b  q8 U- C5 U  E0 d, B) n. x
另外一个小建议,就是move,所有的move都可以这样& p6 Q( j, ~# u" c( g: u
if not move() then debug end
% J4 s$ C0 r0 v. w) L9 C这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。7 X7 t# \' u/ R* K1 ?# C
plant simulation中的free libraries有AGV模板,/ d5 W: |0 B) r1 ~  [
里面也有案例。
" |1 O) F: o9 F我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
- [4 Z: D. {$ m) S' l. J$ |5 w3 ~7 x8 q$ b) a3 c
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 8 ?/ w5 `$ y; o5 P$ v( f7 a% z7 ?

0 w5 X$ g: c* r' z% C+ l那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ; `$ W$ h- F9 _1 y: a6 d
这是AGV_putin中arrive的method。
9 u7 U* D4 q/ `* S( }2 _. O. j# x9 e, @$ q# C; x7 B
当到达物料速度越高时,这个报警更多,

5 v" m' ]6 l' Y另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-7-11 18:01 , Processed in 2.012547 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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