设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8861|回复: 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'
: l5 L. y2 H. |7 Q1 D- E*/0 ]1 N- p. _! B. y) A+ H" T
is, t8 S) i7 I. O# A* _; P+ }
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;0 N# N* h: l& q1 ~$ I: k% n+ ^  N
do0 m6 B/ i6 p0 C) c  J: I
        Lan := rootfolder.Internal.Tools.AOLlanguage;  P+ M% X& c  J; c" a( B9 v( T% y
        if current = @.Destination -- else return4 O7 `- {8 e. X
        then
" o) ]7 g( O2 X/ H8 q                @.Destination := void;9 t% Q4 v- U6 ^- i5 ]
                if @.occupied then
3 N& o# k7 b) |9 k3 N- `                        part := @.cont;) Y! o6 T* h1 a. {
                        @.transpOrder := void;
2 U& P8 n! q+ D5 C! T+ E8 [                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ p" L& R0 b' J& u7 L                                @,root.eventcontroller.simTime);
8 a$ O, w; e8 M& L( z$ E4 O                        @.HasOrder := false;8 K2 q! Y' H/ z  M
                        @.DrivingHome := true;
- p/ b- G/ i; W7 v: V( f                        rgManager.tryToStartTransOrder;
( {& c& s; U- D! L  D  ^+ _) a                        if @.Destination = void7 R+ C" v. w7 Q7 @+ h( O& K
                        then -- no transport order for vehicle @
9 {* O5 G  e! l                                @.Destination :=
$ r0 D3 ]2 G" b! ^. r                                rgManager.nearestFreeStation(@,track.~);
, Z. _! a% ^7 f) i! ?. |( t0 F                                newDirection(@);   ) O% _, z3 v6 o. B9 `3 U" X3 P4 S
                                if @.Destination /= void then0 |# c1 M1 P9 \) _
                                        @.Destination.NumReservation :=
. ?5 Y* G+ g# t4 u% K$ H3 G                                        @.Destination.NumReservation + 1;
7 h; }8 z9 @) r( t) H' E  n                                end;
- v6 i3 b7 d" ]                                @.CurrIcon := "drivingHome";& s2 _" R7 g) d! F1 J) u
                                @.DrivingHome := true;6 L7 `) L* {$ e$ R. E0 H
                        end;
' X/ ]2 o8 p0 H" S( {% M# P                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
# d3 Q; B- t" V6 Q                        part := @.transpOrder;! W/ J6 E& p; r" c" ~
                        part.move(@);-- load part7 y* H6 `' ?: l- N
                        @.CurrIcon := "load";4 X" u) }$ d, \$ H6 v
                        GlobalDistObj := part.globDestination;$ ]2 E2 @) _) B* t5 ]
                        assignLObj := rgmanager.rgAssignL;
  }- O- M: M6 e5 {                        row := assignLObj.getRowNo(GlobalDistObj);
9 D; z6 G5 |, [, j                        if Row = -1 then -- since 70
) P( K+ Y/ y1 I8 A- e( f- K                                if lan=1 then$ v3 q, q4 E: E" |0 C
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),; F+ h* f! z" y
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
- a# g3 m* P  a& v7 I3 |; a                                else
! S. x$ J' Q% I                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
( R+ I$ U* z. C$ s3 P: V7 u& x                                                to_str("in docking station: \"",?.~.name,"\""));                               
9 ]2 a7 j. K! a3 o* [                                end;+ F% I! p0 \7 T( J
                        else7 R7 B. y3 o5 \3 c
                                @.Destination := assignLObj[1,row];
  j$ n. a; v6 t. x* a                        end;                       
  N" _  Q. ]# e# ]                        newDirection(@);
. t8 ^- j) z; w9 c7 t. i* C# C                        @.HasOrder := true;( z. m7 p+ N3 t+ s
                end;
/ ^3 l- m2 S/ s& t1 Y, z7 L        end;
& o0 C& ?  r: U' |* T: S( wend;        -- of the method
) _9 `9 w% p, }- \- K8 c" K
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
; @' A& e' f* [7 ^* g
: R) L; S! ^. Z. N5 Y这是AGV_putin中arrive的method。
& P* J: p8 R9 w  l% S' S, S6 M& ]& @1 P* o7 J* j
当到达物料速度越高时,这个报警更多,
/ z% l5 s" t5 x7 g0 O可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。+ `6 D7 h. r: T  Z% G
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
6 g0 Y, G: e2 _8 d, A4 w" J
; [) V( r. Q9 Z0 _7 ~9 Q" [另外一个小建议,就是move,所有的move都可以这样
  w8 y2 R& ]3 z" `if not move() then debug end# Y- l; M5 t7 ^) D; w# q1 W" J
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。) G5 \" o7 W, n( J' y1 i
plant simulation中的free libraries有AGV模板,
* n1 w8 h+ K; I/ o里面也有案例。
0 Y$ L  S8 o/ [2 q我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
) Q% Y6 q/ G8 D+ d! L
9 H3 F  i* H/ C- {$ j" M- _& |$ f我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
- }( l  b' i7 d
% y' ^# J+ s' P- p那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 7 Q4 P: u( z6 ^6 m( C! e2 `! c6 L& f
这是AGV_putin中arrive的method。
- z6 ^$ O) L+ z4 z) b# a
( s. f  T: c% T2 f5 p当到达物料速度越高时,这个报警更多,

, w3 J$ z8 u8 A( o另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-30 20:46 , Processed in 0.018291 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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