设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6931|回复: 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'
; F- u4 X/ I( K+ x*/9 r, Z2 d( Y& I
is
* N( S  f$ b7 Q. j& o. y3 s        part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ A* s# S2 y$ A. S  V
do; E8 S# [+ d3 c& v$ U" I& B
        Lan := rootfolder.Internal.Tools.AOLlanguage;, F: a3 Q3 c1 W
        if current = @.Destination -- else return& N( i) J) l: n% k8 d
        then
! A7 ^7 `" _: }4 A" ?                @.Destination := void;
- S) |1 |$ A" c+ j. ^! B                if @.occupied then7 ^  m- p/ V0 n) f
                        part := @.cont;
' j9 @5 z/ J( l' k                        @.transpOrder := void;; Q4 C( R, H1 b) D0 j0 \
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,$ W$ M* U- E# b, y; u. v" `% a
                                @,root.eventcontroller.simTime);
1 p6 G2 A1 |6 G$ G9 q2 d                        @.HasOrder := false;
1 f# M0 d; J8 Y0 R# ^                        @.DrivingHome := true;0 V0 X( v$ G" z$ z3 X
                        rgManager.tryToStartTransOrder;1 Z; V* L+ A6 ?) k
                        if @.Destination = void+ I8 A, M9 V" Y# d2 l# s& |0 q
                        then -- no transport order for vehicle @% _( h6 v+ q+ P5 G' }# l
                                @.Destination :=
# |7 p0 a$ y6 L2 ^# a                                rgManager.nearestFreeStation(@,track.~);3 f3 c' |8 ]" T  Z% m; W5 U, v0 ?0 q
                                newDirection(@);   1 }2 V% Q4 l" o7 Q0 V8 B
                                if @.Destination /= void then
7 _# k( Z5 V# m' N  h! U                                        @.Destination.NumReservation :=9 k% j7 D1 }+ n/ E- y9 Q
                                        @.Destination.NumReservation + 1;  ~& W3 a4 I' d4 F9 q. X+ D" H( j
                                end;9 J! T( S4 j: `" N; N9 W
                                @.CurrIcon := "drivingHome";0 }6 p5 ?9 `9 a& x$ Q
                                @.DrivingHome := true;) B' X) ]4 B- ^# a; {, v9 Z1 |
                        end;
9 u$ S4 ]3 |: L6 r                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; V5 J; M! c- q8 ?                        part := @.transpOrder;/ x% i9 \0 v6 |: U* G) U  g6 p
                        part.move(@);-- load part0 w: S% U- |# ~: W& u! X
                        @.CurrIcon := "load";/ L1 _; J& F3 T7 a) W# g* H
                        GlobalDistObj := part.globDestination;
( }% t0 Z7 O5 L& {; H: N4 R- W+ p! j3 I                        assignLObj := rgmanager.rgAssignL;6 c( M1 [0 a6 S$ V2 J1 d
                        row := assignLObj.getRowNo(GlobalDistObj);
* K6 x+ Y! A5 }8 ~; C4 \4 R& H                        if Row = -1 then -- since 70
5 _! R: o6 [* P                                if lan=1 then
; Q/ G/ t. R. U  X                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
" q6 W. Z$ X- N                                                to_str("in der Andockstation: \"",?.~.name,"\""));
. }( R; b8 u) d" C$ ~                                else
% w0 Y" }( r6 x( C                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- }+ N( `- ]% N: j. Y/ @/ [                                                to_str("in docking station: \"",?.~.name,"\""));                               
( h6 T. M: z7 ?9 t                                end;7 B% K/ r* x. R: Y
                        else
4 D# }# w- Q7 r) K                                @.Destination := assignLObj[1,row];
( @# {2 @$ e7 t1 T3 v                        end;                       
+ c" w/ j+ d; o8 u2 `                        newDirection(@);8 `) l! b1 s% S: W5 _, j
                        @.HasOrder := true;
! A& S* L. q! W4 [! x: s                end;5 M# g9 O: b/ J! S8 f; V, A- Q8 j
        end;
4 r! Q6 |# N8 F( d7 m% lend;        -- of the method! q: ?* c- _! s- P
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
# O+ W+ |; c$ |$ q
: {9 E" v/ b  A+ k# e这是AGV_putin中arrive的method。& g0 t' d* Z- b0 C
' l& X: {9 z0 G
当到达物料速度越高时,这个报警更多,
" w$ E* p. t' [4 d8 y* u可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
; i& t4 a8 L3 S程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?1 d1 E  R7 t. e6 w

, R, y* K: N. v, A( e另外一个小建议,就是move,所有的move都可以这样2 f4 p; Y8 j! H2 @  ]1 W  w, l" p
if not move() then debug end
+ `6 q! A, a* W8 Q% z这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。1 X) ]" O9 i, }4 B2 N6 s
plant simulation中的free libraries有AGV模板,
8 z( X, O, m  f' J+ e4 J& F里面也有案例。9 K2 ~' Z2 x7 u$ [, Y( D) [
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。6 N9 N3 ?- @' U% v" |0 R
3 c& `  {: @  q
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
7 F; b# g2 F% A4 P
, O1 P) b  b4 j那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
" q( \2 q7 P# J. v0 r这是AGV_putin中arrive的method。
# M9 Z$ m. e9 ~/ j5 Y* O* g% \
0 m6 A* m5 Q% D2 {& D0 l当到达物料速度越高时,这个报警更多,

( L( P5 z: x2 s+ t+ W0 l* K另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-7 06:37 , Processed in 0.015112 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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