设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8620|回复: 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'% e9 q: {7 Z$ U) P% u9 k/ {
*/
0 j6 s) |' W. E% b2 K+ jis
2 D+ ^' ?* ^, ]. o% y: w1 s        part, GlobalDistObj, assignLObj:object;row,Lan:integer;( G. G# h8 a, F3 h1 Z% x8 f
do& g: ~, w. P2 a: \# f
        Lan := rootfolder.Internal.Tools.AOLlanguage;6 y, [/ _* F0 f8 g* F; t6 b
        if current = @.Destination -- else return! q7 d. F5 X3 S# A
        then* E5 r! U( x# S, Y7 M
                @.Destination := void;
) P9 i4 ~* j9 {7 q4 ?% E                if @.occupied then
  x  z' }- _, j4 i                        part := @.cont;# E7 i( i+ E1 b
                        @.transpOrder := void;
+ x9 r" @! b5 [4 l                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,2 t; [$ r" _! S2 B0 {$ u6 j
                                @,root.eventcontroller.simTime);" `3 ~2 g6 P% f, w# s/ A
                        @.HasOrder := false;8 j- v8 h/ w& F9 k; H) X/ g5 U
                        @.DrivingHome := true;/ T( L# c* K0 ~$ f' U! G& T( e
                        rgManager.tryToStartTransOrder;
& U% M* W+ V- \" i. v! }  t; o% k0 D9 f                        if @.Destination = void5 s( _$ W' V4 U2 [. i
                        then -- no transport order for vehicle @. I. \6 `/ d9 t9 n& Z1 _  s
                                @.Destination :=0 r  Z5 N- R# C7 G( W. F( H
                                rgManager.nearestFreeStation(@,track.~);
! ]7 {# _" Y% o; Z                                newDirection(@);   
8 ?# S4 }5 F8 e; K( K8 S8 q  L8 d                                if @.Destination /= void then
9 B4 U1 c. K* v                                        @.Destination.NumReservation :=
# `# Q( u# ^' \4 D: s                                        @.Destination.NumReservation + 1;6 H# D6 `  `% @% _( b% ^4 Y  a
                                end;. {# |8 t& d+ k1 s+ R
                                @.CurrIcon := "drivingHome";
' {' V- L% A) X, v) t                                @.DrivingHome := true;
- e4 c3 f% ~6 A9 g& {                        end;( p5 q8 c/ @2 r; b9 R# I$ o& K! C( z7 h
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station; M: e3 N7 y) f* e) L6 b
                        part := @.transpOrder;* @* S1 Y& _1 Q. W
                        part.move(@);-- load part
' `) }$ x# Q. W. |- k, W7 Q, o                        @.CurrIcon := "load";
7 g& v, W, L8 Z- N! G" E; C* y                        GlobalDistObj := part.globDestination;
6 E. M. H, E- b% s8 j3 Y                        assignLObj := rgmanager.rgAssignL;1 q, X, z7 Y3 t$ }9 p& \1 U
                        row := assignLObj.getRowNo(GlobalDistObj);
& i9 u1 U0 B% ^. ]# M                        if Row = -1 then -- since 70
/ |: i$ k9 ^/ L5 ~& u/ ^                                if lan=1 then
1 N+ O$ ~3 `$ A( e6 x                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
" t& t* C3 g4 u: ~$ U                                                to_str("in der Andockstation: \"",?.~.name,"\""));, }) y# e* P/ f/ Q0 d+ x7 B; k
                                else
6 x8 }6 l: ~. Q                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),* i+ W: \& {6 ^" u. S5 ]
                                                to_str("in docking station: \"",?.~.name,"\""));                                ! P. p4 \9 [( P1 N, e; o/ Q
                                end;0 n' c3 W. i; y1 ?
                        else/ p6 D4 ^: D/ u$ W
                                @.Destination := assignLObj[1,row];
3 p/ I5 G4 g- a                        end;                        1 i8 S7 ^8 Y% X2 \8 ]3 w
                        newDirection(@);0 ?  i" c+ X0 {; c0 I$ n& V
                        @.HasOrder := true;, n6 x! c' j! A5 B: J( O
                end;9 i2 t7 Y, d* Y5 Y$ @' v
        end;
, r- G2 {6 C8 K) X; X# H0 x* pend;        -- of the method
$ N* \; O* k0 C
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 6 Z7 X3 ]; D8 o! n) [! A
! V! o% {' ~& S: P# N
这是AGV_putin中arrive的method。; o# ]. o4 n' m

' G0 m6 Y* W8 k4 [9 ?) V3 _当到达物料速度越高时,这个报警更多,: M, L1 q) T. K$ \8 A6 W7 A* p
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。8 M' |4 I. r; [4 n: a9 @: ^, V9 E
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?- F% t1 ?" t0 M0 N- _

8 K  [6 [& ^* u) i另外一个小建议,就是move,所有的move都可以这样; F: B6 p5 o1 `8 l
if not move() then debug end  p5 U' K: e8 n1 c) j& ]
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。! ^& g3 v5 W+ ?) ~, z$ ]4 {* L* g  u3 e
plant simulation中的free libraries有AGV模板,
7 C3 }9 P9 t; }里面也有案例。5 R; Z/ Y# N8 ?* C, l. {4 A
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。. O, ~  U- Q3 X

8 B  L6 s% V( q. y5 O2 z1 `/ N我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 4 \: K+ b) o7 w4 U

- |$ g) h# b' |1 J: F那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 : B) U" m( P1 C5 U/ D3 t. h( ~
这是AGV_putin中arrive的method。
( J+ F4 V8 |& t. Z
6 v: @) t( T" M当到达物料速度越高时,这个报警更多,
+ N, c& y% O& f% q% p/ C+ v8 r3 L
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-16 09:48 , Processed in 0.014687 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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