设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7823|回复: 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'; L3 \1 j! S6 t: `' k$ z6 `
*/
$ g5 x8 d" U  |% Dis' h4 m% ?, }) N7 G' a
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
2 ]+ r6 e; x2 ido
' g+ E4 Q- `9 p        Lan := rootfolder.Internal.Tools.AOLlanguage;
$ ~6 V# o3 s2 a8 V+ }' f9 m. P4 D7 k        if current = @.Destination -- else return
( A, R3 s( n# n( A2 P5 o        then
# @. p6 r3 U- v* g: I& X0 M6 m' W                @.Destination := void;- G- \, C5 q5 M2 X* s' G; A
                if @.occupied then+ a# l/ P' ?$ Z) ]
                        part := @.cont;0 {0 V: t& {/ x8 B8 ?8 }" e
                        @.transpOrder := void;
% k( k+ f/ D' N  V& Q' D. H+ ]                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
* z' O2 Q( T8 V% {0 e3 y7 A, _3 f; t; S& p                                @,root.eventcontroller.simTime);
# h8 D2 ~; ?1 M0 }$ a. L                        @.HasOrder := false;
. [% L" g4 X; W  b                        @.DrivingHome := true;
% m& x0 q. y( w                        rgManager.tryToStartTransOrder;
/ }/ z$ O' y9 B9 R& ?. |" k                        if @.Destination = void8 _3 p% @6 J7 r( w4 L8 A' l; y0 B
                        then -- no transport order for vehicle @
7 ?+ P8 h+ c& b! s& K                                @.Destination :=
2 e8 Z( K: H# }) f) _# x                                rgManager.nearestFreeStation(@,track.~);
! H3 ^' e: L1 E/ h, [                                newDirection(@);   
+ h" }& \0 R2 a- ~6 e                                if @.Destination /= void then
0 G" N& o" A, f" q+ Z6 U                                        @.Destination.NumReservation :=; J) p! K: q5 z' j: v# Q
                                        @.Destination.NumReservation + 1;
0 n: _7 C& X$ o5 v5 Q$ L                                end;
' l' ~9 i) E' i3 ?1 K5 T                                @.CurrIcon := "drivingHome";
: j7 q$ e; W& ?8 O- n6 c7 d                                @.DrivingHome := true;9 Z8 v( }2 V1 f: B/ X2 e
                        end;; k' m# T8 O/ B: K- g% e3 l! y5 h
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station( q; b5 v, d# [
                        part := @.transpOrder;
* m' V& |8 v7 H$ m& {) v9 Q" ]                        part.move(@);-- load part7 a& w3 O4 A, N
                        @.CurrIcon := "load";5 z) ~! J* u/ I5 `
                        GlobalDistObj := part.globDestination;
8 q$ j8 ]% t+ p2 a) V                        assignLObj := rgmanager.rgAssignL;8 C7 L- ^& G. N3 h
                        row := assignLObj.getRowNo(GlobalDistObj);$ `1 {1 d# W( m, ?7 p! P+ ~
                        if Row = -1 then -- since 70: l1 |; ^$ d- Q  V4 a( s6 U
                                if lan=1 then
: h9 y1 U- ~# i/ C9 B                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),% w9 {. D: s( q4 p5 o  f
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
2 e* e' i  }4 L: Q: i" X                                else0 K4 L$ _, _) m. u( S! y) @, ?
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),7 m! M; p3 k+ n# U$ e: K
                                                to_str("in docking station: \"",?.~.name,"\""));                               
7 r. t- A- f0 V8 d5 a7 m* k                                end;
. q" r7 A6 [, ~                        else
; Y% V0 f6 x) x" Y/ H! F                                @.Destination := assignLObj[1,row];
& F7 W& k  f, `                        end;                        3 o/ J* m3 |& ^9 s9 b! S- P3 @
                        newDirection(@);. |2 W% z+ s+ B7 |$ K$ T
                        @.HasOrder := true;/ [$ o8 l) y4 [- h
                end;
5 Z0 F9 n& J2 U; H        end;5 y! H  z6 n4 t* r# U
end;        -- of the method
/ [& J. F  ^4 W) ~& C# }
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
" L) ?+ w! V3 ^9 r  a
$ a. b* x) R8 ^! i这是AGV_putin中arrive的method。4 Z7 O+ [/ h! B' X) P" P
/ {, t& p+ X1 d+ |( U' y
当到达物料速度越高时,这个报警更多,% h9 ]6 A/ y$ Y# y/ \4 W$ o! }3 A9 i
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。5 B0 d9 j1 j: ?6 n6 j
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?6 b. b4 ?9 a% m

! D) @. y) N( V另外一个小建议,就是move,所有的move都可以这样
8 O4 [4 B$ W2 w, d6 L+ S+ yif not move() then debug end
8 }2 W9 o3 X1 Y/ Z3 m! c这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。3 x; ^3 J  {$ |. S( J
plant simulation中的free libraries有AGV模板,+ u" {, y( q) N# r% G/ {1 p& o
里面也有案例。
$ ]4 r$ `5 r# e2 _" m1 v, s: |  w我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。/ [4 v' R. r5 f3 V; `! Q6 A
5 v% x/ H+ ^( E, E5 _$ D# [" @& s3 i$ o
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
9 K2 T+ W: Y' n, ~- s7 [8 N+ B7 }% a1 L: p4 _5 t
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
/ H0 }$ n5 u5 s. @7 z8 V这是AGV_putin中arrive的method。
9 U' r! i. k. @8 a9 K. U. f+ h
2 M" O# ]0 R' `# J/ [* N当到达物料速度越高时,这个报警更多,
! o" l3 D6 o! m4 L
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-30 16:45 , Processed in 0.021867 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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