设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 10234|回复: 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'/ v. ^3 `& t: K4 W* I  @0 i7 |' V
*/
  c8 J! v3 J. @( yis+ {& A  g$ L8 S
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;2 `: n! E$ w. `- W
do
/ d, t; E- J+ L- }, u6 I        Lan := rootfolder.Internal.Tools.AOLlanguage;  {* F. O+ \1 k) C) s
        if current = @.Destination -- else return
' x8 O' i! Z! d. _0 ]! J        then
1 @' w. B& o# w+ J. K0 j2 K' ]+ W                @.Destination := void;
# t! B( ^! p1 X2 `1 d                if @.occupied then6 m$ t$ t4 Q  d& q+ z2 [! K2 \
                        part := @.cont;
2 f/ R" A) ]# u& B# r$ J+ S                        @.transpOrder := void;. S2 R9 j$ S5 n  K# D# h6 j8 l! B
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,4 U$ D9 m0 F/ d
                                @,root.eventcontroller.simTime);5 X% d$ z% o* k4 @
                        @.HasOrder := false;
& i7 R; {8 u5 t7 q- }' z8 _                        @.DrivingHome := true;
, {1 K, \: Q9 M% R) j                        rgManager.tryToStartTransOrder;
% e# M+ g5 l, _5 j! I                        if @.Destination = void
7 w6 j5 d% j' o5 H0 A8 b                        then -- no transport order for vehicle @8 ^: r8 B0 k$ n( F3 ?: Y
                                @.Destination :=- J# ]$ \1 O4 {, H# n: a6 H
                                rgManager.nearestFreeStation(@,track.~);
# V* x+ l( x2 N; j! L                                newDirection(@);   5 C7 @, ~' y$ S, l
                                if @.Destination /= void then
2 Y2 W* {0 @/ n+ W5 f                                        @.Destination.NumReservation :=3 V. C  n3 W' M0 ~
                                        @.Destination.NumReservation + 1;
  ]: X0 B, m" I) u. b6 V/ Z                                end;
1 b/ S! M! V3 Q/ ~+ M$ Y& `6 {" ]                                @.CurrIcon := "drivingHome";+ r+ H, a; U. }5 ^
                                @.DrivingHome := true;
9 C5 R2 I; P# m# g/ d; A                        end;2 U' J. G+ Y4 Y2 R% l* v0 q" k& Q$ {
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station& M+ Y- q( `) D1 `* m. D2 ^) G
                        part := @.transpOrder;
4 h" X+ o- c1 ~- U- J( l2 y* l1 q                        part.move(@);-- load part" d" ^; Y6 q2 G; J* I
                        @.CurrIcon := "load";9 j( `6 ]. T/ b1 M) o; B  f( g! A( ^
                        GlobalDistObj := part.globDestination;
6 V9 y. T& X+ p! i' s1 I                        assignLObj := rgmanager.rgAssignL;
( H( x8 ^. d7 l' L                        row := assignLObj.getRowNo(GlobalDistObj);0 W  Z! k! U5 ?5 y- o+ i" l
                        if Row = -1 then -- since 70
0 ?: l. M9 @" B0 s: j                                if lan=1 then
) \5 Q  U. ?/ }2 c  w' F                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& P3 ^6 Q. j. ~3 y                                                to_str("in der Andockstation: \"",?.~.name,"\""));) Q" w+ ^1 k& s  L- `* Y
                                else4 q+ U2 ^( Z2 t* ]
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
$ H- \# y; w2 J/ U, }                                                to_str("in docking station: \"",?.~.name,"\""));                               
' Z; j4 d4 c" u                                end;" F7 i: x* q$ |* D; J
                        else
1 J& y% M: N, o9 e" \5 H3 `                                @.Destination := assignLObj[1,row];/ @. H1 }+ M4 P. k& g0 H
                        end;                        8 m- c& H% h4 `1 b* z
                        newDirection(@);
' D$ O* W5 Q" z6 v1 n9 M; Z                        @.HasOrder := true;
# \+ P9 D" g( L' I) S0 V8 m# @                end;/ I% u' D6 c4 u8 C) R, q2 s
        end;
$ N: t% f. M& y  ^9 p  oend;        -- of the method
/ l8 N1 Y7 z8 ^3 ]# V& h
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
5 K& i1 U( k; U! u# b/ `- G2 M( X/ P( W' p" W
这是AGV_putin中arrive的method。
$ W8 J, K$ t2 I/ Z& Z
0 z2 I5 W, n# H7 A( }; z+ ^5 |* J当到达物料速度越高时,这个报警更多,
7 z7 M  a0 i! }% J' s. W可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
7 Z/ \6 A" l) C6 @# j% g( h6 ?程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
- D7 I  l& A: n" P& d* a7 N! C* z: @9 s
另外一个小建议,就是move,所有的move都可以这样0 }7 L" d5 q) z+ L# m& G, Y, i! o
if not move() then debug end
. h; p. T9 ~. O" f( I' g  K这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。4 p0 k3 E7 j8 O0 l5 }3 w
plant simulation中的free libraries有AGV模板,
- Z# g- g2 V7 I! ^1 t里面也有案例。" P1 |' c; }4 f1 v4 A7 _
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
" K6 U' S, u$ M
( A2 q" R8 g4 o5 l- Z我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 " C* R% f3 z2 W

/ w6 ~' D3 Y2 L6 I- r9 p/ L那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 . ^8 c+ ^2 `/ O& Z7 E
这是AGV_putin中arrive的method。7 J2 K2 q7 y: J$ F; u) d/ q1 ^+ [

6 q# p4 d  M% W; s* l. f当到达物料速度越高时,这个报警更多,

) e$ G& ]" b3 j2 k1 \另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-9-21 16:45 , Processed in 0.018322 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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