设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7054|回复: 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'
% w6 }$ L, d" |" k( G  W*/
) `& ^% z0 U7 |0 @. N4 f& lis! }8 ?( j3 g5 j4 s+ d
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;9 S/ M$ d- Q. R
do! u3 n0 f4 g$ Z* f
        Lan := rootfolder.Internal.Tools.AOLlanguage;
- u; h# {/ v, |5 ~6 Y1 e        if current = @.Destination -- else return  o) e" w. m5 D# j
        then
2 l! S- @' t2 j# \* D3 y8 X1 S                @.Destination := void;1 {" {" M" i$ O
                if @.occupied then2 k6 t7 J& j) N0 b  _% g
                        part := @.cont;7 m  A) F, ~# w9 F3 H6 H; w, T% s
                        @.transpOrder := void;; b$ j/ S. D9 C; {! }3 n
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,  @# k# ^* D  R" K
                                @,root.eventcontroller.simTime);
8 J& u9 Q% w  t+ w, a. z( }                        @.HasOrder := false;" z# k2 E, V3 G* Z
                        @.DrivingHome := true;
) l2 _3 H# k$ c6 `7 t                        rgManager.tryToStartTransOrder;
7 z/ i" n$ t, x1 c7 u1 [3 |5 O                        if @.Destination = void
# d6 M! T% a) i                        then -- no transport order for vehicle @
; l# ]5 N8 I  A$ c0 @% a7 i9 q                                @.Destination :=
: j  Q  U  p  @                                rgManager.nearestFreeStation(@,track.~);
& `4 s8 K1 f% O) ?, y( m+ {                                newDirection(@);   
7 Q: m. Y2 D! L) T1 Z% F4 x                                if @.Destination /= void then
$ n2 [% O% R( W9 S  F4 K/ Q                                        @.Destination.NumReservation :=' e! ?, g; E4 e( @, I/ a; W
                                        @.Destination.NumReservation + 1;
+ ]( L+ l' ~  D, _- G4 {2 L$ W5 q5 x" D                                end;6 h6 o* g0 l& J% n7 S
                                @.CurrIcon := "drivingHome";
; A1 `% c# x% n6 h' K6 [8 y                                @.DrivingHome := true;
) g8 X0 x, c+ p- p! X                        end;
. C; X( }0 h- z1 j) e3 {  q6 g4 R2 V                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
" {* T! t& C6 n% f! M1 Z                        part := @.transpOrder;
: m' ?3 I' O- f7 F! ]% d" a+ Q% ]                        part.move(@);-- load part/ D$ p- O* n( i1 U2 \5 V
                        @.CurrIcon := "load";. S7 q# D* J4 c1 d: ^
                        GlobalDistObj := part.globDestination;
: N2 L0 L! H8 m' a0 S                        assignLObj := rgmanager.rgAssignL;
" }! U: ?4 ~! v                        row := assignLObj.getRowNo(GlobalDistObj);
: Q2 j9 L, f" Z8 b                        if Row = -1 then -- since 70
- Z! c9 \  j- ~$ ~6 e                                if lan=1 then
; P6 N+ s$ d% z1 t2 O6 W                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& y- Z5 I5 s* M4 k8 K. ^                                                to_str("in der Andockstation: \"",?.~.name,"\""));
* _/ y$ ^! \8 k                                else
; w% A1 U+ M& l                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
! H5 O2 D. B- ^6 _1 X# k" j                                                to_str("in docking station: \"",?.~.name,"\""));                                # n! N$ V! i& o/ R
                                end;: _+ m: v; `, o% c
                        else
, F+ E$ @" U5 R! v1 ~) v                                @.Destination := assignLObj[1,row];& y1 ?9 G! Y# s+ f) d4 b# o
                        end;                       
  X5 h! F9 L: [# V9 U8 X/ w                        newDirection(@);7 W# r5 A& w8 F2 b; Y0 K- c) g
                        @.HasOrder := true;$ L8 L6 d6 I4 \# s* f2 I8 u8 q4 g
                end;
( `- I! N0 Z$ m  f0 ]        end;3 [( {' N- k8 s# l8 H4 t0 H
end;        -- of the method
% H" `  `- k$ l9 m2 m; o9 O* E
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 - {5 e0 A: a9 Q4 Y" N: ]( \

+ B9 c* B, c& C9 Q$ ~  H这是AGV_putin中arrive的method。8 Q: Q: f/ [4 L8 r7 `7 p

" r3 }9 b1 ?* O7 o& H0 s; W7 u8 @6 C当到达物料速度越高时,这个报警更多,
/ Y) r4 ?, |: u+ [# _5 P: B可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。/ \; f, d  R7 w2 U
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
; {: ]4 \" ]5 I; h
; A; r, p" K0 p% q1 [另外一个小建议,就是move,所有的move都可以这样
% T+ v: D7 _8 [: {1 ?: aif not move() then debug end0 t5 Q1 ?- d* t" ~3 L/ e- u7 K' L
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。( Y$ K/ d2 B8 I% B. r. X% B
plant simulation中的free libraries有AGV模板,
9 Q0 W0 Z5 ^/ g2 V5 A; o里面也有案例。. C9 l; i* E, {) ?4 w, n' i
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
. W2 n/ c. U, O) @+ B3 c8 M3 Z% t+ F, j1 V7 x" q# @
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 * D: B9 x& S& u2 I/ z( J% D- ^
1 Y( ^1 Y' a# g
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ' A3 U" O- D9 X' J+ r( ?" H  ^
这是AGV_putin中arrive的method。/ \" h& o6 R8 g! S- e4 [/ C8 G- p) d* x

; X) o/ x+ ~  l/ w2 ]8 j当到达物料速度越高时,这个报警更多,
, ~& U2 _% l1 F/ W3 y/ l
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-13 17:57 , Processed in 0.040336 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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