设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6851|回复: 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'1 c& T6 f/ X9 b) l& r
*/
/ T  T- j) ]; Y* G" {# E3 bis
# X- y* N* Z6 W7 \9 g. G  K        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
' X  i" ^# b; O/ M  p8 vdo
% W3 _, I* Q# v6 K( H& c        Lan := rootfolder.Internal.Tools.AOLlanguage;0 m  E! F( S) n5 P$ h/ ?/ J
        if current = @.Destination -- else return* `0 L2 i4 {4 z5 A$ J
        then
% u) x& [. U, v$ s7 c                @.Destination := void;* g+ }" s; s, L
                if @.occupied then# v3 o: b  `1 Q
                        part := @.cont;
/ U* L. m/ l" G& W, a                        @.transpOrder := void;
7 V3 F3 H0 r" c9 b                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
7 z+ S3 S9 c3 q0 }6 @9 \$ z5 ?                                @,root.eventcontroller.simTime);( L/ o$ V2 q8 e( a$ ]; l4 v4 @' M
                        @.HasOrder := false;
: u8 O9 Z0 l! U$ i( R0 G                        @.DrivingHome := true;
/ V+ t+ b/ A7 e1 {1 X                        rgManager.tryToStartTransOrder;* [5 ]) X, k. q- }& R
                        if @.Destination = void" b! y! ?7 Y9 l1 }* h
                        then -- no transport order for vehicle @
+ z& C$ ]/ H* {4 R! ~                                @.Destination :=: v9 J* j% O2 I; S* j
                                rgManager.nearestFreeStation(@,track.~);' i' l' i3 G" Z  E( e5 b
                                newDirection(@);   8 m: x  O. f& w; e5 p4 A
                                if @.Destination /= void then
& u! N5 @% `$ T& T5 p                                        @.Destination.NumReservation :=
- p. x2 }% c3 W0 x6 u" o0 h                                        @.Destination.NumReservation + 1;: A3 x/ b+ e  v: j8 {$ c( E
                                end;1 e( V" `. j' u+ D4 w
                                @.CurrIcon := "drivingHome";
1 f; D& ~# s' k  p+ b* e( d- P                                @.DrivingHome := true;  w& A& `& x; S+ U6 ]! s8 |
                        end;8 Z) h8 @1 c/ Q
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station# W7 R9 p. r6 ~9 M( d( Q
                        part := @.transpOrder;
: E) D4 k! T/ T* w# k                        part.move(@);-- load part! _+ w. L) b4 ^
                        @.CurrIcon := "load";
* f3 w- U0 c# y                        GlobalDistObj := part.globDestination;
1 n& Z* P: n1 q- l% N. }                        assignLObj := rgmanager.rgAssignL;
6 O+ `% x, o( N8 y, K2 Y9 T( @                        row := assignLObj.getRowNo(GlobalDistObj);
2 S% G( J3 P0 L2 h* k9 ^9 `                        if Row = -1 then -- since 70
; e' L" x% [6 G                                if lan=1 then
9 K% d: b! K. c& o  K/ x  R                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),' B) h; W' h4 s7 c0 `3 a/ \+ F( x
                                                to_str("in der Andockstation: \"",?.~.name,"\""));& k- [3 Y; p# ]/ ?0 V+ n$ j8 u9 K
                                else
- A! b6 A! x8 O- J0 q% w                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),  Q1 R) |9 A6 F- {
                                                to_str("in docking station: \"",?.~.name,"\""));                               
' S% J8 ^0 u7 A7 I                                end;% t4 i, ]/ ]5 q6 W" K
                        else" _8 i5 ?( x1 Z; c  _
                                @.Destination := assignLObj[1,row];
( ^( J- ]# }; V                        end;                       
/ h5 H7 F  D( Y( C' |( [, N                        newDirection(@);
  L  b: d4 H0 M                        @.HasOrder := true;- a7 L9 z* d" M
                end;2 K; {1 O' Q8 M6 U
        end;/ I4 W5 C, s- C5 X* r& i/ T4 ?: l- p  ^
end;        -- of the method
) t) l6 d% A2 K, m0 w
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
7 c# }& ^; e6 X( ]! L* v
& t7 y1 H6 E, c* }  f/ D: x这是AGV_putin中arrive的method。
9 e( [: m$ M' H/ x0 ?; G. z& d' S9 k  c: t( }
当到达物料速度越高时,这个报警更多,! K- C$ P, x5 C, ^! X
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
4 q0 M) `1 a! H程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
% u* D# q3 }0 {6 P6 Y) w1 |' j+ M$ w/ k5 t
另外一个小建议,就是move,所有的move都可以这样, U% F/ o; a5 U! }
if not move() then debug end& w8 \2 v/ V3 i, G' @
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。& j$ S6 d4 ~! _8 a
plant simulation中的free libraries有AGV模板,& N+ F4 ^' T* \9 i% R! t
里面也有案例。' W2 E4 }6 L+ y
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。* O& k& y5 V& b( m' N  B( s% R
8 q9 f) X9 K: Y( R3 C4 d- u
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
$ f) K! E. s/ d3 ~  p) Z0 t& R9 }
+ O& `# ~' m' N; G& t5 v那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ' t- @8 j/ [9 X
这是AGV_putin中arrive的method。
7 m8 c. k* y1 z7 U
3 N* I; v# r8 ^当到达物料速度越高时,这个报警更多,

/ V  j1 ^# K7 a8 z( i* s另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-2 13:48 , Processed in 0.023328 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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