设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9204|回复: 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'
4 l% \* ?( t1 H+ e7 i*/
5 |% M1 T1 b, l+ dis2 S2 M: g: ]6 P6 C
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
2 @9 L$ u  t& u& q- w1 Jdo
( E2 h1 U) [) C4 K        Lan := rootfolder.Internal.Tools.AOLlanguage;
! _2 J# f$ \  m! b- {        if current = @.Destination -- else return
$ I( u: d1 O& e, n+ |: `! ^        then
+ D7 ^# F$ I4 h1 j3 f7 V" E                @.Destination := void;
+ r5 B* [, \; E/ W& ?- Q2 r                if @.occupied then" H% |- m+ O' E% n, H
                        part := @.cont;
, c; Y5 m% B0 ]3 x4 g3 G9 u                        @.transpOrder := void;' ~& u5 D& g& c
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
' z: N$ f# n; l7 w                                @,root.eventcontroller.simTime);
8 C- l& \3 {5 ~" R                        @.HasOrder := false;
9 t% s9 \$ e& M; b8 c                        @.DrivingHome := true;
) f( C9 E9 X/ D  k8 S* w) Q# N7 Z                        rgManager.tryToStartTransOrder;
( ]) o9 Q' t) b  p* ^                        if @.Destination = void
# _% z( {6 C4 L" m                        then -- no transport order for vehicle @
7 J1 ]9 E" W" ~. E" B                                @.Destination :=/ E6 z. n* t  j, i
                                rgManager.nearestFreeStation(@,track.~);
* X/ A' M+ B/ S1 l                                newDirection(@);     B; a  a" D6 g! X: z
                                if @.Destination /= void then- C3 c  d+ a1 j. C
                                        @.Destination.NumReservation :=* {# h0 ~. o, X; Z9 s5 p6 K
                                        @.Destination.NumReservation + 1;) @; ]; e/ f2 a/ ?3 v) m" T: _9 s
                                end;
9 S) H4 s/ Q& t/ J0 f                                @.CurrIcon := "drivingHome";# t5 r, V; `/ [) l4 U/ s
                                @.DrivingHome := true;, L5 t) c$ P9 M
                        end;' }/ J( g" Z5 X6 L* Y" z$ Y3 @
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
$ |  C, g" q7 q# ]                        part := @.transpOrder;  `* y& ]. U/ |0 {
                        part.move(@);-- load part- S: c% q5 `2 [* Y. K
                        @.CurrIcon := "load";
, ^6 ~" {: F; Y1 K; Z                        GlobalDistObj := part.globDestination;, C5 M, ?# t% H5 T+ E' F$ E
                        assignLObj := rgmanager.rgAssignL;. N. X# g/ X! n( [
                        row := assignLObj.getRowNo(GlobalDistObj);% s7 g: X8 r. S5 a
                        if Row = -1 then -- since 70  y5 t& H% x5 p1 L- r8 G
                                if lan=1 then
% F  Y2 k3 {8 J+ f0 u                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),5 ?) A/ R5 i! H) x6 o
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
! ^" R. o! m6 U                                else. A1 s6 g! I. d; r! W" H( _5 Q" U2 c
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),1 e) q% ~1 {4 Q1 n
                                                to_str("in docking station: \"",?.~.name,"\""));                               
( l- j3 b7 j. K6 q, _2 U( T: Z4 Y/ V                                end;
9 _% N# G5 P% O$ o% k$ v2 ^                        else0 l5 o2 j; d; b: \  C
                                @.Destination := assignLObj[1,row];* f3 Q! i! x5 ?  k
                        end;                       
' \8 l+ f$ g# j4 x8 P                        newDirection(@);
. C: X2 s$ ]9 Z- `+ W                        @.HasOrder := true;
; r5 c( _2 }" \7 x                end;
( e/ [. U/ |% `' E  O        end;/ v  w$ ^; q! G2 s. C% k6 x
end;        -- of the method) r* c+ P- t& p
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 ; t5 l( \, s$ d% M; Y; v0 D

# j7 \- b1 B8 f5 H; V这是AGV_putin中arrive的method。
  M# C8 @) J! C& p. X8 d7 p  i- H2 [% ]$ G+ z- y' O
当到达物料速度越高时,这个报警更多,
% N$ @/ |1 I) }7 M8 l3 L可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
, M* ?) l1 {9 i# O& d3 `程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?: k+ S: A3 z5 X: |
. ]: {) C4 G. l; B% t1 h- M% P/ U
另外一个小建议,就是move,所有的move都可以这样
% t+ S+ f/ d! y8 aif not move() then debug end
* \. e- H7 B8 L, z0 c7 E7 V这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。4 \* [3 ~0 S2 w, [6 T4 H. Q" r8 d
plant simulation中的free libraries有AGV模板,1 x3 a$ s4 r/ C6 o' Z& w# ?
里面也有案例。
" S- R3 `8 B" Z9 Q3 M我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。( r8 i9 N+ x5 A" c9 g

1 C0 k4 g0 L" y; o$ V% Q% x! x" M我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
7 @8 y5 j1 e! o5 q0 x% P. S' o* c. a# ?' J! M) h2 G5 B
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ( ^( q2 Z7 r% a& {% k" @
这是AGV_putin中arrive的method。* N* v% v  j) E8 [- B
# a, H0 e" \! N* V+ V" }/ @: s
当到达物料速度越高时,这个报警更多,

9 z$ X. n) A2 _% J  G' _' C: @另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-19 07:59 , Processed in 0.019309 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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