设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8877|回复: 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'
  S. E7 }' C% f2 e# ]*/5 r% w. H8 S5 ~/ f! `
is
5 Q# d/ d% R( _  u        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
- f+ c7 w$ t( b! {( c! d$ l  ndo
/ z8 y) T( F& G/ L& _$ A$ Y7 k        Lan := rootfolder.Internal.Tools.AOLlanguage;
* D0 D- h5 R9 b/ a) M+ o        if current = @.Destination -- else return
* _! T1 w5 D& x5 b( i        then) ?$ D* ?; O! s% `" B& q% [  M8 x
                @.Destination := void;, Z7 |0 L: S: h! d
                if @.occupied then; S! W+ t7 c6 v9 d. V# Z5 z$ b5 P8 P6 }
                        part := @.cont;7 _1 X5 [' i- ~4 z" o5 W
                        @.transpOrder := void;
. W3 n+ L6 ]4 X/ K                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
- u( ]# K- s& f3 E9 C                                @,root.eventcontroller.simTime);
# i. a3 t4 R! C' s2 H                        @.HasOrder := false;
2 |- c) B! p; ]/ r( P- v                        @.DrivingHome := true;; a  k8 I% W, u1 l) I' j
                        rgManager.tryToStartTransOrder;
# V% b6 F; I' E/ T4 H3 O  H  p                        if @.Destination = void
7 }1 @9 o  z' z                        then -- no transport order for vehicle @. @) A: i% M7 x; y' v, ~
                                @.Destination :=# H7 m9 v. o9 E* Z
                                rgManager.nearestFreeStation(@,track.~);, s- X6 U) N! \3 y
                                newDirection(@);   5 H9 I- A. A" z' M7 U
                                if @.Destination /= void then
+ N( d: \( T$ \$ s* s                                        @.Destination.NumReservation :=
5 f! d4 g, T# e$ u                                        @.Destination.NumReservation + 1;
2 C  g% s. f7 n# ^; R                                end;
" D, L5 J( D7 R& a* n                                @.CurrIcon := "drivingHome";9 k+ x5 Q  s( i' q
                                @.DrivingHome := true;0 g& i" p1 g! m3 a8 r
                        end;
4 c9 q+ M6 `* H/ C# I8 ]; u4 b) t8 W                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
2 r$ z* b$ ^( a5 }4 h/ s                        part := @.transpOrder;, G) Z' `/ q( R6 I3 j$ f; x. H0 F7 K
                        part.move(@);-- load part/ z$ W1 n( k% U, B
                        @.CurrIcon := "load";( O: h7 i: x" F/ ]. y# a  m+ h
                        GlobalDistObj := part.globDestination;1 ^# I* h% T" `3 ~" e/ k
                        assignLObj := rgmanager.rgAssignL;
: ?( @$ m4 z1 w/ _( N6 w9 E                        row := assignLObj.getRowNo(GlobalDistObj);/ _& y- \! Z. A/ e, ?5 K0 c
                        if Row = -1 then -- since 70) h% h# S9 S7 l% ~* W7 z6 c
                                if lan=1 then* y; b4 Y7 H: }  L3 \
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
" I; n* r" o' F                                                to_str("in der Andockstation: \"",?.~.name,"\""));
( O# s2 e( @) W" y                                else# t! c) _# _2 g2 e
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: |5 ~8 V8 `& w  p
                                                to_str("in docking station: \"",?.~.name,"\""));                                $ N6 k+ i- T% e6 r1 R8 G1 e" S! @
                                end;1 C1 P8 J; G' u: x. F2 d# a3 o; c
                        else
8 Y1 f9 I  }% S# V0 w5 g( m9 R                                @.Destination := assignLObj[1,row];. ]; Q9 o& n8 Z: ?* c* `$ l! Q
                        end;                        4 _, t  K) r9 Q$ W6 @: ?
                        newDirection(@);) X, V" ^' U5 S" w8 B7 O8 x
                        @.HasOrder := true;
( L! n) w% Z8 ]                end;
7 U# I- f: C0 l$ |8 Z! A9 D1 G        end;
  g9 B2 @# I0 jend;        -- of the method1 y* |# ]' Q+ l- S+ J3 m5 X
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
# \) u/ D, k* @0 R1 J" ^
4 [: j& I" i, z3 k这是AGV_putin中arrive的method。3 y* x' `6 w$ O; t
! D7 H3 s. s- O2 N) ~
当到达物料速度越高时,这个报警更多,9 K3 ?& \$ T) `" b( q& f
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。, _' Y) {) ?+ F- c
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
. {  i1 F+ n* t" O1 f3 |7 @7 I. I8 [8 w3 M  M1 b4 V
另外一个小建议,就是move,所有的move都可以这样
  K/ K' M$ [! C# Y4 ~  h7 Q7 |if not move() then debug end
" l  w% u1 K( ?( G' W这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。$ P( }4 |6 V1 k5 K. k9 a6 }2 F
plant simulation中的free libraries有AGV模板,
0 N$ c9 _- M2 ?" J6 R里面也有案例。2 Z) A. q( o4 {8 y0 e* A
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
4 l$ @' x: T* c/ n0 @( q
" t; A- W3 s# t- e$ B/ e我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
7 K# Y! c4 D# M) p: g9 D
- S# h" Z8 L, L那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 1 x& p  |5 {, x$ r
这是AGV_putin中arrive的method。( X" P" ]; B. S& f2 ^

& m, V2 L3 B9 K: l) y当到达物料速度越高时,这个报警更多,
3 J9 B3 B: w: L) X# e
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-2 00:13 , Processed in 0.015765 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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