设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7879|回复: 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'9 V5 ]( R7 D2 U$ E9 H2 P" d7 O4 I" l( a
*/) U# P* N: B$ i, c
is! c9 a! U0 Z" P4 J6 j" w* ]* e
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ i4 o6 s+ u; a" ^
do
) i0 L& u7 q$ Q; j1 I        Lan := rootfolder.Internal.Tools.AOLlanguage;* L% p6 ?. W( x6 H2 p- Z% @3 F
        if current = @.Destination -- else return9 O0 `1 h) |2 V/ ^# X
        then6 P! F4 a, O, d7 k2 z
                @.Destination := void;/ D  U* e1 O: q3 f4 g
                if @.occupied then
4 ]# [- i( A( o" m3 x! q" x3 P                        part := @.cont;
4 U5 H$ j4 H: G* O+ y2 g" I' w5 W                        @.transpOrder := void;! h5 X! {7 b% _
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,/ F7 \2 A0 h3 l* `( {% l9 o
                                @,root.eventcontroller.simTime);
3 I: L% d9 x5 ^2 y                        @.HasOrder := false;
, _% ~# a  U/ k9 Q* W: Q, P. s                        @.DrivingHome := true;# j! `5 X" u! D
                        rgManager.tryToStartTransOrder;
* ~3 H- Y- [2 X- q0 C                        if @.Destination = void: o/ {) R$ P! @; u( p; j$ F
                        then -- no transport order for vehicle @, f* T* l- K- \5 N5 I
                                @.Destination :=
7 M" F: O) e8 ~: j                                rgManager.nearestFreeStation(@,track.~);$ o0 S5 o- N" @! B) q
                                newDirection(@);   : Z2 e3 ?- ^' M
                                if @.Destination /= void then6 z/ G# E; a: z& d, k
                                        @.Destination.NumReservation :=
6 ?* H2 [7 w1 e; k                                        @.Destination.NumReservation + 1;. ~* W1 n7 r4 \! U# m
                                end;
' _+ K! Z' n% F                                @.CurrIcon := "drivingHome";
) n2 S* K( N) C1 w+ s! G                                @.DrivingHome := true;
1 D9 u8 G! x: G                        end;
) M7 Y+ c/ E. V& Q                else -- the vehicle @ is empty, both vehicle and part are in the same dock station$ p+ i" V) _3 U9 g
                        part := @.transpOrder;; z8 E* |% J9 c6 U
                        part.move(@);-- load part% e, t- @. S3 M% s9 l; f6 U7 M
                        @.CurrIcon := "load";
! U1 M6 X7 Z0 y2 @& c: Y5 z( i2 K! B  H                        GlobalDistObj := part.globDestination;9 p3 T: W* D& l0 r
                        assignLObj := rgmanager.rgAssignL;) T. S# i" x' j) r1 `9 F
                        row := assignLObj.getRowNo(GlobalDistObj);
% d+ F# V. |% ~; k# F0 A9 E                        if Row = -1 then -- since 70  z' t. g: A! L0 a( v
                                if lan=1 then
( ]- t" g& {! k- Q3 ]                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- m' K0 s  J7 |+ C0 c! S
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
8 \$ o  S* T( B3 r/ U6 l' O, x                                else
! i0 n1 R' z7 Z6 l$ z: i                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
  H0 j' c* x& r% y# f                                                to_str("in docking station: \"",?.~.name,"\""));                                7 M" B2 d0 a) h+ a
                                end;
: P# }9 ~3 d- O" s. Z8 R/ b) X( v                        else
( r0 N0 @! f3 f# A                                @.Destination := assignLObj[1,row];9 Z! B( {* l5 M3 W5 J5 i; U
                        end;                        ; o/ r& s: b) f8 J" v2 r2 b
                        newDirection(@);  L0 u4 q8 O: [+ b; d2 D
                        @.HasOrder := true;. s5 x, g& _7 A, {8 A
                end;9 ]8 |+ r7 i) [( t: ]8 i) N$ D4 Z: t
        end;& s5 Z4 P' c( a3 R" J. D1 O
end;        -- of the method3 }: R% z$ X, k# C1 Z( q
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 7 P7 {  ^! g7 p

- _, T; q/ Z# v" J这是AGV_putin中arrive的method。; t0 r: l2 M% ~) f) P" ~3 L5 J- Q% A: H
# \- o. R. h; u5 z% B0 i- q
当到达物料速度越高时,这个报警更多,
0 L) ]9 Q. ^# _. q3 h6 h" I! n可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
" A3 `! h! r6 l( e% s程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
% n* [# b* w3 E" d
* B8 W% `9 S8 ^9 t另外一个小建议,就是move,所有的move都可以这样7 t% O# C8 z6 O
if not move() then debug end
% o! N1 r5 j- t这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。- M. R# K8 t; [* \% c% S) [' `) ~
plant simulation中的free libraries有AGV模板,8 E8 L$ t9 A; E2 H* H, l
里面也有案例。
. x, m6 i$ D' b4 ^( C8 o" U+ R* K9 {我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。: ~) B( P  E  n8 J1 i& N

3 ]' m9 P. q' d1 x* z我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
! m, C% ^* t4 o3 Q, ~
, L' [0 ~" T" t) }& \那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 3 e/ G2 b, d( w9 h
这是AGV_putin中arrive的method。
' Y1 Q/ j8 `" m8 [- `9 s7 E) I$ }
, B" P( B0 a  {7 ]- `# E6 x1 B; O0 Q4 I当到达物料速度越高时,这个报警更多,
+ _! A. f$ K) R* o4 a7 [% g4 s
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-3 03:13 , Processed in 0.021322 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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