设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8112|回复: 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'8 R' `7 V3 e" D
*/8 P2 o3 @+ X8 L! d
is$ O+ ~) G1 h: u( h  {& j# \6 x* @. c
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
4 g3 O" N- K# i! b/ t( u- V& Ldo
$ o! R2 D8 Q; S* \8 R9 o        Lan := rootfolder.Internal.Tools.AOLlanguage;4 m$ M' o, C; ?! y" u
        if current = @.Destination -- else return) U2 U$ W$ e$ M5 G
        then
. l0 r, R& o% `* O( l  X                @.Destination := void;* _! ^- I  C' C7 E- k! V! L
                if @.occupied then
9 ?. e$ L1 A. `1 K  b! ]% q  i                        part := @.cont;
- H( F" j! t- `' Q. t# i                        @.transpOrder := void;$ R0 Q" c9 \9 |+ ]6 I
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: ~9 m0 v0 k8 O  e) p
                                @,root.eventcontroller.simTime);; P4 h7 y3 c" P4 b) I- C' N
                        @.HasOrder := false;
1 B7 @+ D+ V% W' ]                        @.DrivingHome := true;- i* G7 w7 y  G7 `: ^% ]3 X; P
                        rgManager.tryToStartTransOrder;3 P% b- v- w4 U8 T$ i5 A" G  F7 }, m
                        if @.Destination = void
2 [4 P9 A2 X0 T( [6 [2 o# R0 G7 Y                        then -- no transport order for vehicle @& w4 W7 ^$ I8 o4 \# w$ d% ]
                                @.Destination :=
% [8 M" r) X) j$ o3 U; Q                                rgManager.nearestFreeStation(@,track.~);
. f1 f$ D% ~7 T  ]3 o' Y* {                                newDirection(@);   
( P1 T: y+ M  X# a( s                                if @.Destination /= void then
$ ?$ r% T- E1 e                                        @.Destination.NumReservation :=
" E7 \" c& T$ N6 S4 d8 i                                        @.Destination.NumReservation + 1;
5 Y+ I! t6 s! }0 T0 R                                end;
; a8 n8 I1 B$ q1 B: @                                @.CurrIcon := "drivingHome";4 u. f8 [+ r8 M: U% C2 S
                                @.DrivingHome := true;$ q. u+ ~5 \9 p* t9 k" }
                        end;+ X0 L+ G& i+ l; S0 y  y
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station5 q; Q+ d+ L" G3 ]. i; X- r
                        part := @.transpOrder;
! K; Y5 i8 h. U# \                        part.move(@);-- load part2 d" G" f, ?# k. ?& z
                        @.CurrIcon := "load";& Q- j3 @1 `$ s+ ^. g5 j; l
                        GlobalDistObj := part.globDestination;
& D4 K" r+ P3 E) c# v+ R                        assignLObj := rgmanager.rgAssignL;
; J% K5 r. F( V( e5 G5 @                        row := assignLObj.getRowNo(GlobalDistObj);
! X( C0 ]: w' l+ u! w- l                        if Row = -1 then -- since 70
  a0 K6 S0 n/ L1 n! @$ b0 f                                if lan=1 then
0 h3 p- m9 U7 Y3 h                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 x. V- r/ t+ ?6 N9 u( [1 U5 X0 b
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
, Z2 H. A  ^) O6 M' i2 e                                else1 z6 u6 E/ L: G3 O7 j: z% @
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
$ T5 L8 z  g- ^& a                                                to_str("in docking station: \"",?.~.name,"\""));                               
7 I5 |7 `) s! \+ W8 [+ e$ x                                end;0 F8 g, |! `1 k' {; G
                        else+ z- ~3 _; u" o/ J# b, @; J
                                @.Destination := assignLObj[1,row];
  g  P0 K- @7 T& {. Z% j7 K                        end;                        8 e/ K& n: _# w1 c
                        newDirection(@);
  D, _4 d) V! a0 _& j4 e$ h2 u5 E4 {3 B                        @.HasOrder := true;$ }/ S5 U# J! U8 n
                end;
' ]  j& g4 K5 f' J) M: Q! Q% l1 k        end;
; R; I; s4 d8 E/ H$ c: R! U5 qend;        -- of the method
- _$ s7 r- `, L: ^
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
6 h1 l# G; E( `% h& A# g4 c. Q% D+ E# L& c
这是AGV_putin中arrive的method。: ~/ X: u: ?' G8 ~
+ {( q; Z9 f$ H& q! D
当到达物料速度越高时,这个报警更多,
) x3 k- z, G. I/ ]$ `6 I# q可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
, J  l6 i' t5 a: q2 U7 ]5 ]程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?7 J: Q* ?4 j: y0 a

# g9 s* ?) G1 U- U另外一个小建议,就是move,所有的move都可以这样- h; ]+ B; _2 p3 x
if not move() then debug end: @; V5 k0 L+ X+ u: M" A* \
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。3 ^8 P5 U/ K8 t5 W$ s
plant simulation中的free libraries有AGV模板,
3 W2 ?( L! C- N, G6 u+ y里面也有案例。8 b% l" p, h  `# _+ B
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。, H! V" A0 b3 g0 @1 K

! r$ g& G/ n; l9 Z$ ^# g我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
9 o# P4 q4 e1 n- p% q6 L$ c6 T: {8 f' Y0 e0 C
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 # J7 M0 V+ |9 u4 n3 J7 y* B* [  y8 J
这是AGV_putin中arrive的method。4 @8 `$ e" U6 Y3 q( {
0 y4 N- r7 ?$ _( L$ ?- O
当到达物料速度越高时,这个报警更多,
/ }  C" r+ X$ {5 S
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-15 13:40 , Processed in 3.930813 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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