设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9715|回复: 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'
! V' o2 A, q2 ]7 x  x*/
& b- C# l7 v% g- Q' fis* W+ C; k& p2 Z" q" \
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
: Y: r$ r$ W' kdo
- q7 n5 e6 H( k% M$ s        Lan := rootfolder.Internal.Tools.AOLlanguage;
  c% r* h6 a4 \' b: t# F        if current = @.Destination -- else return
  @) D0 E& |9 }8 A- M2 ?        then+ Z, w2 [# Q% m
                @.Destination := void;  a+ l4 T9 l. x; \8 _6 X* n
                if @.occupied then
$ w, k: ]0 ]) O7 D/ S0 ?( I3 t) K                        part := @.cont;# _& {6 [  k. Y- i/ H- k! e& u8 \
                        @.transpOrder := void;, L" _: d+ d* H; i
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
' G  a# n1 U$ X& @                                @,root.eventcontroller.simTime);; r! \9 F% q% C- I0 m
                        @.HasOrder := false;; m. H0 K7 e* k! w6 C  J+ o
                        @.DrivingHome := true;
! P- D8 W/ W4 T/ D  r                        rgManager.tryToStartTransOrder;: d7 ]+ m! v$ p- D
                        if @.Destination = void4 r( c$ ?! ?, O2 P
                        then -- no transport order for vehicle @5 l) C# I6 g0 f8 K5 u  M: j8 d3 n
                                @.Destination :=( s& H: t* v, i  ~/ ^
                                rgManager.nearestFreeStation(@,track.~);
; [/ N$ ^0 U3 W' [+ ^+ ]# b! A' e' W( \                                newDirection(@);   / E% H" A* U; ~+ U
                                if @.Destination /= void then
8 e- D6 a6 V4 p+ ~$ Y                                        @.Destination.NumReservation :=
% u4 B" F( ^* e, l* c7 |* c                                        @.Destination.NumReservation + 1;
) ^! }; G7 \  V! ~- T' S6 Q                                end;
, R# P) r. e  `7 i                                @.CurrIcon := "drivingHome";
9 R! W+ V) L; T6 c; X                                @.DrivingHome := true;6 y3 g. P! q6 ^0 T
                        end;, S3 ^' q) x7 X
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
* o/ c' b' C& f                        part := @.transpOrder;
2 S- m! [: d, h* U+ e4 ?                        part.move(@);-- load part$ h; M  M! @1 c- L7 `! d0 c
                        @.CurrIcon := "load";( B+ {( q) D) l* E6 }' z6 w' n
                        GlobalDistObj := part.globDestination;
$ ~' R; X* |* Q9 w+ B* D- W0 o/ L                        assignLObj := rgmanager.rgAssignL;
% p: C. x9 v* `0 |+ i3 H; J                        row := assignLObj.getRowNo(GlobalDistObj);
  E1 r  d0 {' c                        if Row = -1 then -- since 70
4 n+ H3 @$ ^" B# x                                if lan=1 then, ?# H) O" W# e: w  q9 n$ s0 g
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),8 S' {' j* W+ J9 K
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
1 i6 ^9 p/ H: q$ r1 r+ L                                else
+ A4 B/ _& i1 c  X8 g                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),  t8 z; O& Y; @2 k1 g+ P" k
                                                to_str("in docking station: \"",?.~.name,"\""));                                / L% U, x6 N& L! _; [
                                end;7 c4 Q' S  L5 u! ^5 p
                        else! K# ?* I9 _( q& a
                                @.Destination := assignLObj[1,row];/ J; L2 d- V6 Y! G9 B3 V7 a( S
                        end;                        ; h* a# u! ]6 X+ j4 e
                        newDirection(@);
3 i4 U1 }- `3 X2 _. e                        @.HasOrder := true;) R! ]) \( ^, P7 G
                end;7 b5 @% ?/ w0 e- E4 M
        end;6 W( ~# Z3 c3 `7 x9 J6 b
end;        -- of the method9 ]! E% x* |7 p1 A" B
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 5 F* r3 _% n7 E* P+ E4 p" k

5 u& \; F# w, F- x0 X/ \# R8 ~这是AGV_putin中arrive的method。$ R3 T/ d" U# C* j  j

4 s! N9 E' w' h; Q3 V/ k0 \当到达物料速度越高时,这个报警更多,0 I& @% ?: _5 ~# S+ G
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
; R1 `1 _% ?9 c$ L. I程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
% S' i( `: D# {& ~3 x5 V4 f$ s' _5 F' _; ]( Y4 B
另外一个小建议,就是move,所有的move都可以这样
4 Y( I& n0 i& E5 ^if not move() then debug end
8 k. P/ J. l7 c" j$ E: V+ @这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。% |2 N' h! I1 [  `) }* }
plant simulation中的free libraries有AGV模板,
' r0 a" {$ L5 q+ t1 x里面也有案例。  U6 ?- m  k/ f( x- Q, Y' p/ w1 h9 V
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
- _% a  W+ s3 T7 A3 ~) y( N2 l/ A' {
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
: O1 j! P/ x9 x* Y, q1 z
! d) r: ^' ]1 e; S那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
( ~% D- [' I( y& h! _这是AGV_putin中arrive的method。
0 b% }7 d# K* [  K4 g1 J; K- _  p7 S4 X0 d* Y, g1 l( n' y; n
当到达物料速度越高时,这个报警更多,

2 N8 M+ S9 ~6 I+ `另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-8-20 00:50 , Processed in 0.020020 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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