设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7882|回复: 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'
! k5 ]; R# ^8 D1 c- Z" G1 r*/
  L- t: j1 U& \" Jis, n& [6 o1 T: H) c
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;3 o7 @' Z. Z+ x' ]; P; V! n  S1 p
do
( p' D2 {6 H' O3 g- j: c6 Q        Lan := rootfolder.Internal.Tools.AOLlanguage;. E- q( `$ l$ T& X2 C
        if current = @.Destination -- else return
* t# d( m0 m% b        then0 {0 X$ m# z: u
                @.Destination := void;0 C# b: t: D" ?1 f0 F/ b
                if @.occupied then
0 V% m+ U% U8 p% l: T' ]                        part := @.cont;# V# c$ a) u! c. L
                        @.transpOrder := void;
2 V7 x7 I( i$ E, `9 `& o                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,' Y  X1 M$ {: n- |" J5 U% i
                                @,root.eventcontroller.simTime);
- [' r! A+ p' C; P1 u                        @.HasOrder := false;6 z1 u) i- I+ i; c+ S. T/ K! f# m4 E
                        @.DrivingHome := true;! i: d! \/ }- I  S4 c+ A
                        rgManager.tryToStartTransOrder;/ p4 e* Q. H% v) Z! p( [# G
                        if @.Destination = void
5 U# y+ f3 Z) O& O, \$ N                        then -- no transport order for vehicle @+ k& d* C& h' r
                                @.Destination :=( H# ~" S3 u: Y3 M# W( v6 x
                                rgManager.nearestFreeStation(@,track.~);
3 O: v$ e9 V  E6 h6 ~                                newDirection(@);   ' z' J: ~- Z% {* r  r. t. ]- N1 ~
                                if @.Destination /= void then2 o& y3 Y! m/ |
                                        @.Destination.NumReservation :=; {4 J: U# j- l. Q
                                        @.Destination.NumReservation + 1;
# b( O+ S* a( @( X6 U9 M5 c                                end;
9 f) _! k" G. `1 \                                @.CurrIcon := "drivingHome";+ }) L& q$ C4 A6 S/ i' L: r
                                @.DrivingHome := true;: w% O! Q) W8 a$ o- [- S% g: z5 Z- F
                        end;
" H$ [4 m' g/ r( A. ]0 k& f& r  d                else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 F" {  b- |9 f
                        part := @.transpOrder;
+ [7 i3 Z6 L) x                        part.move(@);-- load part
: m9 |# y7 c+ Z* @+ X                        @.CurrIcon := "load";" d6 |2 {2 L/ j* U' h9 D8 E5 ^+ j
                        GlobalDistObj := part.globDestination;
8 e1 c1 K1 J2 A  l                        assignLObj := rgmanager.rgAssignL;
% ~5 k# ^( B$ Q' ?5 ^4 m                        row := assignLObj.getRowNo(GlobalDistObj);8 V- C' d; H8 {+ x1 V$ k" L1 ~
                        if Row = -1 then -- since 70: V8 @/ t% e/ t4 m& z$ M, C
                                if lan=1 then6 U/ B8 r% X0 \+ }' G
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),1 i( i$ @7 f7 v
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
* f; |% Q; s$ o1 g$ `- h2 Y8 ]5 q                                else
3 ^) l8 t1 |3 y                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),& c2 {; n% y* f  S
                                                to_str("in docking station: \"",?.~.name,"\""));                               
7 @. q7 Q5 a; n: x7 O                                end;3 S$ @3 M  s' w& a. q# e
                        else
4 O9 ]% G9 u+ O/ k8 y  ^% n& e                                @.Destination := assignLObj[1,row];
, q$ J% `- {8 Y. |) `' K                        end;                       
* h$ p0 w* G0 u' t% n2 Z" A! C                        newDirection(@);
" c" x+ h! |: o1 r% [                        @.HasOrder := true;) ]/ b8 C, s: x5 z8 V7 [
                end;$ j* Q- U8 A3 H' Q
        end;
; I3 l; b, C: @8 s2 ^  M, V& Qend;        -- of the method
) B( q7 q! H8 Z. K6 G1 q
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
# s# t7 a4 `4 {& F' H- i% i& d: E8 k# C5 N
这是AGV_putin中arrive的method。- n3 h" j/ M: l  I
1 W% G& ?4 H4 s3 ^; s9 u( s
当到达物料速度越高时,这个报警更多,
9 E6 h* z$ X! s7 N可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。: Z' F$ ^8 |; |6 H/ O& g
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?* X; [4 a8 ^1 N
" r/ T- h( T8 G! N1 P7 P. C- ^
另外一个小建议,就是move,所有的move都可以这样% i. @2 O* C! Q3 v; g
if not move() then debug end
& ^& t$ ~" G- T' N% M# Z% W. ]这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
9 n5 M( Y5 h1 l" D7 V+ D- }plant simulation中的free libraries有AGV模板,
' w# Z& G+ Q; u! y* D里面也有案例。
  @; t1 {# T* o4 d  H7 Y" O我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。7 L; t3 R, L: H+ C9 a  p
7 u) S1 S9 ]  G& j7 c0 }
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 . J6 S$ T# A1 Z1 j% k: S
4 j2 `8 E6 Z+ b% ]1 f, I
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
' e  P5 p; U2 g7 L7 L4 m这是AGV_putin中arrive的method。4 |" s+ o: |4 N* z, u2 ^7 g9 j- q
3 V: g0 R( U( M5 G
当到达物料速度越高时,这个报警更多,

2 y# ?7 e' b4 A7 P* L另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-3 08:09 , Processed in 0.024507 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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