设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8707|回复: 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'
: C& h* V3 {) ?' v*/
+ [5 u. g3 h. b8 d+ g( A3 }is
( D! _: D/ {1 Q# A9 G* H. [        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
9 p3 {5 h) j& N+ gdo  _2 p/ D2 `! t  W# [- w* ~  q
        Lan := rootfolder.Internal.Tools.AOLlanguage;
* \# L: Z9 m2 z2 a5 \5 Z& M        if current = @.Destination -- else return
) s. R, O: s/ D0 I+ {2 \! P7 Q- s) A1 D# e        then
) o9 q4 E2 w4 B/ M                @.Destination := void;
& T" C, [' Z( }2 c8 U                if @.occupied then
( D/ P" s0 d2 [* i6 D( |4 p: v; \                        part := @.cont;
, \# C0 z1 f( m& Q0 N+ A5 o                        @.transpOrder := void;  \3 g1 F/ }9 Z: y$ ?
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," F+ M# F- U3 V
                                @,root.eventcontroller.simTime);
/ |5 U- Y! z8 ^2 ?3 O* W; r7 E                        @.HasOrder := false;
. b& X, e  I. {! L. |5 e3 L                        @.DrivingHome := true;7 q' [+ p' C8 G: l. c
                        rgManager.tryToStartTransOrder;  G) v- P% i* Z, d) t2 D, [- E
                        if @.Destination = void
  j7 a$ h/ g/ K; N0 d, E                        then -- no transport order for vehicle @
! X& `: N. x, J) u                                @.Destination :=
# G2 O9 H) @) R# F' a                                rgManager.nearestFreeStation(@,track.~);
1 ?5 z% |6 W, f+ x% A& h                                newDirection(@);   
% s& x6 b7 H" D1 ^                                if @.Destination /= void then% i4 N2 Y% s: Q. ]3 W" M
                                        @.Destination.NumReservation :=, \9 y/ D: J) x4 A0 \! W
                                        @.Destination.NumReservation + 1;6 w" w# O; N; h$ W0 s1 `0 ?, o
                                end;
- N1 E/ }$ C: F9 |; `* |: }                                @.CurrIcon := "drivingHome";0 u6 q$ \3 t/ I
                                @.DrivingHome := true;
. s: M9 d1 `1 e7 k0 O8 C                        end;) y; V" h9 G% H7 w* V: Q# A6 P
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 ^! K$ U5 @9 v9 w* t                        part := @.transpOrder;' L0 m, I4 `: ^7 h9 ~& N
                        part.move(@);-- load part  W$ J3 Z0 Y* [$ e
                        @.CurrIcon := "load";5 W+ z2 W$ Z, S+ @
                        GlobalDistObj := part.globDestination;' y8 D* u! U* J# @; X4 b8 }
                        assignLObj := rgmanager.rgAssignL;
6 L) o/ M* T. ]) @4 E# K8 b+ @                        row := assignLObj.getRowNo(GlobalDistObj);
6 g: _" a% ]% ~  C$ D3 l# v                        if Row = -1 then -- since 70( ^/ ?0 O/ U0 U6 I- g# N3 _# J- `
                                if lan=1 then* V2 [, V9 G  v- z/ X
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- Z! ?- O! Z: X: `# m: Z3 }                                                to_str("in der Andockstation: \"",?.~.name,"\""));
, }4 ~' f( X* t* H                                else
6 @  Y% o: [& w0 `+ T4 S0 _                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),2 P6 \8 f; s8 e( f& p' n7 M8 K8 N/ B4 o/ b
                                                to_str("in docking station: \"",?.~.name,"\""));                               
. p, Q0 B$ _1 M  Z* g                                end;
- E" P2 ~' z" @+ ~                        else
( `0 E. h1 ]8 G/ T& M' d$ q' V. d! \6 k                                @.Destination := assignLObj[1,row];
/ j" ?2 x( i6 B' t8 @                        end;                       
7 {8 Y1 s& s  t7 z                        newDirection(@);
/ `+ I( C1 K. C                        @.HasOrder := true;
5 X  E# e$ J" o9 ]/ H  W! ^( p# A: q                end;( k0 K! i; U  x6 W1 O
        end;
0 B7 q6 @8 r. e( hend;        -- of the method
3 b# ~/ @* \3 I, w
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 & W4 q& g' w( {; m7 u, r+ w

9 E! n( U2 N# P* J这是AGV_putin中arrive的method。7 b2 \# ~# b& h6 ~- }7 Q2 t# P" s
: I9 u- j2 u+ \
当到达物料速度越高时,这个报警更多,
2 r) ~- [5 u" H7 S% J可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。. G. N1 m2 F& Q, A
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?( z, Z4 P! x# ^2 u( e
0 I! [; z6 ~( @( A0 X2 Z& n* n
另外一个小建议,就是move,所有的move都可以这样
1 y$ q" D% |: i9 Iif not move() then debug end
9 B9 H6 }3 I; ?; p这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。: K2 ?3 C) d- E4 Y
plant simulation中的free libraries有AGV模板,+ b/ q2 ?: l6 f5 c" K1 h9 P. S/ v
里面也有案例。
$ ~0 O) f; ~; e4 P我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。1 f' f0 p, Y) V% w( q. G

0 n  F# R+ E6 ?$ c3 K我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
3 C% L8 z5 f2 R. m
2 r3 A" w  O* y5 H5 n那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 # Z# M" u9 b, s  ^: m) F/ J
这是AGV_putin中arrive的method。
+ B" q* a7 O- z9 ~6 h+ l. n: ?/ q- e0 z6 s* r8 D# h
当到达物料速度越高时,这个报警更多,

3 F( A" {0 j  R, y5 b另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-21 16:27 , Processed in 0.014615 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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