设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6670|回复: 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'
+ s9 H& e* y6 ]& s*/
8 v0 _/ X4 J* U. t9 W( iis  q( v) [: \( \$ ~/ ]* s
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
- e0 w0 q- @/ [8 V: \, Rdo7 e+ M2 F% E4 ?3 _3 n
        Lan := rootfolder.Internal.Tools.AOLlanguage;. e2 G  B! O& Y: u
        if current = @.Destination -- else return
6 W  ~- f% ~5 V; S# d" _        then
& h" e$ v- H2 `                @.Destination := void;2 W# a0 W8 }0 B7 _5 ~1 K
                if @.occupied then
' z4 s$ W, i7 {2 Y1 U$ s, j                        part := @.cont;0 R8 C) Z1 E; n1 \; d; {- {5 y
                        @.transpOrder := void;
0 H9 v) _- f* L4 g9 q$ j                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
$ \  L0 L. ?7 {" y4 G                                @,root.eventcontroller.simTime);
- C" q; k# Z. N0 Q4 r" c$ e, I; P                        @.HasOrder := false;( j  W7 T" ^% B6 x+ G" n
                        @.DrivingHome := true;0 M, e# V# D0 p& t( {0 E
                        rgManager.tryToStartTransOrder;$ d6 f* x8 V5 ]' w
                        if @.Destination = void! Y7 f* V2 U1 N
                        then -- no transport order for vehicle @' y4 y0 z% b( \7 h: v" W
                                @.Destination :=
  y1 B" ^# c2 t  D+ }                                rgManager.nearestFreeStation(@,track.~);3 p5 e7 ?- c, f7 o9 t  H( G, E
                                newDirection(@);   
$ [" V1 F7 Z* W& o& Z# \                                if @.Destination /= void then
; C7 z) S1 ~' M3 s$ S6 K                                        @.Destination.NumReservation :=
/ _( @" O. T) t: [% L( W                                        @.Destination.NumReservation + 1;4 D6 H# o! t0 i3 p, h# [
                                end;. O- b% |3 ?6 `0 t# C' e# y0 g
                                @.CurrIcon := "drivingHome";; M/ ]: ^2 A1 Y. M
                                @.DrivingHome := true;
* G) u7 f9 C/ {& K                        end;! b' P1 n% D' n% `5 L1 _
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station9 ]6 B5 @0 x7 g3 ~5 l; X1 R( t
                        part := @.transpOrder;6 K" l& j$ i: Q
                        part.move(@);-- load part
  r( S3 q1 }# I$ W  e* ^' b% b9 x4 B; ~                        @.CurrIcon := "load";% |' ?5 b) s" @) F) E( m* D
                        GlobalDistObj := part.globDestination;  i' k/ d  i/ y6 C
                        assignLObj := rgmanager.rgAssignL;
+ L; e1 {/ U4 n* I: P( u" @+ v+ f                        row := assignLObj.getRowNo(GlobalDistObj);2 y! n, V, M+ j+ n' Y% |+ V% D& Z
                        if Row = -1 then -- since 703 B3 r( j  Z. p$ r* l8 x4 Q
                                if lan=1 then
9 I, `! Z$ O3 I. _' b                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
  @7 \) A  n/ B                                                to_str("in der Andockstation: \"",?.~.name,"\""));
; P5 z. Q( M' p7 t+ h  o                                else2 f, e. [6 Q! u# t
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 ?+ d, B& I+ F) u7 B  G6 Q                                                to_str("in docking station: \"",?.~.name,"\""));                               
. r4 u- b# o7 T9 n) j1 S                                end;
0 \$ |' o) T! ?" u9 v# o$ S. g                        else
: ^. Q+ S$ r) {6 s                                @.Destination := assignLObj[1,row];! W2 B+ O9 Z* Q' P5 [
                        end;                       
8 _' C+ z, T9 o" |* L                        newDirection(@);& X' ^9 o1 l4 g& t$ o: e" Q
                        @.HasOrder := true;
* ^) I4 D8 ]/ J8 |2 v                end;2 }* N/ a  Q9 o+ m! X$ r
        end;4 @& Z# s2 H- E! h3 G/ b
end;        -- of the method
8 U! Y/ T& ^1 w3 |) b0 Q: U: r
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
6 F3 k$ R; q( j- W9 x* S# x+ Y7 e" Y! _+ C: W/ U$ Y
这是AGV_putin中arrive的method。" ~, i; n6 M. S. u. `

2 q  j) h7 G, c6 B' m当到达物料速度越高时,这个报警更多,
. u+ V2 E$ V+ T+ i2 y. s" {可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。0 C/ m' s& M: Z! z/ T) ~
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?% A- v- T: }6 t6 `% Y! H* l. ?) }

% m( ^6 S% _4 j$ N+ }, s6 E另外一个小建议,就是move,所有的move都可以这样
! t& h3 I. x# ^2 D; k8 Nif not move() then debug end& }; Y3 I* |7 @3 l0 r) T
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。) }; u+ y' B$ m1 Y
plant simulation中的free libraries有AGV模板,
# j2 ~0 J" ?, _, H. O7 r2 P$ f5 T里面也有案例。
+ ]8 L+ C9 Z2 K7 J我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
7 o; G* J' E4 i9 s2 _8 V
6 Z- c  L. c4 o! X# @我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
2 q4 e; j  w$ Q, ~! o7 t
4 e4 X' M0 p; S! e9 R1 K那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
  z! R6 O; E: e. l; J" D0 M这是AGV_putin中arrive的method。
9 \  H  w: K; P, X6 I) ]  N: n
& J3 O: A8 o( s: d当到达物料速度越高时,这个报警更多,

3 J0 s$ e- j& U8 h! F, [. i) ?另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-20 02:10 , Processed in 0.020923 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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