设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9897|回复: 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'
" ]( M: w' p/ h5 r0 h*/
: {, D4 }( [2 |is
1 c2 Z- E' R( D5 l% J$ t# {! m        part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 N& t: b, ]+ [* K% _
do
; _- E/ J; ]0 x8 a9 K        Lan := rootfolder.Internal.Tools.AOLlanguage;& P) k$ t! q9 D, P- t7 M& W1 o
        if current = @.Destination -- else return- h0 y, m0 W0 O, f0 F
        then
9 [* j- d7 \4 s7 f- B  ]. y" ?6 S                @.Destination := void;
5 z. B% @* v8 A! a: x                if @.occupied then5 y, ~6 h* _$ [* M. _
                        part := @.cont;
% J; q  \: p) _% Y% t                        @.transpOrder := void;$ W' N0 b( ^- L. t# I7 c
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
  U" R/ h% z. @3 e0 r; _                                @,root.eventcontroller.simTime);
0 {' \/ {! u: g! ^6 B# g$ }9 k) u. G: g                        @.HasOrder := false;
0 V+ U2 W: {, h' D9 J! f                        @.DrivingHome := true;  o/ W/ |9 u; l
                        rgManager.tryToStartTransOrder;
2 b- v# K! B/ _# x                        if @.Destination = void4 {0 d  z7 e2 p  @
                        then -- no transport order for vehicle @! `0 e* J9 c" V2 G
                                @.Destination :=( o# Q6 Y+ L, z+ R
                                rgManager.nearestFreeStation(@,track.~);
) R5 A- A0 g7 f( G; g0 j                                newDirection(@);   - h) c: h" _! _' e( g) b9 u* v
                                if @.Destination /= void then, G$ E9 B+ f8 P' L9 y0 k+ A, `
                                        @.Destination.NumReservation :=  X- w8 l. j; ^- H, b
                                        @.Destination.NumReservation + 1;
0 g; f! e- ?7 _& q                                end;, j7 G# H2 T6 D- A0 ~' m* F
                                @.CurrIcon := "drivingHome";
7 v7 ?' k8 p& ^3 M                                @.DrivingHome := true;
6 P7 G3 t- Q* i5 ]' u8 [9 \$ i                        end;
7 y- w2 l% U. P                else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 g4 q" G+ b0 J3 s* p0 E, l: m
                        part := @.transpOrder;
/ e; K$ t, r% ]$ ^6 p                        part.move(@);-- load part
! J' P( x2 ?5 H' f: K6 ^) M                        @.CurrIcon := "load";" a3 Z9 b0 d2 t) G3 a& t
                        GlobalDistObj := part.globDestination;
: t1 ]! b/ l3 }9 a, X1 T                        assignLObj := rgmanager.rgAssignL;
8 S6 Q2 l4 u/ U: C6 ]4 l  {                        row := assignLObj.getRowNo(GlobalDistObj);
" g" T' P5 W( P, P                        if Row = -1 then -- since 70+ R4 P4 F$ k, F" U9 j9 Q
                                if lan=1 then
/ F6 ^7 l7 _  _+ d2 L4 t                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
6 }5 v/ f& N" d                                                to_str("in der Andockstation: \"",?.~.name,"\""));! {$ u# l9 @0 I- l! P; z! j( f
                                else
4 u4 c! n4 v% Z! l                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) ?& i( U- V5 s                                                to_str("in docking station: \"",?.~.name,"\""));                                5 X& D! z+ V  U- k$ O
                                end;* |0 i+ R( X& S: A+ q. F  B7 Q
                        else
/ U7 D1 W* ^9 }; u! m6 S. U                                @.Destination := assignLObj[1,row];( k8 W6 r. F% Q  v& o
                        end;                       
8 o' c8 F6 T  B" ~# V5 m, D* u                        newDirection(@);
5 N  Z( f8 y3 M( ~                        @.HasOrder := true;2 l' u8 o0 e# V& r9 M, b4 X0 H
                end;
5 j. ?. ~8 D3 U: ^        end;( F) F7 R1 S1 ]5 Q  t9 |" ~* N+ b
end;        -- of the method/ o$ R6 z8 s4 m/ }# ~# {9 W
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
3 _. X7 M) f! e- J* [4 S' Y& c$ }( c4 w
这是AGV_putin中arrive的method。
( Q* q' O$ Q0 V/ `
& K5 X0 t& i  r' o0 @5 \当到达物料速度越高时,这个报警更多,
9 h1 {/ b8 d; w6 ^! B# O* y可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。& Z' |6 s& G. Q$ O
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
. E  h, J) ]5 H! p* T( }* P0 X, y+ C" V: v1 `/ k
另外一个小建议,就是move,所有的move都可以这样# @" s. [! f4 r4 e/ x5 g  x( g8 k
if not move() then debug end- j" c  N' ]  d4 _) p
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。1 }0 P9 X- ?% S4 r3 K! E# ^
plant simulation中的free libraries有AGV模板,, x0 n6 S- `5 n4 x4 G3 ~( Y( C6 m
里面也有案例。' k8 ~9 S2 k: z
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
7 F- O9 K6 p. J8 C0 A! Z# A, J0 S+ D$ f7 @
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 ! a. v% S, Z% O" [: |) x

' W- g+ ]' `2 C+ Z* a# [# e( L8 G/ Z那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 3 m4 O( S% R9 O# ~
这是AGV_putin中arrive的method。
0 d; p: Q* S- [- p1 |, B' z' _- [1 g
当到达物料速度越高时,这个报警更多,

# S" I6 W, ~- P7 u6 \4 q另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-9-1 08:24 , Processed in 0.021879 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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