设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8413|回复: 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') Y9 b; K, ^: _/ C9 u/ V
*/
$ g/ M/ i2 Z* O3 c% |, y6 Jis7 M! y! n5 a8 @3 Y. [
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
, t. p% K* v& z& cdo
9 g7 i. Z! E3 N6 I# w9 ]8 Z        Lan := rootfolder.Internal.Tools.AOLlanguage;
7 e# u7 i( m* i9 j9 J4 a5 {        if current = @.Destination -- else return
: Y8 s, d5 H! `: @: h8 C        then% ~+ @* e, m  o+ J1 @' e5 h% O
                @.Destination := void;
+ j  w8 E+ E0 g! v& f* R                if @.occupied then
+ d  A9 m/ z& G) }                        part := @.cont;) z+ p8 o4 c+ t8 K! {: b1 g0 d
                        @.transpOrder := void;3 w( K" ?: F" i% W
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,) W+ n% r! O: K- k/ D5 g
                                @,root.eventcontroller.simTime);
) |0 {  j/ W8 u& n2 w% @; z' ?                        @.HasOrder := false;: v. p. O' D: K  y1 E4 C
                        @.DrivingHome := true;- }. d4 o/ q: a. e
                        rgManager.tryToStartTransOrder;
7 j2 k; {1 m6 F4 M                        if @.Destination = void
  a8 h4 q* T+ Y% C                        then -- no transport order for vehicle @4 x3 N& q+ y. m1 m" w% T
                                @.Destination :=
' p! p7 J# f/ T0 @% c' G: I2 Z                                rgManager.nearestFreeStation(@,track.~);: P! h" y6 {" a. y5 P( c! _
                                newDirection(@);   
3 Q* l: Z9 m( I# X  P                                if @.Destination /= void then
: s: H6 t$ t1 `                                        @.Destination.NumReservation :=
, p3 j2 o, }9 n% h                                        @.Destination.NumReservation + 1;! J; p! @  F0 o9 g# {1 M
                                end;
& v$ l3 `$ B& V+ |& e( v! i0 ~                                @.CurrIcon := "drivingHome";- S* T2 L$ a6 S, |  g% K1 ]
                                @.DrivingHome := true;$ {2 ]5 x' w' h7 \# a
                        end;" o+ H8 e0 `( l# x
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
: Z5 ^; K# P, ]/ x6 N9 Y; d                        part := @.transpOrder;
( o) R2 g# T/ s1 j                        part.move(@);-- load part
7 }0 r$ z% {/ y( D$ L: \; {                        @.CurrIcon := "load";
3 F) L. d  W9 a                        GlobalDistObj := part.globDestination;' Z- y3 k- Z7 B; c, X8 k# {
                        assignLObj := rgmanager.rgAssignL;- E0 _0 F' h( R( s& E. ~3 o
                        row := assignLObj.getRowNo(GlobalDistObj);
2 G6 s1 n7 j, h" x2 e. I, Z6 Z                        if Row = -1 then -- since 70# x) y  H- H" M! v6 r, E2 P
                                if lan=1 then+ a) O& F. [9 N
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
* o0 c! g; V4 W1 e/ P                                                to_str("in der Andockstation: \"",?.~.name,"\""));5 E2 K$ ?' o% a4 S4 {3 P
                                else
" d% l2 K% J  K& U4 a                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),+ Q8 R3 ~; a  r3 s7 S5 C
                                                to_str("in docking station: \"",?.~.name,"\""));                                5 h  w" z1 y. C/ P5 n3 Z' l
                                end;
. _+ l' E- r' [0 w% C' O                        else
% k: w7 W. A3 E( ]4 Y6 D) M                                @.Destination := assignLObj[1,row];
2 Q* P6 u, J% {+ E                        end;                        7 `+ e& o$ i; ?: q2 [" U
                        newDirection(@);
, w, o2 G1 \) P- p                        @.HasOrder := true;
8 q5 @2 R3 u2 c. f) e                end;
& S4 d$ I6 }/ ^        end;
! I" ^0 p5 g+ a) {! qend;        -- of the method
5 \$ j: m' n+ A3 A  G
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 ' L, O" z, h. s" ]

" i- n! p* t: ^这是AGV_putin中arrive的method。
2 M" o$ }/ @( k1 q" p
8 V4 \7 V/ M  U0 L& Z+ _当到达物料速度越高时,这个报警更多,! \$ [8 L9 p- C+ [
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
- ?3 }# Y  ^# S% y7 r: W程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
3 v! [5 M/ [: Y* H  X) [. c" m3 L* P8 G1 C' j
另外一个小建议,就是move,所有的move都可以这样
8 w$ x1 B( w/ \3 @" K; g, @if not move() then debug end* v; g5 p8 M) O" R1 w  @
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。5 Q; |' N2 _" I/ H7 \
plant simulation中的free libraries有AGV模板,9 Z( m) g5 _4 G9 A; H
里面也有案例。0 Q0 t( o7 {  |! |3 f# ]  X
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。4 n" r1 v# ^/ b
6 Y% g$ ^1 \; H  w1 ?+ Q8 s' ~  B
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 $ v$ k5 o- g+ k) g

" {2 {" Z6 G9 r" C1 p1 O$ X那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 0 `. J  R& s5 G  r6 o# t
这是AGV_putin中arrive的method。
, O4 U% C; u( A1 A/ q# P) \1 H* M6 Z! J0 H
当到达物料速度越高时,这个报警更多,
/ j# f$ M+ c) B  N
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-2 07:35 , Processed in 0.016561 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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