设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9798|回复: 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'
/ S# y7 J; F: I( h; G3 `*/2 s' q- u4 _2 k$ h
is. C# t% z2 r. {4 |2 ~- [" p
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;1 X! U$ E6 R; `1 e
do
* B) y, ]- z$ `4 g6 e0 O        Lan := rootfolder.Internal.Tools.AOLlanguage;# ^. W' G) A( p0 R+ Z" Y! _
        if current = @.Destination -- else return; e+ A' ?" Y( b8 Q( C
        then
8 ]  U! B# ^$ N) X                @.Destination := void;2 r, |3 C7 i0 N: l- E# ]
                if @.occupied then8 E' I# o# q; M( M- w- U7 {4 Z
                        part := @.cont;' _' ]* R! u  q# f% q0 n
                        @.transpOrder := void;8 G6 ]* _# a; h1 c5 p" {/ ?3 Z
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,3 K! D" l% ~0 ~1 v8 J
                                @,root.eventcontroller.simTime);
" O4 \4 Z. t( V6 X. I& p0 Y                        @.HasOrder := false;0 P5 S9 b/ U8 W( t- ?7 X
                        @.DrivingHome := true;, Q& w* g1 ^0 \# |/ F
                        rgManager.tryToStartTransOrder;& {9 r0 U  F% k+ S
                        if @.Destination = void
# ]- u9 ~4 J3 T                        then -- no transport order for vehicle @/ F2 }# m" l2 @8 H3 x" A
                                @.Destination :=+ Q" D' j4 M: K. G
                                rgManager.nearestFreeStation(@,track.~);* w- b1 Q1 K' j6 G
                                newDirection(@);   9 Q7 J' |' j9 `; y0 Y
                                if @.Destination /= void then- ]  E5 l  f9 A" F3 a7 E3 O
                                        @.Destination.NumReservation :=
# h4 ?( J9 P+ d9 }  l  y0 t                                        @.Destination.NumReservation + 1;& H6 p1 \: i6 @0 U% T& S! }+ L
                                end;
/ v2 ?: Z0 L7 Z                                @.CurrIcon := "drivingHome";0 O$ A0 \/ B: e! L
                                @.DrivingHome := true;
: c; t8 t( P+ W                        end;
3 @0 y& Z0 N6 @% ~                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
' i* L+ Q4 |3 V+ d                        part := @.transpOrder;( D# R9 P9 d; g0 \: J% o7 r- u
                        part.move(@);-- load part/ U% J( Z$ h9 f1 o, U  o
                        @.CurrIcon := "load";
: `6 h' _" u* `& d2 Z                        GlobalDistObj := part.globDestination;
* q% F  q. l3 r                        assignLObj := rgmanager.rgAssignL;3 o8 Q( `, R7 V/ x# t, y3 n; }
                        row := assignLObj.getRowNo(GlobalDistObj);
* j) F. _9 p3 I; W* R! j                        if Row = -1 then -- since 705 h1 Z( e# b3 S, h) J: H# e
                                if lan=1 then3 I+ F: T  E3 b
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! [0 p6 D2 ?2 k- b                                                to_str("in der Andockstation: \"",?.~.name,"\""));) w- n' L3 ^; |; ~: v7 u
                                else
" K* ~( D1 l5 w' p' q/ e2 {/ u                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),  K* N7 D0 y" \) c1 V) H6 D
                                                to_str("in docking station: \"",?.~.name,"\""));                                ' g2 L$ [/ I" ~0 T6 r8 S
                                end;
4 F9 K# O  I$ |. f! _                        else+ t9 T% F( e' I5 E6 g* {- s
                                @.Destination := assignLObj[1,row];6 H9 \" n' d; b" a' U+ H+ J
                        end;                        1 ~, t7 @0 w% p" J: H. U4 I) i
                        newDirection(@);3 \. O  k4 b9 Y1 ]4 p
                        @.HasOrder := true;* t  c9 {) Y7 `4 t, A! @- j! o
                end;4 J  V6 L8 L* ]4 T) d
        end;, z7 Z2 i& B  r5 U/ w6 S& o3 ^% r
end;        -- of the method7 i0 ]+ F# U; l5 _
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 1 b8 |- w# r# v( D5 A
' b! l: o4 a$ r! }# k' x0 W
这是AGV_putin中arrive的method。( j- m2 N' n& y

  F9 c" S. u  H  j( M当到达物料速度越高时,这个报警更多,
; \. i. B" ~. R9 z0 e* k可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
% q9 h0 k" R6 L7 X. I程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?, }0 |9 o" J8 R1 k9 x1 y

  G; U6 G  }( |3 B另外一个小建议,就是move,所有的move都可以这样
; G+ u4 Z8 u1 Uif not move() then debug end
, E5 K6 |. A0 S! f, c这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。- S0 p2 v6 P1 u9 f# Y+ t/ `
plant simulation中的free libraries有AGV模板,
( ?" P- E. w( r( I8 b2 O9 v1 X! c里面也有案例。' U! ^8 m8 r- }- X5 J) c  \
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
7 i1 F5 l9 ~. ]2 ?2 Q. Z$ N1 n
5 W8 U3 ]* n7 c+ z我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 : ?& H" L$ {4 a! P
7 c* W2 s' W! j
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
5 A6 Z- y3 X$ b2 s这是AGV_putin中arrive的method。, o, E7 p0 B  X# c+ C) b

; S- ?7 B$ s% X3 o0 N  p当到达物料速度越高时,这个报警更多,

! [7 w; E: e9 ~4 O, b5 o另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

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

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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