设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9350|回复: 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'! l& h/ L% d- Q9 p5 E
*// D+ R0 @  {% r; v6 S( r/ w/ ]# {
is3 o4 E+ ]* @" `; K# D6 \. c2 h
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;5 T' B6 t/ y: j: O9 m3 D
do
2 z7 `/ @2 ?! B4 @3 m% U        Lan := rootfolder.Internal.Tools.AOLlanguage;
% T* u; T4 `6 Z& n% T$ g2 j) f4 q9 ~        if current = @.Destination -- else return, g# v3 s3 h3 b  ]* [! R& O# m. L
        then
: K  D$ T  z' @                @.Destination := void;
5 L3 _3 N" G( F& k                if @.occupied then  @$ W: S: G9 E" j
                        part := @.cont;
6 l5 m: q( f3 B; b                        @.transpOrder := void;
: d' X' [( I5 E9 b# F7 k                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
0 c9 M. t2 Y4 k                                @,root.eventcontroller.simTime);; Z% h' L; N! f- R6 L6 `
                        @.HasOrder := false;
6 M! {5 X& Q1 |/ J6 l2 X3 c! d: M. J                        @.DrivingHome := true;
- @$ k& h. x. ~9 _& k$ F' G* q                        rgManager.tryToStartTransOrder;
8 Z! X; H6 E. o; [/ Y, B+ B/ k                        if @.Destination = void7 p+ [, ]/ }0 v  U
                        then -- no transport order for vehicle @5 z6 c+ t% w( A. L1 J5 f: Q
                                @.Destination :=# J- h# P5 y3 S2 n
                                rgManager.nearestFreeStation(@,track.~);# ^: e/ J9 u: I3 y9 C) L
                                newDirection(@);   # l' ?, c7 I5 V. G: l- N
                                if @.Destination /= void then/ r2 y5 v/ M& _# B/ O# \% K
                                        @.Destination.NumReservation :=
1 k  d) E3 R4 @0 C                                        @.Destination.NumReservation + 1;( ^, Y* z& ~4 ~- U9 F4 L& O
                                end;
& m3 q! x* S5 v9 D3 V                                @.CurrIcon := "drivingHome";( P. R8 e1 j' [! r) r' Z# B: E
                                @.DrivingHome := true;$ U1 W5 E$ A  _& s" y8 {1 a0 H
                        end;
* v1 d- v$ g) K( j                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
+ u/ R/ ~$ t  a' {# {% {  H                        part := @.transpOrder;
! P7 `5 `3 n# n$ `, T                        part.move(@);-- load part
: r" ^4 w: d8 [3 s+ ?' T  C# \9 U                        @.CurrIcon := "load";7 _$ |7 F6 k5 w
                        GlobalDistObj := part.globDestination;" c; p0 B9 ?$ O. C: @  m
                        assignLObj := rgmanager.rgAssignL;6 n; z  S  K# k8 v" D3 A
                        row := assignLObj.getRowNo(GlobalDistObj);
/ P2 D8 Q$ g* g% w" _. e& y                        if Row = -1 then -- since 70
2 \; W8 {* F: K+ l4 o; T( c                                if lan=1 then( o% ~" J! ~  a7 I2 R" e
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),+ M; X" {+ r; |2 w" {9 F
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
' X5 N) T  i1 D- K5 d" l6 G4 U                                else: ^; d$ [7 A" {# k! k
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
* S# m! _7 N' G6 }' C' M                                                to_str("in docking station: \"",?.~.name,"\""));                                4 x3 p+ B7 R+ `0 Y5 [
                                end;
; o9 x) Q# |9 K! T, n. n                        else: }& c6 Z% Z0 H+ L9 g/ G
                                @.Destination := assignLObj[1,row];
7 k+ }/ @: a4 G3 ?$ n( c, h1 j* r                        end;                       
: t* `: ~3 `% H8 i                        newDirection(@);
, X: H- V* E7 s9 g% ?- j7 ]                        @.HasOrder := true;
: x7 m8 V- W! @$ W5 ^                end;( L3 W' c7 H- t  I0 v8 N
        end;& A0 V: T) z* W' X9 ^' R. u+ O
end;        -- of the method
+ l/ W! |  _8 L
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 - X+ y6 Y, D* Q3 M) @3 A
; M  M3 h* C% n/ U% @, E! I
这是AGV_putin中arrive的method。
1 \; w2 c/ ]7 ?; d# @- w- r& G$ A3 o# N7 H; F$ ]( Y: a/ T9 c. v
当到达物料速度越高时,这个报警更多,
- J* s5 s! e. v" F7 k7 F2 z! D( L  u可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
1 v& W" [/ b! k" a8 l程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
* i3 J4 f8 K" j  I7 b& w1 l3 x3 O  W/ J' y1 P) [0 Y1 Z
另外一个小建议,就是move,所有的move都可以这样8 ^2 X% M) ?, }+ `) U  H# J$ A( G
if not move() then debug end
8 b( O( a" Q9 g/ Q/ i6 |这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。6 Z4 ?8 t/ Y- D* J! ?0 K7 x# {
plant simulation中的free libraries有AGV模板,, G8 m- u, n2 @* r! m
里面也有案例。
& p3 f$ j" S0 \. F4 t' w, X0 F我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。8 E; ?! z' p$ F3 ^0 G
& x( B  Z9 x& l4 s1 h
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
/ R+ ^! X2 N( _! g# n
- a& x. U- O# Q那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
; t( D+ w$ T5 O; ?这是AGV_putin中arrive的method。/ F+ Q9 ^: c1 B2 ?: D$ P5 y3 A8 U

& g8 q$ r+ Y# I7 w当到达物料速度越高时,这个报警更多,
& d7 E$ t) m  H
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-27 02:04 , Processed in 0.017433 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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