设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8681|回复: 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'7 p5 ^3 \- A+ x$ m) [
*/% U3 d: ?, r5 S
is
4 ]7 a, [" z) p! y9 U+ d        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
& z# x* Y( \7 J4 n3 Z% ndo
4 l  G  [8 Z& J5 C! e; @& e* Y        Lan := rootfolder.Internal.Tools.AOLlanguage;
# Q' Q/ w5 C" Q' M        if current = @.Destination -- else return# b# K1 }% ~. k; K# f2 ~4 Q
        then5 v7 F) j3 }/ a& O1 F% `
                @.Destination := void;' j9 _, m/ z# d" v* q7 f& }+ y
                if @.occupied then
6 ^. G. u0 B3 q5 J. l                        part := @.cont;
8 j9 R$ h7 \& l$ h* E. N                        @.transpOrder := void;9 |% P, l2 Y  r% `% E
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# L- Q( C2 R/ W# Y  W# e
                                @,root.eventcontroller.simTime);
, B7 l2 l: i; e                        @.HasOrder := false;- n) x+ G0 H4 V  Z4 D
                        @.DrivingHome := true;
/ O/ P! o! q* v4 f: f                        rgManager.tryToStartTransOrder;
# o% C) L3 v' H3 g/ R. Y& J                        if @.Destination = void
. _9 B% p/ l5 Q4 {                        then -- no transport order for vehicle @
8 |% ?. G. E+ }. e" Q3 j                                @.Destination :=" {7 G% y6 f& B- n
                                rgManager.nearestFreeStation(@,track.~);
) X+ s2 O% X! X2 E" I! w: I                                newDirection(@);   
( f2 v& K8 O( V" ~( s, I. U                                if @.Destination /= void then5 ~+ ~/ r7 D/ {. _
                                        @.Destination.NumReservation :=
7 ]' i- V& M: d* [" }                                        @.Destination.NumReservation + 1;  S% _9 y2 D0 m# @" D
                                end;
) O: V3 w5 Z5 s2 u2 t9 z' I2 a$ N                                @.CurrIcon := "drivingHome";
9 N% ]& {; L9 n9 n4 o                                @.DrivingHome := true;+ D; m3 `* J$ ^. q6 A8 k! y
                        end;
6 e1 n# Y8 o8 J$ F+ s                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
1 n( l8 g; c$ t9 o/ ]                        part := @.transpOrder;
9 O3 X. \! g; @0 _                        part.move(@);-- load part
+ u5 p4 J4 z) G7 |5 k! Z                        @.CurrIcon := "load";
; F  p0 z) d  L! d- j* P4 z                        GlobalDistObj := part.globDestination;
+ [( V6 |; J8 \2 j                        assignLObj := rgmanager.rgAssignL;" p+ Z  R/ u* I/ ^" w$ P
                        row := assignLObj.getRowNo(GlobalDistObj);
0 ]- T! l3 N9 Z/ P# l, ?2 b0 J( ?                        if Row = -1 then -- since 70# v! ?7 A6 e! w% P6 F9 ~
                                if lan=1 then; Q/ i( h  Z- F8 C0 y4 ]& m3 X
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),  c( {& \1 k. }- |/ K$ f% Z: h! J
                                                to_str("in der Andockstation: \"",?.~.name,"\""));, H! |- Z# ]- ^/ t  q& h
                                else
$ }/ f; n+ s& m! f                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),5 ~  B2 G! c5 l' R0 x/ D
                                                to_str("in docking station: \"",?.~.name,"\""));                                $ Q" Y3 i- c+ S" N1 h4 e: ~
                                end;
+ y8 H# B- ]+ x. l# b                        else
/ o! c+ e! i* ]/ P                                @.Destination := assignLObj[1,row];4 u' l' V& h7 [5 b+ {
                        end;                       
: ?, F; b# Y' |& K: |% f                        newDirection(@);4 n2 p" b9 J' }! R3 g0 w( s
                        @.HasOrder := true;6 W* Q! J6 }# f9 U; V6 x, V5 ~2 Y2 H
                end;
# h+ ^8 H% f4 ]$ Y        end;! `! {, V8 Z( g+ [. ?! w
end;        -- of the method
. w1 R+ a" I: E) _/ J9 P: _
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
7 O, T& C4 q, s- N: Q+ ^& S2 P$ a  B- ^# ?* K
这是AGV_putin中arrive的method。
( s8 {7 y5 [; c& \3 ^$ t- U
) n3 M2 E1 `+ b% K3 e, U" o当到达物料速度越高时,这个报警更多,3 L2 ]6 Z) @" t8 Y$ M" k
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
. h* G/ I& [2 x程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?8 r1 S6 f& ^9 L) Q7 D

* e$ ^8 J: s6 I7 S8 m另外一个小建议,就是move,所有的move都可以这样7 o0 ]! g5 r" X4 X1 Q
if not move() then debug end
+ A6 O, |3 p+ Q( W! ]这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。; l8 c, Z: W  p; C5 X: B3 m2 Y
plant simulation中的free libraries有AGV模板,0 w6 i" c+ n* h& y2 z' D6 i1 m9 C
里面也有案例。
; N: s: t$ j* b! S  l9 z我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
7 e5 f/ G, E0 r) C) i) R
9 C$ @7 Q3 T4 S$ D- i6 U: g# s我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
& w2 Q3 V) I  p% n2 S! ?  I! X
. @+ X1 z) ]  v$ B; i2 p那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 2 O2 L0 n  y2 _% i2 Z. G) b
这是AGV_putin中arrive的method。. P! x+ ^& O1 v' q' s

# C2 ?: t6 q0 j; L: H( t* A当到达物料速度越高时,这个报警更多,

$ B) B. W; t! B8 D1 `3 H$ k另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-20 00:09 , Processed in 0.020920 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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