设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6282|回复: 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'
9 i$ M; c& U' p" O8 I6 r, N( u' r9 B*/
- s# R$ [" M& G- e; j7 Sis' q# z3 C  k' ]
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# x; O6 {6 G! N4 ]) y5 [8 [" q3 zdo
& Q7 I6 G" G  z        Lan := rootfolder.Internal.Tools.AOLlanguage;
* g& n& X- h3 r        if current = @.Destination -- else return
* f. u+ j4 |5 |+ {' S! T  Q2 Y        then# A0 e/ U2 p8 b8 R8 W; U
                @.Destination := void;0 @$ ^' o2 H9 s/ T
                if @.occupied then6 K; L5 [. v6 r6 R# e# [
                        part := @.cont;
# l+ I$ c# R- q4 E6 b                        @.transpOrder := void;
- A: B" _) I; t/ M3 q                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
$ D/ F; Y/ }4 g$ w0 r; ^! G                                @,root.eventcontroller.simTime);& R. Y( G; F1 h6 P! [; n
                        @.HasOrder := false;
2 \3 ]' j0 B/ P& l& o" Q6 c                        @.DrivingHome := true;
0 ^! s! v' ~; B% L: C) t. l                        rgManager.tryToStartTransOrder;
4 o. i9 h2 R1 p                        if @.Destination = void; G* ?. K! [! i( E* }) u; K3 N( w
                        then -- no transport order for vehicle @
9 [0 I, ^6 w6 S                                @.Destination :=
2 o6 Y1 G, f5 n& Q( J, S                                rgManager.nearestFreeStation(@,track.~);) V' C* M6 _# U+ ^5 z# Q( R
                                newDirection(@);   
1 L4 ?' r/ h4 T0 I/ b% l- [* K% m8 {                                if @.Destination /= void then
+ [$ a) t7 z" t, o+ e( R4 g3 V  Y                                        @.Destination.NumReservation :=
5 d3 b3 g7 x  w7 K5 i) U6 d                                        @.Destination.NumReservation + 1;
3 P( {$ }; t/ G" l                                end;
4 q' A6 ]9 @/ f. n# d                                @.CurrIcon := "drivingHome";
+ I2 W" x; X2 ]# w$ U                                @.DrivingHome := true;* d% M* u/ l1 V3 g$ z# G/ `
                        end;! [/ Q) c7 `' z& m! C
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station" G4 I+ e3 I% v* C
                        part := @.transpOrder;
* S4 Y1 F( l1 }7 y                        part.move(@);-- load part
% R$ X: |0 A/ S9 b1 C& Y6 L! u1 @1 q                        @.CurrIcon := "load";( Y1 h4 \) g# I4 `$ _4 a
                        GlobalDistObj := part.globDestination;' T( o+ N! J+ t* _! M! K- @( H3 G  }
                        assignLObj := rgmanager.rgAssignL;9 i: H4 K( N9 m1 Y8 A5 F6 n
                        row := assignLObj.getRowNo(GlobalDistObj);/ D7 `+ l& `9 P; T2 ]; Q
                        if Row = -1 then -- since 70
7 x$ |5 X( f# Q, V                                if lan=1 then5 q2 X# B3 b9 y
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),( m$ _5 a" Y4 Q' ]7 y+ c( a, [4 G' ]
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
6 L, m& C, ?+ t  V$ g9 x5 Y2 K                                else
$ X  v' x  M* b- E$ d/ t: v7 [, @                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),& i4 Z% J: T. j4 \% c0 A; ^- n
                                                to_str("in docking station: \"",?.~.name,"\""));                               
3 W1 V8 s- T$ ^1 Z                                end;
& ~9 J' X, W$ t- M7 K                        else; B+ Y& p# b; W8 F$ |- C
                                @.Destination := assignLObj[1,row];. n* H" O! k# c; |( h3 M/ X
                        end;                       
- D/ I% \, m/ E- l- {- j8 Q                        newDirection(@);  `$ M5 t! e0 F4 g, a: @4 d
                        @.HasOrder := true;$ V/ k. l0 p. s6 }6 V  a# P
                end;
7 s4 t# u7 y; ~) z3 r        end;+ W; y# \- H9 a+ c( ?
end;        -- of the method5 z5 a0 r& U( B5 \& C
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 ! p% V0 W. b% e  {: X4 T

! w! X% j" y  ?6 {* d+ C$ c这是AGV_putin中arrive的method。4 h, s2 H& `6 q* H4 ]  x4 s, P

/ u2 h" I# b& ]9 k/ B当到达物料速度越高时,这个报警更多,
7 E' m9 p# `% V- t; p2 P; |3 ]& n' r" x可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
. ^/ Z2 Z7 O5 E: t" R1 g/ N程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?( a* o' E3 ^  S8 p& {9 G. \6 k1 L9 v
4 Z9 f3 y" A. P/ {
另外一个小建议,就是move,所有的move都可以这样  h" B) f$ t$ O3 P7 I1 ?2 x7 }
if not move() then debug end
3 ^6 E9 v4 K/ h0 N0 A7 s9 j这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
0 U: u1 C/ \- Z0 K3 tplant simulation中的free libraries有AGV模板,, [8 e9 J- [( n+ r: x% p9 ?
里面也有案例。6 x7 B  a) l: ~3 t: x5 q/ x$ o
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。5 K5 ^8 u! O" x! g$ |) T$ o

0 p1 S& n6 @1 Q( C3 ]$ A我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 2 c1 _, t9 ?, G: L2 J, P

* f6 @+ Y9 h5 A" E那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ! O; {$ T5 x) W; u5 G
这是AGV_putin中arrive的method。6 r& P, L/ D. Y" J$ {8 h
# d0 H' @3 g* B* P
当到达物料速度越高时,这个报警更多,

2 g" M! r' o' L+ ~另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-1-28 13:47 , Processed in 0.020185 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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