设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6583|回复: 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'% M; c$ t! n+ Y9 D0 l: N; `
*/
6 N4 B0 \8 H, Y& I. n. U' K6 Y3 uis
6 C5 m" |8 n9 n# j* W3 M        part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ @* {" s# }( p; t  X
do2 J- Y8 V# e  C0 s; b0 ]
        Lan := rootfolder.Internal.Tools.AOLlanguage;6 z1 U  W/ H" t) c0 r8 Z7 Z& k: q: x
        if current = @.Destination -- else return# x2 O2 s2 {/ q- R6 F
        then* r7 f  a5 l) S
                @.Destination := void;
/ {+ c/ T6 `5 X: Z) l8 f2 [                if @.occupied then. W7 U$ n# S1 K; b* Z. z* ?% V
                        part := @.cont;: d5 ]3 M! N7 [
                        @.transpOrder := void;
9 `' Q% z9 H$ v, q. a% v                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 F1 h0 W5 d! C5 F& \                                @,root.eventcontroller.simTime);2 S4 S$ Y7 ?  q# J
                        @.HasOrder := false;( x  Z. z# b, }% E
                        @.DrivingHome := true;9 t2 c9 f6 }( L( E6 [& p2 T
                        rgManager.tryToStartTransOrder;
" T1 K. P; `; A) |( K' q                        if @.Destination = void; E8 m# l8 }* d4 Y5 |
                        then -- no transport order for vehicle @
' @* F( L; `/ i' L% g                                @.Destination :=
8 Y7 \7 |! t4 G1 F6 a- k                                rgManager.nearestFreeStation(@,track.~);# Z4 m. X( x$ T3 X1 K# i) t
                                newDirection(@);   
  K& u% J/ F! Z1 X2 {                                if @.Destination /= void then
( h* r. Z  K% y, `                                        @.Destination.NumReservation :=
1 o% y/ P/ n* r- T8 |7 U! f& f                                        @.Destination.NumReservation + 1;
7 v% ?2 S; D% E) H                                end;
+ Z# X, d$ b3 i  A$ t9 N  J2 `% v3 H                                @.CurrIcon := "drivingHome";9 O. g7 w$ ]0 j2 [! W
                                @.DrivingHome := true;
0 M8 v1 _, e& r- C3 d                        end;
  _' ?6 G! g/ q# r                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; r, O, d5 S& w: i% r7 C                        part := @.transpOrder;( h' T' i& B3 `3 L/ o( I
                        part.move(@);-- load part
+ k7 l% z; e3 r7 y  R% z  u                        @.CurrIcon := "load";
6 d) G" G; N5 S                        GlobalDistObj := part.globDestination;
6 b. F: W3 W; @" e                        assignLObj := rgmanager.rgAssignL;2 E. l; V% n. U8 x, [" j4 Y
                        row := assignLObj.getRowNo(GlobalDistObj);
2 i6 s3 a1 u9 v/ _( ?5 W                        if Row = -1 then -- since 700 c, L0 b! n8 o  d9 \
                                if lan=1 then8 c- s/ k& Z4 J
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),+ ], Y/ C5 ?5 ]3 u( g# i
                                                to_str("in der Andockstation: \"",?.~.name,"\""));/ h: U: m0 z, |' u3 Y
                                else
2 _% V3 e' S5 R0 G3 j: b7 P                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),  o0 g# [3 ~1 E$ \" F$ m
                                                to_str("in docking station: \"",?.~.name,"\""));                                ; M0 N) ~' z' P* E- c  E; J' N3 i
                                end;$ u* V8 G) J; {+ i7 \0 J; \
                        else
9 p/ x2 x' |6 |" N! I3 L                                @.Destination := assignLObj[1,row];1 e! f4 o% A8 R5 z# E  \3 p
                        end;                       
' y: r- V9 q9 z                        newDirection(@);
$ _$ \6 }7 f  l5 a6 R8 V                        @.HasOrder := true;% I+ P& t. W6 v
                end;
; ^! _- g+ Y  M2 r% Q3 m        end;
; F: i% C& T% s, Tend;        -- of the method
' r3 B0 e  C- Z' r, k
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
5 G: R9 N0 O7 @& A, e5 Z6 ?; l5 x& u6 x) G
这是AGV_putin中arrive的method。
0 v* A6 v7 }9 g- v% J% K5 ?- s+ ?  p  N$ c
当到达物料速度越高时,这个报警更多,8 ~/ C9 |; o6 p# x1 [, Y# u
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
( A& f7 k5 e6 H7 K! r9 v& h程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?7 R& w9 x" A& |5 _' X

2 L  l9 E: [$ Y+ E' `. h4 V另外一个小建议,就是move,所有的move都可以这样  S. Z3 p2 W' `! w
if not move() then debug end! g  O# j  h6 I  O; N
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。( N1 |3 e7 v, Y  f; z  m, I
plant simulation中的free libraries有AGV模板,
7 n" k2 \9 a2 z3 i& w0 C  d3 u里面也有案例。5 r$ Y+ z) h# W
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
, V9 ^4 G. J# K" M+ Q( ]5 ^* [! V. c1 q1 w) N' [( g
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
. g( J. F/ W  V3 d& ^; I: J  U/ ~! s# z! ^, q% W7 }
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
# A% U9 D. s+ z4 ~* N. c( {这是AGV_putin中arrive的method。
# I5 x# `7 L+ y3 r2 i# X
' ]( _% R( y  v% }当到达物料速度越高时,这个报警更多,
$ G4 P0 u* f4 M6 h
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-14 06:24 , Processed in 0.022021 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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