设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7712|回复: 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 ?# O& |  Y4 y" @
*/
" C+ L% f$ b+ i" I" Z$ g( jis
# d0 a6 K7 v1 m* K        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
2 [$ {3 `+ }6 V( a! F* m9 V0 H  Bdo2 R8 `" V2 Q: T8 E4 U7 D% m& ~
        Lan := rootfolder.Internal.Tools.AOLlanguage;% I; \5 k2 C  t; x4 B! x; q
        if current = @.Destination -- else return
" ]9 V  m* w1 J- a' P# |        then9 }  b" o; B2 R, ^1 l
                @.Destination := void;
4 H( v/ a' h( t9 L+ B% W9 q* T# t                if @.occupied then7 u+ }6 D- o7 h% q. N& h
                        part := @.cont;
. p, }/ o3 ~& E0 F% ^9 Z. A/ Z                        @.transpOrder := void;6 e( m9 C+ T, r) J4 {4 p
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
0 Q- T, q7 z* o2 b3 V% y1 i. t! z                                @,root.eventcontroller.simTime);
8 d9 `1 q# V1 F1 C- S4 c: {/ g2 P                        @.HasOrder := false;
4 Z* f: @& @1 Z9 @( H! ?                        @.DrivingHome := true;
3 B+ J6 z: d3 e, ~- V4 n) p                        rgManager.tryToStartTransOrder;1 w0 Y- L/ c7 w6 v/ V
                        if @.Destination = void
5 ?$ G& f) k' I6 x, K$ k                        then -- no transport order for vehicle @
$ [; Y3 o& H  o, A9 O4 w, s                                @.Destination :=- v# }) p; a4 j& n2 e. S* S5 l. h
                                rgManager.nearestFreeStation(@,track.~);
# d6 M, \- `: k5 k                                newDirection(@);   
! A* F! r3 O$ i6 S8 V( \                                if @.Destination /= void then" x, e9 o( B/ ~$ z
                                        @.Destination.NumReservation :=$ N0 Y3 S2 `+ c6 @' D" m  Z% b
                                        @.Destination.NumReservation + 1;
1 h6 G, p$ U, [+ r" F1 l! ?                                end;0 @& I9 u  e! F( ^
                                @.CurrIcon := "drivingHome";
9 f0 n% x$ X: I% g) Y; j. `                                @.DrivingHome := true;
7 U& [  ~0 L  }5 B% s0 i/ M, x/ a& c                        end;
: l' E8 S2 c; @: f+ F' X                else -- the vehicle @ is empty, both vehicle and part are in the same dock station2 w& Y+ Y: s) c
                        part := @.transpOrder;  _( v) K1 e9 X- r
                        part.move(@);-- load part' k2 \; Q$ j6 _2 q8 e
                        @.CurrIcon := "load";
1 v- O! K7 o' s                        GlobalDistObj := part.globDestination;& S- p2 G# p$ H' p" ?
                        assignLObj := rgmanager.rgAssignL;
0 H; w" @. Z) C, Y3 z                        row := assignLObj.getRowNo(GlobalDistObj);
+ W: e5 G- v8 K# z                        if Row = -1 then -- since 70" j* n5 |% R; p. A" f. l$ S
                                if lan=1 then
7 a& R- |. g' S* H                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),1 F3 |7 b/ S( e3 _% G
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
  R" d. |2 I. V8 y3 g5 t                                else1 p: M' v9 B# M* h. y
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; f' Y% C5 x& z
                                                to_str("in docking station: \"",?.~.name,"\""));                                6 |2 u  ^5 U( h! K; q8 X2 o4 O
                                end;
8 K# l( j7 T0 M; S2 g                        else
5 J3 |/ }. P$ c/ D1 T                                @.Destination := assignLObj[1,row];
- o% U$ G. ]" h) S$ @& j                        end;                       
0 l; a$ @% ^$ A1 E) F2 q5 ?& V                        newDirection(@);
8 U, T3 l  K$ a; V3 ?$ m  I                        @.HasOrder := true;: X7 {# F: s) h( G! d
                end;
' v, d2 u7 o7 a        end;
/ l- E/ `( u1 a7 f5 t( Gend;        -- of the method, P+ b$ W. C3 u
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
+ Z5 m% o# P: o) {' h/ L* a2 m" J/ u
这是AGV_putin中arrive的method。. @( ^4 k3 a7 o' P; i' _( P' ]

4 Q3 _+ e. U( A% d2 [: |当到达物料速度越高时,这个报警更多,
" v, c; h! S4 z可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
  {  B" ?" A' X1 m/ O" y程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
! @9 U- m. K3 f2 k4 n
7 v+ x- a1 Q( B9 A0 U2 K5 s" c4 G另外一个小建议,就是move,所有的move都可以这样; @, O  l" k# {, b( J7 B/ m; \; F4 @0 V
if not move() then debug end- d9 @! p% k) M; v0 i; U+ [
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。& V5 f8 z. E4 a# _
plant simulation中的free libraries有AGV模板,' r. X# p  K% T
里面也有案例。
' c$ H$ ]3 L4 A. A9 y我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
/ R4 {6 z- D' R6 K2 o( H( p( q( y$ y  S  _6 Q, a. K$ q
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
+ g0 ^, L% r6 P8 b0 K8 j# U4 C/ _. X: V$ J) z' y" z1 J
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 $ F' m: H; W1 m, O% c. X3 f; I
这是AGV_putin中arrive的method。$ Z1 p* ~4 F6 |9 B

/ F8 e( G# ^  K  F" \当到达物料速度越高时,这个报警更多,

) S( R# Q# g- a另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-25 16:41 , Processed in 0.023120 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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