设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6818|回复: 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'
; n4 |# t7 Q2 n0 g8 Q*/
6 P1 v7 D; q  p8 ?% C6 Q( v* x! Tis
5 ?% K) V5 S3 z/ C: b        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
3 M' D0 m- b' l. @9 C3 m" ^do
4 H" ?/ F1 O8 b4 x# ^1 I; _        Lan := rootfolder.Internal.Tools.AOLlanguage;
; a2 z" w$ E0 T7 C* z% Y% Y" X        if current = @.Destination -- else return9 I4 @8 s& Z5 C4 L4 e
        then/ r3 f  `6 t& ^0 L
                @.Destination := void;
1 g& i2 |+ [5 W4 y8 V                if @.occupied then
- J; j3 k6 b/ [& L                        part := @.cont;
+ \) \% w$ c3 x, W( ]  c! O                        @.transpOrder := void;) G) `  l- ^" C' {3 Q
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
1 _$ d6 u- `, @& ^                                @,root.eventcontroller.simTime);5 n5 k8 X/ [. P
                        @.HasOrder := false;
4 L  ]; `: W& E5 d6 \                        @.DrivingHome := true;
3 L% I& o: s" A& g& X                        rgManager.tryToStartTransOrder;
4 `4 r9 P! L" p                        if @.Destination = void
$ s! U; ]& Q4 {8 Z- ^- O                        then -- no transport order for vehicle @
  G) ^  Q2 l( e3 Q                                @.Destination :=
+ v' J( p1 }0 l( p2 \) f                                rgManager.nearestFreeStation(@,track.~);
# h; A( q% d& h& k$ E+ s                                newDirection(@);   
( D* w% L# `# g7 z- B5 i- l( C+ l. C                                if @.Destination /= void then! E3 l: ~* E) {: {
                                        @.Destination.NumReservation :=
. a3 n3 B3 C2 a: [" }                                        @.Destination.NumReservation + 1;- `& m4 Q7 g, @/ r
                                end;
; N7 Q0 i  |: ^& F/ k8 M                                @.CurrIcon := "drivingHome";+ G& c3 O) V* k, u
                                @.DrivingHome := true;6 G# b8 y* }# z/ v5 b
                        end;
* `/ K) H. ~' Q: k( o7 e                else -- the vehicle @ is empty, both vehicle and part are in the same dock station6 W- E+ t. C- z4 F: l
                        part := @.transpOrder;, ~# X& U" c# K" Y
                        part.move(@);-- load part5 O/ s  C9 {3 V* P! O
                        @.CurrIcon := "load";6 G5 ~' p( v1 t* H2 }
                        GlobalDistObj := part.globDestination;
$ q/ V1 ^+ K4 E' p                        assignLObj := rgmanager.rgAssignL;
) L7 T3 I$ f- Y9 n                        row := assignLObj.getRowNo(GlobalDistObj);6 I  t5 [5 }6 j* h% a" m" T
                        if Row = -1 then -- since 70
, \+ \$ o% o# w6 o5 b                                if lan=1 then
( e/ q6 y1 j9 `( d$ e: T                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& m  S$ j; d3 ?6 j+ j/ b
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
& t# F* O/ f+ ]5 K; u* X                                else6 r( k$ ?, F, v7 {* C
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),1 Q8 E1 s& k' P3 c* b/ t- X* D3 |- U" S
                                                to_str("in docking station: \"",?.~.name,"\""));                                6 Q4 G2 J; }: ]4 H
                                end;
. E# ^8 V) @" j* Q3 U% n+ p                        else* d- v' ]+ L: O/ e3 P
                                @.Destination := assignLObj[1,row];
+ \4 R3 O( B  a1 ~9 i                        end;                       
6 w2 h8 G" `  B# A                        newDirection(@);
/ N) t: j; f1 R" a2 S! _; E                        @.HasOrder := true;
' _; Z& N$ x; @7 k                end;
$ ?  t6 r% Z# G0 I        end;* `3 V& |. `/ n) ?# Z; M- ]
end;        -- of the method
0 r/ @3 \- W& M2 a' T+ B4 ~
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
( K; ~, [0 a0 K* J1 ^& A0 q- a. _4 M- O3 z' r" a% v6 G8 |
这是AGV_putin中arrive的method。$ e7 L$ ~- n( R- x  ?: l* L

! P$ u0 e. [  F3 Z当到达物料速度越高时,这个报警更多,
. x8 ?) ?# U- K2 f5 N可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
% {4 E* I; K% V. s' W程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?  w6 ^+ o# O  m/ Q/ m+ ^# |' l  h

: M0 S- c& o# @. h: K. K. P另外一个小建议,就是move,所有的move都可以这样
5 P4 Q$ [7 x" m/ x7 s! ~if not move() then debug end, [5 r3 G6 V, q# N% X. J0 y; w
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。3 i, p5 x8 n3 J3 l2 ~
plant simulation中的free libraries有AGV模板,
  O$ Q8 j! |4 X5 w( U1 c9 u3 R) o; S' g里面也有案例。
/ Q- p( h: G, s- G' B我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
: E, [5 p5 F( m) E6 V
* y/ J0 [& M$ \0 @* t6 n$ W我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 6 C7 F5 y+ F$ x

. v) |0 f& w1 i8 g那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
& O4 z' u& A. i* A% t: A3 ^) O这是AGV_putin中arrive的method。2 ?( O) h0 y1 @3 e- N5 p
/ j5 V7 h7 b) ]' g
当到达物料速度越高时,这个报警更多,
8 p5 R/ E4 Q+ ^
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-28 10:29 , Processed in 0.018372 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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