设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 10177|回复: 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'0 ?! W1 h3 x$ v, z% ?; d9 o6 B
*/. V5 o, r5 n2 m6 ?
is& L1 D1 P+ X4 J" o2 l8 n5 ]
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
$ R* G5 p5 i" S. _' `5 s$ ydo
5 `( V, T+ G  x0 c7 c  K        Lan := rootfolder.Internal.Tools.AOLlanguage;
% ?  Q" I8 I- g        if current = @.Destination -- else return
& ]9 d8 I3 w8 \3 _0 d! s7 h, ~7 Z        then
8 Y- E; s7 o, J, a2 \/ K4 u                @.Destination := void;( X. u7 C% ?5 \7 W! ]" N+ M+ S
                if @.occupied then- ^% W$ f) J8 l9 d3 z+ ~
                        part := @.cont;% c% T* I# L" t, b( n& i
                        @.transpOrder := void;
- D9 ^4 R# k! o# K1 P                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,7 U# ^( p% k, n. L; J
                                @,root.eventcontroller.simTime);
8 h4 k: c3 \/ h( v& ]% w                        @.HasOrder := false;1 Q% F: x' ^. W$ P, Z0 E9 g$ `9 L
                        @.DrivingHome := true;
0 h* Q9 r7 A+ x* O5 E+ [                        rgManager.tryToStartTransOrder;
5 Y, h# a0 }( B( W                        if @.Destination = void: y5 t) b" F) m/ G
                        then -- no transport order for vehicle @. M" f+ [, U9 M8 ]8 O: _
                                @.Destination :=
# x' H# n+ M. h7 J: v6 B                                rgManager.nearestFreeStation(@,track.~);
7 H5 x' H$ a, @5 s# b! [0 u# V                                newDirection(@);   ( Q6 \% ]0 o* U1 H! w
                                if @.Destination /= void then
7 c: V* f, A( a; g, G. d                                        @.Destination.NumReservation :=
1 `& e( S2 w7 K9 T/ }                                        @.Destination.NumReservation + 1;
6 ]! k$ p" ]8 g1 v# w                                end;
8 l% G- A" C: `' U# c                                @.CurrIcon := "drivingHome";
( Y1 [2 N& y* t8 ^) e4 i2 t$ e                                @.DrivingHome := true;, ^) ^( |4 d7 ~" T2 k3 a
                        end;: E2 P" V+ T3 I9 v. Z
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. S1 o$ _4 B' J) P                        part := @.transpOrder;
7 f: Z: K4 S4 t* w1 R                        part.move(@);-- load part
" O0 n  L5 A( Z! E! a; m! T                        @.CurrIcon := "load";. p$ `3 t9 T0 `
                        GlobalDistObj := part.globDestination;+ U3 n& L) b- z* v4 y# ?; H9 e" `$ ]' F
                        assignLObj := rgmanager.rgAssignL;
- V. i- K2 U0 y$ x                        row := assignLObj.getRowNo(GlobalDistObj);
1 Z+ @. j0 j! J  j; O. j4 e8 i" A                        if Row = -1 then -- since 70
4 O( M! L7 Y4 n" u* e3 l4 _1 N                                if lan=1 then
0 n0 ^, p8 U4 [; u                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),, @- M& B5 M( i8 s2 s+ b
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
- m2 [: y9 Q% u6 t7 |6 Z# w" Y                                else
' n: l9 D( o% T5 k                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 Z; p  U+ m$ t3 _( J0 U                                                to_str("in docking station: \"",?.~.name,"\""));                                6 Q8 p( B, \4 d% i1 D
                                end;3 E# }' J& O8 `, j4 p7 S
                        else  b5 d3 z4 Q* p) d! K
                                @.Destination := assignLObj[1,row];! p2 y; f! @2 I: \
                        end;                       
% n! k! O2 \" \) D  u; o7 G) {* o                        newDirection(@);
8 f6 I1 z' V/ g2 X2 w                        @.HasOrder := true;
( ^/ y' T  Q/ f) D  b. E                end;1 X4 [. [7 S+ ^* N# e1 p7 I
        end;
0 L+ u* l! D' R9 C7 g3 dend;        -- of the method/ F, o0 z. m* u* V5 E
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 . X# I: b* Y6 d, H+ m
/ P* v0 d, W$ c' L* s
这是AGV_putin中arrive的method。1 n( W6 l8 u( p+ @. a

: u6 ^' f1 ^' |/ g7 }" R7 r当到达物料速度越高时,这个报警更多,2 O, z+ ^# s! P# F7 z
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。8 r+ w/ b4 z' X& {
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?/ F0 Q" P/ t/ z

( L7 @' M5 v4 C7 |; R另外一个小建议,就是move,所有的move都可以这样. f3 {4 {) e1 x6 k. e1 O
if not move() then debug end9 ?/ |# y0 V# C" k& R
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。. l7 l9 ?% m& F0 t+ i- o
plant simulation中的free libraries有AGV模板,- U. M+ p# Z' a6 x0 X& k
里面也有案例。
0 K( w! N. N4 A2 G& `" I0 \3 V  N我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
# k4 J; ?1 Y$ |- ~2 a; U1 D- v5 b' C$ F
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 & X2 d7 g- `- [

; O5 d2 @. X0 y1 j5 n7 m那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
) ?7 @7 ?! S6 u2 O* G& {这是AGV_putin中arrive的method。; S" h4 h" O' I! w
% F: F  N& A& b- D) L4 J0 G
当到达物料速度越高时,这个报警更多,
) e  K8 ]) A3 Q4 P4 G
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-9-18 12:23 , Processed in 0.017895 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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