设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7859|回复: 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'
5 S# w4 {* m# ~*/
5 A, @; ~0 O1 S) Bis( m1 h/ }7 h# a1 @1 R/ Y3 l2 G
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;1 d( ?! C7 S6 U6 w$ F( c" q
do; |6 G2 f5 {; ^  G4 g/ `6 _
        Lan := rootfolder.Internal.Tools.AOLlanguage;9 \0 ^5 v, y  }% b
        if current = @.Destination -- else return
5 b" j6 |1 I- D0 @$ z& a        then7 z1 m% t6 i( @  U- X9 f
                @.Destination := void;
; f7 _1 i% X1 |3 B* \& R! O                if @.occupied then
) r9 H- [7 j# I/ L# i* A) V! q4 Y3 n                        part := @.cont;! \, w$ }0 {& a' {5 k/ p( j
                        @.transpOrder := void;
+ g: k1 y: j! [0 _) P1 l                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ C' ^* V8 \; ?5 J8 O, @$ Q                                @,root.eventcontroller.simTime);+ l% A: j; b4 |* q  w# [2 Q
                        @.HasOrder := false;9 D+ C& p& s( _4 J6 |& c
                        @.DrivingHome := true;& a: {& A" B1 O( q8 @
                        rgManager.tryToStartTransOrder;6 W9 Z' A- D0 {' E* W/ Q3 i. Q: C% Z
                        if @.Destination = void& x$ {/ |# {  w$ @; Z/ f
                        then -- no transport order for vehicle @
6 b5 X0 z2 B9 t3 z- P9 B                                @.Destination :=
# b) H" q/ g! Z4 p" W/ I1 E                                rgManager.nearestFreeStation(@,track.~);
1 m& K, ~; T1 O                                newDirection(@);   
) }: C! j6 a% _; l- v                                if @.Destination /= void then
5 z8 s7 @9 n4 @* r                                        @.Destination.NumReservation :=
, Y; b1 m9 P7 n8 r& D! @0 J                                        @.Destination.NumReservation + 1;( h/ \* T# M6 k5 u
                                end;
" S: F/ l6 ], D5 h  Y% d! C6 ~                                @.CurrIcon := "drivingHome";
$ t+ T" q( v0 z2 E5 a# o7 R7 t                                @.DrivingHome := true;3 ^6 \0 u' n3 l4 x3 I  N/ l
                        end;6 A2 ~: j2 H8 j. W' Y, n
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station$ i" p+ W7 T9 C
                        part := @.transpOrder;
5 n2 X! z7 _7 B% x: q  B8 m                        part.move(@);-- load part
& |( K! N! Q. h6 i3 A7 c% Q4 r, x                        @.CurrIcon := "load";
! ^# L' L+ b7 w0 M# C                        GlobalDistObj := part.globDestination;$ _! C/ x& m; _3 I
                        assignLObj := rgmanager.rgAssignL;
4 Z' h1 M  D, `$ o+ z                        row := assignLObj.getRowNo(GlobalDistObj);
5 X- l. p8 H) B                        if Row = -1 then -- since 70
- W: A9 ?5 ?6 x6 L4 J& k% \! ]                                if lan=1 then
, O$ r7 L2 T* ?, _/ B' P                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
  N9 g% c, D0 e* }                                                to_str("in der Andockstation: \"",?.~.name,"\""));
  D! R( b7 V! p                                else7 l, Y% D, u- y6 V1 N  F* n* k
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),# s' n4 A1 G% C6 c4 J
                                                to_str("in docking station: \"",?.~.name,"\""));                                2 v) v! _  Y/ R" A
                                end;3 s: T8 D2 t: r) x2 b
                        else
1 b4 @6 z$ [9 ?- u% j% i                                @.Destination := assignLObj[1,row];
4 `( D4 J6 z: u                        end;                        ( ^" Z% @$ Q4 [4 t% x
                        newDirection(@);' {7 o& r" s/ }4 U; t& s
                        @.HasOrder := true;
8 m" S* ^+ p$ f! h* G# q                end;& F8 C) P+ S" N% K5 ^2 g
        end;' \" z2 g! P6 }
end;        -- of the method* @$ p8 M  _/ n
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 ; d9 b- X. K# A0 l0 ~% V

0 t3 h5 N) K# o0 u. H- T9 I3 G. F这是AGV_putin中arrive的method。
0 @- k5 |0 P; i2 Y
; w, N! P+ v  X- t' n' r当到达物料速度越高时,这个报警更多,9 L, L2 t1 L3 r) _+ ~
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
& i- y8 U! X: |程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
* t* r9 O) h/ z5 f" a# J
7 Q3 j, b- {1 {/ D7 _7 v2 Y# \另外一个小建议,就是move,所有的move都可以这样
# |- M' K1 H6 G+ Z( \# s/ Kif not move() then debug end
7 p# s7 S% U; s8 Z% i" \这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
3 {' b( ^4 ^& x. h1 uplant simulation中的free libraries有AGV模板,& }! p$ W8 w" A6 i" T- D7 P
里面也有案例。8 ?- Z6 O" a/ ^. u6 Q5 I
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
  Z5 \% g6 v. I/ V7 A
, o9 q2 r: H+ A我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 , [; G. {! g( {8 d
  p# T: }, U% M- {
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
' }9 z6 V+ p8 g$ I1 A这是AGV_putin中arrive的method。$ |  `4 p% x# u8 U
' Z  L, `6 H$ [2 F) q) O: Y  X  g
当到达物料速度越高时,这个报警更多,
# q' r5 e/ Y+ q- j$ L
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-2 07:57 , Processed in 0.022929 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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