设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8791|回复: 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'
  @4 p- M7 h$ }3 W*/
/ p! d8 w& \, pis5 @6 {9 O% ^: A9 }4 x
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;- j! c( E7 ?9 Y* d
do0 e7 L6 R/ H1 f6 [/ z
        Lan := rootfolder.Internal.Tools.AOLlanguage;; ?; M) b8 o3 }+ K4 k3 y1 K
        if current = @.Destination -- else return) m; H, j) G- O# i% c
        then+ z" b: g: \% c
                @.Destination := void;
& F6 c, e9 D+ a6 h2 N* h$ i                if @.occupied then
% _  i/ D. H( _- b3 v* B1 v6 j% h                        part := @.cont;" A" r  O' F$ B/ j# @0 K
                        @.transpOrder := void;! d4 K" U8 |5 _7 a  b
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
* r0 G3 X6 f7 t* Q5 r- h                                @,root.eventcontroller.simTime);9 U% @, E4 m8 r- b3 A, L9 F) A, d
                        @.HasOrder := false;& `% m/ J& B( }
                        @.DrivingHome := true;& x$ Q& c# y5 c. z2 X' E  o) z  S# a
                        rgManager.tryToStartTransOrder;
# b" v: g% Q4 a$ `9 `( A9 }9 U                        if @.Destination = void
! j& Z4 M6 E# n7 S& Q8 N                        then -- no transport order for vehicle @7 s4 W' t' u  E. l  c4 |# u
                                @.Destination :=* \0 N3 V# u% V4 ^
                                rgManager.nearestFreeStation(@,track.~);
0 r4 L! H9 `; D3 K$ J. Q6 s                                newDirection(@);   - @7 S$ H+ c  X( P; g9 G) F3 u
                                if @.Destination /= void then
7 c. c0 @' i! q" E3 X                                        @.Destination.NumReservation :=
' l3 ?& h* y$ w2 A/ D3 x, F& @                                        @.Destination.NumReservation + 1;8 h8 [0 T% K2 P; ?# u' B9 Z. n% T
                                end;
  n1 K  V8 i) H: |                                @.CurrIcon := "drivingHome";4 i  H* R, V* f
                                @.DrivingHome := true;
# ?4 K, O1 R1 U: d& M6 ~# Z" M/ Z; I                        end;; i2 D7 x9 P0 e' L
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station+ Y' k# A3 |- T6 ?
                        part := @.transpOrder;
1 W9 W. B/ b8 S2 f3 {3 e                        part.move(@);-- load part& X3 \# v1 g, ?) G# c
                        @.CurrIcon := "load";7 r% W$ w, ]5 H. f
                        GlobalDistObj := part.globDestination;8 D7 G" c0 O: i$ d  o6 B% v& i6 v9 U
                        assignLObj := rgmanager.rgAssignL;7 ^5 l7 `5 f1 y7 j1 d
                        row := assignLObj.getRowNo(GlobalDistObj);, F% l  J6 f- q4 X3 U' M
                        if Row = -1 then -- since 70
/ x7 e; @: M, A4 u5 _& t                                if lan=1 then
' H- [1 x+ s/ X* M                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 m$ m% U) G& U                                                to_str("in der Andockstation: \"",?.~.name,"\""));" y' |7 C. i2 u. C7 V; V! @- G
                                else$ Z5 L/ H% U4 l0 ~
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),0 Z; @/ k# b) q, B- q; d
                                                to_str("in docking station: \"",?.~.name,"\""));                                5 k8 [; a: P: a7 |
                                end;- ]0 f3 L6 d. a7 @# h- |
                        else6 ^, n0 s3 v8 Q) _5 Z2 ~* n
                                @.Destination := assignLObj[1,row];3 Z6 `' c. L. V" [  K5 ~( D9 B
                        end;                        & ~7 I, T0 B9 y* g9 A: e
                        newDirection(@);
* W3 r' M3 i- D. n7 G0 H9 P+ s                        @.HasOrder := true;
2 l, q1 r& V: ]3 k                end;
7 B2 Q! M% K9 J) q% B7 S/ x9 Q        end;
6 ]; D# P$ y' Z3 Lend;        -- of the method5 ]; n' d( f9 s: `- S% P6 z
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 # v3 P4 }  N6 S' D8 V3 j' @7 {! U
3 h- }( Z+ u% i# ?& T% s
这是AGV_putin中arrive的method。
' }3 k6 ?, W  u! v) I5 N! |( ~# r
当到达物料速度越高时,这个报警更多,! J  K. h( b, y
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。1 L& o" s3 }; K0 Y! X
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
: P) F: U7 R2 t  Q, R8 ~* K3 I" r/ o8 r
另外一个小建议,就是move,所有的move都可以这样
3 i0 t- l, M: ?  j% ]if not move() then debug end
$ [) _5 q1 @1 s  }这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
2 l6 [+ g8 a& @# D" ]' @plant simulation中的free libraries有AGV模板,, {, L# K5 ?1 Y+ q$ H
里面也有案例。7 Q2 T+ g1 D/ M# p$ ]% O
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
) a$ ~; ^$ K7 a7 G* f4 d
- e, e" N( a  X! \3 I, `+ g4 I我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 / G, Q) U4 q4 g9 u6 `) ?

% \! A, K6 T$ Z) a* c7 a7 @那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 7 Z  o7 [; z/ k  \0 [% q
这是AGV_putin中arrive的method。$ L, i! F9 W, L6 ~) B# y2 z( `

! b4 J+ b3 L9 M, f. [0 G: N当到达物料速度越高时,这个报警更多,

! O. A- X7 \, j* F另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-26 11:40 , Processed in 0.017398 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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