设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 10150|回复: 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'
0 x% u* M: c6 c6 m*/
; z, b1 L( R- s% H2 T* Nis/ W7 C/ N- ^) A( I
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;' o; ?! w2 }" r, F$ h) R0 [4 K
do
' |! ]. [. G' E        Lan := rootfolder.Internal.Tools.AOLlanguage;: \" _( N3 I( p6 w) [+ I2 M# p
        if current = @.Destination -- else return% g  I( J! O5 T# a# o- ], P- T
        then, i3 z7 [$ G3 Z6 @. K9 P
                @.Destination := void;
1 S( ^: p/ |: S                if @.occupied then5 x! D8 p' V2 m* a" u; M
                        part := @.cont;' ?/ `, r% Y0 \- U  j. b
                        @.transpOrder := void;9 O* u% s4 C$ r9 R8 L0 t- }2 K
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ g. Y0 A4 j5 C) ]- N0 c9 B& h6 z                                @,root.eventcontroller.simTime);
. I5 j1 M5 j( t% a- B. C0 [                        @.HasOrder := false;
* I/ Q! O+ w- }6 R5 V2 w                        @.DrivingHome := true;
# l& |% W, E3 a* \, x                        rgManager.tryToStartTransOrder;
7 K3 @2 i! J7 r5 @! V; y                        if @.Destination = void
3 k$ ]+ [3 f) [- W+ `* W3 @" b                        then -- no transport order for vehicle @/ B4 ~* Y4 f) s, w5 F9 v
                                @.Destination :=% u0 J* n0 m' q/ x# X! i
                                rgManager.nearestFreeStation(@,track.~);- u$ O# E+ [1 b+ q6 o
                                newDirection(@);   
* P. q  ?7 c" i                                if @.Destination /= void then
0 H6 k1 F4 x( ]: S4 Y                                        @.Destination.NumReservation :=
& r: J6 F! f6 ?' E; B% a                                        @.Destination.NumReservation + 1;5 b1 R# ~( t7 W! ~( p
                                end;
' s) ~" h% Q% V1 P4 q2 e                                @.CurrIcon := "drivingHome";
$ d; [6 m1 `, ?0 t                                @.DrivingHome := true;4 U: J! q& h) {4 }
                        end;# Y# l! K/ g4 h& V6 S/ z4 h4 g8 x
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- C' t$ h- Y& L5 \( R                        part := @.transpOrder;) x: \% B7 T! W# S$ ^# v3 @
                        part.move(@);-- load part: Q. }1 c  p" n& H9 ?
                        @.CurrIcon := "load";% K7 {% k2 ]$ ]/ X. I2 P( ]
                        GlobalDistObj := part.globDestination;/ h0 L2 L$ s' T
                        assignLObj := rgmanager.rgAssignL;% {' d% [$ r, Q7 O* E0 _5 N
                        row := assignLObj.getRowNo(GlobalDistObj);
- ]/ h7 [* V( p0 [* Z                        if Row = -1 then -- since 703 u. M. R0 B8 T  R
                                if lan=1 then
% S" }- Z( c  @2 g* z1 m- x& ^$ r                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
  g6 M( Y/ C) c7 R& i                                                to_str("in der Andockstation: \"",?.~.name,"\""));
3 H1 A1 r) g1 t                                else
5 l" N* T7 k. z0 y' f  ?6 T                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 l# a* L. E) s                                                to_str("in docking station: \"",?.~.name,"\""));                               
: }) y4 @" T% }( c: ]5 R1 q                                end;
  J/ V9 g; c8 _3 Q+ l+ n# }0 L                        else
, ]& o/ N, p1 L& D7 u                                @.Destination := assignLObj[1,row];
0 d" Z2 S* p6 i3 s  [2 C" z# B                        end;                        % R9 g$ I( Q' L& \; ^; Y
                        newDirection(@);) K5 j4 X" P( c3 k' Y- K' K0 ]* F
                        @.HasOrder := true;( K1 `  w, E6 ^. H# `$ J# O0 d
                end;4 b! f; x2 l# [# X& S2 b! ]4 a5 L
        end;
  K* K; o' r7 _2 k1 |6 o4 z' p) pend;        -- of the method+ Q; p! J- k8 o4 P
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
6 i. S: f* h8 J$ }8 n' c) ^' P$ m6 @; S- P
这是AGV_putin中arrive的method。
) n+ u2 P  a+ _4 R+ N& x4 B: ]: m  @; `# A
当到达物料速度越高时,这个报警更多,4 d1 d) F0 M. U3 R+ @- W
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。  o6 A9 ]- l: F
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?+ _1 W: ^, j3 L4 O3 A2 l

# N! O7 H, ]6 W( N" M; O0 N另外一个小建议,就是move,所有的move都可以这样
! {; l9 f! D: y, j5 Y# Pif not move() then debug end4 e& K, ^  {) k  Y& t: Q% |1 ]
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
0 e% e8 y) e6 o! a; S% z; cplant simulation中的free libraries有AGV模板,( s+ W; g) v9 ~' ?7 I+ a
里面也有案例。! \: g1 z3 V7 a; X- b; z
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。1 P$ \' t1 M  h: r* d" b8 \

7 Q  V6 F+ F9 X! B* H我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
5 G9 B0 D; P5 A, q0 \7 o
% o7 X, [% q3 `/ ^+ L; ~那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 1 H  ~8 @4 p7 @( K
这是AGV_putin中arrive的method。
. A6 t. g9 x  j& V6 G7 T: ~4 z) H: m7 V
当到达物料速度越高时,这个报警更多,
8 a% C! Y* l2 P5 T- [" k5 z8 ^
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-9-16 06:24 , Processed in 0.016879 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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