设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7418|回复: 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'
9 V: \5 K. K; Q4 n# l/ p7 C*/
$ x5 F" W7 Y9 g3 Lis
: {; `' C: G5 ]' s2 l9 E' Z        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
; G, U3 q+ E1 ~' @7 ido
9 X0 {, v( X+ ]6 B; j        Lan := rootfolder.Internal.Tools.AOLlanguage;$ k; Z5 e2 l; [! s
        if current = @.Destination -- else return
' s( N$ n) I/ |" h        then
0 m& ~! n& q( L3 I. B                @.Destination := void;* Z0 l  B; i- F4 r% R- Q7 F3 y
                if @.occupied then
* d* C) C) F- [; B                        part := @.cont;
, L1 g4 A) N% A! n' R$ I" K                        @.transpOrder := void;# x5 R' D; y; L$ b: A3 s7 ]
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ c% o8 Z3 q& {" f                                @,root.eventcontroller.simTime);
" g- d# z2 @! x/ C                        @.HasOrder := false;$ t1 i* k7 Q' m  y2 e8 Y
                        @.DrivingHome := true;8 Q* l: ]# N4 r) z" _4 Q, Z
                        rgManager.tryToStartTransOrder;+ c) j- P" i3 x: r( s$ ]
                        if @.Destination = void7 D  ~5 m( r7 Q" j
                        then -- no transport order for vehicle @
% w: ]) X3 y9 o. c9 O; A                                @.Destination :=
2 Y4 S9 ]+ t4 ^/ s                                rgManager.nearestFreeStation(@,track.~);( \3 n2 S9 U1 [/ U! P
                                newDirection(@);   
  O# `% Q. ?0 J                                if @.Destination /= void then
  h. h) n0 d* ?5 b5 S                                        @.Destination.NumReservation :=" g2 b0 a8 f# D+ r
                                        @.Destination.NumReservation + 1;
! t: g# H& i% N% w* }9 a: W                                end;( E" W+ ?4 i7 ^% d* T& r1 d
                                @.CurrIcon := "drivingHome";; h" |' ~. F1 ?5 g" u1 x% K; k
                                @.DrivingHome := true;
  `% m) }: U8 j$ L                        end;
* A; F# r1 L$ r1 I3 d                else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 F% A5 ~8 f. _' p! Q5 f
                        part := @.transpOrder;
, v/ y  a+ ^4 _+ M                        part.move(@);-- load part
: F- k+ e" T! h. k8 K                        @.CurrIcon := "load";
7 }$ ]5 ?) A& W9 h" [1 M                        GlobalDistObj := part.globDestination;
  j" d) V' Z* u; T& y7 e+ `  @                        assignLObj := rgmanager.rgAssignL;" O& z" \& g3 Z9 ~! v# D2 U( q/ }
                        row := assignLObj.getRowNo(GlobalDistObj);# b4 H4 t1 A: B  p, G
                        if Row = -1 then -- since 70
7 {1 u" ]6 K- H; q2 @2 U                                if lan=1 then
, V7 I4 e- @; ]                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),( c: L+ y! B7 z4 C
                                                to_str("in der Andockstation: \"",?.~.name,"\""));$ X3 f% G# R# N$ Q9 `, U
                                else& t" s3 R! O* W6 i! Z
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
: K/ z6 o, N% B( u' a                                                to_str("in docking station: \"",?.~.name,"\""));                               
" n( B# [  R8 i9 c8 ]! x                                end;8 A" s" n: g, ]; U. H6 J
                        else+ X4 i8 P5 @2 i. q! |  p) L
                                @.Destination := assignLObj[1,row];1 g6 @& E' U/ E/ F6 b
                        end;                       
  G) r9 q3 M* D. w                        newDirection(@);! u3 |0 F" t8 ]# d
                        @.HasOrder := true;1 l  s6 f; L1 d; S- I8 y# L" Y" a
                end;
  ]6 \  ?) T) T: O! C4 s        end;6 p4 `9 t  ~9 o$ l
end;        -- of the method
7 V2 B; B* P  ?; x- t/ g
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 - G; N: G! h! Q4 k+ f

) b" z$ C0 I5 ~0 G% d+ o# p这是AGV_putin中arrive的method。/ F* \2 X$ R! ?- \+ B# Y
: ?! k" T. a% s4 d7 r0 @) r
当到达物料速度越高时,这个报警更多,
. h+ w  Q4 a( I可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
" Q3 o% c6 W% D' d3 U- `* r# o程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
* r, D0 `3 T/ Z- T- v* [: ]
* b5 g1 z1 \/ t3 C) V9 l- a另外一个小建议,就是move,所有的move都可以这样/ o7 h" v# L; O+ v
if not move() then debug end
- |( G7 Y) v% `/ Z+ ^3 s! x这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。9 A. H# V: s/ @, I1 U
plant simulation中的free libraries有AGV模板,
$ n, J" f& |% G% j" l8 h" B. Z, \里面也有案例。& b# d  p# o( {- A  `1 x1 a+ j
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
% v" Q5 _: i4 K' S* c. @% i" h7 }5 z: J: p& P9 c
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 , D- u  W2 P1 X( j+ A6 y

' H2 z1 C5 a9 F$ J0 m那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
. G7 ^) U4 i. d( w这是AGV_putin中arrive的method。# P$ V# u& C1 \. g0 U" `8 [0 t
2 I# W8 [5 A& X6 _8 g4 Y. A7 `
当到达物料速度越高时,这个报警更多,
/ n9 k! P0 ^2 b# ?% e
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-10 12:42 , Processed in 0.022504 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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