设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9794|回复: 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'
1 [7 b& j; E* V* M% V$ M*/
6 h1 N7 r( c/ d4 ois
0 w0 x' h# |* p5 E        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ i& p! ?, x, z4 M: \do
7 K* z; v# U* V, t, o        Lan := rootfolder.Internal.Tools.AOLlanguage;8 k* l" \5 t. D  h+ T1 w( ^2 H
        if current = @.Destination -- else return! @+ B$ g, T- U+ p9 }1 q
        then
0 [! F5 \3 a! H7 w" p8 S                @.Destination := void;: [  Y/ V% U8 Y' w4 `
                if @.occupied then9 m# {: @2 N) R: [. i  f) Q
                        part := @.cont;
* O( s5 q# V* m7 b. [: J3 P% J                        @.transpOrder := void;! V. Z( t3 [( ^$ c/ k4 h
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: w7 A3 w' H$ k
                                @,root.eventcontroller.simTime);
' L( i4 q: {/ L" p                        @.HasOrder := false;( q& u! `; {% k0 |* e
                        @.DrivingHome := true;
2 p. ~# g, k3 W' w                        rgManager.tryToStartTransOrder;  F1 m% J4 W1 P1 b8 B) R1 q
                        if @.Destination = void
* k1 Q! t5 u* x3 Z1 X& s7 I7 Q                        then -- no transport order for vehicle @
2 b) k6 h& r8 ]3 \; b                                @.Destination :=& o6 @" L1 \: `. g4 ^
                                rgManager.nearestFreeStation(@,track.~);
: a# R5 w/ y) S& @                                newDirection(@);   / H7 E3 Z; c' Y
                                if @.Destination /= void then- b4 S  f( D3 l, l% j+ ]; A4 I; l* X
                                        @.Destination.NumReservation :=
( \7 Y+ U. c, y+ {4 [                                        @.Destination.NumReservation + 1;$ L4 \$ y% F9 |# k- l  U
                                end;
# g3 k2 D% }+ U- [6 s6 i                                @.CurrIcon := "drivingHome";9 y" T2 q- T& S1 y7 f9 o4 F
                                @.DrivingHome := true;8 r+ W0 c, N& {/ u2 a- R+ z
                        end;
  A, ]# Q2 N1 F1 N+ I: o. _+ E                else -- the vehicle @ is empty, both vehicle and part are in the same dock station) o& F, [- C0 k5 o+ e, ~
                        part := @.transpOrder;
* h+ z0 k7 m+ D9 M* I                        part.move(@);-- load part
8 l3 U& I) y; Z% M4 X                        @.CurrIcon := "load";2 l7 ?) v. I3 u; x8 z7 F
                        GlobalDistObj := part.globDestination;
( B9 Z1 F! n4 ^, s                        assignLObj := rgmanager.rgAssignL;
! a9 m7 k; }) f  L5 L+ q+ h                        row := assignLObj.getRowNo(GlobalDistObj);6 S9 e  o+ A4 s) i2 P1 A
                        if Row = -1 then -- since 702 o" a5 r1 ~3 j' X) l
                                if lan=1 then7 p0 A$ m" w: T
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),3 _/ w: N0 U( [& v1 k
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
$ z7 g% V; T; g/ T- y, ?2 u                                else
9 c& F) Z7 g. {2 U/ a                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
" R  C5 C4 e5 t                                                to_str("in docking station: \"",?.~.name,"\""));                                6 v  k  V) f% j4 N" {
                                end;
8 q$ p/ S8 z; v9 j0 T                        else0 K- l. j+ B8 x/ v* E
                                @.Destination := assignLObj[1,row];4 w( E" H, [9 P- O$ o
                        end;                        & O! S% }, R! `" I  A' C+ l: m6 R
                        newDirection(@);6 x- W; i2 f% t) t6 Q- O( O
                        @.HasOrder := true;
3 w7 d2 x( Q* C# p                end;$ l/ t  p6 m- i( k3 G+ C' `0 ]
        end;0 l  [( |" c, a; ?4 u; R0 \. ]
end;        -- of the method
0 c# ~! _/ s5 ~
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
$ V# H2 F" C* Q8 r& K
. ]" J. r- p: K$ H5 Z( N8 p( S这是AGV_putin中arrive的method。
4 R! l8 E* e5 w: T  |( r0 }, q# u$ _- d- K
当到达物料速度越高时,这个报警更多,
: P, ~/ A- m; d: F可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
6 P+ @  N( Z. j' m程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
! ]' k+ F+ ^& C
7 b3 ?9 M, T/ v3 d. y% a另外一个小建议,就是move,所有的move都可以这样
  y; p" y' Y3 p+ p' U' |* e; Oif not move() then debug end
9 a: c5 U/ L& ?5 V5 |6 o这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
% K1 J% U6 X, bplant simulation中的free libraries有AGV模板,
; E3 @/ i  a  h1 @里面也有案例。% V" t. ]9 x% t0 t. R3 S
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
8 U- {' D! O! c8 v. v/ e+ ]" W) u
! f$ Z& O$ N6 ~  f. c我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
4 D' q, T/ l! _  K: y( n" p* \% m4 ^4 H; R
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 # b. q  U$ x8 q$ C
这是AGV_putin中arrive的method。, }+ [) ~# ]% g$ _4 F) N0 ?
/ ]5 V* j2 W7 g5 |% g2 B1 \
当到达物料速度越高时,这个报警更多,
+ b% g4 H* A! ^4 z0 j8 g7 S1 Y+ Z" i
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-8-25 14:38 , Processed in 0.025163 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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