设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6757|回复: 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'* [# m; v0 ^3 h: {; Y7 J9 ]0 [
*/0 r. U, M/ I# w8 W; n! J
is
$ H# y1 T4 Z! T7 i# H- D0 B( a        part, GlobalDistObj, assignLObj:object;row,Lan:integer;7 \+ B5 I; E# I  D$ i
do# B$ X; E7 t- p
        Lan := rootfolder.Internal.Tools.AOLlanguage;
" |, U% |- ?/ x. ^. o        if current = @.Destination -- else return) N* R6 j- {5 R5 G) a: F5 [- U
        then$ P: T9 T6 W. Y# \
                @.Destination := void;! ^8 F: S( q6 p* @6 i
                if @.occupied then
2 V, A& f, q# X% u# K                        part := @.cont;
0 N4 n7 A& ]: W3 e8 a                        @.transpOrder := void;( B' u8 H/ {0 D
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
8 Y6 a4 g6 q- b0 S                                @,root.eventcontroller.simTime);8 E% v' S/ y- g+ h  |- w) _
                        @.HasOrder := false;  s+ s! f, ?! L" B5 s# S
                        @.DrivingHome := true;
. F* `0 y' ]! ?- S                        rgManager.tryToStartTransOrder;* E  T% {0 s) z1 g
                        if @.Destination = void
3 i# r3 x( p) h1 A: B; i/ }& w$ z                        then -- no transport order for vehicle @
& q/ W0 p" m# V  P0 n$ Q+ I3 r- j3 a                                @.Destination :=
! r5 K  x  l# Y( @                                rgManager.nearestFreeStation(@,track.~);
8 D2 U2 y3 j5 @8 B5 c3 o                                newDirection(@);   0 N: T2 Z- O4 S) b! \0 Z! y, D
                                if @.Destination /= void then
0 x. x) c. k$ d' Z5 c                                        @.Destination.NumReservation :=2 X4 u* r& k7 f1 k# X" _
                                        @.Destination.NumReservation + 1;" H, h5 U4 q2 L# W
                                end;
  ?$ a) H+ z( K4 P" }' E6 w                                @.CurrIcon := "drivingHome";- g& h4 c; J# J0 p
                                @.DrivingHome := true;. j1 t# J6 F9 R3 `- q
                        end;$ @! y3 u# g: |- C! {+ A2 {
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station5 \3 M! }+ b" I! I. j' _8 y, H
                        part := @.transpOrder;7 \5 I6 Q$ [+ g; ?0 n6 r1 a
                        part.move(@);-- load part
# R: [; G' W7 q# D) m" m3 v) A5 S                        @.CurrIcon := "load";: H5 b  \+ E' Y2 ~% M3 S1 ]
                        GlobalDistObj := part.globDestination;
# f7 |# ~  `- v4 L! N0 D+ ~* v0 z                        assignLObj := rgmanager.rgAssignL;
; u9 o. s# O' T7 [) p0 T' B                        row := assignLObj.getRowNo(GlobalDistObj);
/ I/ x3 {% Q, O. n  o) `                        if Row = -1 then -- since 70& e  b( L" T% @0 K( a( ?# \9 `
                                if lan=1 then
8 B9 x$ T1 @, w  s! l                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),* ^0 l# B0 @7 N8 D" T
                                                to_str("in der Andockstation: \"",?.~.name,"\""));6 b  L- V& N0 m' Q4 W8 B0 C; D
                                else
8 r1 ~1 S& V6 v" Q* d1 f                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
% D  a' o: F$ o1 m9 T6 G6 n: |                                                to_str("in docking station: \"",?.~.name,"\""));                                5 w3 X( n7 V" a. ~  ?
                                end;
1 U6 I7 l) c* S+ ~) U% [9 Y                        else/ I6 N' w3 W. B$ }' u' d
                                @.Destination := assignLObj[1,row];
  Y: m1 i0 ?! O( x) H3 g                        end;                        & y$ F: p" H( r
                        newDirection(@);
4 L9 l- Z6 b$ M4 {, P                        @.HasOrder := true;+ y! F& |4 F/ f" E% N" }0 v
                end;) ~, K, y$ V7 l5 c' |
        end;% @* V: P. V  _7 e7 l- F0 W: O
end;        -- of the method
4 t9 z. |+ x* y2 w3 A
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 0 q/ D6 h* _: q! ]1 x
/ @3 O6 g) {( d, H) y1 W
这是AGV_putin中arrive的method。7 Q$ C/ F9 r. r
6 M- n& V4 r. L) D1 j' \6 o4 ~& `5 O
当到达物料速度越高时,这个报警更多,
& T, ~' z* R) o: l. j0 ]可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。( \. s+ w* B: ]) J2 W3 d
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
& y5 A1 o- X1 F1 D' K5 V7 E6 X$ N
* X7 H9 ~0 b( [% V& Q; q另外一个小建议,就是move,所有的move都可以这样
0 P6 U/ }( o: t; X, l# A% vif not move() then debug end
1 k& i  S4 q$ d6 Q1 ]5 L这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。( `/ e4 w3 p& Z5 d3 @( |, O
plant simulation中的free libraries有AGV模板,- v/ e. l  z' {3 G; V) X+ G
里面也有案例。& F3 C2 F1 G0 r  G% n$ l9 H
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
' q# d3 K' b) ^6 g4 h6 Z7 E
: `( Z' h6 r3 {* M" `6 d# ^4 d5 o. G我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 4 H( t/ ^- _$ w& f8 D* e, v

  T  {4 L; j+ [* O: G那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
' Z) E+ r% u, I3 r8 S这是AGV_putin中arrive的method。$ @$ T) O+ H% A8 @
' t/ B8 i: L; x1 r4 `  d" a5 L
当到达物料速度越高时,这个报警更多,
4 h  p( i8 K% e
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-25 02:43 , Processed in 0.022426 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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