设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8632|回复: 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'
, x) C' ?8 u7 d- T5 d, ]*/
+ w9 _+ k' J6 S# F' M: ois1 k- ^# E" a/ V% f
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
9 Y( u! o, u/ t9 _do7 I: T1 _8 W8 p; t4 T
        Lan := rootfolder.Internal.Tools.AOLlanguage;
$ Q0 m# R, {& }$ x        if current = @.Destination -- else return8 n- B6 {* t. l. m; ^* l' p' ?
        then3 ^/ I/ j- e& s" e& D
                @.Destination := void;
3 z$ }$ O! M( \; v0 D                if @.occupied then
7 E, K4 a- B2 Y$ L- C: D                        part := @.cont;6 ~( h# R2 E6 C' W
                        @.transpOrder := void;0 z- p9 H& @* c5 C8 j9 T4 c
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,6 J+ O+ l! B8 ]  E5 f% @
                                @,root.eventcontroller.simTime);
2 b3 \- K9 C  I/ {: ~: o, E                        @.HasOrder := false;
1 Q5 {: H& ~8 ]/ j1 P, M* G/ o7 q                        @.DrivingHome := true;. O6 a1 m& [, x  H
                        rgManager.tryToStartTransOrder;6 g2 {& L4 g% k" n
                        if @.Destination = void9 q* x- T8 Q& j9 ~7 }6 u
                        then -- no transport order for vehicle @
  Y* y/ B' Q6 }, m4 C/ _& _2 J                                @.Destination :=
% A) p2 ?9 Q6 T" Y1 {, {% P( t                                rgManager.nearestFreeStation(@,track.~);
) @4 d( v% w! K! E! V) P' S5 ~  D                                newDirection(@);   2 h$ P6 Y& {; C  E. ~
                                if @.Destination /= void then
" z2 T5 N8 X3 F" g                                        @.Destination.NumReservation :=
" G8 c. y4 F( O! V; ^                                        @.Destination.NumReservation + 1;
+ Q+ C8 u9 \2 t# c6 y  Z; j                                end;$ Q1 Y, ]9 W, z2 v
                                @.CurrIcon := "drivingHome";
- j4 L5 g5 v! d3 e) O                                @.DrivingHome := true;- b9 G! I1 P( z$ v, }/ k$ V
                        end;
2 Y7 a- C3 C5 t+ s- \6 \( F2 M4 L                else -- the vehicle @ is empty, both vehicle and part are in the same dock station# |/ u4 y7 p, O! d
                        part := @.transpOrder;
( R! }% @+ Z" F                        part.move(@);-- load part$ j% c% `0 B5 I1 m% f% O
                        @.CurrIcon := "load";
& u7 t5 p. x) m7 F, D5 H                        GlobalDistObj := part.globDestination;
' V4 Y- N+ i7 H4 R                        assignLObj := rgmanager.rgAssignL;
7 [" f; l" P# ^0 w: x                        row := assignLObj.getRowNo(GlobalDistObj);7 O5 I! V! S. T9 \. g
                        if Row = -1 then -- since 70
* Q" P: e, p! S& o                                if lan=1 then$ X( C/ P! E* k  ~
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: y+ k$ r+ l  h0 C5 o5 |                                                to_str("in der Andockstation: \"",?.~.name,"\""));( W, K- x  P+ |3 v" Q6 s( i5 c9 F
                                else
! \9 ?  d5 G2 N# n- b                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),9 Z. b4 `6 k3 V# ?) b5 x; N% G
                                                to_str("in docking station: \"",?.~.name,"\""));                               
4 k8 C9 I. s$ B! E( o3 F                                end;
4 w; f. J' T" X5 {! h7 L0 u$ d                        else
# C# o  M' g8 e% k                                @.Destination := assignLObj[1,row];
7 w7 D" V* J' Q2 M                        end;                       
3 [; m* Q5 K$ Z! b4 Y                        newDirection(@);
  g0 Z. x1 o% e, I& v                        @.HasOrder := true;
! [: z6 C( |) h# w                end;" q- i3 u9 X  Q$ m8 r
        end;4 V) H3 p, }+ o2 b
end;        -- of the method& F8 A7 _; R; t: R- ?
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
0 E# P/ E- c& J* z% m" u5 f* y1 J
2 t& I- B) }$ ?& i5 S6 \# @% S这是AGV_putin中arrive的method。
+ U) Q) [2 m- a( l
8 V, J( k$ ^  q% v6 F当到达物料速度越高时,这个报警更多,
* _4 ~: |1 ]6 H: F2 c, z/ r. H可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
3 [& s2 i/ B4 N8 ~3 B; ?程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
3 W) c: q2 m' @% R' z2 _# g* Z0 c: V1 F6 w2 I
另外一个小建议,就是move,所有的move都可以这样
* X+ Z3 v; {: x# N# H- ^1 D' eif not move() then debug end
$ q% ]. e# r/ h/ r4 @这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。& w0 Z( t  E2 @" S8 W
plant simulation中的free libraries有AGV模板,
0 ^. ~! @; i: n; j. ^: [5 e里面也有案例。
9 f; y0 Z: @( h$ G我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。1 I! Y6 j4 U. e# a# W4 G
: P- ~0 X: C* `+ B$ h" C2 Q# ^
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 / N& r% t" q6 Z' `
+ z/ \! Q. H4 w+ v! _1 a5 |
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08   C1 h9 u% x2 @0 X$ `4 O. j" p
这是AGV_putin中arrive的method。
# K# u) O1 S5 w+ F6 ]0 P4 l2 F! z) _4 x; }2 e( l9 b; w
当到达物料速度越高时,这个报警更多,
* L& B6 J' h5 r; ^
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-17 04:10 , Processed in 0.016137 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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