设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5387|回复: 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'
& M3 i2 L  C+ i1 F; l2 i% T*/4 O# d, l$ b1 y6 y1 B* `
is7 n3 @& d2 o5 \+ l; S
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 ]; T. W/ N  k$ V5 r* f$ ndo- X7 P; Q2 b( T  a8 }4 B4 P, e
        Lan := rootfolder.Internal.Tools.AOLlanguage;) y- c6 ?" d! b. [# ?, h, {7 q
        if current = @.Destination -- else return
( w6 x( }) N7 R1 R2 R( j! S6 N        then
6 Y: F$ ~' e/ V2 j! m+ ~                @.Destination := void;
+ o7 ]& w9 W0 K0 ?4 g2 |4 u6 m                if @.occupied then! L& A2 v8 r+ v6 H$ j# r
                        part := @.cont;) w$ J! h* R8 f+ z. m4 ]" ?; y2 e
                        @.transpOrder := void;: H! C9 i1 q! D
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: q+ o. ^2 ^+ c6 m4 b7 `                                @,root.eventcontroller.simTime);
/ W6 a! a% g5 V7 a! ~! ^4 w- @. N                        @.HasOrder := false;
1 G" e# l- u4 J4 M5 N; P0 r8 A3 I                        @.DrivingHome := true;& Q# ~- F, M$ g
                        rgManager.tryToStartTransOrder;. w' u! x( a* l+ W
                        if @.Destination = void
# L$ W0 i2 R2 P0 A# p4 K                        then -- no transport order for vehicle @
" r$ x; A! U+ q4 j3 r                                @.Destination :=
: E2 g4 P. K6 X8 h                                rgManager.nearestFreeStation(@,track.~);
& D1 D* l8 I* \9 |                                newDirection(@);   0 b0 T- p( S( ^+ D
                                if @.Destination /= void then- F, \2 T) z* H8 P: }
                                        @.Destination.NumReservation :=9 a3 m+ E' p: X5 w  z
                                        @.Destination.NumReservation + 1;
- C0 M" ~9 T  [5 G$ `                                end;5 b- B+ e( D- Q4 \
                                @.CurrIcon := "drivingHome";
' `5 |+ D1 A# P  g( i5 l5 d) z                                @.DrivingHome := true;
, R& t; _2 h6 B) ?; t  K( i                        end;
6 N- }7 V( B  U* W+ x2 t2 a                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
& Y% q4 l% h0 A. j  s' y/ R                        part := @.transpOrder;4 c: w& B1 H$ T6 Q1 M2 u
                        part.move(@);-- load part+ ~8 d! d/ K9 S7 i; a" {$ b
                        @.CurrIcon := "load";
) `* v$ i$ c5 ^( K3 q& o                        GlobalDistObj := part.globDestination;6 t) l' b2 U5 H! U
                        assignLObj := rgmanager.rgAssignL;# @2 R8 ]1 o* H) U' j* i0 O) P
                        row := assignLObj.getRowNo(GlobalDistObj);
: p: e0 a9 s0 c1 Q                        if Row = -1 then -- since 70
6 Y* T1 p1 u" J2 \  ?0 A; Q- }                                if lan=1 then( {$ b% ^. d0 a4 R& s5 ^
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
; w2 _+ D* {8 w+ z: X" A                                                to_str("in der Andockstation: \"",?.~.name,"\""));
8 R2 K/ ?( `, `3 b; N                                else: [$ x: o6 G% _2 }: ?
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) i, [8 Y7 h$ j- h                                                to_str("in docking station: \"",?.~.name,"\""));                                / H7 ~" H9 i2 ?3 j# m
                                end;
! A/ b/ k4 Z  C3 c3 y! n                        else0 C" u2 P0 h- B' t3 f# p
                                @.Destination := assignLObj[1,row];  Z$ c, P9 A4 T5 j, `' {! }3 R
                        end;                        + S( C9 I# V, B" U  y3 y; C
                        newDirection(@);  z% ^) Q0 w& {! m$ z7 F' Q( _
                        @.HasOrder := true;
  [8 _4 h1 g% h! R                end;
8 x8 _& |! Q+ H7 v( T6 H        end;
& A: z8 [- e' t# Rend;        -- of the method- l* C5 E- ^. N; e: _
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
7 j7 V! I1 |4 v6 A2 B* w/ y9 ^4 m9 O
这是AGV_putin中arrive的method。
9 C8 V/ Q! Y8 i3 F( i  e* L' f3 q8 t2 }! n+ Q& X. d4 T
当到达物料速度越高时,这个报警更多,
" U- O# C  E7 f, Z可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。7 B3 a$ _( t) [: Q
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?% f" Q0 m) N: J; I# t/ i

- Q3 t5 A7 ?7 u1 d4 j/ b, l" d另外一个小建议,就是move,所有的move都可以这样, d) O. f- t, U' r- |
if not move() then debug end; x) d# S: T4 c# ^
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。' w$ H( J6 H- m2 H0 R1 A
plant simulation中的free libraries有AGV模板,
6 I7 r; N6 c* Z9 i% I5 |里面也有案例。' u6 e4 [$ m: O$ K& H& S9 v
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
* H' O( Q" ~; R5 |
7 Z( E+ e4 _4 ?( f' S3 P我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 0 {3 T5 |# @- T3 U' u

6 i. |6 A* Q) {( i: ^那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 * T! u5 I$ {) y( f: J
这是AGV_putin中arrive的method。
4 N3 y% f4 H0 f6 X
7 _- L# H5 @0 q7 N) g当到达物料速度越高时,这个报警更多,

; v8 Y( x9 X" Z# K4 U  I6 z  c% u另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-11-18 15:34 , Processed in 0.022326 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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