设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5665|回复: 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'! W: n3 I& k- E3 c: q- P# ]
*/% E( l0 O' r: U1 O1 n( c
is. Q) m1 ]9 P: t+ c8 S* t4 |5 N
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;: O( m" p9 E. b5 _
do* V* `3 {( r; x1 ?! u( F
        Lan := rootfolder.Internal.Tools.AOLlanguage;
3 K; S) v1 I; Y& ~5 l        if current = @.Destination -- else return* i  R! G- e7 Y% w9 U
        then4 i4 q4 b; I0 A! Q# ^: p
                @.Destination := void;
, P! r* T) F, l                if @.occupied then
/ H' b5 U. c  N0 v1 c& {* Y                        part := @.cont;
6 l# J. p/ _6 T' S$ ^  i5 `                        @.transpOrder := void;
+ @, t( a! \9 p* l                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," k8 {! T4 R; }$ H3 y
                                @,root.eventcontroller.simTime);
! b3 m  M$ Q( ]- q: Y' G                        @.HasOrder := false;! z( Z7 B& a, _: M! A3 \1 b
                        @.DrivingHome := true;
% o9 _5 W8 j0 \: @1 m                        rgManager.tryToStartTransOrder;; x' n4 h, x  w4 z! B5 d
                        if @.Destination = void3 F% f: Z, J1 h& h" x* O; s' `  W
                        then -- no transport order for vehicle @# y5 h) A% q' s& h
                                @.Destination :=3 p3 H! |5 h% V! Z2 N
                                rgManager.nearestFreeStation(@,track.~);
2 o7 {3 M& O8 N+ L- _                                newDirection(@);   
5 d% H! z5 R( D# @- J                                if @.Destination /= void then
# j0 R1 J2 w/ a% t- V                                        @.Destination.NumReservation :=+ J+ j, ]* l  r. o. j/ Z/ Z4 Y: {
                                        @.Destination.NumReservation + 1;
3 Z+ @# r$ x( C3 M                                end;7 {9 T8 ^  @$ t. T; Z% T
                                @.CurrIcon := "drivingHome";. J& `1 c7 n6 o/ p- K
                                @.DrivingHome := true;% J( y! O$ S+ p) c
                        end;
! m, W/ F% H% w2 @3 B7 L                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
, @. N7 z& T. y+ k% H$ e                        part := @.transpOrder;& j- T3 M' I7 E( s5 o1 S" x' H
                        part.move(@);-- load part# e, a" H% n) L1 q9 p( k! W& E5 T
                        @.CurrIcon := "load";
$ d( x9 C- n  d3 N                        GlobalDistObj := part.globDestination;
/ z5 {& q) X$ {8 A* Y                        assignLObj := rgmanager.rgAssignL;
7 @! r6 Z8 t2 ~' E& b                        row := assignLObj.getRowNo(GlobalDistObj);4 T  a& W6 x9 ]/ O( r2 G
                        if Row = -1 then -- since 70
0 ~  H5 e4 q6 D                                if lan=1 then3 t: m5 c# K7 u/ O1 W
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),) E7 ?8 I. ?* ?* L0 ?4 w& M& q
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
/ s. b# q% A- f                                else
6 E5 }* i6 M2 i+ q9 u3 ?                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# c0 w' e- n0 D0 @9 C                                                to_str("in docking station: \"",?.~.name,"\""));                               
) ?) S. C; A" q9 D2 g0 [+ O( @/ v# \  ~                                end;, L! I2 k, h$ L& [
                        else
) |* B3 T, Q8 W/ P0 z                                @.Destination := assignLObj[1,row];
2 {$ N6 \# C% L                        end;                       
2 ?1 B2 M0 L' |2 H; I                        newDirection(@);
5 p$ g  V: l2 n6 Q7 y8 z+ i                        @.HasOrder := true;; t+ g: Y, _6 U  c
                end;2 j4 f6 c& a! f* l! i' a
        end;1 F+ l$ _  a) D4 m( Y! Z
end;        -- of the method- k+ H! j/ _3 y* v* i% x+ S. X
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
! @* t, t3 \0 @8 k6 K* I' H$ d+ Y/ ^& g* M; c7 X
这是AGV_putin中arrive的method。
( u7 J0 h0 k+ k6 U/ ^
6 O& o. z) Q# M' w当到达物料速度越高时,这个报警更多,1 z: |, @' l. Z
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
6 ~' I/ e; j  V! {, k+ ?8 P程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?* x4 f4 f8 o( r  j- _& l* g

8 ?, h9 j6 b+ F5 N: k- ?# p* v) w另外一个小建议,就是move,所有的move都可以这样
( T' G. {( F( x' H* Yif not move() then debug end/ u  ^$ |5 ~& R9 ^/ J/ L
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
5 h! |: u7 s- @+ r2 [plant simulation中的free libraries有AGV模板,$ [1 t* d7 E- o% A0 ~
里面也有案例。
$ D9 |% [* k. q$ {+ r5 H6 ^, z我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
7 K7 f, ~  }: I( C1 v
6 }( B: d! F/ u7 Z$ X我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
- L* Y: p" }* H4 O4 E; F
% y/ R/ T' t! x那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
3 {9 r# R2 @) Z这是AGV_putin中arrive的method。: ]4 S2 _% u; x/ S" y

, h2 M( T* e$ F, a/ _当到达物料速度越高时,这个报警更多,
; m4 C1 f' i1 n: D1 x8 i9 D
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-12-12 11:40 , Processed in 0.462408 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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