设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8832|回复: 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'
3 H' Q5 @0 T( \, f# o* d; i*/
) C; x+ ^  n9 k0 G5 W  F* Tis
( e+ H1 e5 a3 {( y. G1 R! M        part, GlobalDistObj, assignLObj:object;row,Lan:integer;( W5 Q* h, M, m
do" L( I3 ~+ P0 V- ^  j( L2 i+ {; S
        Lan := rootfolder.Internal.Tools.AOLlanguage;
4 W1 f8 W- a  w* Z- v6 Y, _, h; a        if current = @.Destination -- else return
( G" L, }7 ?; N' t( a        then
$ i2 O. o) {! f( u8 L) A$ U* Y8 S                @.Destination := void;6 D# {" K. k5 r, |4 ]7 \
                if @.occupied then
9 ^- D0 e% M- }9 a6 U; x) b% k                        part := @.cont;6 [* q. N: r7 _5 y
                        @.transpOrder := void;
. l* T% M  h( Y9 {+ x3 A- Y" d                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,% X5 e  c- F' W  [1 v+ V% Z5 g
                                @,root.eventcontroller.simTime);
4 f( d6 j+ F) M, _5 R# K                        @.HasOrder := false;6 G1 K5 N, n6 s' a& U6 P6 `
                        @.DrivingHome := true;
8 X$ \- N; u' I+ W0 w                        rgManager.tryToStartTransOrder;
* A+ |! t* K, M  s' c+ }* @4 A  {                        if @.Destination = void
# p' n4 M% a* K2 ?9 ?, F0 o2 d                        then -- no transport order for vehicle @# O% A3 }' G5 m+ L# ~! L& G) a, R0 v
                                @.Destination :=  r- T/ M& m0 V5 L# U4 r" T7 s
                                rgManager.nearestFreeStation(@,track.~);' r& k: R7 _/ k4 G4 ^: o- I
                                newDirection(@);   ! i$ X  q2 a" O* \
                                if @.Destination /= void then' e8 G' ^4 a% h( X1 _
                                        @.Destination.NumReservation :=
, {9 P( J0 ^1 p) Z* ^& A                                        @.Destination.NumReservation + 1;
% `5 \- R  ^- q6 x' ~% x- e8 z                                end;
3 [( `9 r* I5 O" a$ J) i                                @.CurrIcon := "drivingHome";
( u  i( ?+ W, L0 T                                @.DrivingHome := true;
; g3 R# b- w: s! N& i' v! n, |                        end;2 f& }/ s& o3 G, \# W
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station+ A$ U( o1 d8 E3 V; O& i, c0 w/ j
                        part := @.transpOrder;
  ~; H# c7 f6 ?' c: g7 m. c+ z                        part.move(@);-- load part% Z9 D. ]. |3 N
                        @.CurrIcon := "load";1 H7 S. s3 g5 b' Y& B& `
                        GlobalDistObj := part.globDestination;" k5 V, X+ b, ^
                        assignLObj := rgmanager.rgAssignL;1 v& k* @/ V( h/ F: `
                        row := assignLObj.getRowNo(GlobalDistObj);
2 N% ^+ R  S) q  Z0 W. p                        if Row = -1 then -- since 70, Q$ U2 f; j4 r. }) ?. `4 R5 a
                                if lan=1 then
+ m3 W7 {! K. R  x                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
; `2 H7 @0 x9 z4 a# M, R. D                                                to_str("in der Andockstation: \"",?.~.name,"\""));  n" c9 ]/ \& T& ]; m
                                else
. y4 y9 Z' {4 f' I( t% d                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: n. C2 T; T8 z' |: g8 b' i! _
                                                to_str("in docking station: \"",?.~.name,"\""));                               
  K: ?' m# l' N/ L+ j                                end;/ r. s6 y1 R/ y: L
                        else* ?; p$ @1 ~7 _7 M8 U
                                @.Destination := assignLObj[1,row];
+ _  Q$ Q4 S6 u/ c) H, h. e                        end;                       
6 k* G. c1 @3 K( a( ?5 j: p. w) V3 W                        newDirection(@);
$ V! y7 H# V+ {2 B1 r+ R                        @.HasOrder := true;4 }+ m$ K7 ^) a8 ]) Y4 @0 \
                end;
, [' S# ~/ L. l" f1 s        end;
0 m7 H( `+ P( w* q  }0 a9 R" yend;        -- of the method
. V0 i7 v& W6 d6 X  @$ {7 _3 ~
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
9 ?6 |! m( q6 B( j2 D% F$ V- ?! @7 @5 s$ F2 |3 G- T* m
这是AGV_putin中arrive的method。6 h6 l# ^, x- J1 m$ F1 Y
7 s# P# L) m0 e  k# v4 N4 m9 s
当到达物料速度越高时,这个报警更多,
( x& V; X7 q. x5 r可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。2 W" [9 m% ^' b% I% Z
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
9 x, N( g9 @7 g
% T" n0 k; S3 D7 B另外一个小建议,就是move,所有的move都可以这样
+ L, Z; n5 Y2 `8 h* y! m1 fif not move() then debug end3 c+ }" ^/ o9 V" a8 v5 _! ^
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
5 r5 R0 ]6 c% D+ H+ Pplant simulation中的free libraries有AGV模板,2 R7 _3 L, H* V7 N8 J
里面也有案例。, k- d; S! b+ Q: C7 u
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。4 `* L4 S- \( y5 d& r0 N- b% W
9 Y; l/ _6 b1 h! {) i3 c& m% x( Q
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
8 i; `, E/ g  H/ u( x& f* O7 ?2 _" O
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 6 Z9 @. a* r/ H2 q# s
这是AGV_putin中arrive的method。
' p# H0 P! |; _9 a" m4 p% U
6 ]( {( g# y# r& o当到达物料速度越高时,这个报警更多,

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

本版积分规则

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

GMT+8, 2026-6-28 22:24 , Processed in 0.021912 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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