设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9419|回复: 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'
! v. T' |3 a% Z3 X*/- h6 i8 n  G1 _  B+ W; f; e
is
+ G6 t/ k& F) ?        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
8 y" M( V3 o* C2 o7 C0 Z- udo
# n7 Z+ [6 E9 h% e) O- Z, f        Lan := rootfolder.Internal.Tools.AOLlanguage;7 |- Z. `" o1 J& e% O7 ]! [" Y
        if current = @.Destination -- else return
- C  E/ a" Q4 n$ I! D+ w" A        then
* i! _6 ^8 a. R                @.Destination := void;
# D* i. C# h/ B: f( |+ ~                if @.occupied then
4 J; s- H) e. x0 Q6 @5 k' f                        part := @.cont;
# z6 h8 g' S& h9 w5 A( k1 K4 D                        @.transpOrder := void;& f% Y1 E9 B( M
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 F1 ^; w; B9 E: H* [                                @,root.eventcontroller.simTime);
% x/ y" O" W& E9 o6 D% O                        @.HasOrder := false;- P% W8 b' ~6 e) f! I. c
                        @.DrivingHome := true;6 P/ v) I- |0 ~+ N( \! U" Y
                        rgManager.tryToStartTransOrder;: q2 e. a, Q4 @- X; M) L3 ?
                        if @.Destination = void
+ B) L& q4 ?% o# p' Y  ^6 j                        then -- no transport order for vehicle @+ W: w/ ]& t" ^! R
                                @.Destination :=
# o! a' K' _& \! ]% R                                rgManager.nearestFreeStation(@,track.~);3 d0 o6 l3 J, z$ c  F# @
                                newDirection(@);   
, H  ~  C1 S; W4 t$ H                                if @.Destination /= void then
7 z% y5 K7 T) h9 [. j6 y# ^                                        @.Destination.NumReservation :=
" s/ ^4 b) b* z* m5 j                                        @.Destination.NumReservation + 1;& x3 n: T2 y6 E& M
                                end;
, g0 Q8 h! z. n) G7 R                                @.CurrIcon := "drivingHome";
1 O) ~) m! G8 [% N9 D6 L: `                                @.DrivingHome := true;
" \5 l  E7 n3 e1 N! ^8 T" g                        end;& I$ m( r6 f# a* q" d$ d8 E
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station; i  D) ~# R- Y5 S5 C$ K
                        part := @.transpOrder;  y0 `% F& r6 L* I: l
                        part.move(@);-- load part! k/ _% M- z; K  m
                        @.CurrIcon := "load";2 A  Y8 I9 h% M' E( ^
                        GlobalDistObj := part.globDestination;- r. Q% h! i1 b) i* H  c  T+ O
                        assignLObj := rgmanager.rgAssignL;0 ]) ?1 u& R8 U- t# }2 F
                        row := assignLObj.getRowNo(GlobalDistObj);* A; Y+ j% [* F4 I! R4 z% B' h
                        if Row = -1 then -- since 704 A0 B, E- \4 F) E
                                if lan=1 then, O" l/ u2 W9 Q2 L* z1 `
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
* C; N% w; ]+ t                                                to_str("in der Andockstation: \"",?.~.name,"\""));5 {; P: ?4 n/ R. B3 ~+ y
                                else8 u4 K" F" C! R1 Q( d
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
* Z- [. l2 e: L- v" n                                                to_str("in docking station: \"",?.~.name,"\""));                               
# V4 w  E- \3 N3 M6 M                                end;
% v) k! E8 v/ X  s6 Y                        else! l* R3 l$ |5 M5 z4 S# [
                                @.Destination := assignLObj[1,row];4 f- k' i' q; P2 Q7 i/ C
                        end;                       
0 H2 k: h$ I- r0 l* D+ e  m                        newDirection(@);3 N( s6 O5 Z, n/ _& c+ S
                        @.HasOrder := true;0 i& ~$ n4 G! V9 a( s+ U
                end;
7 S* F1 r+ ~% A) D$ |        end;) g, w- b  L6 q( b' _
end;        -- of the method9 [( b9 O; P4 c: U- n) x5 `
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
/ @3 Z- ?6 V, p$ _. D1 h! C: u: B# K9 a* m
这是AGV_putin中arrive的method。
, r  {6 @/ z/ F- y7 x
- |2 Y& U) ^9 ]% {  Y当到达物料速度越高时,这个报警更多,
1 q) @' Q; }2 R/ e: @9 H; B* o  c可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。+ ^+ ?( h' P4 R0 u; }
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?4 `4 C- u. C+ M4 ?7 G
% k( x/ E5 j& j
另外一个小建议,就是move,所有的move都可以这样
: _7 _8 l) |: h$ nif not move() then debug end
* N4 v8 B; d9 T) q# W: T这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
# ^1 z4 R) p0 Vplant simulation中的free libraries有AGV模板,3 c" I* w8 }& c7 g
里面也有案例。
1 O2 {$ J1 o* K) h+ G; m我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。2 N5 R5 U9 D3 b1 m( ]
0 H7 K# I3 Y# n. `5 r6 g
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
( ]: l! j: |) T; @% L* w0 a
& H% f& W% @: ]/ g  r  `; |) O那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
4 P! |9 a$ R2 l这是AGV_putin中arrive的method。
. F# x4 K- i- J* K8 C7 Z( p
- @1 e8 }& K( u1 E当到达物料速度越高时,这个报警更多,

8 P; D% p; @/ U2 Q. C# j+ \另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-31 05:19 , Processed in 0.019894 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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