设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7922|回复: 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'
: B/ e: K% ~7 e  f9 d3 e*// n. _/ t$ S3 g* C9 F) I/ J6 r
is
3 \+ v# A- J9 W, x: W% b        part, GlobalDistObj, assignLObj:object;row,Lan:integer;! z& l2 s- I- t' j$ @9 P" t
do; {) l) G7 Z% B5 {. f
        Lan := rootfolder.Internal.Tools.AOLlanguage;2 b9 \+ Q8 U/ d7 {2 W6 U: t
        if current = @.Destination -- else return; L# T2 G" w7 b2 S, x: G+ d
        then6 n1 ?  j& I7 w6 `) a
                @.Destination := void;  B/ e/ n% a- E( k# g7 t& f& p
                if @.occupied then, F1 U- T/ l- W* ?4 r. w
                        part := @.cont;  `% V  {0 h' @9 F# D: u1 v9 b
                        @.transpOrder := void;5 Y/ p1 S  C1 ]1 d3 c& g
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 c# q6 H. j2 B* ]                                @,root.eventcontroller.simTime);
( L, |+ d) x( J, m0 E                        @.HasOrder := false;
5 ?4 ]" p  u. Z  _* f                        @.DrivingHome := true;3 w; l! W) d1 g! _) t. L% ~
                        rgManager.tryToStartTransOrder;
8 S8 Z; A7 y( v# T7 d9 R. M# @                        if @.Destination = void
% @% K. {) E5 G& r8 E0 p4 V' d                        then -- no transport order for vehicle @' R2 b$ I) V: Z% l
                                @.Destination :=) U. I% o! V8 D5 q6 q
                                rgManager.nearestFreeStation(@,track.~);/ z: ?0 l3 P* U$ A
                                newDirection(@);   4 F/ y' K: [0 {' z
                                if @.Destination /= void then
0 V2 G2 I: \& }0 [6 d$ y" F# P                                        @.Destination.NumReservation :=% l3 B+ P; g, r* V# v
                                        @.Destination.NumReservation + 1;7 \+ {: h1 ?( ?
                                end;% R% H5 v; _* N. |" B. Z4 k
                                @.CurrIcon := "drivingHome";
6 ^4 b* }. E$ s                                @.DrivingHome := true;0 k; b" M2 ^: [* i5 y7 ^
                        end;
! O. P6 K7 i8 X; _  J                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
8 }8 p5 y, S+ A# K$ |( h                        part := @.transpOrder;  r  Y, D/ R" H! o  |0 p" C3 Q
                        part.move(@);-- load part$ N& J; Q* `6 u; ~' C7 C( w
                        @.CurrIcon := "load";
8 c8 N3 |$ G" ^- V                        GlobalDistObj := part.globDestination;8 O( J9 W$ s# V- b' L
                        assignLObj := rgmanager.rgAssignL;
; ?4 ^# a! j- H+ c  k. }                        row := assignLObj.getRowNo(GlobalDistObj);
( M5 \% ]! i  S4 q( V5 p* [                        if Row = -1 then -- since 70% `- f: t7 t7 R+ Q2 n6 f* ?% V
                                if lan=1 then) e9 C* c6 g# p
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),; L% Q4 s/ v% C
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
8 G5 w, Y+ i5 _1 O4 O" V2 d                                else% _5 P: k* S2 U# g4 t5 _
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 P" m5 Q  V/ N6 T9 m9 S
                                                to_str("in docking station: \"",?.~.name,"\""));                               
1 y$ G* \+ ^; f( P! b! m                                end;
8 }3 v4 B( L% K4 F9 f                        else. b- C7 i* K/ X# w; @' n  L
                                @.Destination := assignLObj[1,row];7 J6 L. ]. T! n" d- ]+ l
                        end;                       
6 h8 f2 g8 b2 D  t6 M9 Z# j7 p, \                        newDirection(@);+ X! ~) O8 a3 r2 l) ?3 R3 c0 t0 {
                        @.HasOrder := true;
$ H! L7 w+ I1 e0 B                end;7 L* |# s# h" i; n
        end;
1 M0 F& v2 f5 A; lend;        -- of the method
, x6 M; S1 N$ h" O
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 0 x& f1 }) `$ w- o5 R

. D7 F  P: P( k4 Z5 E: a& t这是AGV_putin中arrive的method。
) c1 R# `3 R" r$ }# d0 {" e6 l; ^8 s) {' o5 e% M0 H
当到达物料速度越高时,这个报警更多,
7 A, O  H5 Z4 }. s6 o/ y' |$ n可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。( a3 O, w* C5 A3 X, R
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
4 ]$ e' o2 |/ M$ q* i) d& ^- v8 j
另外一个小建议,就是move,所有的move都可以这样
( l/ K  k6 \/ `+ e7 i6 Pif not move() then debug end) ?+ x; z% @0 F7 Q
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。: E& F& w. L) r' H7 ?* P
plant simulation中的free libraries有AGV模板,5 I# v2 X, d9 d/ s
里面也有案例。2 S9 Z$ B0 J5 h0 U1 r! c5 R
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。3 Q& v7 x3 r3 |7 k8 b! N
  T: Z/ ]3 U; _1 }
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
" E" L/ C& Y: K4 J' `- z( y( v/ v  E0 X$ _  }
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 & J0 G  V5 g/ X. _1 a  o" K6 ~, D
这是AGV_putin中arrive的method。
0 Z% n! Y: v3 j3 K$ J; h" |# H3 l) P. G1 k3 }8 M# g
当到达物料速度越高时,这个报警更多,
* K; y8 x) b' Y6 J' N5 b
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-5 20:05 , Processed in 0.018809 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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