设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6301|回复: 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': j; ^3 M: `3 @- f' C! R
*/
' e: V) `. i- Z9 Q! w# y2 C& Gis
- \2 b( O4 X# l* |        part, GlobalDistObj, assignLObj:object;row,Lan:integer;4 ^9 ^: b9 S$ ^1 [+ @
do
; U: h0 k2 h  D6 v" |        Lan := rootfolder.Internal.Tools.AOLlanguage;
/ }8 F+ X) p9 M3 y7 y) Y$ @9 e        if current = @.Destination -- else return
/ w! B0 V9 o( B8 h) R        then
$ y6 A! b! e  y& Q                @.Destination := void;
2 E) P; X( O: S/ I                if @.occupied then
3 O" \0 f$ H- A) C7 J0 }, F                        part := @.cont;
) D! o6 s( S; q$ I, R                        @.transpOrder := void;& z' o1 n+ m# }0 Z0 u6 N3 e! n8 x, a
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 d7 Y; j4 ?; t1 {" {* a) a                                @,root.eventcontroller.simTime);
6 K, `# `8 A+ i                        @.HasOrder := false;- K. q# b" ?0 [' y" @6 S
                        @.DrivingHome := true;
6 ]( M" y! J- U3 `                        rgManager.tryToStartTransOrder;
2 {3 a+ I9 R7 Z                        if @.Destination = void
) @! M* @, W2 d! w; U5 @                        then -- no transport order for vehicle @- n8 D& ?/ S4 i/ [
                                @.Destination :=1 F/ x) x3 S% _( Q
                                rgManager.nearestFreeStation(@,track.~);/ Q8 ~: \3 B0 [$ U
                                newDirection(@);   6 M- m+ v( O) E: A
                                if @.Destination /= void then7 C  ?" V! K# z4 N
                                        @.Destination.NumReservation :=
6 K$ l( G( B! L                                        @.Destination.NumReservation + 1;
: S! b: J( W+ u6 d                                end;
& w' m! ]) s( }, L4 M+ u3 H; w4 A# `                                @.CurrIcon := "drivingHome";( U& H2 K. I, [9 Q
                                @.DrivingHome := true;8 }, L$ Y* ~3 [; O
                        end;
3 J! m  l8 C* p: ]2 L6 i7 k                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. p' O4 e6 Y& n- _1 |# D& p* \& R' p                        part := @.transpOrder;
( y: |6 o% Y$ B2 c, Z                        part.move(@);-- load part
- K8 y7 y; Q4 n" `* I# ^' ]6 `                        @.CurrIcon := "load";
- y) z5 O0 ?' ]2 }& r. d                        GlobalDistObj := part.globDestination;
" t- ^! d7 X! W1 f* U* u                        assignLObj := rgmanager.rgAssignL;& ~/ b4 [2 s" @/ e2 O+ a% f
                        row := assignLObj.getRowNo(GlobalDistObj);
1 H7 [* s4 ^0 {$ P9 n                        if Row = -1 then -- since 70
- V: q7 Q9 F0 m+ v/ s                                if lan=1 then
' X- H+ m2 F0 H' W' e! Y- }                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
2 f3 @3 z$ W6 ^& F& [# t  X                                                to_str("in der Andockstation: \"",?.~.name,"\""));
! b* d3 x) \* \) v" H: L% a+ d                                else
3 F" G5 Y) I& d: Q' G  Y' F                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),/ T; ~+ k; P* U. |; z  n1 Y4 T
                                                to_str("in docking station: \"",?.~.name,"\""));                               
$ o3 ?; j; B, A) L8 P# q9 B1 I                                end;' M2 F  h% J' F2 W. s
                        else
- g4 P5 i0 R, r" y+ J                                @.Destination := assignLObj[1,row];9 ^4 c" Q" d. A* }+ l! [$ s+ ^
                        end;                       
/ g) i" J9 K& q                        newDirection(@);. t4 d6 D9 l. T2 @0 \! g
                        @.HasOrder := true;
: A" f3 |6 z! m* H7 @% I                end;
4 B4 O7 n: x3 x0 A8 g- q  _$ l        end;
$ ^, _) U/ `8 ]# s5 aend;        -- of the method' b4 X3 D9 X" p7 F# @2 L/ c+ w
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 * S) W; K3 e" J* R! ~

: a; I% A+ X( U, m7 n% T4 c. T2 j这是AGV_putin中arrive的method。
& |( u0 x1 c; W, N, m" C" K" A2 ?6 ]1 m7 w
当到达物料速度越高时,这个报警更多,+ _# f) X3 j' O2 H2 U; k. b
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。  \# V+ y# U- Q( |0 }7 k
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
$ Y: @0 B% t$ v* i  i
; i  x2 Y  l1 _另外一个小建议,就是move,所有的move都可以这样. j2 ^7 d* @) Q% X
if not move() then debug end
# k) h1 |# c% G- T  x这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
4 d& `, g0 C3 ~5 g  x; }: Qplant simulation中的free libraries有AGV模板,
9 J) ~$ Y& @0 S1 q里面也有案例。! B/ ^) d; Y+ R. j4 s' ^
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。; T9 j9 y; H3 w( W2 @
% t& u% i; n$ u* w, n' z7 z/ U1 H
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
. z2 I& b- [/ H' K. }  u6 S7 o/ L8 D% a; S, Y- G: ^8 ^3 o  _; ?- l3 p
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ' n9 t0 E$ t7 c( U; l/ J1 ?
这是AGV_putin中arrive的method。- Q( I: o( u$ ^" \! T! w# r! N( q

* Z8 @4 x6 H7 A2 o5 F  j- v当到达物料速度越高时,这个报警更多,

* ?/ U$ L" L; R& F另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-1-29 16:21 , Processed in 0.018709 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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