设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6845|回复: 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'% S3 S. j* ]7 b6 S
*/
" D' ^* M6 o5 k' W+ H" Nis  j' r  j! a% x8 c: w  z! _
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;! N+ a5 E* I4 _) u7 w/ X) |  P/ l
do
6 t+ A( N$ P6 T, a1 J, o( q        Lan := rootfolder.Internal.Tools.AOLlanguage;
/ _7 n% T  S! f6 p/ b! w! X' R- F8 y" _        if current = @.Destination -- else return
3 ?" Z5 a4 v4 Y. B  Z9 d        then: u( B+ H$ ]  Y1 k  h4 k1 ?' Y4 w; r
                @.Destination := void;# T5 [* f% j8 a% f
                if @.occupied then; X9 n; z9 y: Z
                        part := @.cont;
! j1 p/ _; L4 J) v" o5 Q1 Z                        @.transpOrder := void;% q7 }: @4 Z+ F# A$ l
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: P# f$ S! z: r                                @,root.eventcontroller.simTime);5 Y5 _* y) U4 U4 I+ |4 g7 s, Z
                        @.HasOrder := false;
4 R' g7 u3 o: |                        @.DrivingHome := true;
! [3 Y7 n% ~! L1 D* o- D                        rgManager.tryToStartTransOrder;' C2 |9 [* \5 ~1 s
                        if @.Destination = void
; ], R8 ~$ W$ K  |5 O                        then -- no transport order for vehicle @
5 H# `( }. m, u- ?; c3 k                                @.Destination :=
9 l6 ?* V/ Q0 Y& }+ c- L                                rgManager.nearestFreeStation(@,track.~);
/ z/ B  U( H) J% N                                newDirection(@);   - x+ q0 n5 q( U) B2 F
                                if @.Destination /= void then/ l3 J$ n/ j9 b2 ?' ]
                                        @.Destination.NumReservation :=' O5 c6 J5 Y5 X9 c# y# w
                                        @.Destination.NumReservation + 1;
' b# n# W5 z; ~, p: r2 {0 B                                end;
4 t. K0 N6 E5 f5 x  H) ?1 I# ?1 {                                @.CurrIcon := "drivingHome";
1 D, X0 l4 B7 z( O9 Y- \                                @.DrivingHome := true;# j( x0 t; q! i. E' i5 x- G+ |
                        end;0 y  h( M; ~6 `% V5 r$ F
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station. ^4 |% S2 r6 O
                        part := @.transpOrder;& A4 `) S1 }6 `
                        part.move(@);-- load part
" x5 l; _! h3 p# N- }                        @.CurrIcon := "load";
3 l1 l: d5 h6 O- j                        GlobalDistObj := part.globDestination;# R( a: t6 {8 v" v# n# H2 `' h: p
                        assignLObj := rgmanager.rgAssignL;
$ g: d& o. V  H) |                        row := assignLObj.getRowNo(GlobalDistObj);0 R6 `8 j4 U7 y3 l
                        if Row = -1 then -- since 709 k5 }$ \7 W1 ]* d/ C
                                if lan=1 then
1 A; W( U' G! O- [8 ]                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- w2 t* O% L2 d4 t6 s4 Z# g9 _( Q" a                                                to_str("in der Andockstation: \"",?.~.name,"\""));; r4 d& V% L4 O4 F
                                else+ c0 f3 a% y% M3 k: ^! T6 Q6 ^$ `
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),4 x2 E& \; m! X, l7 }: y
                                                to_str("in docking station: \"",?.~.name,"\""));                                0 e( X% P  R3 N& b6 K& i1 Q% Q
                                end;7 V( Z) ?/ y, i: Y% M" v& H1 o
                        else# o! H: o0 A  p2 P' f6 F
                                @.Destination := assignLObj[1,row];+ [6 @5 J9 C9 \) O9 m
                        end;                       
$ N& c  l) ^7 @3 l7 M) h                        newDirection(@);
9 f7 _9 K; L/ n7 H6 }                        @.HasOrder := true;% A$ E& H3 F# h% a, M' O2 y, F1 Z
                end;- n$ |( P6 H' G/ l) b1 q& ~* L
        end;! {6 d/ b% V* F. T
end;        -- of the method
! \$ C) W1 x8 R9 w, ~
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
- \+ m) c; F/ G+ e' ^* ]# Y3 r  U' K' M% e* L
这是AGV_putin中arrive的method。) H, b% {1 Z+ Z* [
& v( m7 ?1 q7 [  ^1 A8 ~/ M! ]* \
当到达物料速度越高时,这个报警更多,
8 \7 g! K) D: d. d; c  A& Z可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
/ ^! j+ m4 G/ [( d程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
" y( h# N6 k$ K( }1 d) H& T" }& z; s& g+ ^% U% p
另外一个小建议,就是move,所有的move都可以这样2 z& X- `& V9 j& ^0 [( `
if not move() then debug end+ F7 V/ I& v5 g& F9 F; B! P
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。; H" \0 O. w: d
plant simulation中的free libraries有AGV模板,9 P0 v# U4 p. r& \9 z, s9 n" h. O0 U
里面也有案例。& n$ q0 z8 V; q1 e+ Q
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。# x$ E0 ]; A8 U4 b* k

1 S4 K/ d7 e0 D3 H我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
: u: z$ [1 [0 O' ~
# b0 V! ?& I4 P那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 # K) z. s' p$ U1 \" @: v
这是AGV_putin中arrive的method。
" l( G4 A* h' x2 t; z" o) ?# Y% }9 ~; B
当到达物料速度越高时,这个报警更多,

! t+ J3 x$ o8 L1 Z7 ]/ E/ w3 E2 E另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-2 05:37 , Processed in 0.026436 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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