设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6767|回复: 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'
) j1 Q* K9 ]. q; O. x*/
8 u  Q- z( C! o2 N$ w. h2 wis
3 l9 }7 r: h  n        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
* E+ T. g; [; \7 d$ ]do
# q4 P8 X! z- W' O4 Q: q        Lan := rootfolder.Internal.Tools.AOLlanguage;
3 ^  B$ |" ]' e        if current = @.Destination -- else return- j7 X* e  u% J6 j# X1 H- p
        then
/ l$ P0 X( ]0 V9 J1 g0 g6 w                @.Destination := void;8 M6 ]- Z( }$ L5 J. V2 A6 s
                if @.occupied then
1 U& j  O& T2 k9 P                        part := @.cont;
. ^; g: `/ ?/ c8 I# F                        @.transpOrder := void;: _4 Q& G$ h3 t
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
  H9 {1 J8 P! h) A                                @,root.eventcontroller.simTime);
- r6 w1 J2 W* S9 p  g                        @.HasOrder := false;
# a- q2 V8 z- `  O& l# l7 r8 {                        @.DrivingHome := true;5 ?9 F" {1 h7 M, G$ Y7 n! ?
                        rgManager.tryToStartTransOrder;  R1 \4 v) x$ d7 _7 M4 @1 k# g1 m
                        if @.Destination = void
. f8 t5 t3 N! S2 V                        then -- no transport order for vehicle @
5 ~5 p" S( ~3 w0 B                                @.Destination :=' S% M3 Y; e; r# D: ?9 v
                                rgManager.nearestFreeStation(@,track.~);. H7 h4 L, M, d5 w+ E, U
                                newDirection(@);   
: x6 r3 Y- M6 ?. \( F                                if @.Destination /= void then- @' o" y# e$ d7 c9 O- U# O
                                        @.Destination.NumReservation :=
7 s* J2 m; n# C, o& e                                        @.Destination.NumReservation + 1;
! h" _0 G: K+ I" x6 d8 ~5 ^                                end;4 f* X. x% R. N! h. U% b! ~
                                @.CurrIcon := "drivingHome";- m7 ?5 d/ l$ Y# a7 g+ a3 H
                                @.DrivingHome := true;$ Q+ \5 n8 G9 c) _' u
                        end;) P: }# {! w% ]( Z  v# t  ]
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 U1 e6 Q$ |, ~2 @1 N
                        part := @.transpOrder;
; i- l1 ]/ |, q  a( R' s' h3 a; u                        part.move(@);-- load part
3 ~7 a! r9 d$ {) B9 g  z- y                        @.CurrIcon := "load";
1 ]4 e! d/ z# C8 |- [2 g) q                        GlobalDistObj := part.globDestination;
4 [* X) a+ h; \" s1 ]0 q6 m$ o  V) l                        assignLObj := rgmanager.rgAssignL;
# y5 `7 K' \9 k# X8 ~. B( o/ {) ^                        row := assignLObj.getRowNo(GlobalDistObj);
. R* W6 J  {8 y. l$ }" |. [  o3 ^                        if Row = -1 then -- since 70. u+ R" q7 ]6 H! t; i: `
                                if lan=1 then% X& R* V1 `& ]5 \7 m
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# D( B% o$ _* L9 p$ D2 H& U
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
( R$ l$ E: {1 _5 R                                else8 w1 Z  F) D2 }6 X3 i: g
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
" L# ]  N; Q" u  l5 t3 O8 U8 ?                                                to_str("in docking station: \"",?.~.name,"\""));                                7 d! y$ Y! C( C' f* D4 n2 K2 L
                                end;
/ R9 H% V9 O( K; z) d  R# q                        else: P: I- }% a. v; i( W6 P
                                @.Destination := assignLObj[1,row];& \3 ]+ `0 J1 P9 [1 b  g
                        end;                        0 q8 z( y; X/ I3 \" v# I% A# x  f
                        newDirection(@);
( J/ `& r3 h2 i+ |: b) e7 n. z                        @.HasOrder := true;
2 u8 m% y  K1 F. G: K                end;8 d* R" k1 k  K
        end;
3 V' G& k2 J$ f" e& xend;        -- of the method
  E3 |. S7 @6 i3 e; Z! |9 X
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
5 [! ^6 w) ~) G) H4 B% ]! e( d* N! T6 p
这是AGV_putin中arrive的method。; T1 p) w: V; ~0 ?, ^

" O9 y3 t& H9 L4 \当到达物料速度越高时,这个报警更多,
0 J7 I( C$ Z: Q- g, ^1 m& I可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。9 A, J, x+ R+ \# O" A
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?  \( V" x+ z0 h
. J( F# S1 a5 z& h: v
另外一个小建议,就是move,所有的move都可以这样0 r; g3 N3 F- N9 M$ O& ~( H
if not move() then debug end7 ~/ a8 `: Q% Y4 C, G
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。$ o# I# \) A7 ]1 m
plant simulation中的free libraries有AGV模板,
6 [" r2 T8 M8 P  b; Z) q: x9 I里面也有案例。2 d4 Y# w& J; ^% J/ Q' p
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。) i, m/ a! `9 e( _7 f$ x7 f! ~

8 s( X. w& r) q9 @我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
' x7 b7 M3 L* G6 S% j
+ ?8 ~1 ]& H0 P' c8 S) g7 I; g0 h那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
* ?6 z7 w% }) W  d4 }' Q这是AGV_putin中arrive的method。
& o% s2 S+ Z% d( Z1 Y0 A" v. G* N6 O5 `0 H3 z( c. [
当到达物料速度越高时,这个报警更多,

2 l! _, m9 `; C' z6 ^另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-25 16:12 , Processed in 0.017944 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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