设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7518|回复: 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'
! V4 Q: V; ]$ Z2 h. E*/
  I/ C# i. n# Mis
3 t6 P- O6 R, M7 [% U, N  ]# l        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
7 L, \0 r# L; a5 [5 w! Odo
7 _8 Q* T+ g" S        Lan := rootfolder.Internal.Tools.AOLlanguage;
$ C5 x3 g0 w# A8 u# ^$ s# ~- t        if current = @.Destination -- else return
5 Z2 Y$ a# G, w; G( }( `        then( b5 ^2 e+ O; o- l& c* k2 L
                @.Destination := void;; `# U. o; }) b% j' F" c$ Z- _
                if @.occupied then. {# ]3 e: U! H. C. s+ a+ ~1 f
                        part := @.cont;7 m* ^% B. A+ }4 ?# W
                        @.transpOrder := void;
0 G" D% w/ `/ x  V                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
. F! n  R. n8 i) t9 p  S+ m( L                                @,root.eventcontroller.simTime);
1 p3 |4 D2 r/ J9 u! [! T: O                        @.HasOrder := false;5 @+ K" c; Q' ^/ @1 @
                        @.DrivingHome := true;& y# e2 G4 U! \; O' L- O4 U
                        rgManager.tryToStartTransOrder;% y. K1 ?. u: h1 r. L1 M
                        if @.Destination = void
* G/ W4 u; r! C" @4 U" B' p                        then -- no transport order for vehicle @
% \  ?* \# d" I1 G# ], e0 p                                @.Destination :=3 [' T5 y4 |/ {3 J6 ?0 A
                                rgManager.nearestFreeStation(@,track.~);3 a7 V! X& o* j( u2 c
                                newDirection(@);   9 r* w2 ]" ?3 T: i0 D( G
                                if @.Destination /= void then, [; U  r! E, T% r0 \# ]
                                        @.Destination.NumReservation :=1 X) O. W1 M) m# T
                                        @.Destination.NumReservation + 1;
3 @6 N4 o3 W# x/ _1 K                                end;
8 V+ F1 Y7 e$ z2 v$ l$ ?% l                                @.CurrIcon := "drivingHome";
% T5 u- k. I. H; v                                @.DrivingHome := true;
/ T* c$ ]" }  j                        end;5 M1 }# M* g5 C/ t" W0 h; q
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
  f! ?. U# L0 N; g8 \                        part := @.transpOrder;
  }8 T# j3 ~" F# K% x3 ]                        part.move(@);-- load part
" Q: z: E7 Y5 a% W" }9 C                        @.CurrIcon := "load";: j! L% m! b+ J# o, k5 g+ y) @
                        GlobalDistObj := part.globDestination;4 G+ ^6 y0 O4 T' k' `/ W2 n1 F
                        assignLObj := rgmanager.rgAssignL;0 m; g$ a9 m7 u5 p/ L% \
                        row := assignLObj.getRowNo(GlobalDistObj);9 s9 Y, J4 f0 Z, N: Z
                        if Row = -1 then -- since 70" k9 b/ T, A4 s0 y+ u1 z
                                if lan=1 then1 J8 w: e( u2 h, S* i& W
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
  }! j8 ~9 c( m$ x                                                to_str("in der Andockstation: \"",?.~.name,"\""));
; i: y6 g' Q- q                                else
: O' {$ V0 M: }1 ~2 F* C                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),' ?( p% [3 Z$ A, y- w, D/ u
                                                to_str("in docking station: \"",?.~.name,"\""));                                : r" ]  k, M8 R3 @- }
                                end;6 k. _. u6 X! X* H
                        else, F/ O2 G  s1 ?% C# u8 p9 M
                                @.Destination := assignLObj[1,row];
) U6 E2 |! S3 c/ A4 ]1 G8 x( r6 f* g                        end;                        & ]2 L4 F0 {% |! G: W" U8 E
                        newDirection(@);  n* ]  Q$ K% O& ?1 {4 C- J
                        @.HasOrder := true;
5 B% b, C6 u" \3 B) R8 a                end;
0 @  {2 n, v! ?6 c% L9 U- o        end;
) ]+ ]0 f; x* V2 x2 D& ]1 }end;        -- of the method% |0 ]) g% P7 ~, x
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
# z& ^3 f. m, b. i- _, a2 g% h6 I) d6 e
这是AGV_putin中arrive的method。
0 y. ^8 B% x( y
( v7 l3 c+ ]4 t当到达物料速度越高时,这个报警更多,1 n8 u$ Y* \+ y; f! M  I9 `
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。8 k! f. ^6 P* C  G
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?/ y" k% W# H6 a* y

( b% x( A& _: a, o; w2 E另外一个小建议,就是move,所有的move都可以这样
# \1 ]( x# B) ?; f0 @if not move() then debug end/ ^2 u( @7 H3 q" d% J3 E; j
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。$ s, p  a' ^4 ?) ?
plant simulation中的free libraries有AGV模板,
8 H5 Z7 K1 @: q( B7 `: Q1 Y- ?里面也有案例。6 B5 ?$ |) c4 ^
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
0 y# D$ A7 _9 d" l5 `9 ~
! F1 ~2 f. y1 q9 g  B6 Q我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
' Z# O! p( s) o  q- |) o* {. ^$ c4 _4 c4 ?3 X9 s4 H' a, ]3 r
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 : l6 @3 @& ?& A/ K- H( I3 |
这是AGV_putin中arrive的method。
5 ]! J8 e% v' L6 @; t9 R7 N
' U2 X; h7 G* e当到达物料速度越高时,这个报警更多,

3 S; h, M0 e" m  @0 v( p另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-16 07:38 , Processed in 0.030240 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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