设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5648|回复: 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'
7 P  m- J! w2 h3 b* j( X# A*/
) y6 D/ T7 S2 c( ris; n4 N5 n) s3 f9 q; ^9 |" R% x
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 r8 p5 @- ^, p) |1 ndo. n) M( N, F3 c2 M3 }
        Lan := rootfolder.Internal.Tools.AOLlanguage;( a0 u. Y% j  z
        if current = @.Destination -- else return
! v' v8 ]% ^5 \- B+ v; s, }8 \& Q        then5 X+ N' ~" J& B7 F* X8 J
                @.Destination := void;* K& B8 |0 m$ f5 V3 b
                if @.occupied then
6 g1 K2 @. F2 s1 S                        part := @.cont;
# X$ ]" T$ a4 x: `" I                        @.transpOrder := void;5 L. X" Q1 u( e- @% u" S5 c
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,4 w. S$ d2 r; B: L( _" L* b. B
                                @,root.eventcontroller.simTime);
9 s& c, n; M3 Q; t1 r                        @.HasOrder := false;
3 \4 Q# Y* g/ p( E: H                        @.DrivingHome := true;
; x) p( J9 U4 p3 @8 {4 r                        rgManager.tryToStartTransOrder;6 I5 \5 P0 ]. Z8 g1 o- Z  k
                        if @.Destination = void
2 z- ~' ?' I' H7 a1 e) P                        then -- no transport order for vehicle @
. S. L$ e' D' n7 |, t7 Y1 X; I# m                                @.Destination :=
& h$ D9 p+ Y# @, y$ P5 l                                rgManager.nearestFreeStation(@,track.~);4 B, ?8 z$ M( L4 x& q" f
                                newDirection(@);   
( M5 a- f; P; \$ P                                if @.Destination /= void then
$ t+ c  l; D" t  j" l. g                                        @.Destination.NumReservation :=
7 S$ N9 b+ o4 S) e                                        @.Destination.NumReservation + 1;/ _0 y3 r# Q/ I0 O2 `1 u' y
                                end;
9 B) u% }  E* G1 X3 ~6 R9 \( g                                @.CurrIcon := "drivingHome";
% e8 H# I6 }# D" c                                @.DrivingHome := true;
3 g( {  {& n9 I& V( e; y  Q/ I                        end;6 }' h! l4 E% ^: B* z3 t7 Q3 |
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 Y- m0 K; s. X. f, [+ R: S
                        part := @.transpOrder;
- Q6 S% r0 @3 x5 ]+ `9 o+ G+ N* i                        part.move(@);-- load part, C  U+ |. q& p
                        @.CurrIcon := "load";6 d1 j% A! V" ~2 S
                        GlobalDistObj := part.globDestination;
' F$ D7 f8 l9 H9 ]8 m1 {% n  }+ H                        assignLObj := rgmanager.rgAssignL;
6 p( J0 @/ ^9 t! O/ F1 G                        row := assignLObj.getRowNo(GlobalDistObj);  w8 a/ N) U& o, [' W# [0 [
                        if Row = -1 then -- since 70
  A0 v! j" P+ K6 k                                if lan=1 then
9 l# {# N2 ~8 J* i0 t$ i5 m                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
/ n0 l; r2 m  D' c" x. m                                                to_str("in der Andockstation: \"",?.~.name,"\""));+ [8 {2 V5 l$ @, K, [
                                else" A% x/ \6 _" g- W5 K
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
, @. O, N+ L) G$ K                                                to_str("in docking station: \"",?.~.name,"\""));                               
" A( I, }$ V' L8 ~& B) K                                end;
6 |" T) ^) H5 L                        else
/ f7 x# H( ?7 i0 u7 W                                @.Destination := assignLObj[1,row];
. ^( b# k! j" R  ?7 ?                        end;                       
$ x; U  R' z% Z# N/ o( r                        newDirection(@);
, z) `, |& ^, p, {                        @.HasOrder := true;
4 v8 c, j6 U9 e& }1 [, B                end;
3 y- r; X  K; B3 ?; _* O& e5 Q        end;0 _# O! d$ k( |" @& B
end;        -- of the method" a# K5 q% {5 H: U
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
3 I/ k# q2 y- [% {0 y3 d
1 U6 f1 s) A; |+ r这是AGV_putin中arrive的method。5 |" f  p! L2 F; F+ V  f8 m( L! C3 ^

" Q, B6 t: y/ a/ @! b( j0 c当到达物料速度越高时,这个报警更多,
4 X0 v" J8 F# q% d! K& x可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。3 d7 B& m" N* @
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
3 B8 O" y5 x) |; O# A3 l" M. O
7 V' O' z6 l5 Z; O另外一个小建议,就是move,所有的move都可以这样% h- k% |1 [9 p' j) U) \
if not move() then debug end' P" p# i& A: q% H$ c
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。$ M# U! j: `' K
plant simulation中的free libraries有AGV模板,# T! z  x' g( r
里面也有案例。  t; q9 N& ~! e% h0 o  A
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。2 w7 m5 o2 C% A" x) ^

- K3 I, E" V( b4 j我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 - v0 y% r) M* W

0 }+ ]# J9 s. U- h那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
4 C. {2 d/ E2 E& f" \! D- m这是AGV_putin中arrive的method。3 X# Q  j( N* K  P# T1 F
: _- b% D( y! d4 y
当到达物料速度越高时,这个报警更多,
- c0 _- X( w, u" V- z; e6 D
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-12-11 12:04 , Processed in 0.018809 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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