设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 10021|回复: 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'( n* ~1 e7 \$ Z
*/
; [5 M6 ^3 t& @- a" w& g8 kis
: q9 V) ~- e4 o* ]        part, GlobalDistObj, assignLObj:object;row,Lan:integer;7 ]# u( E0 l8 ^: w  W
do$ J. a7 \  V* V5 Z
        Lan := rootfolder.Internal.Tools.AOLlanguage;
8 H- n! n  M- G( \% L) H        if current = @.Destination -- else return7 Z8 R3 o1 m; y
        then; e8 V: i! @- _! P$ P
                @.Destination := void;$ J6 Q4 r9 {/ S7 P  {% D+ e6 F
                if @.occupied then
8 [( ~: f* w4 T                        part := @.cont;# c" o; W. z5 p8 _
                        @.transpOrder := void;
5 y( E! ^" ]' {: W7 B6 }" Y                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,; }1 |/ `# {: O5 G
                                @,root.eventcontroller.simTime);  I' n5 o7 w7 d: x9 J
                        @.HasOrder := false;
# ?! S1 j1 J* a0 l4 n, b0 i                        @.DrivingHome := true;) @: ?6 h' t1 p, a( @
                        rgManager.tryToStartTransOrder;
( s  e4 z* A+ P1 x                        if @.Destination = void
4 c: [6 ]' E' _* {                        then -- no transport order for vehicle @8 a$ D; v; W5 j" D, [
                                @.Destination :=
3 H9 i- s& {0 J2 L! M                                rgManager.nearestFreeStation(@,track.~);+ n6 B$ E1 Z! c8 M7 B  z! {
                                newDirection(@);   4 R1 }5 [% a. I- D$ |
                                if @.Destination /= void then+ a* B, C5 p+ M: c& O( F. o. l
                                        @.Destination.NumReservation :=
" \' J8 ~$ K0 I6 P8 B                                        @.Destination.NumReservation + 1;
1 R& d9 }6 \* g/ H9 \* m; k                                end;! G8 H9 S: V, i; k8 `
                                @.CurrIcon := "drivingHome";( I7 a, l2 Z/ B7 t
                                @.DrivingHome := true;
" m* U) H3 N* j6 U  F                        end;
' b6 X5 C$ \% |6 h4 e                else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 H. z. m0 F  c4 V8 c9 Y
                        part := @.transpOrder;
5 _5 |3 X# C1 {                        part.move(@);-- load part
6 {' N4 Y4 S0 Y6 C                        @.CurrIcon := "load";5 o5 L. u( a0 Q
                        GlobalDistObj := part.globDestination;# q( G+ Z+ d; b# a
                        assignLObj := rgmanager.rgAssignL;
! b% n4 V& d& X3 b                        row := assignLObj.getRowNo(GlobalDistObj);
$ J$ g8 _# S: m- V' v                        if Row = -1 then -- since 703 y( `! C% D; E& v
                                if lan=1 then
- B! F0 _+ E. }* p# n& @" }) U                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
  w" K& D& |/ {+ H. P$ c                                                to_str("in der Andockstation: \"",?.~.name,"\""));2 |, C% {  e+ M, ^
                                else
9 q" V- c1 z, j9 {/ s                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
& _3 ~* D/ e1 E6 D2 F                                                to_str("in docking station: \"",?.~.name,"\""));                               
1 O2 K1 i( N& b* B8 g                                end;
6 j* L& ?1 K& b( }1 ?. o+ n$ ^                        else, W0 F# R$ s! h* K& |" y! g- a
                                @.Destination := assignLObj[1,row];
/ V* Z$ `0 B( l0 s. o- w                        end;                        9 H' e$ Y& |7 l! x* K( }) h
                        newDirection(@);
1 c* z! b2 D+ [9 r" c& w                        @.HasOrder := true;7 D3 o: J1 T" M8 P0 r' u8 C' z
                end;! A* O7 {+ H+ S6 @
        end;
5 e0 H; ]: g9 @% U' ]9 \6 o9 oend;        -- of the method2 k- |2 D5 W3 @5 p" P( C: D% {
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 . x1 L$ R* I& C3 M0 t
0 [5 s7 U6 a8 D2 K+ D( ^
这是AGV_putin中arrive的method。
5 m0 z9 W) b8 b2 x3 }  C" z. U  {1 X
当到达物料速度越高时,这个报警更多,; R2 a1 ~% R; c
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。  P6 i; O7 q! L( r
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?  A' J$ v- L  Z

$ \* p7 ~, K) w* Q' O& G! }8 N另外一个小建议,就是move,所有的move都可以这样) H! _+ ]# [9 I& C( U( N1 k
if not move() then debug end+ y5 U) [' p2 G( y, F
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。! A+ u3 b# V  D' l+ Y+ [- b( \
plant simulation中的free libraries有AGV模板,5 f) T% }6 ?' ]" J8 ]
里面也有案例。
! v! P0 T) c  B& @3 {+ {* [- q我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。1 s+ d1 m! W. x% @( S1 S
9 `* Q" R8 ]0 K' d' \% l" J
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
3 }( i; }: A5 |# r7 q9 ?" v/ V! v0 J( i) q/ H2 N* A- C6 g
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
( h/ a! Y+ [0 R$ G% c  G8 E这是AGV_putin中arrive的method。
$ c; B- ^7 q1 G8 x. ~% R8 _8 A  @
当到达物料速度越高时,这个报警更多,

) x5 W" i! o2 h# Z, Z另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-9-8 01:35 , Processed in 0.018254 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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