设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7226|回复: 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'
. s7 ?3 N4 {- |( u1 P9 y% w; V*/& f1 j" H* J, n7 D7 U/ G. m
is1 p' v, }8 Z/ A) g1 _+ A* D3 e) f. @
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;9 S1 b. Y! K2 Z9 x( j
do
- \: x8 Z' P: y- [% R        Lan := rootfolder.Internal.Tools.AOLlanguage;/ ~1 k) |( D5 {5 g9 E6 b, Q5 }. E
        if current = @.Destination -- else return
& H" R; S4 `5 }4 x3 E        then
4 W0 L3 W& k' X$ V                @.Destination := void;
+ R, E+ H7 \3 r1 u                if @.occupied then
) f- O5 g  R1 [                        part := @.cont;% Y/ d. Q0 q  ]+ `& @
                        @.transpOrder := void;
. k+ H7 W( ?) X& I                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# c. @7 ~2 E* |' ?0 S
                                @,root.eventcontroller.simTime);5 \- O6 ^6 }' u2 v+ b
                        @.HasOrder := false;4 v6 a* X  t( L
                        @.DrivingHome := true;9 c( L! g5 r0 W7 I% ^
                        rgManager.tryToStartTransOrder;
% Y$ x1 t2 h/ X5 h5 K; ~                        if @.Destination = void
+ i6 B. l4 _5 Q                        then -- no transport order for vehicle @8 u; z5 f" Z' t
                                @.Destination :=
% g: ]. M! n7 ^* }                                rgManager.nearestFreeStation(@,track.~);( U, t' V" o/ ]- Z4 ]
                                newDirection(@);   
& i9 A# d+ c3 q                                if @.Destination /= void then
( ~4 B" d2 k4 J& M8 `8 g+ ^                                        @.Destination.NumReservation :=
& v7 A4 o! i1 w5 l! E7 g                                        @.Destination.NumReservation + 1;  z  @( E: ^7 ]6 l* M
                                end;/ K6 Z8 x7 D1 d2 ^8 z9 y) K
                                @.CurrIcon := "drivingHome";
' b$ ?, |+ H% Y- C/ g: \& y                                @.DrivingHome := true;
$ v4 o/ t+ N5 o9 x4 q6 L                        end;
- @1 j( n1 Z, Z! G                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% J: ^, i7 Q* Q! Q* @1 E                        part := @.transpOrder;+ M8 b* w$ O. k8 M- u
                        part.move(@);-- load part: A/ m: ]' ?. h3 J7 s& }6 k+ F
                        @.CurrIcon := "load";0 W1 q+ M  s/ y9 B1 a4 `: Y  u
                        GlobalDistObj := part.globDestination;
6 |9 M$ N8 J/ f                        assignLObj := rgmanager.rgAssignL;
0 u6 B+ s& J2 O. }* H                        row := assignLObj.getRowNo(GlobalDistObj);9 L! i3 x3 J; w, |) d
                        if Row = -1 then -- since 70* E1 h: }) s) G
                                if lan=1 then
' y2 f7 S: E* c; @/ ^" x  ~; d9 Q                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),! r0 P# J2 L. u4 S) {
                                                to_str("in der Andockstation: \"",?.~.name,"\""));; T3 X4 F" Y, b; L6 t
                                else  E6 ?& {* i" y- N
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
* i/ ?+ Z+ u) R# z; W: L0 \                                                to_str("in docking station: \"",?.~.name,"\""));                               
3 N$ O2 m* b& e6 e                                end;
2 O9 C' r! r2 V, n$ X6 Q: X                        else) |* j/ D( S5 y# L3 }
                                @.Destination := assignLObj[1,row];
$ H7 O9 m8 v% h. S' j                        end;                          m) [9 Z# I- C% u% F4 Y  \/ f9 W
                        newDirection(@);  |* ~# K3 J2 d
                        @.HasOrder := true;
- z  C8 j- H7 r$ V+ j                end;
- b. [: l/ B, ]+ x' y        end;
9 q  U% D! X2 k& z, S7 J* A  {end;        -- of the method! b  `, e# [- A* d
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 ' g# f  z4 ~6 s# s# z) [
  g( P7 Y5 l, X6 P$ L
这是AGV_putin中arrive的method。
" T! i, k* b4 N. ~
* P9 a# b  L: c. \4 [  F, Z当到达物料速度越高时,这个报警更多,
% `% H0 w* [( C$ e! X8 B可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
9 _' F- Y" @' w程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
4 L, ^. O) a8 i1 V5 m/ N$ n! }( k: K/ H  b
另外一个小建议,就是move,所有的move都可以这样3 \! K. D0 l- h& g# |( A! m
if not move() then debug end. R' R' t" _$ c% r/ {
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。# s7 _% u, g$ O
plant simulation中的free libraries有AGV模板,7 T5 ?$ I, h# C  C7 n) k$ t
里面也有案例。3 T$ j; C# e4 d! c; O! B/ K7 v) m; U# a
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
9 P0 q% h- R* y5 B/ s  m) U2 W" k$ ^( u! N: _- ?1 e3 M0 g9 Z
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
  ]# k$ E* Q( m! i0 @) ^0 F: ~+ W" S! {# ]* W. ?9 W
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
; {5 l0 o( A0 c% ~( I& `这是AGV_putin中arrive的method。- p* W/ I' l) E+ e6 Y1 \
0 r# q  N2 I$ c7 c2 Q
当到达物料速度越高时,这个报警更多,
3 b- l9 |3 d( W" N! B
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-28 23:35 , Processed in 0.018350 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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