设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6345|回复: 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'
% b* ?* I' @! j, Q2 C*/
8 h5 |& @3 o" m; Z) zis
/ _* W& h$ C" w% ~1 z        part, GlobalDistObj, assignLObj:object;row,Lan:integer;6 x1 }+ Z9 q. j% w7 |& ?5 o: e- A
do6 J# l; U& O0 M0 X6 t% I% M
        Lan := rootfolder.Internal.Tools.AOLlanguage;$ `# b' h3 f  g$ l. Q8 ]+ B
        if current = @.Destination -- else return
/ ?9 c8 Z9 u/ S9 Q2 I        then1 n/ K* D+ o+ W7 }' q/ r) y
                @.Destination := void;- U- ~# z! D9 A
                if @.occupied then* b- S6 W- Y7 `7 h
                        part := @.cont;1 W; H1 Z  r! L# n$ K+ Q  G: Z1 ^
                        @.transpOrder := void;& |; Y" @1 o4 t' \$ B4 W
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,% I: ]7 g' n! [- m9 b8 z, @3 p
                                @,root.eventcontroller.simTime);
: R. _4 I6 F+ w4 T( o                        @.HasOrder := false;$ M/ v  A- e) }. m6 t! ^
                        @.DrivingHome := true;3 H" E5 @! V3 |: Z2 K* W
                        rgManager.tryToStartTransOrder;' T: f. Q1 F3 t+ j1 |
                        if @.Destination = void
; E- O7 y( _% s; h                        then -- no transport order for vehicle @
! l, |4 b; G+ X                                @.Destination :=' a: [* n; I+ g  R" g
                                rgManager.nearestFreeStation(@,track.~);
" A7 S$ c) d) E                                newDirection(@);   
# c- B) z, }( B                                if @.Destination /= void then
( ], n5 a) N; @/ l5 U& P! p0 q7 p: `" E                                        @.Destination.NumReservation :=
6 _1 S4 {8 k2 {1 \8 {' ~2 b                                        @.Destination.NumReservation + 1;' y# L+ D6 ^. w, q4 W0 u) O& S& j
                                end;
0 \) q( b1 `: d! z/ e                                @.CurrIcon := "drivingHome";
+ Y: l7 r7 B- ]4 c                                @.DrivingHome := true;
  s9 y$ \1 \) O7 x1 U, J( O                        end;, R  z- T+ d% A* [0 Z6 E
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
7 g! U" {# g% A2 x7 L% }  C9 N) ]                        part := @.transpOrder;
3 C" g" P+ U0 w" [                        part.move(@);-- load part( N; @1 ~- s. z( M8 t  {# R. K
                        @.CurrIcon := "load";
  M1 I- c! }( @2 U) V1 b3 Z                        GlobalDistObj := part.globDestination;: e6 p) |* C5 ~4 C4 K# ]
                        assignLObj := rgmanager.rgAssignL;7 d; `$ G( L2 ?" g- G
                        row := assignLObj.getRowNo(GlobalDistObj);/ N! Q7 w! Y. h$ `
                        if Row = -1 then -- since 70* z& n: L0 J% r+ Z( r" @0 V# g
                                if lan=1 then
8 z; }; C3 [" s: j$ [8 D- m                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),* a, @6 D! m. f* n: k9 Q6 d
                                                to_str("in der Andockstation: \"",?.~.name,"\""));( h, J. F* G) Z0 r: K* k
                                else
3 k& Y+ n5 D& d! a                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
$ |0 Y, I5 A  T                                                to_str("in docking station: \"",?.~.name,"\""));                               
" s# v. W: k. A                                end;! D. ~% s0 C. O1 y! B) o6 B
                        else
' L. F* R5 U; t' T: z                                @.Destination := assignLObj[1,row];
" T( T& r/ }  d8 |                        end;                       
" B0 h& ]/ W) `1 C2 n. \1 b: d                        newDirection(@);* g( o) A- e" C- c0 O
                        @.HasOrder := true;- Y# [, M8 t2 l: D
                end;6 Z8 t7 m1 [! z7 A- O9 I  m
        end;
  s+ D6 d* V+ qend;        -- of the method
+ ~1 V. X' T2 e7 p! T8 ]0 a
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
/ ~9 W% r- m! p4 B$ ~, F" z1 Z! f# z( ^  g  F4 c, d8 @" j
这是AGV_putin中arrive的method。8 c6 I, L& p* H& u2 A7 U  y
5 r( _' ?7 K+ \3 t4 s  Y: F
当到达物料速度越高时,这个报警更多,
4 i! Q- Z9 s; f3 R5 w' q可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
4 j4 p1 a8 I; u) z# G( u& v% j+ D程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?( m3 V& `5 _" @) ^* a
4 b0 |5 Z  L( U, d- n
另外一个小建议,就是move,所有的move都可以这样1 |: Z5 R6 C. K. k
if not move() then debug end
  H( P# N0 v2 N2 M& S& Q4 B这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。1 N, O' C+ n7 P/ B' r2 ]
plant simulation中的free libraries有AGV模板,
1 c. \$ \! Y# d里面也有案例。/ R4 Z& B  e. Y7 ^6 Q/ J8 w) \# Z$ a- H
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。9 k0 b; t5 g) y1 v7 Z$ G
7 p. F0 c9 w; I/ n
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 8 w+ @2 X0 }4 J0 H# t5 i3 w
8 Q$ j* |0 B5 X$ t! Z+ {( _! B/ K5 V
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
" ?, I/ V! H' S% m9 A. p) N" a这是AGV_putin中arrive的method。
" E  H- T% Q9 ?' q/ J5 T& P/ M* T
" n* S" ]; V% ^+ h; m9 Y当到达物料速度越高时,这个报警更多,
' }9 y9 i6 G, [
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-1-31 21:42 , Processed in 0.020207 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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