设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9304|回复: 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'
- X; Y9 l" i; P! I4 {9 B' h  U% w*/2 K/ ?- O+ y4 T6 l/ I
is
$ ~# }4 d6 D5 l- `5 r        part, GlobalDistObj, assignLObj:object;row,Lan:integer;% Q8 Y! p. I) |/ k8 X3 T
do+ U3 z& K' o  Q; W9 V2 S0 t/ f
        Lan := rootfolder.Internal.Tools.AOLlanguage;
+ h8 u% D0 ]( r        if current = @.Destination -- else return
0 a$ n. K5 [  y! @# ^        then! X' b' J, X  N3 D' p; i- l
                @.Destination := void;) C" t" t6 A2 a$ D
                if @.occupied then
) m* F* e# m6 I; l                        part := @.cont;# u3 V" [& V) H% T) F  _; ?
                        @.transpOrder := void;
( Z3 N+ }4 \7 K& A* y% |1 D                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,$ H$ B$ K7 @# I8 F
                                @,root.eventcontroller.simTime);
! K* p3 }# W3 t0 Q1 ?                        @.HasOrder := false;9 {. L1 L2 A% b+ l9 W( a
                        @.DrivingHome := true;
1 w/ l7 g$ ^+ G% z* M                        rgManager.tryToStartTransOrder;
$ w$ {0 R5 U( T9 a1 e. I  C5 y                        if @.Destination = void9 [" U& ^0 |2 v5 b
                        then -- no transport order for vehicle @- I3 u6 q; i# l3 u1 O
                                @.Destination :=  C$ r0 T# w" v% S
                                rgManager.nearestFreeStation(@,track.~);
! i# t7 I/ c+ g6 g5 g0 ?                                newDirection(@);   
5 x8 K' [7 x4 |                                if @.Destination /= void then
8 R6 [% A! Y& |* i: i) f                                        @.Destination.NumReservation :=9 R2 H5 m1 b! u' V) G
                                        @.Destination.NumReservation + 1;
& ~# g$ A3 B" S. J5 l# W# R& j                                end;% ^& ~' p& {8 ?$ t  ]
                                @.CurrIcon := "drivingHome";
1 S, ^$ ^, l4 }+ x                                @.DrivingHome := true;2 c+ t4 T# G3 v6 T
                        end;
. U6 i; C. |) O                else -- the vehicle @ is empty, both vehicle and part are in the same dock station& p  K1 s! E3 B8 o- v
                        part := @.transpOrder;
5 Y% \4 I- B; g% S( ?9 J; S0 \6 l& m                        part.move(@);-- load part! i+ ?: I8 `8 O9 Q7 U' K( a( @. {
                        @.CurrIcon := "load";% O3 F5 Y* Z; e2 p
                        GlobalDistObj := part.globDestination;
. p$ Z! o! K5 f8 B+ |                        assignLObj := rgmanager.rgAssignL;
! ~5 P9 @+ L0 a$ }6 c* F                        row := assignLObj.getRowNo(GlobalDistObj);
, h# b, X! n7 I  a" @                        if Row = -1 then -- since 70! z. m8 U4 H" }3 d; `' M
                                if lan=1 then) N1 V9 L8 a- l& L& H- P
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 b; m/ R5 G* e; K  p" L9 ~  X7 p                                                to_str("in der Andockstation: \"",?.~.name,"\""));
4 K) j5 f9 e8 j, G' V" J                                else# {5 p1 I* M9 }  T) R! J3 V
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),6 _$ s& T# q9 f+ B9 }7 x. U6 A
                                                to_str("in docking station: \"",?.~.name,"\""));                               
) f, H9 X, M& n6 t6 Q$ i' |* P                                end;" O0 n+ s3 p' D! t7 o9 I+ V  p' |
                        else
/ K3 @6 A* Q8 b                                @.Destination := assignLObj[1,row];  u* b# J5 ]0 Z" z9 q7 ], B! r
                        end;                       
& q6 V9 l" G  \, ?% s1 B                        newDirection(@);
# z* X2 f1 A4 I% |: T) X" T0 \. H                        @.HasOrder := true;
) ]% f$ W  m" b# e, p0 C8 x9 s                end;* S3 i. i& Q: r' o" q
        end;
2 a- f# c* }1 @3 _- Hend;        -- of the method
) D- z6 B& l5 P+ W. D9 b4 A( R1 q
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 # ~3 X8 M" z* B
" B  ~2 m' c0 F2 }& K
这是AGV_putin中arrive的method。
6 _& `- P5 V3 t4 J' Z! ]. h( N* C1 R& V  t0 K1 _; z
当到达物料速度越高时,这个报警更多,  y& x* p, y" q4 b3 C6 u6 l
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。# C' y- v: S' o1 z
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
+ E+ Q9 s: J! g* k. }) P) u! C0 M& F6 b1 D  {3 b& m5 \
另外一个小建议,就是move,所有的move都可以这样
$ S! C9 d" C5 M" N* E0 M( S$ e7 iif not move() then debug end
3 z/ B: i4 r/ W8 K+ J3 j; ^1 R* ?- ?' z+ ~这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。, k" f3 U8 D5 [: {4 L- a
plant simulation中的free libraries有AGV模板,
- {8 a5 b; M$ j" R; K! z& E/ _! G里面也有案例。. O( m$ q% f! V0 K
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。6 b6 x  b5 p( p2 F0 K9 E

# r  C* n$ f, C我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 & ~* E/ }3 _% R. `
, x7 ~- B2 m* r, S5 G
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 * T% w2 Z. I3 \7 N5 M
这是AGV_putin中arrive的method。
/ G. U/ f9 B2 N4 j* r
7 Z' y9 X" X5 z' {- T当到达物料速度越高时,这个报警更多,

" R# w0 U  p( V; f3 P% I另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-24 05:50 , Processed in 0.022955 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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