设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5975|回复: 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'
8 L5 K7 I: e) W, {3 d: V1 D*/! \5 @' W' Y" A5 z0 b, R. X
is
0 a( p: D* F4 A5 O: ~        part, GlobalDistObj, assignLObj:object;row,Lan:integer;. K$ D" _7 h& i. p5 q
do
5 y' f1 E: F9 V) K        Lan := rootfolder.Internal.Tools.AOLlanguage;
; l2 {+ e3 K! z) n        if current = @.Destination -- else return8 E: F. f0 \; q
        then
6 ^, g6 z4 H. R* i  j( d                @.Destination := void;5 @: @. ^* i2 W4 d* ~. ^
                if @.occupied then; z, w$ w9 d" f# v" Z0 L
                        part := @.cont;5 ?3 v; m# `9 a7 n  a4 r
                        @.transpOrder := void;. s1 t* i, H7 ~- F6 t4 D+ C
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,- r5 ?- ?% j, U; N( |& _
                                @,root.eventcontroller.simTime);- W5 |2 O5 J! m( ?% f6 K" i
                        @.HasOrder := false;
3 {: p3 X% x: V                        @.DrivingHome := true;1 Q3 q2 [$ g" A. s( ]
                        rgManager.tryToStartTransOrder;; ?% R. }1 q9 D# }" _( V
                        if @.Destination = void0 z; k6 {! g( \5 p
                        then -- no transport order for vehicle @! n9 R& e4 W9 y5 @2 d0 Y
                                @.Destination :=% J7 o+ ?8 S: Q9 z: H. {- D! G
                                rgManager.nearestFreeStation(@,track.~);
& `& d) |: U) [                                newDirection(@);   / [8 Q8 O8 Y4 W3 m$ C, r( f
                                if @.Destination /= void then
2 y/ m% p- K. j. X                                        @.Destination.NumReservation :=
. E/ y6 D. [5 Q" }& ~# |                                        @.Destination.NumReservation + 1;1 |3 @7 L+ Z; j2 W7 r4 M% b$ t
                                end;
+ S; z+ G% y: P) u$ Q0 c& a! |                                @.CurrIcon := "drivingHome";
. b6 z9 P% ~+ h6 I+ D& i! s                                @.DrivingHome := true;
$ b9 Z6 U" Q. o! a& t                        end;& u, B% l- M& H# Q7 s, y
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station  x6 I2 h$ R/ X, `
                        part := @.transpOrder;* z, n! R# y% ]4 @  v0 A( x& T
                        part.move(@);-- load part; R' @5 ~! T% U" j
                        @.CurrIcon := "load";
9 k, t: t8 {: [  y4 J8 w                        GlobalDistObj := part.globDestination;6 L1 x! m3 W% K
                        assignLObj := rgmanager.rgAssignL;' q* D' V5 c0 G  n0 G3 q$ M
                        row := assignLObj.getRowNo(GlobalDistObj);) f4 h7 d: t- c9 e5 A, |
                        if Row = -1 then -- since 70
3 \# ^  \% X0 h( |0 s5 U4 M1 A" d3 l                                if lan=1 then0 x3 ^4 \1 d- D9 ~# y4 o$ ?
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),9 S, S0 p' \. l- Q
                                                to_str("in der Andockstation: \"",?.~.name,"\""));' |; T' x/ \' k. K. {! f
                                else
, P6 a2 _' A' {                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
( A8 L9 s7 x& q% f                                                to_str("in docking station: \"",?.~.name,"\""));                               
# R: p( P, X) D8 z6 {' Y                                end;
  h5 ?& y! ?: @                        else
- ?( O3 P6 q7 ?, {7 a$ [( C                                @.Destination := assignLObj[1,row];0 v) Z! _( \  f: ?1 n6 R
                        end;                       
( E% T" l8 y0 X6 T                        newDirection(@);9 w' S* S8 M: _* M+ G
                        @.HasOrder := true;; T+ F- i0 N5 C1 @9 H6 K( t/ c8 x
                end;
  n1 v5 U) N( e+ Y  g5 f6 `7 K        end;# _# p2 Y- v" J2 h& X7 Y
end;        -- of the method; F( q2 U8 U9 _+ {+ z' E# ^+ N
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
; p1 x# p3 N8 w( M; h( E! I. r9 U( r2 n; ^, p
这是AGV_putin中arrive的method。( |0 O4 m7 p  C0 l% \$ n
. J1 @6 G" j" P
当到达物料速度越高时,这个报警更多,: v) o* s& N. q1 J# ^5 N
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。# d, P5 n  f; {3 \5 N4 Q
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?7 f( k& x- b  R. f) g

9 F0 A: V: [4 P$ m) {另外一个小建议,就是move,所有的move都可以这样
" h$ o2 i6 c; q7 X' kif not move() then debug end
2 v* U0 i% j5 g% D5 t& u% Z这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。; ~2 W' |; }8 |3 C, p
plant simulation中的free libraries有AGV模板,* s6 W$ ?3 U+ U5 q9 n4 N# E( `
里面也有案例。6 J% V0 w7 O1 s% a' ~% Q
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。% v6 ?$ _" a0 r% l

4 E4 ^! Y- y8 w9 z# Y  k我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
6 i% D5 k$ E0 E/ r
3 j) f9 V/ `) a那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 $ Y8 W" f  i7 U
这是AGV_putin中arrive的method。
0 T7 F* E. j+ @* y
. j# B; S1 T# l/ g! f当到达物料速度越高时,这个报警更多,
& P. ]" w: t8 \
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-1-10 06:13 , Processed in 0.021126 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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