设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7963|回复: 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'- N$ \0 x% m) c& c
*/
. O6 t8 ?9 w* G9 k$ C0 yis
6 t9 n# q' p9 E, S2 r        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
6 L, L& @$ f* N6 xdo& d: J8 e6 |) M# h4 h% I
        Lan := rootfolder.Internal.Tools.AOLlanguage;- R3 c6 }& i/ D1 u7 h% P+ M
        if current = @.Destination -- else return
8 i0 L, R4 y+ O9 d2 b  ~        then2 y# A0 w+ N3 ~1 [; }1 Y
                @.Destination := void;: f9 n7 @! Y# o( @% ]/ I. ?) |
                if @.occupied then& ~4 i  j- X7 Z1 ?; F- V
                        part := @.cont;
/ r5 Y9 N" ?8 k8 S% [                        @.transpOrder := void;
& @. E) _) `8 ~  n5 F, a- l$ Y1 }& A0 Z                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
4 k, S9 }7 l4 p  f                                @,root.eventcontroller.simTime);
0 Y& o# Z& |& R! a- \                        @.HasOrder := false;
" R: \9 z- B8 V+ R  l8 W                        @.DrivingHome := true;
8 _2 M* ]$ ?; N( |) R                        rgManager.tryToStartTransOrder;- z3 B' Y0 F% W. y9 K0 P, z
                        if @.Destination = void
2 l) x) k( y6 T, T  Q* I                        then -- no transport order for vehicle @' D9 b& w' ^  ^5 _# M: o
                                @.Destination :=
2 ]2 r6 ]' }" r# m+ M                                rgManager.nearestFreeStation(@,track.~);
% Q2 _4 g* P* _  e                                newDirection(@);   
3 i( G' S- u* ~7 D: {* F2 W                                if @.Destination /= void then* A" \8 h& ~  U# R/ L. d
                                        @.Destination.NumReservation :=! ]- O2 f- G+ J: B  x7 i, T
                                        @.Destination.NumReservation + 1;
' U8 X$ l7 c& j0 C; w                                end;
+ {8 s7 z4 |) R6 C: k: s                                @.CurrIcon := "drivingHome";
  D- e, }/ H- q                                @.DrivingHome := true;( s3 B0 B: x; f) q* H5 J1 ]1 ~. @0 L
                        end;7 D7 Y7 B+ p- M) W7 n
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station) N$ q+ A5 U/ G2 H9 y6 I7 K9 \' J
                        part := @.transpOrder;8 L0 ^7 E3 f) x* {( g
                        part.move(@);-- load part
6 U5 Z* a5 d) @" {                        @.CurrIcon := "load";' j0 U' |" C7 `6 A' b3 w
                        GlobalDistObj := part.globDestination;
) l: E# ]8 J, c                        assignLObj := rgmanager.rgAssignL;8 W  V- Y" U; V" a9 U0 ~
                        row := assignLObj.getRowNo(GlobalDistObj);, E' ?1 S9 B5 K" `0 H. Z) U
                        if Row = -1 then -- since 704 V% Y( J" @) ^' H9 u$ |
                                if lan=1 then7 t# r( u" m# L" f9 t* h0 Q3 n
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),$ H$ [$ K) c; j9 F: x
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
) S/ _4 ?0 S, B6 r                                else5 J* R7 z) i5 Y4 P3 J. K" q  e
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),1 s& ]$ i+ r7 F$ n! \
                                                to_str("in docking station: \"",?.~.name,"\""));                                . X, x0 C6 b) G4 `) R% g1 t0 u
                                end;
( f; }5 u, A2 f; v+ E( Y! t4 j6 E                        else
% {& @8 ?( }! s9 G7 `. }1 l                                @.Destination := assignLObj[1,row];% I8 `6 q( b1 F4 K* [
                        end;                        7 S$ d6 _. M6 F) z5 o
                        newDirection(@);
  C0 e4 W6 X8 ?( m# P. b                        @.HasOrder := true;
& U& c( z0 c/ w; p                end;
1 A% v# a" J9 `; V6 _        end;) s9 Z7 m( t( [, ~- a. u
end;        -- of the method
4 A8 R. {' B, D$ ?! p, l( ^
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
1 L' n4 h, O2 c6 g& W
. s5 W5 y( Y3 v. S+ v" B& _这是AGV_putin中arrive的method。
4 G5 T. i: H* w$ d
: ~: K1 {  |* l% T* o当到达物料速度越高时,这个报警更多,
  }0 `( x5 ~5 W1 a8 w! F, x2 g$ J可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
* A1 I) {" |. [/ O0 f( y* H程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?& Z4 m1 y4 H9 L- Q% B7 X8 T
$ j+ r+ Z" Q, f* P
另外一个小建议,就是move,所有的move都可以这样
7 K1 d! n4 s. M  X+ hif not move() then debug end
! h% N7 h) i7 X  T9 {这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。) |; `! {5 z' _* c/ i  T+ F
plant simulation中的free libraries有AGV模板,. l  M  H# C) R3 Q- J! @
里面也有案例。" d2 ]+ p5 c6 T' V1 b; a) T
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。4 p9 Y/ ^8 i8 r

. I% D+ |; ?% r1 L! I我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 : z6 h( p  H. T
; X8 j- P$ l4 G
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 6 [9 V- j) H7 i  j1 g: m3 {" L7 Z' N
这是AGV_putin中arrive的method。
! a! J9 L- e9 R# s
5 D# q( z# c" z" d当到达物料速度越高时,这个报警更多,

; x4 \  `" D- o2 t; J, u另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-8 00:26 , Processed in 0.025352 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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