设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6826|回复: 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': X, l' d" x/ a% m* U' |7 @+ s1 P, v
*/  }% L2 ~+ J+ y! w. k6 ?: Z; i
is9 a8 A3 S& I- `, e3 P' N7 ^  b- \% H. r
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
  a: M( k& S3 d+ T) F9 E0 Kdo
! B  U& v9 W0 T7 q  _        Lan := rootfolder.Internal.Tools.AOLlanguage;$ W% F5 I- O, Q. p* Z7 G1 e
        if current = @.Destination -- else return: C/ W; f& W' H- d! Q% l/ q
        then
) v  b8 }% p% z' P1 L9 P$ A/ m  y                @.Destination := void;3 H+ Y8 T( F3 ?1 W8 i* P( J
                if @.occupied then4 G  g- s7 i5 G8 h) J/ d$ `( g
                        part := @.cont;. h3 f+ H9 \9 x  U' ]
                        @.transpOrder := void;
3 o. g! V- [! h( B                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,  X; n1 }( k: h* @+ a: j
                                @,root.eventcontroller.simTime);
' ]. R* ~& }2 W: e% q4 M0 ]  u& ^                        @.HasOrder := false;
) x3 v( [* {5 t! [9 M: K; M                        @.DrivingHome := true;5 C# N1 ^5 i3 U$ k& ~9 w
                        rgManager.tryToStartTransOrder;
, p0 i# _! [; B5 ^" K( k                        if @.Destination = void
7 t* W/ L2 n. _  z# ?4 ^8 v                        then -- no transport order for vehicle @5 ~; L6 z+ e) I2 x/ |( {7 f
                                @.Destination :=
$ b6 e; J: j& Z- L( Y                                rgManager.nearestFreeStation(@,track.~);7 ^, N# L: `' w5 D2 \
                                newDirection(@);   0 K4 Z' K8 S' W  B' l( ]+ l
                                if @.Destination /= void then, X2 C9 K( w  ?! Z- g0 K
                                        @.Destination.NumReservation :=! `5 ?4 ?7 f$ c1 l' M  a; M; v$ D+ |
                                        @.Destination.NumReservation + 1;) f! p  L' U: o" Y* p
                                end;
0 n& e# T& t2 @9 C5 F4 K                                @.CurrIcon := "drivingHome";
2 |9 F+ [- O! F4 U$ b% T- d5 u                                @.DrivingHome := true;
/ B, H1 X7 Q0 R$ ^  K                        end;: s( |& E( q7 \" t5 D' J6 B
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
: F4 K& u) j7 B4 ^                        part := @.transpOrder;
. ~* H+ }$ L/ _  x" @                        part.move(@);-- load part9 m$ Y8 U, o: M3 D4 W6 Z4 z5 m3 y
                        @.CurrIcon := "load";: ?) V1 _- ]% B4 W8 i+ _
                        GlobalDistObj := part.globDestination;6 s2 [, c4 A! I. L3 t
                        assignLObj := rgmanager.rgAssignL;
' J4 |5 X$ z. Q8 e9 J5 T- C0 R7 ?                        row := assignLObj.getRowNo(GlobalDistObj);
2 x& a6 l, X& n# }3 N) i                        if Row = -1 then -- since 703 r  M0 d% G2 J1 h7 Q5 b
                                if lan=1 then& s9 u' a# V; ]2 I. K5 X" U. \
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),4 y  T8 {/ g$ J$ `( D
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
. q- l' V- `1 O. G- r+ O                                else( d% W3 E; Y4 T3 `$ `* ?
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
; q: N4 j3 l7 {- m- W  M9 R                                                to_str("in docking station: \"",?.~.name,"\""));                                & `( {; H# z; G8 T8 e
                                end;* ?* A, Q- h8 W
                        else7 @: y, Y; G- Q7 S7 U8 ^, u9 D5 @" ~
                                @.Destination := assignLObj[1,row];
& n, u+ v$ o% F: Q                        end;                        3 r& \& h9 h( ^* T, Y- X
                        newDirection(@);
9 I6 A4 M+ \( i3 C5 T& V                        @.HasOrder := true;
& h9 O7 t# A& Z. O% t                end;
: ~! {3 a+ D- u& Q( `        end;! o, @. E) @2 e. l5 H* _
end;        -- of the method/ L  |3 y0 t$ ]% {* C
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
: T" R& X7 U: \. n! o- a4 ~! ]' ?; w) K! U8 F2 y
这是AGV_putin中arrive的method。. w, X: o" e. p
. X4 `  C6 D2 Y
当到达物料速度越高时,这个报警更多,
4 i* ^1 w- G; P6 X" n2 x可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。" h' H1 i$ E% p" `7 @+ V$ F
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?) D7 W8 o& D% M! C/ p6 `
0 A) ~, Z1 ?6 t# |. @8 ~4 `
另外一个小建议,就是move,所有的move都可以这样
. p% S6 h+ B( G7 ^" D8 m' Aif not move() then debug end$ d) _6 m2 ~6 l6 Y  X3 u
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。4 {; Z  e+ C/ G  s5 m
plant simulation中的free libraries有AGV模板,$ f6 ~& \( n6 ^
里面也有案例。
' p+ j; I; b- Y: |2 X7 [. g8 A3 N我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。; Q0 _, o1 p5 t

2 J! i, L- O# {+ a) q9 y我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
/ P" z4 {2 o; N" S! @
7 a' |3 B' N8 Z那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
$ u% p! H. e3 a这是AGV_putin中arrive的method。1 _' w4 }4 B( s. J- c: C
+ i$ ~$ z5 N& x6 k
当到达物料速度越高时,这个报警更多,

$ v+ p0 K$ P: D/ m另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-28 23:05 , Processed in 0.029930 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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