设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6554|回复: 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'
2 ^- d  U1 k1 N( D7 R2 m*/( I. j1 D  e$ }  s+ W8 P8 W
is
4 _0 I% Q8 t/ D; I1 L- h, w2 a        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
$ x: l% K9 s* ddo) O6 [2 X7 i$ @! W' x" P
        Lan := rootfolder.Internal.Tools.AOLlanguage;
# r# A$ h7 Z. x        if current = @.Destination -- else return
$ p3 V  g' W' [! M        then
6 m& P: f' O3 [4 J; a( e5 a' F                @.Destination := void;3 ?2 D9 l( }9 X5 t3 Y
                if @.occupied then+ E" s, ]5 j' s& n& z  H
                        part := @.cont;) G4 i, P* q- r  Q' j( Z7 ^
                        @.transpOrder := void;
3 X1 M( I. k  u) K& H                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 y6 F" V' l' |( z& }7 |
                                @,root.eventcontroller.simTime);# b& o: i) \! `: I5 k! Z; v
                        @.HasOrder := false;
1 P: g0 {& ^* X% m; g. x6 P                        @.DrivingHome := true;2 v3 j" b6 u# e) E# Q( p& S# K
                        rgManager.tryToStartTransOrder;
0 o. T6 U2 W7 R" `0 {3 n                        if @.Destination = void
# L! O$ D( q6 z! |                        then -- no transport order for vehicle @7 G+ S. ^' K4 j9 y$ e+ U
                                @.Destination :=, t9 Y' E  K( \8 J
                                rgManager.nearestFreeStation(@,track.~);
- q8 o; @2 q! O# B                                newDirection(@);   
! |  }( P* W' n% q; q                                if @.Destination /= void then6 I+ x+ _, V1 ]. C# W" e
                                        @.Destination.NumReservation :=
* e1 T  g% n4 u! F$ r6 g! L                                        @.Destination.NumReservation + 1;- _+ K( Z( @# g2 h/ v
                                end;; F6 p4 ?2 n  Q; P2 e( `. M* c
                                @.CurrIcon := "drivingHome";
. n  z3 x3 W) i: w* Q                                @.DrivingHome := true;
, e8 d3 _- j" J8 g! ?. Z7 x                        end;
: h2 P- I  f/ n9 |7 R! ~3 Q                else -- the vehicle @ is empty, both vehicle and part are in the same dock station+ U+ V& }+ w4 a# P- Z5 K& _
                        part := @.transpOrder;
+ b( [+ O4 I7 k* n6 Z0 G                        part.move(@);-- load part* ]. R, Y  c6 [7 @: L+ k
                        @.CurrIcon := "load";7 a1 S  A9 |8 P. H) x
                        GlobalDistObj := part.globDestination;" ?+ t4 R# ^+ p8 `/ r3 B5 h) K) G
                        assignLObj := rgmanager.rgAssignL;" A' O8 Q6 }1 S& ^2 t
                        row := assignLObj.getRowNo(GlobalDistObj);
; C) C1 |! ^6 l. r5 u7 ^                        if Row = -1 then -- since 70
- s3 t' f, s4 y1 }2 c1 L                                if lan=1 then" I' ]) [; D0 R0 X! f/ F* Y( D& D% ]
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
7 M# B# L; ]5 u5 [: c. `                                                to_str("in der Andockstation: \"",?.~.name,"\""));7 X$ }% Q  P. k/ N1 ^4 n0 _
                                else
* q/ U9 F7 Z6 l0 l: R+ z1 Y                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),9 J9 t  z* b5 a  F* E5 z
                                                to_str("in docking station: \"",?.~.name,"\""));                                " L# T6 L" G. k8 l
                                end;( }7 v6 }; `' L3 W9 [
                        else
, H/ }5 g, @+ w                                @.Destination := assignLObj[1,row];
* U4 A2 K% u9 P1 [) _5 ]3 ^                        end;                        ' v1 N( T- `2 O4 Q& [9 G
                        newDirection(@);5 e5 A! n$ t/ j
                        @.HasOrder := true;0 m  I& E" h/ a6 N
                end;1 p0 H5 f  K& a( Q6 e/ Q6 `4 A
        end;: o4 O7 j/ Z; E) z) F, A
end;        -- of the method3 h1 q; @8 W2 d- U7 L  }
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 4 _* [" ?  m" P

3 v, R) X9 O7 m  f: s这是AGV_putin中arrive的method。
1 F$ D! P7 i5 ^! H
- |% R8 c; r: {7 V* n2 S当到达物料速度越高时,这个报警更多,5 U# z' a; J( Y; _; T" J3 E- F# e, _! L
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
0 S0 @" L' L2 w4 m  K" h3 x程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?$ i; A7 q( [4 }

/ i, N. x5 f4 o另外一个小建议,就是move,所有的move都可以这样7 z& g, D: X1 m; F( E! Y
if not move() then debug end
! s, o1 c2 I) @0 t) @+ Q6 l3 w. D这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。# Z* F7 S! e3 m2 L; g, U
plant simulation中的free libraries有AGV模板,
" S4 k1 k1 p, q% s+ l+ e- `0 i里面也有案例。: p$ w1 A4 F' v& H
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。! P* l5 m+ ]' O4 K2 @/ w1 v
! ^$ O* F! `9 u4 E; l
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑   d& v1 e% R, d- {& v! n7 l

4 E- R: f& N7 M( w0 o0 I7 H7 L那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ; U) p3 H8 L, w' @/ j
这是AGV_putin中arrive的method。$ e3 b5 L, y& {/ t8 |
) ^. U* c9 b4 Z
当到达物料速度越高时,这个报警更多,

) o  K6 C' u; ^$ G) b. Z另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-12 14:33 , Processed in 0.017210 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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