设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5756|回复: 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'/ D+ L, m+ e! T% i( T: A
*/3 D6 g! P8 \, _2 D& _% L9 y$ D' |
is1 k5 u, V9 p/ k1 @% n) Z1 t
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;! m5 l0 Y" o. ]4 u5 O- Q
do
+ X( I6 Q  Z  U7 I0 v        Lan := rootfolder.Internal.Tools.AOLlanguage;
9 T0 w( J- q+ Z. V* |        if current = @.Destination -- else return
, O+ V  u  q* s" k  {/ {        then* @8 r6 X) P$ }4 f  m+ _* m/ v" n
                @.Destination := void;; C0 N9 d4 {( ^8 [  R  d, z3 p5 t
                if @.occupied then
8 Z4 b( S7 s, a0 i( z                        part := @.cont;
  k4 Z5 ?+ t6 F                        @.transpOrder := void;- r5 `' B! `; T$ }( H7 s
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,; E; J, |! `( B3 w
                                @,root.eventcontroller.simTime);7 k* f1 W) `, F& Z6 i6 _! d9 c
                        @.HasOrder := false;- m3 r" p" |3 _
                        @.DrivingHome := true;8 O2 @, P! i$ }( ~* `2 d
                        rgManager.tryToStartTransOrder;
$ E- f; q% Q+ |* J                        if @.Destination = void% o0 U/ m# i/ N! B, x  Q& _( o
                        then -- no transport order for vehicle @. X( X$ R6 k; `  p/ R5 r
                                @.Destination :=
  ]1 f! E( B, F+ G5 f2 P( X& c8 l" A                                rgManager.nearestFreeStation(@,track.~);% K, T" H$ z! z
                                newDirection(@);   
" @$ [7 T8 D$ y5 k) ~. j                                if @.Destination /= void then* l5 C8 D% h* u6 g' U4 Z
                                        @.Destination.NumReservation :=/ S8 s, H. X3 E
                                        @.Destination.NumReservation + 1;
, N& U% _5 z& `6 `                                end;8 |) v$ l+ M( g
                                @.CurrIcon := "drivingHome";* D, s1 j$ @/ h7 _
                                @.DrivingHome := true;7 l7 g0 j1 P* C9 M/ U5 q
                        end;
9 B( v- ?' ~1 K- T7 X" a0 H" q                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- s+ [/ U% @+ H) v                        part := @.transpOrder;
) X7 E9 E0 T" R8 q" A3 `                        part.move(@);-- load part
6 Y6 W, k8 G: P! m                        @.CurrIcon := "load";4 _9 A% I" d6 x8 M& ]8 J
                        GlobalDistObj := part.globDestination;
' U# g, _# X: a                        assignLObj := rgmanager.rgAssignL;
" v4 ~# a# [( m* _                        row := assignLObj.getRowNo(GlobalDistObj);# ~: J, |2 `3 S2 o
                        if Row = -1 then -- since 70% _  J1 h0 ^# \# @% C0 Q
                                if lan=1 then
3 J& K& t/ h6 {/ ]! ^4 G                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
3 T5 o- X( C: n1 q                                                to_str("in der Andockstation: \"",?.~.name,"\""));
- P5 X- W8 T3 q% |                                else
4 ]/ P+ q" i9 j, L$ G                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),& N3 V$ l2 ?1 R- S) D# h# y* {
                                                to_str("in docking station: \"",?.~.name,"\""));                               
# T  M+ ]$ D% I8 u                                end;
( q% u0 S% E: I8 j* c9 j& H                        else
. ^7 l: @; T: ^& F4 P; y8 \+ S                                @.Destination := assignLObj[1,row];/ j! ^4 M3 L9 J5 y+ t
                        end;                        ; m) T1 _% {% i6 c7 \7 b
                        newDirection(@);' u3 ?- ]( ?) l( g2 o; ^6 Y
                        @.HasOrder := true;' S) _8 W& h+ `8 c. P% q
                end;
" H  O1 j4 K- T9 Y        end;
! y" O  d$ G& j% g( r. D# b+ ]end;        -- of the method
* G7 r" t6 K5 N" y6 E0 v! c& I* z
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
" a, I) I* b0 f9 B& q# k& H# \& n
这是AGV_putin中arrive的method。' J# M( {/ k: s  ~) ]( J7 }
( J  L; @1 _# `) ^& A& x
当到达物料速度越高时,这个报警更多,  O! W7 Q8 n; Z, I' V
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
0 S, T# v# W) T5 h0 [6 M; d- m; d程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
7 W1 |; {' z+ R2 U, _" _# q3 \0 }
. w- b7 @. v1 t- \( G另外一个小建议,就是move,所有的move都可以这样
; k: Z" ~1 L. I. A6 Y3 U/ X, Qif not move() then debug end
; r/ H3 K7 Z1 O. V这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
& ?7 a0 j  B: f% U6 e: Yplant simulation中的free libraries有AGV模板,
/ Z, B+ [% F* `里面也有案例。
5 ^( a1 j1 A( s& v$ Z6 k我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。" A0 ?- L. I3 J2 O

# R9 Z7 i( n8 S- o: @我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
$ y9 U" C! L, t2 f) A/ }; l, d0 T+ F$ z% M' T4 F, p2 U
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 # ]9 L6 H7 K. \9 W6 Z; F
这是AGV_putin中arrive的method。+ }8 O6 {( ^; h; U

' A* q9 l0 E9 f当到达物料速度越高时,这个报警更多,
7 y# }4 A9 l/ x9 ^1 t8 X
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-12-17 17:18 , Processed in 0.039185 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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