设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9145|回复: 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'8 ]1 A! V6 s# `7 G) s
*/4 m3 m& Q8 n/ l% {1 G
is  e. W$ s2 Q; L+ p
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ m( k" ^) H4 @4 }
do
5 g; W' Q! t* a        Lan := rootfolder.Internal.Tools.AOLlanguage;
5 A; |: J- m2 w) V4 L+ s        if current = @.Destination -- else return2 f+ U7 \7 {. E% J$ A0 t! u9 B" N5 M
        then% L  @0 s; L3 G" Y* c, n
                @.Destination := void;
/ X; {: K+ B0 H# j$ f6 D  ]                if @.occupied then# r0 |0 B8 n. M- w
                        part := @.cont;
9 u: p) j4 P- e, _) O" m) a                        @.transpOrder := void;0 x$ k) |; y1 _! K1 `! q
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," M4 x( ?, u$ W) A/ Z
                                @,root.eventcontroller.simTime);
& s* X! z0 @& ^+ V6 d                        @.HasOrder := false;0 F# R3 I% b! S5 y; T
                        @.DrivingHome := true;4 p: {6 P4 Q! w0 e. d8 K9 X, r
                        rgManager.tryToStartTransOrder;0 O2 m6 |& X3 e/ |; Q
                        if @.Destination = void
' [9 P9 I# d8 u1 e! t& S                        then -- no transport order for vehicle @1 g% e$ o( K# Q/ m7 V0 E4 E
                                @.Destination :=
3 w4 G8 V+ a0 |  n                                rgManager.nearestFreeStation(@,track.~);
% A+ j9 q& r2 C+ h0 o- r! w+ G+ K                                newDirection(@);   
7 O* Z) K6 t5 H( q6 v6 h                                if @.Destination /= void then
) g  A7 l: a+ A: t2 h/ O) J3 T                                        @.Destination.NumReservation :=4 y9 s3 p; u" @* A& U  _
                                        @.Destination.NumReservation + 1;* X; q, G8 t! y4 ~: z/ }$ p8 X
                                end;" I0 v% H! I6 z+ Q! n
                                @.CurrIcon := "drivingHome";
1 a" X! y6 Y0 U                                @.DrivingHome := true;
: M) z  [. I# f' t3 t+ W                        end;
/ N: s4 m$ P& `4 T6 E                else -- the vehicle @ is empty, both vehicle and part are in the same dock station- F# M5 L5 I" q. C: w
                        part := @.transpOrder;
4 Z# ~; i/ @: v+ R* a. A                        part.move(@);-- load part4 ]  s2 F# _3 Z% M6 `7 i
                        @.CurrIcon := "load";
' j4 J* ]; M5 L8 p; @; V! p% G! x                        GlobalDistObj := part.globDestination;
0 `- I7 B9 n% k3 b" |* z                        assignLObj := rgmanager.rgAssignL;) K& e9 {  h+ {, O; Z& Y# h
                        row := assignLObj.getRowNo(GlobalDistObj);
0 q6 a/ h) N7 e$ |% t0 o2 x                        if Row = -1 then -- since 70/ H  e; U0 i& @2 j( h3 S" \! ?# t% T
                                if lan=1 then# c/ f9 d$ ]5 Q
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& L3 d7 a7 w( ^6 e7 x/ N' G7 v
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
' d, i: H# v8 v6 ~6 b                                else
6 ?' U7 n) D: V! a                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; H8 t/ G. T7 V* p% A
                                                to_str("in docking station: \"",?.~.name,"\""));                                ( M9 g+ l: `. w" e+ ~
                                end;1 C3 y& Q1 d6 F" [2 d% j" m" F8 P
                        else
1 ^3 |# n6 _  N                                @.Destination := assignLObj[1,row];2 W' R# F/ y. s0 ]4 F4 @
                        end;                        : t- I8 `" R8 M. G3 H2 x9 o
                        newDirection(@);
" Y+ K' r3 d5 S, ]+ {                        @.HasOrder := true;
# a% P) z+ |' x) U, J* u& X9 [                end;
% @+ H9 b/ s% M1 c        end;4 @2 N/ a3 B9 ?" D& X1 D. G
end;        -- of the method
; Z3 Q& H& _0 J, `6 ]' q$ Y
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
' K, t6 I6 |  i" w  U* J7 S9 u( {
1 Q# k  y8 ]4 [这是AGV_putin中arrive的method。
0 J; l+ N& K* [7 ~$ G, P, y
( M( H1 ~$ x7 Q1 n当到达物料速度越高时,这个报警更多,0 z& n% n! }! h
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
' u1 X' @( W9 b" ^# f程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?7 q5 v, [0 G8 g  ]
3 l* b( w6 o" w% P; p
另外一个小建议,就是move,所有的move都可以这样, ~6 B( p6 l0 j8 {
if not move() then debug end
" w. p9 {0 k6 n/ M这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。/ y3 q9 O3 q8 n. o# C( S: w
plant simulation中的free libraries有AGV模板,
4 i1 d6 j5 `: Y+ C里面也有案例。3 e% c0 f4 p( i0 z
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
; }( m& I/ U# j. \  ]1 R1 Z. ^1 x& Y, p+ ^, d, x& s) F
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
1 m9 s% H; E0 @3 P6 j. t& ?3 c8 `, a9 h
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
$ Y5 _8 _  a  W7 i这是AGV_putin中arrive的method。
$ Y3 _( N: j- ]; C
- T" W+ `# P1 z+ ^7 L* Z4 K当到达物料速度越高时,这个报警更多,
: ~3 j5 b/ P6 s
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-16 15:18 , Processed in 0.016014 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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