设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8537|回复: 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'  @* Q  ]5 B( @9 W; z* P+ L6 c0 G# L# {! J
*/
, @" `6 ]* r2 k) T" {is
' o- a! T, U" n3 \, H        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
: S% L% Y; j" T! ]0 K* w% Ydo
5 T& E3 O- U1 L6 s: D) a4 V) h% C        Lan := rootfolder.Internal.Tools.AOLlanguage;
  f7 |' W8 F( X/ I! M        if current = @.Destination -- else return
% {' ?8 D- c1 b  o; m- n+ K        then+ ]7 x' K# F6 E0 h
                @.Destination := void;* w/ k8 b/ J* a! ~
                if @.occupied then
/ H# H; f. v! w  U. b1 }: K                        part := @.cont;4 @3 t. @% _5 G
                        @.transpOrder := void;" L  y4 o2 |7 e- l( k1 }8 L
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," |+ C) J' [3 _5 y$ i/ [6 `
                                @,root.eventcontroller.simTime);# t# z. v9 T4 Z
                        @.HasOrder := false;
7 c4 s1 E- z. `  Y; g7 c+ {4 D. v3 a1 I                        @.DrivingHome := true;1 i/ M7 ^% s* R% O6 t: U4 f
                        rgManager.tryToStartTransOrder;
$ `# |6 H" U3 v& [                        if @.Destination = void
  ^* D3 I  C7 e: L- ]& ]: Z7 |# X                        then -- no transport order for vehicle @) u( U1 \/ p- y  J
                                @.Destination :=. T5 r, W7 R# B& W. E1 ]# B
                                rgManager.nearestFreeStation(@,track.~);
% T) I: m5 g+ J, e4 T6 `; y                                newDirection(@);   
0 G) S: e" J: S5 a0 |& w* x                                if @.Destination /= void then
% l2 b3 e; B6 u                                        @.Destination.NumReservation :=3 H+ H, w# G" o) r- D
                                        @.Destination.NumReservation + 1;
+ }0 ?1 u( ~* i+ z! `" ?, f4 L                                end;
) {) t8 @# t* N1 m7 A                                @.CurrIcon := "drivingHome";
* r+ `% N! U% m# y4 {& [                                @.DrivingHome := true;
+ U. M8 D. v& i; V: z) J: J* `                        end;
! v7 U" ^2 E9 m+ s/ o8 ?+ y                else -- the vehicle @ is empty, both vehicle and part are in the same dock station( h) S& F$ _" k6 p- S9 y6 [
                        part := @.transpOrder;( S6 r  r1 o( K0 G- y  `/ y5 F( w
                        part.move(@);-- load part
" |3 W9 f9 s2 m* {4 p                        @.CurrIcon := "load";5 d  g' v- @5 W2 C2 Q' e
                        GlobalDistObj := part.globDestination;
- H' d6 B. ?8 \8 o: M& a' d: {+ G                        assignLObj := rgmanager.rgAssignL;/ \0 P- A, ~, C2 s3 {& ]4 W
                        row := assignLObj.getRowNo(GlobalDistObj);
0 V5 Y2 b- f4 M7 {5 _7 J' N- }                        if Row = -1 then -- since 70
) t$ @$ d* S, h; y, g                                if lan=1 then
" ~3 y+ I# x; t                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- ]1 P7 g6 z& S  B% g7 _: ]                                                to_str("in der Andockstation: \"",?.~.name,"\""));
2 A+ F0 X) f" z7 |( l( J                                else
( g% G' A3 ~6 I4 |3 A; x                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),9 {# I* C( b" O
                                                to_str("in docking station: \"",?.~.name,"\""));                               
+ V- C; s  [3 S* o/ h                                end;
; ?& ]9 h3 X- q  _1 S1 O/ K! d& a                        else2 V! g6 M  h4 T* Y+ D+ o
                                @.Destination := assignLObj[1,row];& ]2 p, ]3 v: l& n0 \7 ]8 Q
                        end;                        9 g, G/ R1 w$ G8 r* L! \5 z5 m
                        newDirection(@);  e  d: s, K: B+ H, ~( H% ?' |2 H
                        @.HasOrder := true;/ l3 l' V: u" V8 ?; a+ c
                end;
! H& I8 `3 _4 C, f' _6 j        end;
% N# l6 K4 }8 U* I' Aend;        -- of the method
: P) X8 M8 z( I
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 - z! Z8 `4 N9 N6 X

  m* M- h: r4 i这是AGV_putin中arrive的method。8 \- w( |8 Q& v) |8 V% i

8 k. Y  O$ L! l3 C' o. n当到达物料速度越高时,这个报警更多,
; _9 v) R$ w3 @8 w: {2 A可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。. N1 M  Q4 f0 W3 a9 u" E7 }
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?& N0 e# K6 i$ E1 w4 X# R/ L- v. H

2 N" V) l! d5 X; A% W7 J% p7 E另外一个小建议,就是move,所有的move都可以这样# N+ m/ F0 A' `$ ]8 r" h9 h  |
if not move() then debug end
+ J) E7 l. n; ?8 M这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
% ]: |, P9 m; p) Wplant simulation中的free libraries有AGV模板,
9 P0 h1 J& Z& V; z$ p. k; m里面也有案例。
: p2 M' h  G4 k8 {6 Z' \5 h我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
+ D- M+ l) P5 `# u. O, ~& k# Z. d4 H0 H9 V
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
4 u; i1 T1 q7 T* ?
: H& q, z1 x- z, p- a4 z那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
4 p- n# `4 ]6 v( }% g& L这是AGV_putin中arrive的method。. Z  B; ]; R! c
8 B# N" Q' Y$ M7 x0 T% T6 c
当到达物料速度越高时,这个报警更多,

' }1 k$ _9 G3 q3 h) O8 S另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-9 21:20 , Processed in 0.017301 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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