设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9137|回复: 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') T; ]! q' U, o7 g9 V4 o0 m0 I
*/5 s* u  i0 c8 \
is3 H/ ~+ p2 B9 C
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 }/ X9 S0 W7 c+ @* J9 b! L4 f" n) Xdo! u( U: h5 ]8 E) g: m3 S1 h
        Lan := rootfolder.Internal.Tools.AOLlanguage;1 q: ~, `$ B, p. s1 O7 e
        if current = @.Destination -- else return
" l4 Z1 X+ h5 E( H+ b1 d+ @7 G! D  K$ @        then2 ?( y8 n4 L. d, w, O) r  S
                @.Destination := void;
5 V. W& r( a+ C2 S- y* v                if @.occupied then, I) f0 Q4 ~2 G9 Q$ `* n7 {
                        part := @.cont;
2 N' R: G/ f( ]                        @.transpOrder := void;; B9 h) Z  M) C
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 W5 L$ k5 t2 i. t' @) W                                @,root.eventcontroller.simTime);6 F% E! n) v' l+ w" J6 K: H
                        @.HasOrder := false;
5 K- P9 a. C; J8 [1 `                        @.DrivingHome := true;
0 Z7 k( M! D" l* O2 A                        rgManager.tryToStartTransOrder;
1 c1 R7 _- M  n5 T                        if @.Destination = void
  t. S* L& w) [* y% Q5 R0 m                        then -- no transport order for vehicle @6 O  I* ~( @9 M1 |% l
                                @.Destination :=( K) c: B. L' L/ S2 X
                                rgManager.nearestFreeStation(@,track.~);6 i" [6 |- c! J: w
                                newDirection(@);   , _( t, f4 k) S
                                if @.Destination /= void then
* N7 W6 s! }2 k9 B                                        @.Destination.NumReservation :=2 G6 Z+ f, f5 N, d8 n
                                        @.Destination.NumReservation + 1;) O' z; P5 ]4 t* U+ H1 O# Z
                                end;( \3 M, R6 r% q
                                @.CurrIcon := "drivingHome";
: r$ N3 T/ d, Y) p                                @.DrivingHome := true;
( {8 K3 Z! \0 L: G8 h$ z; k& ?5 \                        end;  f% K! B' n3 ^" }: m8 V. t
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
8 Q& |# r  L4 r2 V3 e. t5 v4 H                        part := @.transpOrder;" R9 Q% |+ W2 G
                        part.move(@);-- load part
7 M6 T/ E5 a! N8 h  V9 s                        @.CurrIcon := "load";* T: A9 ~  @: x& ]
                        GlobalDistObj := part.globDestination;8 s3 K( _& Q- R  X4 ]2 [
                        assignLObj := rgmanager.rgAssignL;2 c! l$ X7 u' M3 L
                        row := assignLObj.getRowNo(GlobalDistObj);
; F* d, b) M  g/ t+ }/ @5 c                        if Row = -1 then -- since 70
: H$ G3 x8 R8 m: V7 W" P7 r* Y6 ^                                if lan=1 then
6 w8 D. R7 v: Q5 Z                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
) h- R: g! S( y& d! U# _/ o                                                to_str("in der Andockstation: \"",?.~.name,"\""));0 P( l/ L0 g5 [# K; k6 h. I4 h
                                else/ {- X9 C# u) l
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
. K% K6 k! N/ T) H+ \  v  j9 Z' e  A$ d                                                to_str("in docking station: \"",?.~.name,"\""));                                5 H' f% U/ c0 i* p9 ~
                                end;$ x- i1 B0 n& l9 N. G2 h7 I
                        else2 I" L' {. q) L0 t. `6 g0 s
                                @.Destination := assignLObj[1,row];
: \7 u0 D- B8 c3 F3 r5 B  v6 m                        end;                        : q( s+ }8 m6 q5 f6 b4 ?5 F
                        newDirection(@);5 y4 H3 u7 ~/ l7 u( x" B  O! R3 ]/ \
                        @.HasOrder := true;( a& P; a/ l1 j9 P; U- l4 j. _
                end;& ~$ Q$ Y1 S+ q( ?/ F" m/ |
        end;: v1 ]/ s4 Q; P8 r, |
end;        -- of the method
- J4 f, z+ J2 n7 h& s+ |! H
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
) y7 i$ A* \: w6 Y9 A
8 M9 @+ u+ _! w1 s  T7 R8 k, t这是AGV_putin中arrive的method。) I; H% J5 m% J& X9 h
) _" _; {( t# p0 p3 P" F; F4 ^
当到达物料速度越高时,这个报警更多,/ Q7 z1 E) q" F- E9 C1 r6 u
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
8 b$ u% Z, a/ Z9 ~' L' M程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
, o5 f- ~1 B+ A; v- [4 N5 I# v
2 K8 L  g' D8 {- j; K* \7 h另外一个小建议,就是move,所有的move都可以这样
$ C( c: e; U8 U" f2 Aif not move() then debug end
# L  J7 Z& e- T4 l这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
9 I: d6 Y" y6 C6 [plant simulation中的free libraries有AGV模板,: x0 r1 D+ V: B* i- Y/ w& _0 a
里面也有案例。& }! O7 g/ q8 a! T" M7 J( Q
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。$ o1 n0 G- C! T; n# e1 y  f
; Q7 L% Z8 G+ {' s2 o0 I4 W
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 1 U% U1 @* I7 z& a& d/ ]

5 G5 E) x( R/ J* ~2 h+ p/ @1 X那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
) p$ v  ]1 D7 z% p( e" m, [3 J这是AGV_putin中arrive的method。
$ h. s+ ~, E( \( A9 Y  t: M6 z* Q9 Q9 F
当到达物料速度越高时,这个报警更多,

: a' d1 ]/ j1 X4 f/ a另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-16 02:04 , Processed in 0.019097 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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