设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6821|回复: 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'% N' r$ K% ?* i3 n  J6 h
*/
# H+ P4 W, ?4 G3 Jis/ E; k% a5 W2 G" n
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
( {1 R( z6 T5 o. p0 Qdo$ G6 ^9 M9 g6 h/ p1 x& G
        Lan := rootfolder.Internal.Tools.AOLlanguage;, Q( c4 Q  a) [- r/ K
        if current = @.Destination -- else return0 k  q+ T. M  D4 o
        then4 b; }+ ~7 f- H8 J5 K; |) t0 c
                @.Destination := void;! r" `0 o0 B- z; g4 j! i1 |* H) [% e
                if @.occupied then% M; ?5 G2 g1 n
                        part := @.cont;
; `/ v& {& \; _# U7 \                        @.transpOrder := void;
7 O, `! i  ]" g+ L: g                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 F0 A( Y1 R4 ~- e; h, D: S
                                @,root.eventcontroller.simTime);0 O0 n; K4 J; U0 l  g
                        @.HasOrder := false;
( b3 G7 o$ Y' @1 ]% `" h                        @.DrivingHome := true;3 g" Y. y6 x# k  q+ v
                        rgManager.tryToStartTransOrder;' |, ]0 B5 g( c$ o
                        if @.Destination = void6 L- V# Z1 L* I
                        then -- no transport order for vehicle @
& `. J4 f* f( w* Z; N                                @.Destination :=" }' |4 D/ d4 @& R& k. U
                                rgManager.nearestFreeStation(@,track.~);6 Y9 f" q* P1 u& q
                                newDirection(@);   
" h+ s( g* c3 U. H; h                                if @.Destination /= void then: Z$ \- [% @, x
                                        @.Destination.NumReservation :=0 ]( w" c5 x3 }
                                        @.Destination.NumReservation + 1;
4 M7 s& e0 t6 c, E+ ?' N. A                                end;( s" ~* y" y# m! \) F% o
                                @.CurrIcon := "drivingHome";
5 H3 P$ p6 D' C9 `/ X( ~+ w                                @.DrivingHome := true;* Z4 u. u4 n  J6 X- f3 j
                        end;% r8 r* w/ ?5 m* [/ x/ F9 W1 w! n  `
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station6 h1 S6 v; j& E& B# x
                        part := @.transpOrder;
0 C  m' K# L& R: a2 ~0 r* S                        part.move(@);-- load part7 P" q- ]+ ^% W0 C0 Y
                        @.CurrIcon := "load";
2 k5 R' a( w2 T# f$ C  C! Q                        GlobalDistObj := part.globDestination;4 q- Y+ `: [0 D% C! ^9 i
                        assignLObj := rgmanager.rgAssignL;, H: Q; _/ B3 X3 I
                        row := assignLObj.getRowNo(GlobalDistObj);
# W' a* d' v: o1 y. P                        if Row = -1 then -- since 70
& p3 U) \0 Z( D0 M9 S                                if lan=1 then5 Q# u5 a3 z+ e- W. j8 X# S
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),; c' v$ l( B; i
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
; P; }/ g/ F' A0 Y7 ]+ q1 }" }! T) W                                else
/ y+ U8 U7 e* U. S& u                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
! b# x4 u6 F" Y                                                to_str("in docking station: \"",?.~.name,"\""));                                5 H$ `2 H/ ?8 l/ N, d
                                end;
6 o! Y# i( y6 u                        else
# \- \. y7 P7 i* z4 k4 e                                @.Destination := assignLObj[1,row];$ s3 \& `/ T; O$ T' h
                        end;                          t* U8 I6 f# S! s, u  k" R* A
                        newDirection(@);8 G6 i" A  W3 k$ U" s4 F) j4 V
                        @.HasOrder := true;- I, Z; P! k' ]% J$ r' v- r
                end;, b; H" `/ Q1 A4 Z/ y3 z; C. T
        end;
* z; B. e, v* [% Q& xend;        -- of the method" }0 K; U3 v' r- Q2 _
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 5 ~& Z) ?0 P; f" }1 b

+ {) \" z1 a% z* j这是AGV_putin中arrive的method。+ X; |. @" a; z5 `% q: ~
" Q- x' `+ c+ h! D" B
当到达物料速度越高时,这个报警更多,
2 G' n) q6 c' T5 |) |可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
- c# }$ N  @; E: r程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?% ~6 p7 C4 W% u
4 G# B) t6 H! {/ `1 x5 V8 {1 o
另外一个小建议,就是move,所有的move都可以这样* V& p! @4 }* X* h
if not move() then debug end; s8 Q( K3 N: \6 P0 E6 R2 R. M
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。4 h( W8 k1 }% g! L; x- p6 Z
plant simulation中的free libraries有AGV模板,
& e( G$ C; Z4 ]7 G2 Y7 F6 m里面也有案例。
3 C$ u8 b( D- V7 ]  C我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。  Q* Z& A9 h3 M8 E4 P

8 T9 M+ j' }# d" M# d, v3 L我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
; V, v# R" `7 R
% O5 l( U% K' ^  h5 K那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
! O6 S0 @4 k2 ~5 n; p* K这是AGV_putin中arrive的method。
. R' h2 ?5 u  F- J0 A
( s+ V/ g8 o  I; e9 q! N. A当到达物料速度越高时,这个报警更多,
7 P5 \: C" R+ M; Z, g/ q. W
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-28 14:13 , Processed in 0.022271 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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