设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8302|回复: 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'1 Q) ~5 M  Q$ k% j
*/
% [- R4 b7 X& wis
! c/ m8 A) T% w1 _        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
2 M! W( Z, s2 H3 r( U  P8 N. rdo
$ X; R( i9 O1 W. j( ~" D1 l- Z        Lan := rootfolder.Internal.Tools.AOLlanguage;
9 {3 F& z$ c3 y7 q' |/ ]        if current = @.Destination -- else return7 b) Q! Z- W3 V5 j- I; X
        then5 r2 Z  V  M' x( F
                @.Destination := void;
/ h& r9 j6 Q; N0 \) k7 t                if @.occupied then- G3 A( W6 F, {# X! ]  u% p* O
                        part := @.cont;# F2 y3 @1 W6 U( l
                        @.transpOrder := void;
+ o' ?: T. W! j- d: s                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 {1 e9 j7 H- h  q% S+ c" ^
                                @,root.eventcontroller.simTime);! t# L: A7 `$ c% z% V2 B7 ]+ k
                        @.HasOrder := false;" E  d  J5 P# Q- L# Z  ^5 b# F
                        @.DrivingHome := true;  j* o0 d% J: ?) b1 F
                        rgManager.tryToStartTransOrder;6 E* @9 p6 R* D( D) Q2 b
                        if @.Destination = void
' F) S, y3 a$ u                        then -- no transport order for vehicle @8 n8 c) w  k6 B) E. \
                                @.Destination :=& G4 a* z- g0 f  ~' b2 g
                                rgManager.nearestFreeStation(@,track.~);, O. a- `" Q' m5 {
                                newDirection(@);   " K" e- P, I" S1 r7 ~
                                if @.Destination /= void then
+ g6 O. ~! v# W2 f                                        @.Destination.NumReservation :=
) i" ]" P( N' g* Q$ |# T* }                                        @.Destination.NumReservation + 1;9 {  A: p* s, L9 S; M6 e
                                end;
* t  X- f* I1 W                                @.CurrIcon := "drivingHome";
* t- S6 [% x; X8 P                                @.DrivingHome := true;
- T; R( }/ C# O5 a( v5 ?                        end;2 O5 |6 @/ J$ B1 N  e. O8 j9 F
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station  i5 o8 |3 x, C# s3 |& E( o5 m9 R
                        part := @.transpOrder;  `* G$ p# N3 P5 a0 \2 h
                        part.move(@);-- load part
$ ?+ \% I3 H. d2 u! {; O" S                        @.CurrIcon := "load";4 q- u: G' ?5 p" Y1 P
                        GlobalDistObj := part.globDestination;
) d/ E; @* M+ S- f/ b                        assignLObj := rgmanager.rgAssignL;0 U  w, g1 H# d7 m* U# t# I
                        row := assignLObj.getRowNo(GlobalDistObj);
  m! B1 R' S4 U* p                        if Row = -1 then -- since 707 P0 \4 d- y+ |, N5 m: [0 v
                                if lan=1 then
" c* {  t: Q! r% @8 l5 O                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),* w" I8 F/ {3 n, v5 _
                                                to_str("in der Andockstation: \"",?.~.name,"\""));. k. j; l7 r0 ]( z2 a5 T7 [( ]
                                else+ [$ |5 ?* s! v$ f0 e. D
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
8 s" i* G  |# E1 I. g* E7 Q                                                to_str("in docking station: \"",?.~.name,"\""));                                  u& P3 ?" e: h  a3 [
                                end;* l* K5 o, h% S& W; _
                        else0 h8 V2 b6 g* V
                                @.Destination := assignLObj[1,row];! F4 N+ h' k3 M+ M
                        end;                       
5 Q5 V# P8 a8 ~# A                        newDirection(@);
8 n: k6 `! c9 U                        @.HasOrder := true;* b0 z) I/ O2 a* V7 c7 r$ ]
                end;" e/ G0 i3 Y2 @& X0 w
        end;; l9 W! t" }' a* C* p; S2 [
end;        -- of the method3 D- k0 P$ u) _8 \; u- j: i7 Q
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
' _5 K- w5 h$ c3 c1 \. w9 Z
' Q$ Q/ e% D% ]; a! ^8 H& r) A这是AGV_putin中arrive的method。
3 K7 b* W, o) `7 _% d( j6 [: s( Y" [* U+ T6 V, j+ r
当到达物料速度越高时,这个报警更多,
9 N: v0 ^# Q" r可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。2 ^- @; h6 p7 o3 |
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?5 k2 l( W% I& U" q

6 ?, ^8 x. y5 O1 k5 K# {' L7 J  q另外一个小建议,就是move,所有的move都可以这样
3 D* Z/ k& ^" P1 p# rif not move() then debug end, n4 z" G; s# D4 H
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
# t. q/ E$ @: T, S- F, k) B& ]plant simulation中的free libraries有AGV模板,3 I) G5 L( H, Z& y$ z, B
里面也有案例。( z% O6 U: `; e
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。/ S% c6 @! i/ M3 e  C
' l& o0 q  p) h0 f& [2 Y
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 6 k* k8 S( A  g, z

$ Q' d  {6 J2 j* m! e- G8 W$ Z那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 % n+ \! j# A! G5 _9 b* Q! X- V
这是AGV_putin中arrive的method。8 T9 j% B3 o( n  G: L

3 k' V3 p2 D: }# T* q: I1 i% }当到达物料速度越高时,这个报警更多,

# h" ]$ H: z( y( g" r8 e7 n另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-26 12:52 , Processed in 0.018891 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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