设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5750|回复: 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 J' q0 |; s0 ~0 P9 h4 a* s5 i*/
% D  I) `( s. R6 ais2 [& ~. S/ [# y; y9 B. ^$ d5 V
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;7 q& b5 t2 |6 n7 W: n
do
1 w7 J8 b* R) k" q! I        Lan := rootfolder.Internal.Tools.AOLlanguage;1 a+ ^. {) _4 O( Q/ K
        if current = @.Destination -- else return% a: f3 i+ R4 U, J4 ]
        then* Z' ]( J1 l: ^3 Y
                @.Destination := void;
' {% u& [( [* Q$ v  ~                if @.occupied then
; e" X$ o# U7 ~8 o* e                        part := @.cont;/ l5 y( f* b: Q7 ?
                        @.transpOrder := void;
8 c, @3 y, R4 ~4 u* q3 r                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
, t4 Y9 C' }2 O                                @,root.eventcontroller.simTime);
& K) |& i+ H) m8 \( U* |. H                        @.HasOrder := false;
) {" k7 V. p. t4 Y* G) O1 n, ^                        @.DrivingHome := true;. p3 f3 Q" r3 I3 P3 j5 m
                        rgManager.tryToStartTransOrder;# t' I& d# C6 \
                        if @.Destination = void  d& [. w- T5 o! k$ T
                        then -- no transport order for vehicle @
" v6 n0 B* z/ [4 F6 D! f                                @.Destination :=& e2 N9 ]' z; n, b, Y
                                rgManager.nearestFreeStation(@,track.~);, {* P, q. x( Y, x
                                newDirection(@);   + o; j, g* E, P; w( w6 I% P
                                if @.Destination /= void then* b! y: e# b9 f" R0 R3 x
                                        @.Destination.NumReservation :=/ [' c& d# @0 O% Z; \" ~* W
                                        @.Destination.NumReservation + 1;
/ i! \- R+ |: F, z9 z/ c. Y                                end;) k" t  R% T! C7 h
                                @.CurrIcon := "drivingHome";$ Z8 R+ Q$ I; Z5 m/ o7 @% a; k* _
                                @.DrivingHome := true;
2 i5 d3 {  F' H" y( U                        end;
- `& u& T' M3 ]& [6 ~. L: ]% o$ z                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 u5 [+ ^7 V" V# X6 U+ ?6 t                        part := @.transpOrder;
  v1 T5 E! X* H7 k/ V: N3 H                        part.move(@);-- load part
: z7 F4 _: X# G6 s2 \  w                        @.CurrIcon := "load";; w' p- |% q% B3 ?9 K
                        GlobalDistObj := part.globDestination;
: o! \+ n. p7 j3 d+ d7 h8 f$ o                        assignLObj := rgmanager.rgAssignL;# g$ B2 Q3 Q5 d" Z, v1 m9 T
                        row := assignLObj.getRowNo(GlobalDistObj);
. ]1 @* c% \  \: C( {: p1 W                        if Row = -1 then -- since 70. O4 u' z( O: R. b
                                if lan=1 then3 r3 V- O' v+ _: a, w! M4 k
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),( o/ }5 b' O. F
                                                to_str("in der Andockstation: \"",?.~.name,"\""));6 p  r* C: v4 U, I- D' ~: P
                                else
  X& G; M+ E* Y; n/ g! m                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 J, y7 C5 Y; F                                                to_str("in docking station: \"",?.~.name,"\""));                                " M$ }8 M  g3 _; S+ ~! I$ p8 p
                                end;
- M! f* t  A" b. s( h7 ~                        else& G( ?* s) }6 n$ A- }" U# I( }0 X  U! ]
                                @.Destination := assignLObj[1,row];
+ q$ i/ e- o- t- u, [                        end;                        & V( }" D! g" M% q/ [
                        newDirection(@);
6 S2 ?( s) G; W" L. R' C0 M                        @.HasOrder := true;* C- ?( h- Y9 V
                end;
# o- E: R2 e0 h8 {        end;
" R2 p" P' X) Y2 I  F3 M: bend;        -- of the method
: P" x% r' ]+ l% P1 o$ l6 P
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
" ^, b3 x8 e* ?. l8 V
9 ~9 q8 E; T7 e# }) j! W6 ~这是AGV_putin中arrive的method。
3 w; w* b+ `1 k; \# r0 j' i
: Z6 b) X& a6 H' E( V* U4 {当到达物料速度越高时,这个报警更多,
% y" R, D5 [. e6 z可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
/ r. T$ Y) D' t" d8 G4 z! m/ }程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?( a- o, p6 T2 j. k/ I  Y
! ^* m! o$ P4 d& N5 b) J
另外一个小建议,就是move,所有的move都可以这样
0 H# \/ x, z* p6 M5 i0 y4 {8 yif not move() then debug end$ O) A/ n: U+ u/ f6 W+ A
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。  Y7 G8 b: x1 r' v! z9 n
plant simulation中的free libraries有AGV模板,
- A, @8 u. b. n) a( `0 d) n8 i% f$ [里面也有案例。% \) L* }  D. q! |4 k2 F2 ~
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
& j( P' Y6 ?, x. x% H$ W2 `5 u) Q. Q+ ~, l) ~; h6 r
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 $ C- p0 y0 ^  ^9 q1 w8 u9 @
% e& |8 y8 V! D, O2 J
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 * F4 g1 H2 @0 b: ^; j* A" s
这是AGV_putin中arrive的method。3 L9 C: s+ e4 V- r- j, X; W

; t3 I' d* d# I0 S8 g当到达物料速度越高时,这个报警更多,
# L( n7 N  }. x; n/ b  _+ U2 o
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-12-17 07:18 , Processed in 0.018211 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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