设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6676|回复: 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'
$ N& n. c* d: h*/- \0 i+ v$ b7 E8 p# _3 I  W" d* Z
is' x$ V% }; y) r% X3 v8 x& d
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
" n2 s8 P+ R, W: _do2 l, ]" L' z+ U; Z. X. f$ e  a. y
        Lan := rootfolder.Internal.Tools.AOLlanguage;+ m4 M+ _' M, T) V
        if current = @.Destination -- else return9 V# k+ s8 A. F
        then
( i6 i/ ^& `8 _2 S                @.Destination := void;
* e$ `& }2 X9 X1 K0 R$ D                if @.occupied then# Z  ^- D( ^* M1 M# G
                        part := @.cont;) J, J, K* Q* {4 x. s* r
                        @.transpOrder := void;# O! j7 l6 D  j0 l& h+ j& n
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
  q* Q* V0 {% Q                                @,root.eventcontroller.simTime);
3 s" w# D3 k% A* U                        @.HasOrder := false;
( ?* ^8 V5 |, b. I                        @.DrivingHome := true;
- z! q1 Y) G( x1 K' ]9 u/ x6 p                        rgManager.tryToStartTransOrder;" d  A- B+ k; l! e
                        if @.Destination = void
) P  x; C8 ]  g/ V: }# k3 B                        then -- no transport order for vehicle @
5 f3 E! q. V8 ?, S; e7 u7 j/ E                                @.Destination :=
" U' t: }# K5 h. a+ b" `" R! F& X8 q                                rgManager.nearestFreeStation(@,track.~);4 x8 y6 `8 y! \; f9 |
                                newDirection(@);   
5 M; U$ o% ~6 `% l                                if @.Destination /= void then% Q# C/ j2 a( @( f7 E
                                        @.Destination.NumReservation :=
" M+ G- H1 I. {3 \. k* {, J                                        @.Destination.NumReservation + 1;, x5 n1 T4 l( P, C+ R1 Y1 _! i
                                end;
  O( i+ a. z8 S; ^8 G% C                                @.CurrIcon := "drivingHome";: x: `4 f7 [+ h: |; N/ d
                                @.DrivingHome := true;
9 V7 f: D. h5 T6 V1 T$ V2 P3 d                        end;
7 _# G1 E' U* h$ h                else -- the vehicle @ is empty, both vehicle and part are in the same dock station' T9 O3 P+ K) W2 `& X
                        part := @.transpOrder;
( N! }/ L+ i6 \                        part.move(@);-- load part, D! F% a4 h$ D
                        @.CurrIcon := "load";) R+ m5 \3 m. T) c6 I9 ~5 X
                        GlobalDistObj := part.globDestination;# Y( c, V$ u4 V/ s) _; t
                        assignLObj := rgmanager.rgAssignL;/ G& U' b7 O  _7 {
                        row := assignLObj.getRowNo(GlobalDistObj);! n2 ~7 n2 w3 C2 ^% }/ u& q
                        if Row = -1 then -- since 70' v& c# F8 j3 f# _9 c$ S0 r
                                if lan=1 then
( J& D+ P! k% [& H( w' U                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),( q8 D. ]1 o$ l9 H+ L' R6 t
                                                to_str("in der Andockstation: \"",?.~.name,"\""));) I5 ]+ C7 N9 Z) Y: o- p: M
                                else, s- g# N! ]% \2 A
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
  d/ V0 q/ s' f8 r6 ~3 K2 D- v                                                to_str("in docking station: \"",?.~.name,"\""));                               
! l' \  Q& p' D( d                                end;9 J& e  _( O: ]* v
                        else  L- U8 g7 O$ `  G  I' y0 m# g7 a
                                @.Destination := assignLObj[1,row];
8 D2 k) D; F) d                        end;                       
' _0 h  P! M2 n4 d8 V0 h6 H                        newDirection(@);
) U3 H! l0 p' ~+ ]' l  h& `0 c                        @.HasOrder := true;4 k0 h7 E8 x  s2 }1 R
                end;7 _# l# Y4 Z8 v1 y- [
        end;1 g' x; k' e# d& Y2 y6 ?( t
end;        -- of the method
0 v" y! c; F  g, d3 H
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
9 W! {. q) u* g- l3 H
# l7 ^) F6 z$ R( k  M- {这是AGV_putin中arrive的method。4 _3 u2 Q/ ^& T2 r1 d
7 H6 a; D4 I) D- i& ^: d0 F
当到达物料速度越高时,这个报警更多,
3 v) W6 M' `2 l- y可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。. p$ |  ?/ }  t0 }" D
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?; d! J8 g0 m, d& y1 P
/ o3 p. e5 x% S4 b3 S$ Z$ U
另外一个小建议,就是move,所有的move都可以这样
2 `; M# ]6 t0 P5 O7 nif not move() then debug end' X/ L0 z, J# W- ~
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。. S4 Q) }- L- K0 z5 M5 T
plant simulation中的free libraries有AGV模板,
8 C! v2 i* C% D6 J: w里面也有案例。
  ]! \4 U! @) V& e8 z, I& I$ M  `. a我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
. r! i& _6 Z! O5 j6 b, W7 B, |# r' D* u, z& m
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
: J* {# t- o- W1 z
0 N3 M" z- ~! ^& D& R  C! ^( ^那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
5 o! p: ^) S$ t$ S' \) z6 c这是AGV_putin中arrive的method。3 b8 i% y; `0 [) g

7 H3 S0 g! F6 m# @5 o! D; u当到达物料速度越高时,这个报警更多,
8 F6 D+ r, p8 Y- {9 o8 \
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-20 07:16 , Processed in 0.025098 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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