设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6046|回复: 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'
# p6 \# I' j1 U*/
+ |- C8 ~- q; V* M  T' Gis
7 n, c; ^$ [1 d$ Y. ?7 X) r        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
( ?, k# G3 [& j/ W3 fdo
0 G: J0 o/ ?4 ?9 k  ]: i        Lan := rootfolder.Internal.Tools.AOLlanguage;
/ a. {8 M5 w: e5 z: p) x) V        if current = @.Destination -- else return! X/ f& b4 u1 \2 C. T, d- t
        then6 ^8 J7 I9 m/ S: ^
                @.Destination := void;
; A, J2 @3 z- Z! O3 n  T                if @.occupied then
1 X, u/ I6 @- z                        part := @.cont;2 N3 [5 g# A0 L, m
                        @.transpOrder := void;. Z+ _. ~+ x' n+ K8 q
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,$ ]. n' D( R. f
                                @,root.eventcontroller.simTime);" Z# {- I5 U9 p( S: X
                        @.HasOrder := false;- P' d+ m- O; h9 o
                        @.DrivingHome := true;3 X3 ~- D% u. i0 f3 i
                        rgManager.tryToStartTransOrder;
  U0 n3 D! P2 |& h0 n. h                        if @.Destination = void
& V/ f* }6 K4 b, d2 \9 m                        then -- no transport order for vehicle @
+ t( O  n" H$ m: T6 b# v! P' J( M                                @.Destination :=" s& r, o. r% s2 g; o7 `
                                rgManager.nearestFreeStation(@,track.~);
5 X& u4 _: [- v+ e                                newDirection(@);   8 C5 _# z5 e* O8 w: m( F
                                if @.Destination /= void then
& P4 D7 W+ e/ x: d& v" R                                        @.Destination.NumReservation :=
7 p' _3 ]* c. f1 |4 i                                        @.Destination.NumReservation + 1;' w5 C, {) Q0 x: C' Q# Y. y
                                end;
; f$ u% I% g( w$ L7 H7 ~                                @.CurrIcon := "drivingHome";6 r2 J5 q* f1 W; R7 I
                                @.DrivingHome := true;' F! \+ L4 O3 t8 o! `! @/ |
                        end;
5 L; u. B: H) V1 K$ e8 c                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 H$ }4 ~. g% K$ [  H" Z* |# a                        part := @.transpOrder;# w7 c& W9 U6 B8 l
                        part.move(@);-- load part
. u) q. r- h2 _- d: W9 e                        @.CurrIcon := "load";
0 E0 q4 a& a4 Q$ P                        GlobalDistObj := part.globDestination;5 ?$ h  u& _! W( C  K. R
                        assignLObj := rgmanager.rgAssignL;" S2 u: Z3 K' P
                        row := assignLObj.getRowNo(GlobalDistObj);3 U9 Y) v4 L! Y( i, l7 {6 t
                        if Row = -1 then -- since 70& g8 T8 `* ^4 ?1 _+ N/ d
                                if lan=1 then$ v* @0 [5 N/ H& |6 _% \( w
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),4 E) N- ~) T5 _  O$ j, @- J6 M" S3 ?
                                                to_str("in der Andockstation: \"",?.~.name,"\""));! j/ c/ h+ z1 F* f9 q) h
                                else+ M! R8 k7 Y: ]) v# A! A6 A3 a
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# k5 B5 _0 o5 k, ^' R                                                to_str("in docking station: \"",?.~.name,"\""));                               
! b8 b( g/ @6 V& r' o) ~8 g- O1 K" z                                end;) Z1 F. f$ `$ ^! u: s  G
                        else! T8 Y" @/ W, o4 X
                                @.Destination := assignLObj[1,row];8 A% X* A% t5 q6 x) _& O
                        end;                       
8 e( C8 o( C6 {8 F                        newDirection(@);
8 e* K+ u  F4 q: p, Y5 H                        @.HasOrder := true;+ H. U1 a# |4 N2 @7 ]- f
                end;# C& ~6 E6 Z6 e4 A
        end;
% ?& |. j( r1 ~- X( G* Tend;        -- of the method4 M' [3 W0 J& s5 O/ W  e
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
3 f: l9 q5 t. ?' X; e6 M+ {) T" l/ J, ~+ U9 k9 x0 F9 H6 i
这是AGV_putin中arrive的method。# {( `6 t1 Z* o( L) x6 H2 D" A
. v' d& p) |4 f, N+ C! C
当到达物料速度越高时,这个报警更多,
) }5 |: S2 N$ q可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
  l2 f! ?. f6 g5 |程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
# `/ t8 _" g# u# n! W5 Z6 p
  A# ^9 a  x" u; J$ D$ I另外一个小建议,就是move,所有的move都可以这样  }6 h/ c9 P4 V9 g) T* P
if not move() then debug end
  [. ]! H) E2 Y" T3 z这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
& m$ l4 j' D, J. O# x( X% |& j$ tplant simulation中的free libraries有AGV模板,9 `! g8 |* F# H7 x! j: O) Y, B3 m
里面也有案例。
( G. i# x) O5 r' J我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。/ Q3 |. u1 g. `+ q4 q. t
* f& m$ h( _* `- r
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 % x6 B5 X3 ?1 N; m

1 u! Z# R+ z5 z% I% Z那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ( K( a0 [. o6 X$ f- x, `
这是AGV_putin中arrive的method。& j8 k' m! O$ T3 r

" j- |9 ~: q& Z0 ~9 p0 p, {当到达物料速度越高时,这个报警更多,

' m- S; K3 ?& \# n0 K& ]) `另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-1-14 08:37 , Processed in 0.019581 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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