设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9899|回复: 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'% P! b+ p5 i- |' o  Q
*/
* L  j2 J, \  W! Q/ e$ Gis5 M( v6 R7 [3 t: L& k9 h* H3 y
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
* W# P% ^; {8 a7 ddo
) f4 f5 [& _1 g. K        Lan := rootfolder.Internal.Tools.AOLlanguage;
6 q& V4 @/ h, g% C4 ^+ w        if current = @.Destination -- else return
$ b; b$ J* J6 a: r. z2 r9 U        then, b: E+ @) H9 ~
                @.Destination := void;
+ R8 b) M6 h* w8 W. E% c                if @.occupied then7 w' q$ Q. T/ H1 R: T% H& W
                        part := @.cont;6 l: n# K% g- y3 \4 G
                        @.transpOrder := void;
4 [4 D3 e* q: i* N- i: P1 U                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 \5 w' R5 H8 ~' Z6 @* D! p! v
                                @,root.eventcontroller.simTime);
. p  ^) B0 W. E/ `+ G                        @.HasOrder := false;0 F) r4 [; f6 h. _6 }0 X# X# Z
                        @.DrivingHome := true;
* ~. k' V- x; q' p                        rgManager.tryToStartTransOrder;
5 ~+ {7 K; }2 S                        if @.Destination = void
% l, L, f! ~, _5 w. g( q                        then -- no transport order for vehicle @
7 F/ Z/ k) R% o, }. @2 Q; p" A                                @.Destination :=3 N2 u4 y; b: _
                                rgManager.nearestFreeStation(@,track.~);
" Q% v- B& a. O  \  C                                newDirection(@);   
$ h0 V2 L/ T1 b/ W& K9 }                                if @.Destination /= void then6 e# G  k- X9 G/ _% x. X6 ~$ C
                                        @.Destination.NumReservation :=" L3 z  C( p5 G" h% y/ @
                                        @.Destination.NumReservation + 1;4 X9 e7 y! O* _+ N3 _: |! W
                                end;. l+ ?$ x' n7 L; `- y0 ]
                                @.CurrIcon := "drivingHome";0 B% ^( @) v- c4 ^8 v* u
                                @.DrivingHome := true;* o0 \, x. X; ^3 K6 V
                        end;
6 A) N8 W! U& n4 [                else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 p4 ^# l2 L( s+ i
                        part := @.transpOrder;0 r9 z# ^0 k7 J: L8 N% C( L
                        part.move(@);-- load part
( ~$ @/ p. j5 T2 p: \6 a                        @.CurrIcon := "load";  ?; F8 R* O$ W6 x3 \) c) g+ b
                        GlobalDistObj := part.globDestination;
5 K0 F* A( ~% z6 q: x/ L                        assignLObj := rgmanager.rgAssignL;* Z4 h" j6 h! E# U6 w8 r3 T
                        row := assignLObj.getRowNo(GlobalDistObj);
  L" G" p# u4 T, K! v7 P                        if Row = -1 then -- since 700 @  A0 B- W3 Z6 I# b$ {
                                if lan=1 then: o: E" Y2 m' h: k/ E
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- R- Q7 T6 ]+ c: j( T1 \2 R
                                                to_str("in der Andockstation: \"",?.~.name,"\""));, y) d" m( E3 i9 [4 s' B
                                else/ Q8 y6 |. z  o7 l  |
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),& S0 P4 K) ]4 K3 g- c
                                                to_str("in docking station: \"",?.~.name,"\""));                                % _1 O( e& c: h( I7 P& S  W5 ]4 ?
                                end;' f! b  }& e9 x, y: F- k9 m/ b# b
                        else
% p" a  d% r8 y- w( u2 g                                @.Destination := assignLObj[1,row];: ?8 M) ?5 J+ P, L7 A
                        end;                       
0 [! R5 K* J* h. m                        newDirection(@);  {; U  ^) p  F% [' Y5 j9 i3 b
                        @.HasOrder := true;
$ ~! |8 O: y7 A% y. W                end;! ^: t3 Y* F5 H5 Y8 K9 `! g
        end;' _" S9 ?0 A5 c3 f8 l+ x
end;        -- of the method. w' \" w* C0 g! G( z- c% z
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 , |& l# t; _6 ~+ d

! J% M: Z; l- A) [3 D这是AGV_putin中arrive的method。
8 K; r$ q. t. B5 U! S8 b* V& S
- |2 R! }2 l8 E! r: e9 y2 s当到达物料速度越高时,这个报警更多,- C/ g7 f+ D, G! H4 Z. `) F! d/ N0 _
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。- S- M# h  k( }/ Z. o2 u
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?; p3 [% x5 ^& s. j

8 J& D8 T& V- [- Y另外一个小建议,就是move,所有的move都可以这样
: j1 ~7 |( X+ [% [5 s( l- Nif not move() then debug end# [; B$ c2 K2 K3 x& o
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。2 r& a- V  I& R1 y4 _2 Y" ]1 Q
plant simulation中的free libraries有AGV模板,& ~5 ^6 \& |. N
里面也有案例。9 y7 y, r/ R- Z: t7 k* `- S- P
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
* I7 B) X# g! s5 m: n! B8 z2 v* g# q$ E, Q% `% `2 X
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
3 r  C& \4 @( u+ l0 b7 S, X' u0 \/ x9 A7 ?5 |
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
/ G4 T" i  P3 H- A6 o4 h2 t# x4 N( G这是AGV_putin中arrive的method。
/ I& g( _0 i- }# l+ ^  u" _5 x/ N
7 H. n* {; h/ T* l" Y当到达物料速度越高时,这个报警更多,
0 u& L: R9 A; U& w, b
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-9-1 12:16 , Processed in 0.024129 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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