设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6569|回复: 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'; d; U- Y* w; ~
*/
6 C$ N* M" A% J( `9 dis8 b; ?( T# a4 X+ i' ?4 j# Q, X
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;6 L$ f5 H. k$ Q& p9 _  s
do2 \' p. E. Q6 o' f
        Lan := rootfolder.Internal.Tools.AOLlanguage;
: N, N4 _5 t. i. |3 S        if current = @.Destination -- else return- e( F# p/ v# S7 J$ W, M
        then
( C5 {; ^) l' q" A. d  Y4 D5 U9 q                @.Destination := void;
  c9 j' K* a5 |* }% X$ |                if @.occupied then$ x" n1 j- g7 x* M- ?
                        part := @.cont;! r9 @. t. `8 p: y6 @6 p
                        @.transpOrder := void;
$ q: j$ T" ~* X8 @8 \: K                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
* ~/ Q9 z1 g" X* B5 M                                @,root.eventcontroller.simTime);
" ^- ?0 \) O0 s7 F1 b+ N                        @.HasOrder := false;
( E* P2 n! Y9 f                        @.DrivingHome := true;
; {6 R2 R: H+ ~" G. U5 _                        rgManager.tryToStartTransOrder;# n* N$ d% @$ w: T1 s" e
                        if @.Destination = void3 |, }5 P: D4 s$ C- {: |; s, g3 c
                        then -- no transport order for vehicle @
* K# }% c/ k/ T7 a                                @.Destination :=
- p; S0 `/ z+ {7 T2 h                                rgManager.nearestFreeStation(@,track.~);1 S4 c. ^, `( Y) v0 A! [# k: H
                                newDirection(@);   " ]( Q5 S( f: n8 R2 z+ k
                                if @.Destination /= void then5 \) D& S: e/ _0 E; R& L1 ?
                                        @.Destination.NumReservation :=
3 r! ?* V$ m# B( E3 K% n- Y                                        @.Destination.NumReservation + 1;
: D# |! ]$ e* x. I! R, |                                end;( D" F; t* n8 O& J7 i
                                @.CurrIcon := "drivingHome";8 s# ?8 x: {2 o7 l$ H
                                @.DrivingHome := true;2 M1 N- J9 E' A0 V& h# o
                        end;
  }  o* T1 ~1 |7 J, C( p                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
  J* C# B$ C0 T" a                        part := @.transpOrder;
. V) f# V) e. j3 \5 b                        part.move(@);-- load part- c/ j; ^  d. N8 W9 Z( [4 O
                        @.CurrIcon := "load";2 J' l- A1 p9 Y4 q, Q
                        GlobalDistObj := part.globDestination;
8 |3 n4 k+ O9 k1 D1 K. B                        assignLObj := rgmanager.rgAssignL;6 f; t' }+ y' I# x
                        row := assignLObj.getRowNo(GlobalDistObj);
! f& p8 `3 Y- H7 p8 J8 m: \                        if Row = -1 then -- since 70
4 i8 {8 {" }; j  v                                if lan=1 then
& ^% s/ B- V7 Z! y' d                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," ^9 _& [! G. r
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
; [6 M- O. n" ?                                else
. K0 L2 E/ n% c3 l4 P, s( Z7 A                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 D9 q1 O% t- j
                                                to_str("in docking station: \"",?.~.name,"\""));                                / v) H+ G+ L1 S6 J# a
                                end;
. O0 d& Z$ ?0 Q- o( ?( @. h" b                        else4 ]: Q0 w+ I9 f# |. F% ?
                                @.Destination := assignLObj[1,row];. N, |8 k6 I- i9 t9 g3 f
                        end;                        9 X  B8 u. I9 l9 c
                        newDirection(@);+ T* x; V# [" W0 |
                        @.HasOrder := true;/ u5 }4 X5 A. C, c# i4 u: y% p9 k  P0 N
                end;
) H& D6 f1 X- a/ A        end;* ]- c6 q# C/ e' g
end;        -- of the method4 |- |; `1 h9 B6 h( [& N
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 # ^) Z# l. g: k
0 e  |& L7 I. v9 I% _
这是AGV_putin中arrive的method。5 {+ t, f, ]- U; i6 k! k3 l
; v* K2 W9 ]" G2 N# ]) [. V% A0 g; Q" j
当到达物料速度越高时,这个报警更多,
+ `5 |; k$ G' J可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
) h) O. j% g1 z/ M3 s2 d' s  q- [程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?" a! |' D  D6 t6 O0 u7 s# D$ k

" U1 h+ r: m* S! s另外一个小建议,就是move,所有的move都可以这样
- ~6 [5 F% w% f) `$ S, ~( G/ q2 wif not move() then debug end
" O- ]) z  F; b这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。5 h: \7 K: O( E$ ~" ?
plant simulation中的free libraries有AGV模板,# ?5 \8 K0 p' Q
里面也有案例。
  N6 z+ E* e# y/ A% o! C我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。4 a0 y4 V; ?# A! c& {

( v3 Y0 g% |( [6 V3 b) ?9 s" a我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
7 Y- d" V3 g7 u1 f4 ~! w8 Z6 m+ f( E
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 : }4 y* O2 I3 M7 ^
这是AGV_putin中arrive的method。
: T. Z0 s; J: _/ b
5 l" b0 K% `) d! ]! p# c& a8 k当到达物料速度越高时,这个报警更多,
+ L) P# F  f& L. w# k- b! O! g' N
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-13 09:33 , Processed in 0.019041 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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