设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6659|回复: 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'. [0 n5 E  \2 W5 I% t
*/
4 \' x5 x  d3 z7 x1 D# Xis) g8 ~4 K" n; j5 R
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
& q8 K# ?: {+ }7 |  \7 m2 Fdo& [2 _( u+ W# r* A0 M
        Lan := rootfolder.Internal.Tools.AOLlanguage;
% t* ?* h* M0 Z8 E3 _* i        if current = @.Destination -- else return* j% [8 k6 Y3 Q1 W5 _  i! o
        then  T- b" `2 {- Q, E' z5 P' e+ I
                @.Destination := void;! @# o4 z/ Q/ b0 {- b/ s
                if @.occupied then
, m8 a- K- A. _$ {% p& K0 S* H                        part := @.cont;! E% t! Z* L0 V" }3 ?9 U
                        @.transpOrder := void;4 V9 a% ~8 s2 R, @* D3 B1 v" ~/ P  `
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 X/ P  J2 z' y                                @,root.eventcontroller.simTime);
9 u7 S% r3 Z! N* O                        @.HasOrder := false;2 L( Y) h/ q+ @
                        @.DrivingHome := true;8 K  D& ]! l3 X
                        rgManager.tryToStartTransOrder;
  e7 ?: J1 p& Z0 Z0 q& [                        if @.Destination = void
  Y1 L6 W+ t: ?1 K" l6 h3 n                        then -- no transport order for vehicle @! G) A1 U6 W, w* ~" g
                                @.Destination :=9 V+ B& A4 c4 j  f; i
                                rgManager.nearestFreeStation(@,track.~);
0 j- C4 O8 s! W4 C) D                                newDirection(@);   ' i( `$ N7 X+ @" @" O, r3 U
                                if @.Destination /= void then! o% X$ K; E0 _$ m
                                        @.Destination.NumReservation :=
( c# {7 n$ n! r/ V; n7 @                                        @.Destination.NumReservation + 1;
) H0 j/ a) M' p3 c9 r8 Q0 W) v' _5 a                                end;. o6 Q  w; F; m) }% f' x
                                @.CurrIcon := "drivingHome";
7 X" L" {3 o5 b8 m9 k. m2 H                                @.DrivingHome := true;
$ M5 a/ S/ X# D) \7 H! A! _9 t5 Y0 _/ R                        end;# L) K- }+ l* ]8 z  X/ Q
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 }  F) m! r6 r
                        part := @.transpOrder;
6 w- _& c* h. d                        part.move(@);-- load part/ y! m' o" ]; [" R) l: e8 ?
                        @.CurrIcon := "load";
. F7 z, _! r( y4 k( `7 b                        GlobalDistObj := part.globDestination;
8 @# [8 }8 N2 z, ]5 X/ t5 p! V                        assignLObj := rgmanager.rgAssignL;9 M8 z$ c* k/ R/ Z7 R5 W/ s
                        row := assignLObj.getRowNo(GlobalDistObj);* j$ J6 F5 c9 `9 g! Q  Q& z# t  z7 s
                        if Row = -1 then -- since 70$ g/ V  O2 h% X1 [& p- m
                                if lan=1 then7 o5 g  v6 H8 m4 w7 F
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),5 i% B) U1 y$ t% n3 @# q$ I* L: ~2 g
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
! K7 [% N* v0 u! G" ?/ g                                else
7 g/ h" i( Y( d                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
1 f" v8 L# l6 R  D5 f                                                to_str("in docking station: \"",?.~.name,"\""));                                  ?1 l- h  c1 T4 C
                                end;' `$ n" c$ f2 f- Z
                        else
* v; n3 [8 c+ P  @, c                                @.Destination := assignLObj[1,row];8 \: K6 b6 w- b3 ~+ l3 |$ a
                        end;                       
8 m1 a; V- ~* w, H: i                        newDirection(@);$ x% z2 {% R4 I( ?) ]* B4 N2 ~
                        @.HasOrder := true;
9 ^" c0 z' n0 _- s                end;
# H; [" ?7 J( F0 {* F4 @3 Y4 z& h1 {        end;
( i6 m8 }0 {1 k% K) t# ]end;        -- of the method8 K6 Y5 P7 }9 f6 Y: X
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 ; M7 F  X, E, F1 J, n. x
( G+ x( z  X" g# u
这是AGV_putin中arrive的method。& M: \* {8 @) |$ y3 S
; v( U% e4 c! J  E( [
当到达物料速度越高时,这个报警更多,
4 V- m$ |) h9 F# v可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。$ C) h; c+ b$ E7 M- f" E
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
% w8 ?# j4 g9 s0 x# V
( n: A4 ^, [3 j' [. `另外一个小建议,就是move,所有的move都可以这样9 H3 S' v; ]- n( M* W2 w" A
if not move() then debug end
' D: a3 G' X8 \+ y# H这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
2 r. _% p$ O  N; i, A, @! B+ iplant simulation中的free libraries有AGV模板,
7 k0 G$ e4 W: q! W5 w/ Z- k$ w% ^里面也有案例。0 w; a9 l; R3 I9 K# U1 T  D' _+ |
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。: M# r' \& t- h0 P  i

3 u* L$ ~! |. Z我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑   u" h" ~" `2 e! g% t

8 _; a  p( j9 q' u5 V( m7 _" `那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ; Q7 [: e- j) h$ G2 z
这是AGV_putin中arrive的method。7 i. }5 x7 f- a( Q* ^' w: Q7 A
; }: F5 X* h6 O, u- I" W
当到达物料速度越高时,这个报警更多,

* W) w. ^& F5 a# B$ S另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-19 11:09 , Processed in 0.021928 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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