设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6774|回复: 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'/ y, N6 l7 R0 r
*/" {  D" B& K7 @8 v- L/ v  C6 c- ]9 a
is! T' \  t1 D) v  E7 t
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
  r  z3 K3 E" M& E) z4 m- }1 Mdo
* g* A' F- h9 u+ @9 Z        Lan := rootfolder.Internal.Tools.AOLlanguage;3 S+ K. r3 x* o* U1 v- g) b/ ]$ W
        if current = @.Destination -- else return! y! L: N% i+ B! z# I" K4 I" x8 {9 f
        then
3 Y% m0 l- p" J" i                @.Destination := void;
. R" y; S9 f7 R) R8 z                if @.occupied then9 i4 ^/ I: o1 ^6 G' F) P
                        part := @.cont;0 ~3 F( \1 ?, @, Q' F4 ?
                        @.transpOrder := void;1 K4 ^& f; f2 t
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
2 T/ o7 o1 @: o7 F$ F7 w                                @,root.eventcontroller.simTime);
5 @2 @$ B9 z' U% _3 H                        @.HasOrder := false;
8 e2 v- d4 O' k- i/ ^                        @.DrivingHome := true;
% {2 S5 o/ i) g                        rgManager.tryToStartTransOrder;  ?7 C- Y3 g; m. S. [/ Z
                        if @.Destination = void
0 V- S( @6 e1 k" g6 G                        then -- no transport order for vehicle @! M- m( ?" F3 e; {
                                @.Destination :=6 P; [+ s/ _. ?
                                rgManager.nearestFreeStation(@,track.~);
5 x9 l2 z6 m2 ~, Y; t& U2 [                                newDirection(@);   
# X, G0 e4 W# R+ t* C! Y' ~                                if @.Destination /= void then
' O0 j/ o8 T+ B8 z/ Y( ?  w( U                                        @.Destination.NumReservation :=
" b) M/ ]9 H7 A/ w1 n) x2 z                                        @.Destination.NumReservation + 1;
; K6 L# t. |1 t" q' ^                                end;! V( j0 u# ?8 K! h; H6 T
                                @.CurrIcon := "drivingHome";
4 w/ j+ g& I1 K$ x/ k7 m9 }                                @.DrivingHome := true;
' V; K+ o% D9 ^/ ]6 Y                        end;
+ K: ~8 H, m! K                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
3 I4 B- Z4 n& ?; Q% j                        part := @.transpOrder;% z+ k7 R$ R, V+ r
                        part.move(@);-- load part
3 J* d8 R! m! u6 t2 S+ M                        @.CurrIcon := "load";  u- d! y6 W6 \* W. {; d; z- p
                        GlobalDistObj := part.globDestination;2 K: u: c0 `$ `: m$ P# k# c
                        assignLObj := rgmanager.rgAssignL;
* ^2 ~. y) o( L( \  Q                        row := assignLObj.getRowNo(GlobalDistObj);
$ V0 [& ~* F" P+ @                        if Row = -1 then -- since 70
  b) D6 |* P7 C- n0 h& w                                if lan=1 then' K8 J7 Y4 e- M3 Q/ c
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),' ^- Z5 v" C# \9 {: k
                                                to_str("in der Andockstation: \"",?.~.name,"\""));2 O4 w  ~" @3 q3 L  o
                                else
; [# @- Y  O) v* p1 F1 Q                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
3 ~1 g; V0 W; ]$ k$ Y7 l+ v2 c                                                to_str("in docking station: \"",?.~.name,"\""));                                7 ?- _, m: }8 u) t" Y- R' m
                                end;
5 D  W! c. T# }" }4 q                        else
1 Y7 N/ d  @" E  S7 \                                @.Destination := assignLObj[1,row];6 _% A. A* p# `5 R2 o3 B6 `3 s
                        end;                          E% b! R! S3 C$ E' D
                        newDirection(@);
9 W# {* p9 K- P( h1 y                        @.HasOrder := true;
5 K0 Q  |, v; c9 V8 R; x                end;: _/ X5 r$ }8 T2 t. Z
        end;+ ^: [: f' c5 I, a8 D( P% f5 }
end;        -- of the method, c. r. L7 l/ e* `2 s8 H
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
$ ?1 C0 Z) {. g; e
7 t9 I, o3 `& N* T$ v+ C' w1 F这是AGV_putin中arrive的method。
" G+ V8 F/ m3 @0 r8 \) {% x- ^3 p' C$ p( ~
当到达物料速度越高时,这个报警更多,
' S( ~& Z0 s. N可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。6 y" E! j4 `  Q/ E
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
& d& q1 R! {; }# N3 h
$ T) E( B1 {$ a另外一个小建议,就是move,所有的move都可以这样
  {. o( Z, b! |& R" V; a! dif not move() then debug end2 V. \! B8 i1 V4 G) k5 H
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。- F: A3 ^; m+ W: U( K" U- a
plant simulation中的free libraries有AGV模板,( L- ~" k+ f$ N# ^0 F
里面也有案例。
( s, u8 m' a5 g$ N我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
/ l6 C5 F0 l( w8 c8 c8 g, l3 D
  ~( E: J& k8 t我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 ! I* z8 A4 W4 G7 y+ q# U9 Y

+ U" R9 s! S& _那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 5 J7 P4 e/ A; T; I
这是AGV_putin中arrive的method。
0 S( Y+ y& i7 H
5 X5 O! K4 Y- `" i当到达物料速度越高时,这个报警更多,
1 Y( x" V8 {. ?% s; f" G
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-25 23:49 , Processed in 0.020152 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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