设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6680|回复: 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'; n' P2 w  N/ b, q, }5 F
*/0 D2 r6 {! e7 m: G: |  t3 j4 v
is( e% l( f; s2 o) d
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
' S8 `+ @) T2 E( u0 F1 gdo+ t# U; c, D5 o) J! B
        Lan := rootfolder.Internal.Tools.AOLlanguage;* Q1 w8 c1 c5 I+ w
        if current = @.Destination -- else return
4 V+ u, Y: l$ a, z0 O! O8 {! B% N        then
: j8 {6 j/ S5 n8 c                @.Destination := void;
- X- a8 w) y+ f( i& d, C                if @.occupied then- a$ W. h  t: x# J; A
                        part := @.cont;
3 v- P' G7 R% z* G$ h                        @.transpOrder := void;7 p% ?, m6 v7 q# d5 l% h
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,4 D  y* y7 u( w2 `: C3 m8 M
                                @,root.eventcontroller.simTime);
: L- D5 @, a5 Y2 a) P3 z4 x7 L4 [                        @.HasOrder := false;  r7 ^& S5 B, _, ?. a4 F7 [
                        @.DrivingHome := true;6 ^' U3 G& H3 D
                        rgManager.tryToStartTransOrder;
- l2 Z' X, i  p5 N( Z/ h                        if @.Destination = void/ t+ m8 M3 q- @) U- w/ y! _
                        then -- no transport order for vehicle @
; {) \0 J3 c; s5 l; U- p                                @.Destination :=
6 C4 |3 p) _( I4 c                                rgManager.nearestFreeStation(@,track.~);' s0 @4 N- w6 X8 `9 q
                                newDirection(@);   8 X$ @& T1 q; L( M
                                if @.Destination /= void then$ C% h2 H% A4 k- ~; s1 N% L. p
                                        @.Destination.NumReservation :=0 I/ B) Q+ W' E# H, C" X# I: I
                                        @.Destination.NumReservation + 1;  j$ h& R/ a" W8 G: Z/ T( s5 E
                                end;% a9 n1 a9 ^. ?0 H  |% M
                                @.CurrIcon := "drivingHome";
  B4 U0 \' h& @+ w  `                                @.DrivingHome := true;1 s. v: z2 N5 c; x  C# ~. p1 |
                        end;( C2 W. g" Q. r3 s
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station2 v! g( V. N) ?  z' C2 N! z
                        part := @.transpOrder;
. J, J5 a+ D7 [/ S  Z                        part.move(@);-- load part
9 y1 Q; X) e* J# @8 s9 P2 H( z                        @.CurrIcon := "load";* ?: R+ A* z3 \* x! F) L" |2 v
                        GlobalDistObj := part.globDestination;9 o$ s# F0 b/ x( A2 ~0 t
                        assignLObj := rgmanager.rgAssignL;
$ [" X' R1 ~( N' W8 z- o( J$ S  j                        row := assignLObj.getRowNo(GlobalDistObj);
: D+ C5 W$ {8 e- l                        if Row = -1 then -- since 70
7 {/ x1 _8 V9 Z8 h3 |                                if lan=1 then
& P2 X5 Z8 J6 z# k! K# \# E                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# s$ z8 }# t, r7 J; z; K4 l! M                                                to_str("in der Andockstation: \"",?.~.name,"\""));! D) W! X- A' L) l
                                else
! ]% Q2 s3 \9 A/ L; V7 c                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
4 Z  Q( {/ [8 p  h                                                to_str("in docking station: \"",?.~.name,"\""));                                8 k3 l  \2 G' Z. B8 O/ o
                                end;
2 Y' L( k6 B  r# M1 P                        else
1 }& g' Q: U& K) W                                @.Destination := assignLObj[1,row];
' _0 y- K1 d4 ^                        end;                       
0 L% p# e9 Y# B                        newDirection(@);9 W7 ]; ^1 x  a$ p* T" ~! W
                        @.HasOrder := true;
. J  l2 j$ _. @* r; G( c( s                end;$ u+ f& p3 Q& ], x
        end;
" A4 w3 @3 q* Y7 qend;        -- of the method
% q5 X9 F8 v" e+ N% A
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 + J3 X/ [2 S7 s1 h8 E

& z0 d( T% T5 j3 X6 E. m! }$ c这是AGV_putin中arrive的method。# k' E$ G5 L4 `* y$ c' V0 r# \

& E4 H6 E; v2 R. N当到达物料速度越高时,这个报警更多,
+ t' R' ~! }- B2 z; T可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。  z* C9 Z1 W6 O, a: c$ C
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?# V- |" G/ J& s( C/ ^& J# F
5 y* T/ F: S9 {$ B; E+ K
另外一个小建议,就是move,所有的move都可以这样
0 K& r6 @  D4 q* E. Fif not move() then debug end
+ F1 e9 R5 ?3 |这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。' X3 L+ T& m" c* o( t
plant simulation中的free libraries有AGV模板,1 o: {$ C! e, h( u6 M
里面也有案例。
  ~5 X' P* _/ |7 q' X8 }, L我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
; p  Z8 X, ^9 o- V4 E
# ]5 C. T6 ^/ w% G' l7 H我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 ! I( l4 Q  J3 S
# O+ ]  y* f4 G+ {! A% o+ |
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 * M: s3 n( B# S: q. i( U
这是AGV_putin中arrive的method。
) B9 }0 t$ C, `0 z
9 D3 y+ h, k9 s+ D7 d. a当到达物料速度越高时,这个报警更多,
% _8 x/ \" v* t' Z' ?
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-20 13:29 , Processed in 0.019738 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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