设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8601|回复: 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'
$ E2 N: `7 @% o' t2 N% G. ^1 H*/# l/ v: ^  ~" J  j8 u
is
" U8 b- R7 L( e' L) T( @; T' E: g$ n        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) Q0 C# Z9 s+ K$ j* v$ q. K: ]0 \# cdo4 W% w' Q. u8 ]% ]
        Lan := rootfolder.Internal.Tools.AOLlanguage;  A6 o4 H. N) [+ n5 b( |" m3 ~0 E& o
        if current = @.Destination -- else return( O5 M0 g2 f  ]* e( Z( R4 ^
        then
5 d% D  e8 W4 q$ t/ n                @.Destination := void;. n/ v7 C# ]" ^5 L
                if @.occupied then( P/ r4 b% Q3 u; }$ W* |2 _1 j5 B
                        part := @.cont;
1 n8 s# p4 p* q1 D8 n1 E. d. y1 |; [; W0 b                        @.transpOrder := void;# I5 M0 }+ D5 `1 M2 L, G
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 p0 l- |. {/ Q
                                @,root.eventcontroller.simTime);- `5 ^9 ^! d9 Q, }2 L/ i
                        @.HasOrder := false;
* M& L5 u5 P* m/ g                        @.DrivingHome := true;
8 W' k: V  M$ x# \6 O- O                        rgManager.tryToStartTransOrder;% w. j6 u+ h0 f9 A' }" e* h
                        if @.Destination = void, Z- d& R1 ?8 v
                        then -- no transport order for vehicle @
6 z% Q6 L, X) C                                @.Destination :=
% E2 I. n; M( ?2 i                                rgManager.nearestFreeStation(@,track.~);, S1 M2 m+ M$ \( m- K
                                newDirection(@);   
2 @7 d' f5 f$ z+ ]7 w, T                                if @.Destination /= void then. d& X7 ]1 l+ ^3 q) C
                                        @.Destination.NumReservation :=. j8 l. d% x0 R  I
                                        @.Destination.NumReservation + 1;* A: F; q  V1 [" v
                                end;
4 b) k7 v# s8 J" C( x# R                                @.CurrIcon := "drivingHome";) G* o5 Q3 m; m$ ]( e+ \1 S4 ^' @
                                @.DrivingHome := true;
# f0 I  \: ^& m; S                        end;
+ C( M" X5 h% o7 o4 d0 f                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. t; I/ @% ~1 P0 J8 `1 C" i                        part := @.transpOrder;5 P7 F% D. @- m
                        part.move(@);-- load part; O; {5 L9 K' m9 j* E& X2 M) h
                        @.CurrIcon := "load";
2 |! D( f4 @0 M1 V6 ~! v  L                        GlobalDistObj := part.globDestination;8 ?" N* M" E; m2 V  H4 `
                        assignLObj := rgmanager.rgAssignL;
- F  d0 D5 b3 D/ P" _2 V                        row := assignLObj.getRowNo(GlobalDistObj);+ S' u* m- g' m+ K- w: H
                        if Row = -1 then -- since 70
$ ]* @; U% _3 W' Z* w/ r                                if lan=1 then5 f0 G/ z) u) ~- i1 ^
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
, x) [' C6 _+ g* d2 ~$ J: w) w, Y                                                to_str("in der Andockstation: \"",?.~.name,"\""));4 _" I& w+ |# U
                                else, m* I1 ], b3 K& m0 [
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) i0 b+ ~& C! @! i$ R1 L                                                to_str("in docking station: \"",?.~.name,"\""));                                7 g  y8 J$ f  d2 {  o5 F) y
                                end;
% d( ]. ]1 B7 H: E5 O' V                        else- G4 Z$ s8 I, i8 ?
                                @.Destination := assignLObj[1,row];
! V1 \% R5 B  l/ C, Z; H                        end;                       
* X+ S6 S0 ^. D4 @                        newDirection(@);5 r2 h9 M. j' h" `
                        @.HasOrder := true;4 t; {; A- M3 U5 b
                end;1 D0 ?( r1 F2 P7 D/ B. q, {: v
        end;
" c( L+ |6 U- Z3 N" x' Gend;        -- of the method
+ l3 K8 H. B* x! D
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 . L, E* y+ J/ v& i7 \/ ?" F

0 D* q# @% {8 N7 y0 _) l这是AGV_putin中arrive的method。
9 v2 ?. j  [- f  o( \' s2 @* \" r# U
当到达物料速度越高时,这个报警更多,
* L% e" {& c( I, _5 z9 B可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。; C7 m8 U3 d2 a& L, g
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
3 Z" I& L7 V& s2 x& I5 @$ q3 m6 _
另外一个小建议,就是move,所有的move都可以这样: U% C% M" @% F9 E  }1 _
if not move() then debug end
6 |* ?( X- H+ ?0 I. l' B这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。5 T/ C7 m. I& U. |+ P
plant simulation中的free libraries有AGV模板,3 X$ B- g$ G/ K' i& a
里面也有案例。
& l# Y- p% ^  n" e我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。, y  G; ]3 ~5 d+ ]: E8 U

+ \" {" _- r. T4 Q9 Z0 ~$ J我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 1 p; Z# ~, i7 v$ _7 |" j* c% b

5 o6 d) ?5 d- D* N6 P" t* _, N那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
  ~2 u8 ]6 m' M7 K' L8 O这是AGV_putin中arrive的method。1 E7 e# h1 M& v2 ~" N/ c, O
, m& L& G+ E; f
当到达物料速度越高时,这个报警更多,

5 p% p! U- \" {另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-14 23:45 , Processed in 0.016899 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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