设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7671|回复: 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'# K: C8 u' W0 Z; d1 [4 o/ {
*/9 e/ W+ n1 R. e' h) W' ]
is
6 _. k/ f# q; J- D6 F# V, S1 o! _        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
- K/ A1 l. R9 ~  e+ j- Gdo# X: n, G1 e7 R+ {& X0 H
        Lan := rootfolder.Internal.Tools.AOLlanguage;
+ J3 D4 e8 d  L( V1 ~2 d        if current = @.Destination -- else return9 E$ x5 O, D( B8 s; P/ X' u
        then
1 W1 p; M5 e3 r* ~8 r% k( Z                @.Destination := void;2 W* w" [0 H7 W2 @$ B( O
                if @.occupied then3 B7 U' m  t& j  `; f
                        part := @.cont;
9 b  @- I) j. O2 _, O" Q                        @.transpOrder := void;; y( Q# F" E% X
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: T( o6 w) T1 n, P/ [, n
                                @,root.eventcontroller.simTime);, e9 b4 z8 g8 B" D& s' {
                        @.HasOrder := false;
, W" R; @# p# V9 e3 ?5 y; b5 I: Z: k                        @.DrivingHome := true;
9 q6 ^2 A/ E- R" i0 _% {& o                        rgManager.tryToStartTransOrder;
$ ^) p+ H) a. z4 u+ H& y" V                        if @.Destination = void
7 @( C) z) p' O; f1 }                        then -- no transport order for vehicle @: m6 |' a, V! G7 K
                                @.Destination :=
2 x. }6 j; d3 Y                                rgManager.nearestFreeStation(@,track.~);
3 G! K/ T) _( {; n) [                                newDirection(@);   
' _* [8 P8 g1 O3 L( m                                if @.Destination /= void then1 X! F( Z5 J# |& r4 X, G& c
                                        @.Destination.NumReservation :=
2 F! E- S, w0 G4 p. B                                        @.Destination.NumReservation + 1;
8 m* I. t3 z# _2 j3 E: u                                end;0 M, F) W, @+ q# P! N0 o* ~/ G, D  @
                                @.CurrIcon := "drivingHome";: b6 A" r) ?0 F: }
                                @.DrivingHome := true;/ U* G) j- L1 l
                        end;
4 |1 y1 N! z! Z- O                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; v7 h* q1 b4 s                        part := @.transpOrder;
6 b+ ^* I, ]5 g% w* q+ C                        part.move(@);-- load part
2 j# j* t1 t/ r+ x                        @.CurrIcon := "load";& m8 m" I$ L! w) N5 n0 r7 D
                        GlobalDistObj := part.globDestination;; j) z& `9 n7 k+ J6 Y; ?1 Z$ N4 Z% J
                        assignLObj := rgmanager.rgAssignL;
6 Z  C  R$ y* T" p                        row := assignLObj.getRowNo(GlobalDistObj);
9 D3 L, b+ J1 P1 H( E* C                        if Row = -1 then -- since 705 {, q! V' V( o, k+ q* L- s
                                if lan=1 then0 h& r* U- X9 T
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),  M: {' `. z7 n
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
, @, r% A7 S/ t                                else
' o5 I- T4 N6 S$ u2 ?4 Q; f/ o                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),5 O' N  E+ v5 _5 x
                                                to_str("in docking station: \"",?.~.name,"\""));                                / [. s; G) }& z" X: ~, K
                                end;7 w' x" M! I& q
                        else+ M" z' P9 V$ K& |4 V0 J3 ~0 j2 P  Q
                                @.Destination := assignLObj[1,row];, s- Y  n6 N# U
                        end;                        0 I' j. z+ w6 ^+ m9 R3 F$ r
                        newDirection(@);1 f3 T6 J' W! p0 Q
                        @.HasOrder := true;
3 P4 x$ c/ i9 g+ q                end;
3 [" h. F8 F3 [! X        end;
" E1 z( h* {- Bend;        -- of the method# a8 F0 ]. f# d. ^' A, c; @
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 4 k1 O/ P) e* T
' s$ m' v5 H4 V) S2 f) ^& R
这是AGV_putin中arrive的method。7 N- J. Y( ~& B# K8 @
% C. W3 U* b. U7 l. p4 J
当到达物料速度越高时,这个报警更多,. R0 G( n4 @- A2 D! O, Z
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。9 S9 t5 A  j1 B2 s% L
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?+ h% A! p& P/ Q1 S1 X
7 S4 e* \# j& S+ w. [( c
另外一个小建议,就是move,所有的move都可以这样$ {7 z- E" a! \9 l3 K( M
if not move() then debug end4 ]  r6 t1 B' |. w0 x) L1 H* Q; h9 n
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。. O. p" i$ L# t) a4 E1 ]* ]
plant simulation中的free libraries有AGV模板,
* o6 ~, |- K( E* h2 N里面也有案例。* w8 s( l: I8 V' g: B5 d( O2 E! P3 ?
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。& {5 b5 Q8 `0 f% G4 T
/ Z- b5 U( N+ s8 t" S. w
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 & d3 w0 l% H3 @% S9 N( w' L( U3 H' t

  D& P  M* ~$ z7 v那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 * u% Z5 v" k6 A# O( a6 j
这是AGV_putin中arrive的method。$ p) `& f* l0 }# B3 k+ A: c
6 ^( V$ X- ?7 u% R2 q  h' _  E
当到达物料速度越高时,这个报警更多,
, ~- i: N- j8 L+ m( L) ?
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-23 15:09 , Processed in 0.020543 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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