设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6903|回复: 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'' b* A' E$ _8 ~( _9 w
*/
3 R* G6 y: }5 f8 W4 ~6 V% ais
+ |% z* T5 |& Q5 `, k# i) _        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
  X% ^3 L( y1 O% G4 s4 y6 Xdo
( C4 p. w4 P, @% w        Lan := rootfolder.Internal.Tools.AOLlanguage;# \( \! r" Z: }
        if current = @.Destination -- else return* ^0 i8 o0 ^0 P: _! }) r
        then2 b# a4 x; Z) @  N4 G: t7 \
                @.Destination := void;% {& x+ x1 I( S8 P' o( R
                if @.occupied then% i. C9 _, W, i6 {
                        part := @.cont;
- t& w. W# c9 t0 Y                        @.transpOrder := void;
9 L/ a; x. p1 N; }. c# Q  d* x0 V: R7 r                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
% N: ^8 k$ p$ b/ H, U3 {                                @,root.eventcontroller.simTime);1 z5 h. P1 U- ~; n4 e+ \* |
                        @.HasOrder := false;
. S4 c% Y1 u3 ~6 O8 H                        @.DrivingHome := true;# ]: Y8 v* t6 A1 @+ V! R; Y
                        rgManager.tryToStartTransOrder;
- \% x$ S% k* w/ f                        if @.Destination = void+ Q- U0 P. O+ p$ `) y
                        then -- no transport order for vehicle @
- h8 ?' m3 Z7 G, I- E                                @.Destination :=
. ~& I) r: X& f5 T' P, T8 s7 V                                rgManager.nearestFreeStation(@,track.~);8 i6 p7 F( O: S# G
                                newDirection(@);   
9 j9 m& f  C( S& c0 t9 u4 s                                if @.Destination /= void then
, {' p8 D3 g. t  J                                        @.Destination.NumReservation :=/ B  J+ |! R5 B* {
                                        @.Destination.NumReservation + 1;( r) p# Y: t0 t5 x  h" C
                                end;
5 m; i9 d5 t* X% \% h* D                                @.CurrIcon := "drivingHome";
8 T7 o9 l1 L8 N# H0 n/ X. d$ L                                @.DrivingHome := true;
3 h& a6 X' k# F" o$ g+ p                        end;
9 N+ X5 p2 m) i                else -- the vehicle @ is empty, both vehicle and part are in the same dock station! n! F1 N* u% Z+ Q: [0 ?
                        part := @.transpOrder;, C9 ^6 {$ q8 t7 Q4 I
                        part.move(@);-- load part3 w! ], P5 D( ~( T% E+ f7 B+ j7 s
                        @.CurrIcon := "load";
. L6 m6 x9 D# R* K: Y  c/ b" G                        GlobalDistObj := part.globDestination;
7 O; X+ k: F, ?" c8 N+ \; M! @                        assignLObj := rgmanager.rgAssignL;
3 X9 f: T9 F4 C( f                        row := assignLObj.getRowNo(GlobalDistObj);2 j% j1 o3 O6 o. C1 Z6 t5 N( Q; H
                        if Row = -1 then -- since 706 e* f% h6 D, x1 b- D3 R7 n
                                if lan=1 then/ |' R8 `5 b. o
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
, U8 f- a) T/ S) d! j                                                to_str("in der Andockstation: \"",?.~.name,"\""));
. L; k) L; A, z2 ^& C! v- a                                else" l7 @7 c. k( b7 v; x  K4 z
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; e0 p% q( r5 M( N3 v# y$ Y+ B
                                                to_str("in docking station: \"",?.~.name,"\""));                               
. k7 M" S7 Q/ Y% P" B                                end;
. I- g6 W# ]5 V9 g8 g: M                        else
4 G: G8 @- {" O# C) ?                                @.Destination := assignLObj[1,row];
9 \; E0 ?) C1 `' X8 I                        end;                        0 i/ c0 g6 e/ y) S% R# e7 V" P
                        newDirection(@);
! H1 t# b3 z! ]' S1 x0 x                        @.HasOrder := true;
/ `. D2 t( z! r* ^/ [9 T& I                end;
2 Z3 k& N2 O& L$ W3 `        end;
, K( v# M  ]5 m+ G  U. z5 jend;        -- of the method
. u" V( `9 g7 ~. h9 u& i; J* h
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
% i! d8 y9 M( P* C" V( K' j" o, D) J
这是AGV_putin中arrive的method。7 w; ?0 w+ l5 |3 c

0 R5 \. M! [: t2 V9 w$ W当到达物料速度越高时,这个报警更多,0 f6 f7 _9 C7 _' a" V7 X- T
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
# I& j$ p) j5 l) j( @3 h程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?6 k1 J4 t) G! ?$ [* `
3 K* s1 c. s# H
另外一个小建议,就是move,所有的move都可以这样% Y# A; k; A6 a
if not move() then debug end+ t4 W9 U+ g" c$ P& C( ~9 N5 q0 C
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。8 h7 `' K- _$ r
plant simulation中的free libraries有AGV模板,
' A' w1 C9 ~: w$ H* z里面也有案例。8 T- C7 a3 {5 e+ F: I
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。! e7 x! I  ^8 e9 ^) Q
' L6 M; d) [% Q% p4 l
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
/ g/ C( L( |, l6 c" J+ M/ A7 M8 t1 X/ |/ S+ P
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ; T/ a$ N; T2 n
这是AGV_putin中arrive的method。
7 G# |' s" k. \# A1 S+ _, {& h% p# s$ e% m
当到达物料速度越高时,这个报警更多,
; ?2 o# B1 C. W+ b- }
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-5 22:06 , Processed in 0.019977 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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