设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6588|回复: 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'
/ e8 J* `% m0 I3 `( E*/6 o$ O: v; i/ a
is
- Q) K1 K" X6 G8 C) U# R1 ~3 x        part, GlobalDistObj, assignLObj:object;row,Lan:integer;- T& w- b. a( `
do
% d5 ]) N7 s. N        Lan := rootfolder.Internal.Tools.AOLlanguage;
/ w& J% P7 C6 E8 e0 z; K5 ]2 D3 H        if current = @.Destination -- else return
8 D2 X* Q0 d  o9 J$ `" P        then7 N, K: q& X: u, Z7 n
                @.Destination := void;' o- j! P3 ]  z
                if @.occupied then
9 \8 \. i, e3 ^+ f0 w                        part := @.cont;
1 W6 T+ N1 t8 M5 s$ ^  O                        @.transpOrder := void;8 s3 H6 G, g$ r+ m0 Q2 n8 Y9 F
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,7 U6 Z# y( V9 C) ?- w( r" d
                                @,root.eventcontroller.simTime);
: J& W' q) _! A* h) L( u! c: F( h                        @.HasOrder := false;
  I& ]$ i4 }; K, S% R                        @.DrivingHome := true;
( K5 N% p1 i' ]                        rgManager.tryToStartTransOrder;
1 A1 |% {2 A, V; w+ q+ Z! A                        if @.Destination = void6 P  e5 \6 @& k, t4 J; ?, c$ s* T
                        then -- no transport order for vehicle @% l  i$ w1 c- K" K' c9 C
                                @.Destination :=2 m: H- r6 V3 b% |, G3 K
                                rgManager.nearestFreeStation(@,track.~);, t# K6 b) ]6 W) Q& w
                                newDirection(@);     i- n% g& \9 t7 h# C" O5 B. m" Q
                                if @.Destination /= void then$ G  {$ s0 U0 Z2 v, E# h4 f
                                        @.Destination.NumReservation :=
& S  S! [# S- g, W7 e: d3 ~                                        @.Destination.NumReservation + 1;* G% D( w9 d6 L/ g1 B1 I. b* Q) C5 {
                                end;
9 [5 M- @2 I) e/ Y. f                                @.CurrIcon := "drivingHome";
- p2 Y. m$ a! d9 n1 v4 J/ Z6 s                                @.DrivingHome := true;
0 x" R+ b5 _( s, u: x. L" k                        end;& f3 A$ X3 w+ M6 g6 L+ u- N
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 H& m5 e' L" N- M5 A  G' [: s                        part := @.transpOrder;8 v7 Z) [1 M; h
                        part.move(@);-- load part" h0 j' z" I* v) f
                        @.CurrIcon := "load";
% `* V/ o! Y  z/ `# D                        GlobalDistObj := part.globDestination;1 w! Q) z7 G( a% W- C9 ]) @( K! u
                        assignLObj := rgmanager.rgAssignL;
5 ]4 D7 T( @% A9 N/ v                        row := assignLObj.getRowNo(GlobalDistObj);- V+ k$ S1 B8 L" j3 [4 t
                        if Row = -1 then -- since 70
0 z3 k7 o0 i5 p  @5 y                                if lan=1 then/ W* o& T: _$ T1 u; ~
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: Y8 J& n9 L0 _* z  \                                                to_str("in der Andockstation: \"",?.~.name,"\""));5 m' P3 B6 W, g8 Y& u2 k' }) d
                                else
/ R9 s" s" M- S3 s0 d                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),, g3 i3 K$ N% x- F
                                                to_str("in docking station: \"",?.~.name,"\""));                                2 i4 Y# h; k$ O2 }
                                end;8 s, J4 y3 e# }" S- S) r8 T3 C1 l! g
                        else: W$ I' n/ j% @8 y) f
                                @.Destination := assignLObj[1,row];3 ?5 ?/ E/ y$ G2 Y( F0 n+ U
                        end;                        ' Q1 U3 n6 t) m
                        newDirection(@);: l: W3 Q2 R  v
                        @.HasOrder := true;! m3 m9 K- i1 G% u
                end;& }2 s: r9 _( \0 Z" H1 f- w
        end;9 S7 E: H; j, _8 K+ P: ?! @4 W
end;        -- of the method9 V8 [! W- j. Z1 u0 Y! G
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 0 K* A4 U' H1 `: ]

# I) A1 Z: t  c+ r4 F. V0 ?- h这是AGV_putin中arrive的method。
  t2 Q/ R" m8 Y4 Z# N% _& p# V2 B# n
当到达物料速度越高时,这个报警更多,7 n9 h. I/ B" u! P, s' k
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。1 v' K+ ^/ x* Z) B
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?6 S! o, `7 D1 A! n; T& F
* P1 t/ _. T3 ^, p
另外一个小建议,就是move,所有的move都可以这样
. @, y2 H4 j. c4 s- u; mif not move() then debug end( d* y6 S* Y7 T! [* J
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。$ _. K* k* m; e  L- X( W
plant simulation中的free libraries有AGV模板,# g/ V/ \% x* v8 C$ x4 T) W' o: V
里面也有案例。
# p+ N- }8 M7 r5 r我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。1 {) Q  A, g, l6 [7 W" {4 G

2 ^* ^$ Z' n( k) t8 g5 R, \我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 + D6 k" d; J( v7 p6 a; C7 t9 s9 N
7 f6 r2 A( W4 x- X& w5 ?5 r
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
! W6 \$ [: x$ L0 }9 c+ i这是AGV_putin中arrive的method。! Q; \4 ^' q! e$ I. V, K4 g

% J6 `9 Y) f# t( R当到达物料速度越高时,这个报警更多,
8 w9 H2 r$ Z. j/ _
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-14 12:10 , Processed in 0.017533 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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