设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 10036|回复: 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 k' K8 m4 \4 [& M# J8 ^*/; ?! ~3 m: H2 }3 k$ b
is$ C. Q9 T. E. U) w
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
, p7 a# O0 \' P' a& E2 P0 Xdo
' @" `3 ]1 g* }        Lan := rootfolder.Internal.Tools.AOLlanguage;) ~; }" H  L( G0 f5 ?  @1 S
        if current = @.Destination -- else return, O! Z) }, t6 s# i: {2 S- b. N
        then
  U$ r! y9 n& B, m  D                @.Destination := void;5 S" u% t2 O" F$ J( z
                if @.occupied then
8 R' `7 p3 B( g6 r$ _3 |9 R                        part := @.cont;
+ K6 Q( _( r5 Q7 d9 t# Z                        @.transpOrder := void;! C5 o! Z0 y" z5 [5 p$ ]9 p/ ?
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
( P% G  q2 r9 ]! H/ A' P, j  J                                @,root.eventcontroller.simTime);
- U8 p$ V; ?# t' M                        @.HasOrder := false;
7 p" b2 j! @8 p' n                        @.DrivingHome := true;% f9 C3 g( T8 a& [0 \, ]; r
                        rgManager.tryToStartTransOrder;
, c0 ~& C5 y/ b7 `2 Z  V6 N                        if @.Destination = void/ l8 M9 f5 |  i) n! S1 t
                        then -- no transport order for vehicle @& \0 t& J3 ?. g! S. T& `6 ?$ J' ~
                                @.Destination :=
5 u* D- S; \$ @4 f5 w- b; D( q% q                                rgManager.nearestFreeStation(@,track.~);
! g3 x8 _1 Y' Z+ ^0 K                                newDirection(@);   
" I5 V5 l: t( n) W                                if @.Destination /= void then  ~# V9 j* _: o# l" B
                                        @.Destination.NumReservation :=
( d# T, L4 A3 h+ N5 A# ^' m                                        @.Destination.NumReservation + 1;
, l: W! b" {7 V1 N: z                                end;" Z3 S: Z% u9 y) x9 C
                                @.CurrIcon := "drivingHome";2 C5 q+ f+ |* i* I* `8 `  R- y8 g
                                @.DrivingHome := true;5 F, P$ S( Q$ W; h0 L- ^
                        end;: E$ g( |7 X" Z8 w
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station. b' _: s. v+ E# D, I
                        part := @.transpOrder;2 @$ }# ^5 a& i/ K# k. h
                        part.move(@);-- load part* q% n- ^0 k, w- ~# Q
                        @.CurrIcon := "load";
% _" z: E$ c: z7 r1 U                        GlobalDistObj := part.globDestination;0 L! e  y4 X* W! P0 ?+ C8 _& D
                        assignLObj := rgmanager.rgAssignL;
. @  [+ J' ?, W) U3 L                        row := assignLObj.getRowNo(GlobalDistObj);) O/ B- {$ S# d" F
                        if Row = -1 then -- since 70
- t2 s% j( @( p+ j* J9 y2 |% G8 N                                if lan=1 then- y7 @' J8 h/ o) ^
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),+ \$ b+ P1 z0 z0 L
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
1 p* P, Z# g3 f( U1 n( |                                else
/ b: l% S, X* n( p/ O/ b                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! J0 [0 ]2 P3 }- Z! f# t/ ?  Z. a
                                                to_str("in docking station: \"",?.~.name,"\""));                                4 Q! x7 ]& y# X( B, k. ]* o
                                end;
) j* C0 R' r. F" @( K+ g4 W8 _                        else
& t2 T/ s! O& Q' w* q                                @.Destination := assignLObj[1,row];
9 D' L. t, a5 V" O2 L$ J                        end;                        5 e8 ^% x: P6 A" d/ y7 C
                        newDirection(@);
  J6 y& r! E2 V& `/ Q4 @                        @.HasOrder := true;4 K! r, H' u" x1 Q
                end;" b) z) a" v" I) c
        end;
) y4 r" P4 r+ w% _end;        -- of the method
& u7 @( j; w: {  W* X& r
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑   F# K5 a8 n+ u0 R; a; K
1 B+ D- p0 o) y# ^; e/ S1 Q6 O
这是AGV_putin中arrive的method。! M/ C) ~2 P# \- B6 I

" e& \1 K6 `' Q' F0 d6 `+ i( j当到达物料速度越高时,这个报警更多,
( r* n4 g/ e" L6 q6 w可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。. j% a- B9 A+ W  X
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
! [) J9 u9 k' z  G
$ w6 s& S3 E. D+ e/ ~, @& ~4 E. ~另外一个小建议,就是move,所有的move都可以这样
0 e6 D; g; G) L4 cif not move() then debug end
+ t: |2 m: `% R1 I! T0 T! v" k- Z这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。  m. f( Z9 C8 ~
plant simulation中的free libraries有AGV模板,
5 o2 f8 c5 o  J里面也有案例。
, r- E; {0 Y* b0 `1 e9 A我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。- O' {8 A  S# T; b& w

: |. i, S: ]" C2 [2 G我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 " L* v6 O7 H( F/ L

5 ?  \; u4 P! B2 g, N那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 # [% q' s5 H; d  ?
这是AGV_putin中arrive的method。
& M9 ^; K4 r0 z7 ]* w
, y1 R: Y2 Z" N" T, X  `当到达物料速度越高时,这个报警更多,
6 o! Q* c0 H1 i1 P/ r) v
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-9-9 02:15 , Processed in 0.019865 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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