设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6962|回复: 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'
& N; \3 f4 G  C*/, L" j( ^% d1 H! `0 f- f6 v4 Y; L
is
8 d' y6 F( y- [1 F        part, GlobalDistObj, assignLObj:object;row,Lan:integer;" d6 R- X" ?6 [5 f* q
do3 x4 N. m2 k( L; Q5 `/ x4 T
        Lan := rootfolder.Internal.Tools.AOLlanguage;
% x$ [' C1 r; J4 V$ v5 k  D6 B        if current = @.Destination -- else return; ^1 w: P( S& k1 J3 m3 v
        then
0 a8 R- L- |. c9 [, [                @.Destination := void;3 F6 ?0 i: r. b3 V
                if @.occupied then- Q; g) ?- a% I# L( i) J
                        part := @.cont;
/ {) P' O$ f9 g" f# b                        @.transpOrder := void;/ t) `4 ?1 f$ q$ j4 P
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
. Q  A, }3 Y2 c! c4 T8 z' a- L8 h* f                                @,root.eventcontroller.simTime);
6 ]1 z9 q- b* e- D& T7 y- e                        @.HasOrder := false;
* `1 c6 n% Q0 v. J: L3 N7 @- }% |                        @.DrivingHome := true;
6 o9 }* r5 v0 Q% O# s( P                        rgManager.tryToStartTransOrder;' r6 E/ Z; O1 L5 `
                        if @.Destination = void
3 E* d& f! p& o1 b' r5 }                        then -- no transport order for vehicle @3 w5 f% p6 o) R+ |0 O
                                @.Destination :=
# |  u5 B" h2 j4 \" M3 J3 A                                rgManager.nearestFreeStation(@,track.~);7 ^  z6 ]4 ~7 b2 T* F
                                newDirection(@);   
4 r9 ~3 q# @% S+ z2 f* I                                if @.Destination /= void then! e/ Z7 [4 R" d. L6 N) B& _
                                        @.Destination.NumReservation :=
: r4 c6 h- v1 s5 j% {. b                                        @.Destination.NumReservation + 1;, Y5 ]2 j0 Y# O1 \0 R6 m
                                end;& d! s/ F) T- o% L9 I: l, j# J  g. j
                                @.CurrIcon := "drivingHome";- P4 H- g0 [! i) r
                                @.DrivingHome := true;/ L8 o; H$ q  z; e+ Q
                        end;
/ j+ N- \) x7 g, f8 y8 R+ w                else -- the vehicle @ is empty, both vehicle and part are in the same dock station# @- X0 e$ z1 G: ]
                        part := @.transpOrder;: K) X6 ]# l+ j; W5 W# K0 V
                        part.move(@);-- load part
3 i2 u! g( j- ~                        @.CurrIcon := "load";' z" c, s" C" y6 J; D( Y* `
                        GlobalDistObj := part.globDestination;
8 L' K0 s3 n7 V: J- B$ A                        assignLObj := rgmanager.rgAssignL;
- Q0 i# }" N+ X) d- Z- c                        row := assignLObj.getRowNo(GlobalDistObj);
% z- g& @& ~" O# A                        if Row = -1 then -- since 70" p$ v& m% {  O" B8 i. t/ d' O# S
                                if lan=1 then6 u( {$ s+ P; D  `1 o' S
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
5 v' E# f+ b; K                                                to_str("in der Andockstation: \"",?.~.name,"\""));5 B0 g3 }4 s) K& x
                                else
% u' ?. _% ?0 F$ C/ W: ]                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),& z  I2 J$ O5 [+ ~3 n6 o4 a! e
                                                to_str("in docking station: \"",?.~.name,"\""));                                2 r$ M1 H. R) J) o$ b; O: V+ E
                                end;$ H5 F! }( w( Z( I
                        else, Q5 b7 N8 o# I" G, `
                                @.Destination := assignLObj[1,row];
6 K7 c+ `4 M$ B0 t                        end;                       
" s/ ^' ^; I/ |1 j( G                        newDirection(@);
2 ^4 T2 ^1 l3 Y9 o- R                        @.HasOrder := true;
* c! U6 k8 {- e; ^                end;
% k: e3 U% N- b& o        end;4 j* W3 d( c; G( n" j8 B* n) C" q# Y
end;        -- of the method# I% ]. r1 \0 }2 G9 O! l2 N/ T' L
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
3 q) f0 n: d) g
" C5 |+ k' j: s- I9 t' l- c这是AGV_putin中arrive的method。
( F$ A1 w6 U2 j, d. J1 ^( w
6 B  ?, `8 S: h( ~' B' Q  i/ e当到达物料速度越高时,这个报警更多,
( L0 m# k  f$ X2 I/ P可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。1 t" R- r: j6 p1 V
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?2 Q- @% V3 i( n$ y# c

6 b- R' b$ [# V; X2 B7 H另外一个小建议,就是move,所有的move都可以这样9 a1 `) [6 p: I/ E% w
if not move() then debug end3 i9 Z* ^* K1 n1 s7 O8 G  h4 ~2 o
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。- n: g* n- p& C% D8 D1 _( `/ o
plant simulation中的free libraries有AGV模板,! Q6 L5 s3 [- Q6 ~( i1 [1 A8 H8 S
里面也有案例。7 P' V0 \3 X2 T% k5 j0 ~
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
# @3 x  w% Z6 Z9 j" [, \" H: c0 C" V5 v
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
8 K, q" s6 s# ]4 S0 V& [" ?3 G( q
2 @/ A6 ?" {5 h* i( [# A那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ) P, [7 ?3 L' E2 U: F
这是AGV_putin中arrive的method。
, i4 n8 D; x7 b: Z, R# T, F3 T" \( c
当到达物料速度越高时,这个报警更多,
$ c% x' N* u. b" S9 y: @8 _
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-8 11:57 , Processed in 0.021221 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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