设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5400|回复: 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'
& d; Y4 j5 x& N! G8 ?" |; Q*/2 Q) U% h; ?( _6 X7 B8 E
is
$ ]' ]! q& v; b6 r- V: G$ q& d4 ?        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
6 M/ V" V! m2 p+ w" s. _do0 I% X* T# H* b: ?9 W# v8 c( x
        Lan := rootfolder.Internal.Tools.AOLlanguage;! e/ Q* }1 Y: _  j! n$ a" }! F
        if current = @.Destination -- else return
0 i1 l% b0 E0 Y1 I+ X8 L: A3 ~        then$ F7 z. S, X7 O
                @.Destination := void;0 y2 ]6 R' r$ X6 a) }# ]* ]
                if @.occupied then
' V! S* g! `7 }9 W  v  l# {7 N                        part := @.cont;' S9 ~4 P% g2 Q) Q
                        @.transpOrder := void;
* H; o$ V/ {: @" f9 z5 f                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
8 d4 @. f' F9 @; _8 f4 y: I                                @,root.eventcontroller.simTime);1 m0 {" @5 I+ M2 F* y# K# I
                        @.HasOrder := false;
& E  s: Z# w( Q; w( l4 v                        @.DrivingHome := true;# D# m# H, ?; `
                        rgManager.tryToStartTransOrder;# F0 d# y. e  B4 R5 q5 P1 F
                        if @.Destination = void) K+ |( _" ?1 V! u: ]$ B9 W
                        then -- no transport order for vehicle @
1 x3 f( P$ b, ~- q: L                                @.Destination :=: J7 S9 ~" ?9 }; m  r' W* L
                                rgManager.nearestFreeStation(@,track.~);
" O& X2 V& l4 p: f                                newDirection(@);   2 l4 r- N. f) c) p2 w
                                if @.Destination /= void then1 `* X1 i  U5 i* [7 q! }
                                        @.Destination.NumReservation :=1 _- ?/ d: r# l
                                        @.Destination.NumReservation + 1;- O0 W$ [+ W. Q+ V' w* z$ G
                                end;! u% {, @6 f7 _5 t
                                @.CurrIcon := "drivingHome";
0 y0 O7 r, A  [& P7 e- Q                                @.DrivingHome := true;
# d% y- k! F) U                        end;
+ V( u% K# `- i# g" o                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- X4 f8 S+ l5 V/ \9 _                        part := @.transpOrder;/ X5 N& L( f8 F5 ]
                        part.move(@);-- load part# N( w) g) w, k% U' \& ]
                        @.CurrIcon := "load";
3 ?$ _% q& O# S3 t: K                        GlobalDistObj := part.globDestination;
5 d, C( z1 U! I# r' O+ Z                        assignLObj := rgmanager.rgAssignL;5 m& m8 ^3 m4 \; n$ W+ E
                        row := assignLObj.getRowNo(GlobalDistObj);
4 @9 v, V2 V0 o& W; `4 u9 E4 r                        if Row = -1 then -- since 70
6 b6 z* [  d) V0 Y6 t                                if lan=1 then& }5 R  l; T* e5 n# S& k: n, r
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- |* y2 K: q9 J! O) w( v; e                                                to_str("in der Andockstation: \"",?.~.name,"\""));
7 J4 u, m3 Q1 E9 V# c                                else
: B2 s3 N# M: @4 K# J                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
$ b4 `# Y4 l  `/ P                                                to_str("in docking station: \"",?.~.name,"\""));                                8 m1 l& {2 h5 I2 J
                                end;
, [. x0 q7 F& T! }0 ~; d                        else
! x! t4 l  `; I                                @.Destination := assignLObj[1,row];' w6 H1 a! F7 c7 K- [: ?, a
                        end;                       
: K6 l3 s4 k0 W2 S# b9 X                        newDirection(@);( x' e2 j9 c) M  X8 `
                        @.HasOrder := true;$ x  G; @; I8 |! n( O5 H' D" V
                end;
' K  h. b1 ~2 j0 _8 m        end;% p! Q( g0 V6 P* M
end;        -- of the method
1 `9 W2 Q) V0 n0 q6 r+ t: y* _
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
5 c; `! t9 Y: M; C
; Z9 c, J/ w8 R这是AGV_putin中arrive的method。; z4 l' ]5 ]4 k! A. z

! P4 ]7 R, n" e; r, O; q( Z当到达物料速度越高时,这个报警更多,, M& f5 n# W, ^4 U% _5 ]
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
' t$ w: b- L0 l9 p- n程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?7 R, m  ^# g. O$ p! F5 E2 u
8 w9 J3 q9 Y/ t- ^6 ?# ]
另外一个小建议,就是move,所有的move都可以这样
2 y0 |" \6 u7 z# @3 Q% v: |. Z' iif not move() then debug end9 s: `' x  S0 [7 @
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。. o( l! L0 U% X- l1 d
plant simulation中的free libraries有AGV模板,' T. a7 b" {! P8 B
里面也有案例。
/ x9 [: O, Q2 ?& f我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。6 V: Y, L4 ^6 M0 p8 n* A+ G

  ]- F, {8 a: o4 u我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
) W* i& }( y+ G" Y
- n  G+ a. j& q) H; h$ ~6 ]. [. R那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
% i) n  w+ z( f/ i) T这是AGV_putin中arrive的method。
# s4 e; a3 P, `( d/ s/ Z. B: p. f6 B- [) _- T
当到达物料速度越高时,这个报警更多,

, n" l. f+ V$ M* E) F+ D' ]另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-11-20 10:35 , Processed in 0.018461 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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