设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9670|回复: 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'
" z0 y$ \, ?. _9 x; J0 P3 q*/
5 ^" ]% o% C+ j  g2 ]- [is7 y7 Q( O' v* ^. Y6 Q& i& _
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
; V+ _% k4 {! `! I+ Rdo
, r0 m" d0 |2 u" w% V        Lan := rootfolder.Internal.Tools.AOLlanguage;
% W& M/ h1 Q) I; G! k        if current = @.Destination -- else return
" r* h  ^7 V' @9 X4 ]  t, v3 s        then
9 y7 b0 V' X0 ?                @.Destination := void;5 L( X1 G: t3 K
                if @.occupied then! S. r/ f& i" C0 I# v; X% y
                        part := @.cont;
; k. d  M4 V, M                        @.transpOrder := void;# z5 @. E8 @% `7 e% }9 g; P
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,2 E3 a& s" A; a# u3 e! Y
                                @,root.eventcontroller.simTime);. [% c  [6 @! b' u  z, K
                        @.HasOrder := false;' v. I- H. k% n* N3 _: t
                        @.DrivingHome := true;
$ e7 `7 B/ {: g' u- v; o                        rgManager.tryToStartTransOrder;
+ l, B" T1 Z" [                        if @.Destination = void
9 d( ~$ n, }4 E9 V2 @                        then -- no transport order for vehicle @
9 {( u6 @8 G1 `                                @.Destination :=
1 B5 }" Y  m- J  t5 o                                rgManager.nearestFreeStation(@,track.~);
1 h: e  I) \9 `! Q! X" b                                newDirection(@);   / r  `) }8 K# p
                                if @.Destination /= void then
; ?# d/ \; g: `7 ~. q- I3 p                                        @.Destination.NumReservation :=
" M5 l4 T( V  I                                        @.Destination.NumReservation + 1;0 q: S2 F# [9 ~' ]4 f, @! ^8 ~
                                end;
$ S9 m! D5 _- O$ b- s+ ~$ j( s                                @.CurrIcon := "drivingHome";
7 |. `, u) L9 K% Z" X! W: s                                @.DrivingHome := true;
# H: _2 q, L! q& ?                        end;
. @) ^- x* t( i4 m3 Y& v                else -- the vehicle @ is empty, both vehicle and part are in the same dock station9 K# x6 `. }: c+ i% {
                        part := @.transpOrder;6 }  i8 ?0 {  ~' Z% M
                        part.move(@);-- load part4 {+ q) `1 r1 N9 t& o
                        @.CurrIcon := "load";0 k; h3 h/ }. [, _2 M5 C
                        GlobalDistObj := part.globDestination;
, U+ M  K  j" h9 n+ g" m3 P                        assignLObj := rgmanager.rgAssignL;
& ^9 ]$ N* k- r+ t+ d! r0 j# N3 Y                        row := assignLObj.getRowNo(GlobalDistObj);
# m' w3 {' ]7 t( A  U+ W                        if Row = -1 then -- since 70# F& R1 c7 \3 j/ s& D" ]- `
                                if lan=1 then
) d- \- r" a& P2 o3 z9 n9 g1 L                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),4 w8 S7 r" Q6 _, Z/ A
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
& A3 d+ p& t* z8 B8 P3 S1 G) }                                else
. L1 W! J6 D6 k! I                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),0 u: X: p: n( q; E
                                                to_str("in docking station: \"",?.~.name,"\""));                               
/ o" ~  a2 e' V8 p! q+ G  `0 Q: |                                end;$ c* z: \8 e  S! k0 z
                        else- g8 l  K0 K( y" q+ N. q
                                @.Destination := assignLObj[1,row];& a0 R; c$ V8 I! {/ o5 {- k
                        end;                       
; V4 j" L: j9 B% S/ I/ u7 [                        newDirection(@);
# y- I- d- L( x                        @.HasOrder := true;! ?2 a/ n$ v2 k1 ^7 M% N
                end;
$ }5 d8 X1 f# o; G6 I        end;
/ F3 A8 m# U. v6 e0 ?end;        -- of the method; ~: T  p8 }" |6 h( V7 p6 g2 _  ~' F
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
1 l; N$ L/ i# k4 y' Q( t2 K, A1 E# i; P) x) h4 C- ]
这是AGV_putin中arrive的method。
5 P7 d2 a* ?3 `% ]+ K4 [4 {- `: [" V1 B( @' _! }
当到达物料速度越高时,这个报警更多,# ]; T1 `/ l0 y( m$ @4 F5 y
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。* H. Q. @; p/ |" b' ?
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?, S; r$ {& l) N: h; g9 W

& {  l1 Z8 M) [另外一个小建议,就是move,所有的move都可以这样% g% T3 h" J, g
if not move() then debug end* N! n/ o$ h6 \
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
4 \9 w& B# c( A5 |plant simulation中的free libraries有AGV模板,
+ j6 O; }' ~1 B, y9 l$ J里面也有案例。, B9 F$ k  O- E, E) k; \
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。( P" K" m. K2 g+ C3 l

7 v' `5 [- D, y: s( \: k2 L. d我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 . V/ i* ]) k7 t
5 i. t( h. o7 i/ _0 X) v0 M( U
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
& n; k& G0 h& V: o这是AGV_putin中arrive的method。/ N# o* u4 \1 y* T

7 w4 B. h$ F/ O. f/ p# Y1 F当到达物料速度越高时,这个报警更多,
; t" C5 B* j* r- |9 u
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-8-16 04:11 , Processed in 0.017354 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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