设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7174|回复: 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'/ _- w0 \- r* e( H, J
*// w: [: E- n% Y( D
is
" M/ ]/ r  f5 I( h. \8 s) R$ Q1 b4 }        part, GlobalDistObj, assignLObj:object;row,Lan:integer;; r4 d, c# Y7 N
do
8 |& O( C8 L. |+ ^$ W        Lan := rootfolder.Internal.Tools.AOLlanguage;0 G2 F! W, v2 M% W1 {# `  Z
        if current = @.Destination -- else return
3 ~! z& |7 \8 z7 G1 s$ A: U        then7 _& k# V/ ~& _$ d$ I8 ^9 I
                @.Destination := void;) Y( c) H5 E# ~2 [0 b
                if @.occupied then
1 W5 E  n$ B# v6 {                        part := @.cont;* {; r# x5 y5 W6 n3 q, g
                        @.transpOrder := void;
- i9 i9 J" |! U+ z0 J) }9 M9 i                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
; m9 j# C  l$ S5 Y: f                                @,root.eventcontroller.simTime);
& ]+ [& {' S: Q, @2 B& B                        @.HasOrder := false;
2 M4 A/ Z. s! F2 E( F* B                        @.DrivingHome := true;
1 Q! d1 K, t9 Z1 m$ q; z                        rgManager.tryToStartTransOrder;6 Z5 x( K, S# q; T6 W  ~
                        if @.Destination = void
* e& ?5 \6 R/ Q+ a& J$ E                        then -- no transport order for vehicle @1 r2 f4 ]) L4 m- g
                                @.Destination :=
6 g6 V6 F6 `& a: |$ X2 O                                rgManager.nearestFreeStation(@,track.~);
2 l+ }( I) x# K, X                                newDirection(@);   
+ @/ s5 ^' G! V% r& E. u1 U                                if @.Destination /= void then
. G- x2 C+ P4 I0 U                                        @.Destination.NumReservation :=
4 h8 D; m' k4 G                                        @.Destination.NumReservation + 1;+ e1 g: _( w  I9 t: ^) p5 d. S
                                end;
2 J  t! Y! {1 I& w7 |                                @.CurrIcon := "drivingHome";5 u$ m: ^8 [' g# F3 ~, O: T9 t, n
                                @.DrivingHome := true;: `0 m: [( X, B) G) B
                        end;
, `* e2 D2 x8 ~8 o, c                else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 ~3 e3 W. v' ~* R( T. @) O
                        part := @.transpOrder;
+ S; b* `- T* u6 H                        part.move(@);-- load part% Z3 L, z1 S$ J0 x
                        @.CurrIcon := "load";
$ S& \! M+ V$ i6 P$ f4 E& E& Q$ a/ ?                        GlobalDistObj := part.globDestination;
% B6 N0 o6 }% k7 q* _5 {  Q                        assignLObj := rgmanager.rgAssignL;5 c3 Y/ q; N" x
                        row := assignLObj.getRowNo(GlobalDistObj);
4 x) }6 \) T, y6 `0 j4 g5 i4 a                        if Row = -1 then -- since 70
+ W. ]* h7 h2 j/ V                                if lan=1 then* K5 j# C/ n4 g! l- S, ^, d
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),, u0 E1 d( r- M) H
                                                to_str("in der Andockstation: \"",?.~.name,"\""));, n' O5 _% u% j+ o
                                else- ^) ~) O8 K. g; C3 M
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
9 ]/ J  ~$ x" |! J& S                                                to_str("in docking station: \"",?.~.name,"\""));                                2 {( p! u; ~: {
                                end;7 H$ p: y8 ?; t6 k) `# z
                        else/ p9 ?7 z$ S, w: w& r% A* p& V. {! g
                                @.Destination := assignLObj[1,row];
2 H* L: U. a6 H) O2 O                        end;                        : E5 Z6 P* U4 k& g. O1 P/ u
                        newDirection(@);
, Z5 t2 M6 u' T4 X& y8 b# e- X/ J# r& x                        @.HasOrder := true;
/ \9 F3 y. n9 J& ]( f                end;; m6 ]! v' i4 s
        end;5 o! P, {- W8 Z) @, V- i  {
end;        -- of the method
5 `0 d2 t- A: ?9 v& f# [& z
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 ) W: O' l5 Y, C# e! @1 O

& h- A. N. ?5 S! E* G5 b这是AGV_putin中arrive的method。
7 Z- s6 p5 L: W3 f' x
& G4 r& D8 J' G当到达物料速度越高时,这个报警更多,  r# D( z3 \+ J! C; B7 E
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
$ n. S, _: w9 t% W- k6 e程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?9 K( u9 Z$ o2 Q$ }
% _/ _, J* @$ G: S2 U+ N
另外一个小建议,就是move,所有的move都可以这样5 J% X. y% L0 ]! S- P2 e
if not move() then debug end
7 y  w6 z/ i  f  g3 j% y3 u这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
& ?( G- e- W& |5 S9 d$ hplant simulation中的free libraries有AGV模板,
1 G8 t1 `4 o! e+ P里面也有案例。7 j0 |2 t# G0 c5 f
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。1 U3 U3 f# w. P& L
* q2 `8 u) Q0 _0 M$ U
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
3 r4 @2 o$ f* l
$ V2 `# J9 f8 x那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
5 o. ?% i! [! ]; K这是AGV_putin中arrive的method。* K* g6 r" g# H% T: t0 A, x- F

0 P8 v5 V. ?# }当到达物料速度越高时,这个报警更多,
) U  G# q' H8 g/ c1 r
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-24 14:59 , Processed in 0.016703 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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