设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7773|回复: 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'
" M4 G, m- Q+ L) s! G*/1 b# w- p! ]# p6 u% K! G6 k/ L
is* F# x/ e9 u! {2 K2 c7 }
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
0 s; ^# `& l/ gdo5 T9 ?. C  E7 O7 h& Q
        Lan := rootfolder.Internal.Tools.AOLlanguage;5 L/ A+ }1 F1 }4 h
        if current = @.Destination -- else return
$ R) n# x' l$ `+ n4 K+ l        then
4 N. @/ F9 f4 J/ _7 [  v                @.Destination := void;( d; Y) R; t) n9 u
                if @.occupied then
7 @; C9 C) z8 ~                        part := @.cont;( f2 d5 O0 L# j1 a( z
                        @.transpOrder := void;
" ^& N4 p5 K7 m) R                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 n. ~$ O' f0 A& T' E! w0 y
                                @,root.eventcontroller.simTime);) l% n* L4 B  p( z
                        @.HasOrder := false;% Y- r5 ?* S0 l% M
                        @.DrivingHome := true;
9 a4 n, ?* H. C& l+ Q                        rgManager.tryToStartTransOrder;  x4 I  d' c4 w* E$ x2 P& e
                        if @.Destination = void
. @: q/ O1 s4 y% B4 z                        then -- no transport order for vehicle @% r5 T) I' K+ R8 K: ^
                                @.Destination :=
; ~, S; T3 q  L" \7 W* D: q& @                                rgManager.nearestFreeStation(@,track.~);6 i: q6 U8 w8 x$ k
                                newDirection(@);   9 `$ a" w. @" F2 w& N2 s
                                if @.Destination /= void then( x3 J5 d' g0 ~) C
                                        @.Destination.NumReservation :=$ a; n, \  X2 F9 B. X" k7 f
                                        @.Destination.NumReservation + 1;
0 x" l, Z7 f2 a3 q) a- d1 ]# R                                end;6 k- |1 C) r0 v" C; A
                                @.CurrIcon := "drivingHome";6 m' |. Q5 E9 ?1 y
                                @.DrivingHome := true;  B; B! @% L: e/ i  A, e+ S
                        end;
1 X5 n9 `) {% o+ @                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
! g: t# M- c0 a, @                        part := @.transpOrder;
+ l8 i$ r0 D% C3 E# p8 K                        part.move(@);-- load part4 O& F6 X- G. n8 e$ w
                        @.CurrIcon := "load";) \# @% O% _  K+ P; ]
                        GlobalDistObj := part.globDestination;9 m1 k( U  R$ L
                        assignLObj := rgmanager.rgAssignL;
3 D0 V3 m6 I. b4 g/ e* i* ^                        row := assignLObj.getRowNo(GlobalDistObj);
6 B% _1 U# b! X1 S: `                        if Row = -1 then -- since 70( c0 e! x% W  Z1 P- j( O- h3 h' C
                                if lan=1 then
, Q; |. ~) w' O( d  K                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),! v& `* n9 ]' k' ~7 a
                                                to_str("in der Andockstation: \"",?.~.name,"\""));7 @6 J9 x+ E0 S4 D7 M8 R* V
                                else' `" k' O7 K& @3 X4 k, s
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 L" L, e) j5 O  W                                                to_str("in docking station: \"",?.~.name,"\""));                                1 k/ r. `1 b4 c) N* f# v
                                end;
2 x! a; ^- Z( A6 {% t& Z                        else% f$ h  c' k# P2 s4 l
                                @.Destination := assignLObj[1,row];# s/ ]+ n/ @( H0 m, S
                        end;                        5 G2 `. }' e2 k2 X
                        newDirection(@);
3 `! b3 I1 ]  |( q, Z                        @.HasOrder := true;
4 K' d. Z, w* W: u5 E/ p' y! @                end;+ N, A1 g+ M! _
        end;
0 G/ S- u( H% L8 R# J. j* ~end;        -- of the method
+ U6 m2 s: f3 {" a
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑   a$ g  o% c* w; b7 |

" n6 K; L4 a! z# c# }# ]这是AGV_putin中arrive的method。
# r. q- V0 S/ R
5 X! g/ ~% @0 m5 b, X8 p7 u- U7 X$ Q当到达物料速度越高时,这个报警更多,( B1 _7 k8 U- j! w" x3 R
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
- T9 M/ T* T3 x& v/ ]5 D程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
/ i5 H0 l  ]/ o( f9 T  a$ U. w$ _, `* A. P0 X3 _. U* Q0 z
另外一个小建议,就是move,所有的move都可以这样8 d- K. b! _) p, U
if not move() then debug end
7 H2 o+ b' A0 M& V这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
/ J4 l. m+ I" R9 Jplant simulation中的free libraries有AGV模板,
) e2 G6 c% S3 ~( _3 u& T里面也有案例。+ {1 e/ i/ t5 e( D/ X0 K
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
1 @+ m2 K1 Y; Q! M
4 r8 h. z6 G# j7 p8 q我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 / U' Q8 F+ H( h3 S7 S* a" `1 U+ C

8 e' ?( j6 R; Y+ i) O那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 0 v2 U! a1 o% W. r
这是AGV_putin中arrive的method。1 U( G4 o+ Y8 Q- {
4 t! p. T5 q$ O. z! P
当到达物料速度越高时,这个报警更多,

. Z$ o$ w! x) S0 R8 O/ Z另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-28 19:39 , Processed in 0.023150 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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