设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7170|回复: 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'
% f2 i6 c( j7 s*/5 `  h" u+ E" j7 e9 b) k% k
is
' a# B1 x, h9 R1 I; ]; R        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
% k/ ?; e1 n# ^- e7 b  cdo7 K6 h5 `6 r5 l' u# y1 U( K
        Lan := rootfolder.Internal.Tools.AOLlanguage;3 Z# P2 `) r# i& f* F( D% e4 o
        if current = @.Destination -- else return
, ], F  `) Z" o* n- r        then
* ~- a* T9 X: d& o! w4 e& T9 b% _2 ]                @.Destination := void;3 w( {/ Y! [, u- f# e6 q
                if @.occupied then
$ V( U' [3 o; y, q0 V                        part := @.cont;/ j& E7 y) E! D% X2 s) w: l
                        @.transpOrder := void;
8 u7 a- E" x9 S, c( X                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 w% j4 T* e9 A# ^
                                @,root.eventcontroller.simTime);
) `/ L% V0 _+ m( C. B3 B                        @.HasOrder := false;( r7 ~& S- c! Y+ O! V
                        @.DrivingHome := true;
4 \0 G% |. ?. W4 m" U                        rgManager.tryToStartTransOrder;$ W. ]( {1 S* ^# r
                        if @.Destination = void
+ Y2 a4 {$ m. E5 A8 w' d                        then -- no transport order for vehicle @
4 V$ ?1 ]! @( r2 B                                @.Destination :=7 U3 \! @" o+ o# A5 K" v( v
                                rgManager.nearestFreeStation(@,track.~);4 c$ D9 {+ B/ o+ Y6 i6 C
                                newDirection(@);   : u6 V2 \/ q4 U, y3 j( F
                                if @.Destination /= void then
$ o  G7 _$ v$ Q4 L                                        @.Destination.NumReservation :=
+ x4 w' r( g& @5 B& y' T  ~& M6 F                                        @.Destination.NumReservation + 1;" T) P8 b% l3 k# K' v, x
                                end;
! k8 L# L$ c! s' v5 n6 {9 G. a                                @.CurrIcon := "drivingHome";, U4 {( [6 H# k* l0 [% b8 d. N- X
                                @.DrivingHome := true;
& Y/ ]) e8 O% q9 V! V                        end;( S5 [+ f0 M8 ]9 T2 F/ W
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station* ]$ S9 ^/ m! ^  Z/ \. G. m: Z8 \! O
                        part := @.transpOrder;
6 y% p7 `. F( f2 k" W                        part.move(@);-- load part
) e9 U2 U9 T! U& N4 B3 e                        @.CurrIcon := "load";. c8 y& V: a$ P
                        GlobalDistObj := part.globDestination;2 Q2 M( R5 J  U, R0 @" y' ?
                        assignLObj := rgmanager.rgAssignL;
4 ^% k2 `0 h7 a' ]+ P7 J                        row := assignLObj.getRowNo(GlobalDistObj);# ^- E+ g' ^6 u8 X# V" m
                        if Row = -1 then -- since 70
  q  O$ D' M5 J6 r$ F; [& w                                if lan=1 then
5 V3 m  T  B4 a3 A; E' W5 p; t                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),  ]% p3 D$ a. h& x
                                                to_str("in der Andockstation: \"",?.~.name,"\""));5 s) ]3 S5 Z1 r+ x
                                else* W3 U- S( f& i" J  g3 E1 m
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 ]! |+ H) D/ J5 `8 r; ?                                                to_str("in docking station: \"",?.~.name,"\""));                                0 E/ l& p2 f/ v  Q# S9 e1 x( d
                                end;; e. u( B% Q" g' O# c( x
                        else
! i1 M6 q% S$ C2 m9 ?                                @.Destination := assignLObj[1,row];
9 {" g! A; M# e( K6 ~4 e                        end;                        , g+ {1 w: }) C9 J& q8 j8 O) J
                        newDirection(@);8 c9 Q  [$ A& v  P. q0 }& T. X
                        @.HasOrder := true;
0 Z- N% \# b3 H0 w6 S: d1 o                end;
1 A' D. r9 w7 E  b( ?  Y        end;
, e+ @9 w8 |' iend;        -- of the method$ s# }0 W! q# l% t8 u% Y
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 . D  |& t7 X, o2 r" _3 C
! A+ o. }4 j& o( N/ j4 z% D4 A
这是AGV_putin中arrive的method。( w; |4 t8 B. k+ K
% E2 k* l9 |2 O- p, ^4 p, A) }
当到达物料速度越高时,这个报警更多,) M% |. E/ P6 c, M, [5 M" g
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。, m8 P7 O0 H: r' x
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
4 ~6 p. Q4 \; s1 \9 ^
. U) A8 p8 w' \0 S2 n3 y0 r5 ~4 m另外一个小建议,就是move,所有的move都可以这样
! L  s+ P8 i6 o; L5 Mif not move() then debug end
; E: H2 j6 \" y. _3 n  Y. F. s这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。" |( a+ T1 j0 l1 S: X# u
plant simulation中的free libraries有AGV模板,: ~8 A3 V9 l, X3 N
里面也有案例。* |3 a3 D6 G4 l. ^# P
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
+ K/ x% `6 e+ W6 C* I% L
: z- ]$ L( W3 d2 W& Y/ \1 S3 f: W% |我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 8 [+ ^, L  q7 M$ m6 L7 T, l, G- @

8 b' S6 S% ^) i- w9 ?( t" x5 A/ K0 T那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 1 A6 Z' b) D: {
这是AGV_putin中arrive的method。
- E1 M( R  Z$ X# H5 q; J. y4 u. D: V; ~
当到达物料速度越高时,这个报警更多,
# C# @: F) h' v6 B0 P3 H
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-24 05:08 , Processed in 0.017848 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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