设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8519|回复: 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'
+ [! S2 G/ |# m" E*/2 `$ Y! {6 }9 w( i7 F
is
) T0 _  H3 |1 X7 U) S. K        part, GlobalDistObj, assignLObj:object;row,Lan:integer;! s, t8 w( m) Z
do2 n; [/ g/ H7 e7 `
        Lan := rootfolder.Internal.Tools.AOLlanguage;
6 b" N0 U, B& ]3 T! t        if current = @.Destination -- else return$ h' _: p6 y! b! j7 X
        then
8 g, @" K- t$ ?$ i0 H. M: H                @.Destination := void;
3 t; W+ t6 u$ \                if @.occupied then6 L1 L: J  v4 r% `
                        part := @.cont;
9 q$ v! M; n4 a/ S8 `$ a                        @.transpOrder := void;
! F7 ?% h; A+ n' t1 d: \/ @; r                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,$ T$ U3 U) S* f2 q4 a* a
                                @,root.eventcontroller.simTime);
+ `/ I, H9 t( X, R                        @.HasOrder := false;
* u7 J  `4 W0 x3 `                        @.DrivingHome := true;
6 A1 y- P# K# Q+ l4 k8 e) j+ W) Y6 s                        rgManager.tryToStartTransOrder;
8 K0 l7 x* l# Q$ q" V                        if @.Destination = void
& r8 g% h& _) X- [+ A" f2 E                        then -- no transport order for vehicle @
( {: ^# x! ]) X                                @.Destination :=% D5 b+ C* \4 ^0 c3 ^
                                rgManager.nearestFreeStation(@,track.~);% \7 i# P. Q! T2 _/ M
                                newDirection(@);   9 }' [; [, b2 [0 F7 ^
                                if @.Destination /= void then
* m* f( s' Y+ @1 W; w  [- f6 Z                                        @.Destination.NumReservation :=0 d! h6 k; I( v' ~3 m
                                        @.Destination.NumReservation + 1;
8 t' ?; Q0 o! I) [                                end;
+ E0 a/ Z# l+ A# C; z8 h9 M4 E                                @.CurrIcon := "drivingHome";
2 x8 g& [$ J% d5 P6 D                                @.DrivingHome := true;% t$ f( |- r- h6 S9 p8 I2 k6 s
                        end;7 T" |+ I  I# o6 f7 b2 X
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station, l& `$ Z# x) f9 y# e
                        part := @.transpOrder;
% s! O" E1 u) a& p% I5 P) q- J                        part.move(@);-- load part6 b: X9 l: g. N3 P
                        @.CurrIcon := "load";5 G/ i# h) E# z3 k; w7 G' |& D
                        GlobalDistObj := part.globDestination;, R$ Q1 ]* n3 W. i7 h+ O1 i
                        assignLObj := rgmanager.rgAssignL;) u/ F8 K6 E$ n% ?4 Z
                        row := assignLObj.getRowNo(GlobalDistObj);  m- D5 P6 m$ }
                        if Row = -1 then -- since 70
! e! D# n( `9 c* R5 u6 X  E                                if lan=1 then
) n% c) N! y3 l* o) f# O! Z                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
) w2 P, Z! H2 a7 Q8 W+ N                                                to_str("in der Andockstation: \"",?.~.name,"\""));
4 h: x6 ^( A. O, ^( `( ~( R                                else. l* a5 r- F. x
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
+ A6 [% S6 ^* s* V$ _- Y  _+ k, i                                                to_str("in docking station: \"",?.~.name,"\""));                                2 e. q0 u2 h& V5 O# J2 y
                                end;* H3 e' W/ ~. Z4 n. L4 i& p! F, U( e" O
                        else
, `8 E5 O3 F  g2 S0 _: m                                @.Destination := assignLObj[1,row];$ f' D; [* d% h' l0 s  C) w* w
                        end;                        ) q1 h& a( B, G3 }
                        newDirection(@);3 [& \8 Q3 G: x  B
                        @.HasOrder := true;; f, ~- I9 a, Q; W' d4 K4 b- Z
                end;( k4 f4 ]( ]9 ?6 o" }( X
        end;
1 V1 k  g) x+ C* }1 w+ O9 Pend;        -- of the method  R( d& d9 h! ]. k
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 7 b/ h; Z/ C1 S0 p

* Q! ]0 W" r( p- O6 U7 K这是AGV_putin中arrive的method。7 B) ^! X% r5 c# C1 ?( e1 V
; A, v+ {$ e) I$ q4 F4 w% b, a0 n+ P
当到达物料速度越高时,这个报警更多,
# d7 S! s( l& e# E5 L4 N3 S可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。, C! ?7 a5 s- \
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?7 ?7 K, Y/ W' ^9 J/ i

* v& g6 u  @) |) p+ D& V另外一个小建议,就是move,所有的move都可以这样
  @2 K5 H8 n' d' i' J3 H& ]if not move() then debug end3 H) l  i" K% s! S
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。  o- r1 H8 d2 d; O
plant simulation中的free libraries有AGV模板,3 p- l1 |. L/ Z
里面也有案例。
7 r3 B7 O; W; x我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。) h/ ?  p* E) w# o: `( f/ `
4 T, ^5 v" F. @7 g6 Q
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
, E* P) @& Z+ M0 ]) A. ~
) r" ]2 ^  f( E* P1 @! C8 W那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
/ K1 o' U% X; h2 V7 I- v这是AGV_putin中arrive的method。
% }6 ?; \- Z0 C- i" ?& S: m( j# J0 B1 Y
当到达物料速度越高时,这个报警更多,

5 y5 Z, ^) G: _8 d1 b另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-9 04:13 , Processed in 0.019669 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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