设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6606|回复: 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'6 s: {, M) O7 r4 M
*/6 k/ V2 `4 z! ^! P( \2 J# B! y( ?
is
) L8 H# x* e# ]8 i        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
+ }/ C& L. A7 Hdo
6 P9 c- g5 G+ ?% W& Z* O# B$ f        Lan := rootfolder.Internal.Tools.AOLlanguage;
% m" V7 @, r/ S0 ]8 E% y        if current = @.Destination -- else return' E( a' V% f3 V( x4 \2 P
        then
8 a9 b5 Z/ B% b5 r                @.Destination := void;6 f( q- t; W3 a
                if @.occupied then! n# b! S% \5 I
                        part := @.cont;
: K9 t6 v/ }4 F7 B& v* d                        @.transpOrder := void;0 o* @) Q# C6 ]$ ~9 `
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
" r: f% D! I8 u/ q5 q4 u) D2 N, U                                @,root.eventcontroller.simTime);
9 C( \% O  B0 L8 d                        @.HasOrder := false;2 W3 i' b/ J9 ~: B( \
                        @.DrivingHome := true;, P+ @& Y4 F: }' k& t. @2 y0 X3 R
                        rgManager.tryToStartTransOrder;
& a8 P) {+ P" I8 `+ I                        if @.Destination = void
3 g  b9 p: `( k3 F+ x                        then -- no transport order for vehicle @4 A% b; X* g8 \" q* i1 F4 v% R
                                @.Destination :=
( b4 {# I! G$ _# [0 H, R. ]' E+ P5 T                                rgManager.nearestFreeStation(@,track.~);6 E9 z  ~6 U9 c
                                newDirection(@);   8 m/ l, n4 O! Z1 x4 E! `
                                if @.Destination /= void then+ j! V9 f+ h5 x: N
                                        @.Destination.NumReservation :=
  I- q* z6 X, x7 u- Q  }' A+ p                                        @.Destination.NumReservation + 1;# ]$ [# A2 y2 p, g* V6 T
                                end;
$ ~6 _5 M" m6 L                                @.CurrIcon := "drivingHome";
) H8 e5 F2 d) y7 e                                @.DrivingHome := true;8 S" M+ g  z: L2 R/ f% j
                        end;
3 Z' {, M2 ]6 r0 W3 m, Z, i+ Q6 s                else -- the vehicle @ is empty, both vehicle and part are in the same dock station7 L# n) e8 a/ V( R- r
                        part := @.transpOrder;, R- Q" n" L6 [0 b5 k; S
                        part.move(@);-- load part% k% C: V9 K* A! y
                        @.CurrIcon := "load";
+ e7 e4 `3 T9 [' c# }8 e                        GlobalDistObj := part.globDestination;
  s* l) G& d$ i& a( A* D+ y; T                        assignLObj := rgmanager.rgAssignL;$ P( s9 G9 H' ]9 x
                        row := assignLObj.getRowNo(GlobalDistObj);
7 {' h4 O/ c) T/ f; W1 P                        if Row = -1 then -- since 70# Y9 g7 O5 X9 O* j2 G7 A
                                if lan=1 then
  U+ {6 v% B3 J                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),( n5 B  z' A/ g0 n; ?
                                                to_str("in der Andockstation: \"",?.~.name,"\""));" \/ ]0 ~5 a% S- {
                                else
0 E- m! F% u0 Y' Q- ]; j! O" z' W9 s                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 t3 U! f! ~- @1 {" h, d, G( d! E                                                to_str("in docking station: \"",?.~.name,"\""));                               
5 {" H, U0 s% s  e) W3 V+ [4 C: [                                end;
; }5 J8 D  W' C6 s8 v                        else0 Z5 D  C  Z4 U' Q: j  I1 l$ M
                                @.Destination := assignLObj[1,row];
, |" X1 t6 i: z2 g, k) o4 l5 U                        end;                       
- G- H5 h2 U- [+ U6 g$ L" V                        newDirection(@);
# C3 L8 R8 w0 q  O" m7 a                        @.HasOrder := true;4 m+ k+ S- }  _+ h2 Q7 Z
                end;7 o, f5 x( ^$ n6 c% J, C/ ]
        end;
  w! b- i2 S) ]5 a1 aend;        -- of the method4 n6 }- Q% i5 h( W3 n
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 # E0 U* t* G5 ~% p$ J# s

6 Q  E' P4 A9 x1 p这是AGV_putin中arrive的method。0 n& g' }! M% b
6 P' n" P) r7 W% m( {
当到达物料速度越高时,这个报警更多,
( X2 V$ B2 J6 Z) k" ]% Y! I可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
+ {9 b' y! L" `  p/ L6 z( a程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
+ R  `$ w! N( L
% b3 ^3 _/ x( R6 \另外一个小建议,就是move,所有的move都可以这样  g0 n6 ~( P4 A9 S3 l
if not move() then debug end
; Q. T, N. T! k+ ?. ^这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
, y) b% ~/ R$ m- C5 Tplant simulation中的free libraries有AGV模板,
9 v; |9 L' a* ?+ _! }0 L& h, N7 ~$ o里面也有案例。# Q) j  Y8 Z" d0 R5 L$ X
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。' W2 c0 r1 V- \& Q1 L8 ]) W$ t

2 ^% e7 r  P! p7 E- V3 Z: @6 S我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 ' g. U" k- }* }
/ f! o9 |# V% g+ @7 h. Z; i) R$ l0 R
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
! B  ]6 b2 i- d2 [这是AGV_putin中arrive的method。
/ q% D4 M# T7 d6 R) p/ P' t8 @# {1 Z* }+ K* w# B) w
当到达物料速度越高时,这个报警更多,

4 h/ K" p8 `5 ]2 r7 y8 N+ P另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-16 00:08 , Processed in 0.022320 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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