设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5800|回复: 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'
3 L! W9 x4 s3 x* x*/  x6 u- c9 }) `5 t. b  K
is( p* W' D$ [1 {
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
9 K( \0 e9 U0 W+ {% i/ s! T2 u6 m8 cdo, i4 F" k& W# f
        Lan := rootfolder.Internal.Tools.AOLlanguage;6 C( W! }3 v& s# F
        if current = @.Destination -- else return
/ Y- \% e) v" ~1 v0 C        then
7 M- P7 d- L+ O. U1 J3 D                @.Destination := void;* ^& J+ F$ h, H, F: D
                if @.occupied then! \5 c# w1 j9 W5 A5 ?" C
                        part := @.cont;/ N& t2 Z) p- `9 |4 g% T: q$ ]
                        @.transpOrder := void;
% `( z+ U+ v5 a" l" O# Y                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
8 I2 ^" G  {- n" n4 D                                @,root.eventcontroller.simTime);6 `* A. {( A# L7 x1 o  D2 m
                        @.HasOrder := false;' E& C( [4 Q$ {  ?5 X: A
                        @.DrivingHome := true;
) A+ X4 v, A: r' z# o3 h                        rgManager.tryToStartTransOrder;4 Y) q+ ^8 h/ c* a- d2 V+ P
                        if @.Destination = void
% h$ v) i& t- x. l- I                        then -- no transport order for vehicle @
$ |& x; X! l% E& k3 y0 k# I! N+ z, o2 m                                @.Destination :=
) Z3 L+ s$ W1 |7 Y* l+ S  M                                rgManager.nearestFreeStation(@,track.~);
0 R( W, G. P/ `+ g; H                                newDirection(@);   
* s. x0 f% D. u( P                                if @.Destination /= void then
0 u# b$ ~  f% w, S) o                                        @.Destination.NumReservation :=  B3 a0 o- ^% N1 m' u
                                        @.Destination.NumReservation + 1;
# C* |6 g  f; S+ M                                end;% j; a. A( t; g+ p! K. O
                                @.CurrIcon := "drivingHome";( o- f6 c8 g% C$ o  L
                                @.DrivingHome := true;- u1 J8 R6 y' D; A. S: u
                        end;
+ |: p* U$ _; n" g, w# L) f                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
0 [' d& A9 i! s& Z                        part := @.transpOrder;
" z9 D/ F3 t( X4 ?# P& W                        part.move(@);-- load part
' M" {# n+ J7 {* _* ?/ A                        @.CurrIcon := "load";, ]0 f& S; t- J- P2 `
                        GlobalDistObj := part.globDestination;
$ C& k+ `- [! [% l- c8 o                        assignLObj := rgmanager.rgAssignL;. O) h& @: W" Q" o7 P
                        row := assignLObj.getRowNo(GlobalDistObj);6 G. n; w0 s9 }! C' k: H
                        if Row = -1 then -- since 70& F2 `. A( r9 B0 \/ V$ X
                                if lan=1 then0 A0 Y% Q0 P) U+ g: O% v
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
. j7 _0 o. g" M& `7 P  s5 q9 X                                                to_str("in der Andockstation: \"",?.~.name,"\""));+ u8 O. k' C6 m
                                else
7 }+ ~# E/ g* {- n% k7 g                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),9 C, x. K+ l! r4 H5 b  `/ K7 a2 [0 V
                                                to_str("in docking station: \"",?.~.name,"\""));                               
/ q: B% m1 b$ C5 H9 B+ {. C" u* K: h                                end;* h4 D0 @6 w, \  n) ]+ Y
                        else/ C) C$ O) L8 K7 p# k
                                @.Destination := assignLObj[1,row];& X, D( E: V9 i6 l/ c
                        end;                       
0 s+ Y/ Q% V9 D( n                        newDirection(@);8 v) I( }+ i3 Z" J
                        @.HasOrder := true;5 D4 k* ~# {( b: c
                end;# M# c/ |3 U; x3 R1 a
        end;  U8 B# w/ ~6 N) p7 c0 L
end;        -- of the method
. x' {; c; m6 ^) ?7 s+ k5 s
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
2 R1 _. H. ]# O  `- s3 ^$ p  u% I, A
这是AGV_putin中arrive的method。0 o" L& Y- H, y5 X
( K5 U6 F  N) g  ^
当到达物料速度越高时,这个报警更多,
$ B" x; M+ u9 `8 a/ U  ^2 [" K- E可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。3 b5 u; ~8 y  e# Q. N! G
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
& l# Z$ n. }; [$ ]+ u; B; N; ~
2 G0 z) f" A) p5 H- U! c+ O0 j另外一个小建议,就是move,所有的move都可以这样
/ I# a" ]- |; ~8 L! D& w/ I6 M- Gif not move() then debug end
% W0 v7 F2 L7 Z* V2 d  d这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
/ v) A% ]' W8 T. u$ X' ^plant simulation中的free libraries有AGV模板,
0 `& |9 s- Z/ f, [1 f里面也有案例。
1 C' n8 `9 h, _- J" L- d我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。% T3 F6 g! [: U3 _6 ~) V8 B

+ r- \; m+ ]' F( ]我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
8 |7 k9 z/ e! m4 r
& {- f3 V' D+ b7 S* U: G那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
: B# K) J' V  X" G0 i这是AGV_putin中arrive的method。3 d1 ?) j% I4 N

: _6 T+ Y! T$ y2 d( G* }+ ~2 g当到达物料速度越高时,这个报警更多,

; h" V7 X, P$ _. @$ k另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-12-21 18:45 , Processed in 7.713830 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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