设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7448|回复: 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'
% X7 F/ ], W! G7 Y3 C# M*/& h& L5 K0 W' ]$ x
is( N- D" ~9 Q) V. K* _: ^" _- }
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
. i1 q% @4 S8 V+ ?9 ?- N3 D# Ydo
3 V7 |0 Y) ]" a5 j' i        Lan := rootfolder.Internal.Tools.AOLlanguage;" k! h" J# a. w5 k9 f4 `
        if current = @.Destination -- else return
" k) G% j4 v  \9 w; n9 G$ d6 `        then
# R( x) T8 o# z0 W' k                @.Destination := void;
# i. H, y. L( b0 X$ C1 ^                if @.occupied then( D& q6 E7 m; {1 ?, d: {# H
                        part := @.cont;
/ j, ]) P  E0 V+ M1 r1 a( C. V                        @.transpOrder := void;2 R$ R  i6 v. y
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 c1 h: g  L- U: ], n7 r
                                @,root.eventcontroller.simTime);
3 S- j* E* f+ C                        @.HasOrder := false;) s* t6 _0 s8 w4 X1 Z
                        @.DrivingHome := true;
( D- }5 i; m0 A3 ^                        rgManager.tryToStartTransOrder;
, o% D3 \# r* j4 c' W$ K/ Z                        if @.Destination = void  ~. v1 W1 y8 ?+ e9 c8 }2 O4 p( _
                        then -- no transport order for vehicle @$ o4 K- a0 X) o8 r' S, A9 s8 Q
                                @.Destination :=
: I. v* I0 O1 n+ k0 ]) `                                rgManager.nearestFreeStation(@,track.~);
" V0 \+ e1 |3 B9 G4 \0 B                                newDirection(@);   
  _+ e$ Y$ ^+ ~: T, t8 P5 ^                                if @.Destination /= void then0 f1 T5 A8 q2 W' @. W" E, s
                                        @.Destination.NumReservation :=8 d: V, _8 ?4 Z
                                        @.Destination.NumReservation + 1;2 E" K+ O# {  i, ?% Q3 j+ ?
                                end;! `; q+ W2 |4 ]! e. U* s; Q
                                @.CurrIcon := "drivingHome";7 G; o: H  G6 n# f) @
                                @.DrivingHome := true;; [8 p" w" J3 ^: C9 k/ X3 n
                        end;
" ]6 V$ c4 {7 t1 _+ B                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% Q$ r/ Z+ I  E% W                        part := @.transpOrder;* B( D  N3 C' r& l
                        part.move(@);-- load part
7 c& S( a% G4 D8 i. g" h% a0 j                        @.CurrIcon := "load";" [  }$ s; s' ~: s3 k
                        GlobalDistObj := part.globDestination;
8 k+ U8 \3 _- G) b- q' H                        assignLObj := rgmanager.rgAssignL;
" c7 a$ Y# u+ U* R) Z# B                        row := assignLObj.getRowNo(GlobalDistObj);
. D0 ^- H2 u2 c7 k# e                        if Row = -1 then -- since 70
  [+ a9 b/ B0 b" j) g) O3 t1 i                                if lan=1 then) T, P  X2 q1 X, c+ E
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),/ @" o3 w, e. U
                                                to_str("in der Andockstation: \"",?.~.name,"\""));9 R, D/ v; K' J# y3 U: N
                                else
5 u9 o) I! c- z( r0 ^. z: M  f6 ^5 ]                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. ?, o& {7 W! y6 o
                                                to_str("in docking station: \"",?.~.name,"\""));                                4 ?& ~. r3 d, P. E8 L& T# @. ?- d
                                end;
& j+ W: Y8 N3 X  G! ?3 Z; v                        else
# }1 B2 f1 Q0 ]; |1 ?, H                                @.Destination := assignLObj[1,row];9 k- g- I  U$ q/ [3 r- W' O/ [
                        end;                       
5 s0 a' p, ^) v' B8 {3 ~                        newDirection(@);
( w' F" x' ~+ U3 k! i                        @.HasOrder := true;
+ z. a) V4 z9 e  i- r$ B2 n                end;6 ^$ j% w8 u; \( r+ \4 G6 M
        end;3 g) u: b. O5 ^% {6 _
end;        -- of the method  ?' U; B4 p. |1 z* ]
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
% e5 @8 T3 E3 C* r4 A3 Z) @5 {% ?8 f) b( K  }  H
这是AGV_putin中arrive的method。" A3 ]; I& i% C, T+ o* w
9 u$ f$ n! W2 H; y  m
当到达物料速度越高时,这个报警更多,
' T4 J! @0 Y3 n可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
1 f# y7 w6 y% G& B+ J程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
6 z7 H/ ?, I3 L; i& S1 [7 D7 i8 t$ w1 {$ r8 ^6 G
另外一个小建议,就是move,所有的move都可以这样
4 r4 a% P" m" z4 hif not move() then debug end
( z0 {+ Z3 T# X# P! W这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。# E# a7 v$ k2 K) L1 \2 m. h
plant simulation中的free libraries有AGV模板,
! H8 V1 t( C3 s. P$ W& L, y( H3 a9 D里面也有案例。
: U: M5 X0 O+ c8 n8 X) G我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。" ?& y" X/ C; f
7 l+ _3 x0 B6 L. S% i
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 & v4 ^4 t/ a& h1 p4 g" p. Y
; }( ]0 F" y1 C( [, c
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
0 B7 J: E8 t7 ?8 {这是AGV_putin中arrive的method。
& P' c, |+ g  W  @7 m& e3 ]' _# W' t0 i
当到达物料速度越高时,这个报警更多,
0 }- p, F% j# t# c* u( |) Z
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-11 23:57 , Processed in 0.024347 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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