设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5427|回复: 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': M1 v$ O3 Z/ ]8 v
*/
9 {7 M7 L9 r6 ]& yis' }, c% e6 q/ N& T
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;9 _7 H( a; L, p
do9 k# G2 o" s0 ]8 _
        Lan := rootfolder.Internal.Tools.AOLlanguage;+ O4 C- t4 x! T* ~. [$ B7 @/ r
        if current = @.Destination -- else return( |$ p9 {; |' r1 B; t1 o: g$ S" {
        then0 `3 _0 P9 G5 }; h
                @.Destination := void;
8 ^$ P( ]5 ^$ F, V" S# {- S8 ?                if @.occupied then
2 c' x" q/ O2 |1 W9 }+ h4 G; ^/ T                        part := @.cont;# a9 g8 }; N3 z
                        @.transpOrder := void;
5 h9 u. Z4 W% u8 o9 x8 Y- u# |9 o$ T                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# y4 {" j4 ?4 r  e5 g( b/ q& h
                                @,root.eventcontroller.simTime);( y4 O5 g' `% @* q
                        @.HasOrder := false;
, r2 a: g  v5 U) ]$ `                        @.DrivingHome := true;
" ]" U5 K: ~9 G: f; Q                        rgManager.tryToStartTransOrder;! ]$ [" w. ~& r+ ^* W
                        if @.Destination = void
  Z# h: Z4 L9 e9 s. \3 s                        then -- no transport order for vehicle @
1 G* Q2 z8 G6 U  @1 `/ I' x                                @.Destination :=% G) B+ l3 K: e9 t- r
                                rgManager.nearestFreeStation(@,track.~);
- {# q- l8 n- _! H2 `7 z                                newDirection(@);   
5 B4 x3 X* S  Z3 i                                if @.Destination /= void then
7 a/ f. L" g1 [. x! ?. v4 |6 l; g                                        @.Destination.NumReservation :=
) r" c, n9 e9 ~4 `; \3 U/ R                                        @.Destination.NumReservation + 1;
" Q* T$ j7 B5 Y, _. m                                end;- ~. g# Q# N# q3 ?
                                @.CurrIcon := "drivingHome";
4 z3 d7 ]$ [* N& b8 v' z                                @.DrivingHome := true;+ z/ e+ M4 h! g  `% y+ I9 _
                        end;  {, [+ r3 w, d  G
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station% G  C7 P( ]! V- A4 t! f* o
                        part := @.transpOrder;* e: w: Y5 W' S, A3 R$ y+ E, c
                        part.move(@);-- load part
' _" S5 k8 D! v5 M                        @.CurrIcon := "load";
! k$ U1 O: d. d" O: W                        GlobalDistObj := part.globDestination;
3 R+ ^7 W- r: R: Y4 p' x+ a                        assignLObj := rgmanager.rgAssignL;0 a5 |. ?7 Y& q  p' L' T
                        row := assignLObj.getRowNo(GlobalDistObj);& [2 A* l9 b0 U) y8 Q2 d$ }* y
                        if Row = -1 then -- since 70) d1 R: E& O1 R- h" R7 L
                                if lan=1 then
$ V0 }/ \' j0 B( M                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
1 l- I1 {- F, m, L5 l                                                to_str("in der Andockstation: \"",?.~.name,"\""));
: O; [, d7 u8 r* ?7 H                                else6 ~, l% F6 }* n* M
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
% ^3 q4 i7 {: h- p                                                to_str("in docking station: \"",?.~.name,"\""));                               
" B# s7 B" e% r# O6 D  b4 ^: d                                end;, F! N' \+ o/ v: h: s* T( Z
                        else; `5 B3 W7 P! S
                                @.Destination := assignLObj[1,row];
  _. |4 S/ S$ y) n                        end;                       
8 M- A& Z' G: d/ f9 X9 ?7 O4 m, f                        newDirection(@);
. _! }7 p5 v$ e3 U                        @.HasOrder := true;; ~6 T; o/ K; q: y# n
                end;! I- b/ H" d" b$ p( Z# h# o; ~$ _; u
        end;$ I0 o. Q& Z) c, U% J# `% }
end;        -- of the method
/ m. s! P' m4 g" ?: C- U/ H
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 $ {8 M; r' T7 M; K+ ]8 B. r

  L( Y! J' U* T1 l8 L* z这是AGV_putin中arrive的method。
4 k$ A, {2 B% ^( I( p6 j" I' `/ f1 b: z  T
当到达物料速度越高时,这个报警更多,
! D  E1 e1 B$ m, m, n+ G& z  e可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。, d4 h/ J; L. ^& F
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?; P$ e$ u! V/ P) k
: w2 s3 j# ~  p# @& g
另外一个小建议,就是move,所有的move都可以这样
" Z; X# p5 j( xif not move() then debug end
7 G( m/ d6 V6 e  N+ V这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
( X+ l: J! _; _7 f  q8 Mplant simulation中的free libraries有AGV模板,4 s" f3 g7 w1 q" m+ y+ J$ A" e
里面也有案例。/ `0 L" [  A* y
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。( Q) B% O* [4 p% K# O( ^  j

0 H* X; t/ C& q2 ]7 B3 P我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
2 D, e7 N, R& P/ V' @3 l9 X6 [7 _( Z& T2 E4 t; S
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 & G& v" d+ c) v5 w4 ^% d& h
这是AGV_putin中arrive的method。# A* S- q: r2 L# b9 [  d- C

0 ~# o6 o7 |% s  z2 Q- }当到达物料速度越高时,这个报警更多,
2 |" v5 M8 v% T: h. y9 \* g& K
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-11-23 07:54 , Processed in 0.019800 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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