设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8649|回复: 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'$ l8 B1 A: I5 L( Q3 l0 O
*/' A+ b; p; B- I+ a1 S1 C
is
; a6 N: L5 n* x6 A: R        part, GlobalDistObj, assignLObj:object;row,Lan:integer;$ P8 T5 Z- X2 w$ |7 l* p
do' I4 f, ^+ N, x/ K* f
        Lan := rootfolder.Internal.Tools.AOLlanguage;
; @# h6 m; m3 O' Y" z4 J8 P        if current = @.Destination -- else return
5 E4 s0 ^2 H7 q! ]        then
/ n! n# K6 J$ v- n4 |& g0 N$ v                @.Destination := void;
5 T, s% C& F# V( r                if @.occupied then3 s, t: w$ x" P+ k; W. G6 h# {1 b
                        part := @.cont;! W) f- a1 S1 C& x" s5 d7 V+ U
                        @.transpOrder := void;
# B/ H2 Y( \  Q4 ^                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,) y+ Q  U* J: H: F
                                @,root.eventcontroller.simTime);
4 D* ~9 y0 `' X# N; M* @                        @.HasOrder := false;
* d8 O  ?% g5 V5 V                        @.DrivingHome := true;
: g: m9 @4 t- f$ H5 s" G) k7 ]$ t                        rgManager.tryToStartTransOrder;5 A0 G6 U7 b, |+ i
                        if @.Destination = void% a& ?$ Y, g5 g/ [- K  A
                        then -- no transport order for vehicle @
* s* n. T& s% E  I; o7 X+ R                                @.Destination :=5 n7 ]0 x0 k9 ~+ V/ n
                                rgManager.nearestFreeStation(@,track.~);1 x$ P+ i7 q8 d; x' h
                                newDirection(@);   4 {# T! g# d1 [6 y8 {3 _- A/ |
                                if @.Destination /= void then* Z+ E& H' l3 ?! R8 y
                                        @.Destination.NumReservation :=
9 _: H4 {! n# G: V3 D2 C; f                                        @.Destination.NumReservation + 1;
( Z  V+ h7 b; Q7 d$ v7 U/ C                                end;# [  Q+ i" C. A  ]$ y5 T6 m5 X
                                @.CurrIcon := "drivingHome";
5 b/ K( D# s: m9 L% f                                @.DrivingHome := true;" l0 H/ Z8 n. C' O- R7 k% f8 Y
                        end;
4 t% Y  b& L4 T' L* `+ U1 W# R                else -- the vehicle @ is empty, both vehicle and part are in the same dock station- ]0 C; F2 z0 l0 O
                        part := @.transpOrder;
+ V% s6 d3 i: y                        part.move(@);-- load part5 o% a% c+ H# A; }
                        @.CurrIcon := "load";
" O& {+ a0 v  F8 j7 R$ F                        GlobalDistObj := part.globDestination;( M  @6 l2 d; y1 K. _5 X' p: e
                        assignLObj := rgmanager.rgAssignL;
) v5 X+ O* H: ]8 ?) ~                        row := assignLObj.getRowNo(GlobalDistObj);5 S. n: F' o/ c/ V
                        if Row = -1 then -- since 700 t$ C+ t8 g5 P! m( I2 `- u1 x
                                if lan=1 then% i" c  Z, k9 ]
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),3 C1 p! ]& ]# x1 g$ Q4 E- S3 y
                                                to_str("in der Andockstation: \"",?.~.name,"\""));+ t0 g7 J* R7 v4 }4 ?
                                else9 u( Q  Y8 `" V( |! P7 a. M/ Q, P
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) N1 ~5 A& P2 B7 |; w                                                to_str("in docking station: \"",?.~.name,"\""));                                & ~/ H  m, m5 S9 e" S! {
                                end;
( ?/ k/ A3 r' @! t/ I                        else
" [2 ^4 V! w; l                                @.Destination := assignLObj[1,row];% y7 g9 D9 f# s+ O: ^$ P7 r6 c
                        end;                        8 t" L) J0 Q. w+ [% ?3 O% m
                        newDirection(@);# N  q! D1 i( v4 [' ^; g5 d9 `
                        @.HasOrder := true;
( |! h+ u& I8 l9 e7 F! m# D7 E                end;
9 o7 L! `; y" h# l# s3 \( o        end;
* O+ R$ w9 Z$ i3 bend;        -- of the method) I+ @( g+ p4 A; R
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 $ c% j8 O9 `" g- W) H

& n* B' R* k' l* \这是AGV_putin中arrive的method。4 n: T8 W) b/ C( V# ]

, s8 K! U6 K' s  V+ ^  @. C7 i当到达物料速度越高时,这个报警更多,
8 m4 `- U: X0 P! V: N# E可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
' }) i; E* R1 l# i; w; r6 W2 Z程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
/ n  X) w( _0 f2 p8 g! d/ F6 N! q7 j9 r; l# O" Q
另外一个小建议,就是move,所有的move都可以这样" ]. t9 Q1 s, p
if not move() then debug end
7 g7 h8 {+ }0 q6 C这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
/ d. e8 l1 R- |0 z. A" }* ]plant simulation中的free libraries有AGV模板,+ U: ]" r0 s# y7 i' u
里面也有案例。
: Q' P( b! k/ b3 ]我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。9 J" h2 T/ R: S1 X- a

/ [5 T5 Z1 e2 Q, j* T' P: q9 J我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
# C+ m% [( s, K! }* I
9 v! j8 k; c% ^/ a5 r那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 & p$ g, a7 P' S9 p2 {& w
这是AGV_putin中arrive的method。: K1 t. f* Q" j; Q( {+ M( q

- }  ]( j- a$ h9 l当到达物料速度越高时,这个报警更多,
+ W) z+ o0 n  z* S+ b. g
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-17 23:44 , Processed in 0.017506 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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