设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7100|回复: 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'7 y2 o7 C  d( [( ]2 S1 ?
*/9 t+ t; S! o6 ]/ q& D! K- a
is  w; l( x4 s! H2 N9 [9 T$ n' c9 Y
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
6 k; h/ [! D0 o1 s- f8 p) A! @do2 A( ^9 F, v) X2 a! C# l3 F
        Lan := rootfolder.Internal.Tools.AOLlanguage;0 z1 }  M- Y! z9 N2 C
        if current = @.Destination -- else return
* T% X8 Y1 A8 \* b1 X        then
/ x0 _' X9 p; g9 [                @.Destination := void;$ s/ k6 q' j7 s% s8 w
                if @.occupied then- E, t/ {. o+ i, Y3 c5 F$ d0 ?4 f! r
                        part := @.cont;
9 j+ m+ ]) D$ w8 z! |; K                        @.transpOrder := void;
3 _  b( x# b# {( h- K( @) n                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,  z4 W9 t% g5 q2 G. A* `$ |% z
                                @,root.eventcontroller.simTime);, `* P3 o/ x7 w6 S+ n/ H) G
                        @.HasOrder := false;/ J$ u4 G6 R6 y# Y  b
                        @.DrivingHome := true;; B1 K8 }' L7 N- D# s. e# i2 P% C( x. d
                        rgManager.tryToStartTransOrder;+ J9 p  [. `4 {0 Z
                        if @.Destination = void/ H5 P3 W2 H4 H0 X  Z$ S
                        then -- no transport order for vehicle @6 D! d" U4 O+ }( a9 G1 q1 Z
                                @.Destination :=
# M( ]# T) t# k/ I1 i3 j5 q; \% w                                rgManager.nearestFreeStation(@,track.~);
" u$ v$ s; K( h0 u1 W                                newDirection(@);   
' U) g% \  B- P( ]" B, b) }                                if @.Destination /= void then/ d& ^+ _& p% D2 G
                                        @.Destination.NumReservation :=
: A- l) p/ G+ X7 k4 J  n                                        @.Destination.NumReservation + 1;/ Y) ]/ _/ u5 h0 f2 ~  S5 I
                                end;
; x" i% }$ \9 O. T                                @.CurrIcon := "drivingHome";3 p7 U& S6 [) Y+ K  W( D; [
                                @.DrivingHome := true;
& ~* v0 L' o+ l% c                        end;. c4 F9 H! u0 |' G, ~4 X5 b6 x5 R% {
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 o( l$ i6 l1 f! p  S; Z  {! N
                        part := @.transpOrder;
5 ]5 N) D" ~: |7 }6 A  l                        part.move(@);-- load part# U1 l0 g* ]# P  r$ P
                        @.CurrIcon := "load";0 R+ O8 g2 h7 u" H/ ^* V+ D- `) h8 t
                        GlobalDistObj := part.globDestination;) s( T& g8 {# h* j3 h9 _5 m
                        assignLObj := rgmanager.rgAssignL;
" d2 z: U) N- F, }9 F                        row := assignLObj.getRowNo(GlobalDistObj);; m* O' e- O! E) u4 E
                        if Row = -1 then -- since 70* B; b  ~4 y% R- v8 e
                                if lan=1 then
$ Z3 @1 w3 G, k2 c- c! k, K7 z                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# N. n3 ]- D* h* d$ {& y- D8 A9 N2 V                                                to_str("in der Andockstation: \"",?.~.name,"\""));) E2 M# e8 C" I1 V( l# D  H( {
                                else
% y7 I. F; L  C/ Z6 ]" K# f* l                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
  `) V4 t. R/ h2 k- o2 e; I) h                                                to_str("in docking station: \"",?.~.name,"\""));                                5 R' R. M  d& P
                                end;
3 A; {* r+ S5 {# r: _* H                        else
! ?8 {; t$ P" C                                @.Destination := assignLObj[1,row];
# q+ K2 N+ Z2 R/ i$ Z6 W                        end;                       
+ X# F* V5 K  T4 f, l2 E- o' M: r  m  C                        newDirection(@);2 E2 ~+ s! r5 i$ G4 x7 V' Z: g5 e3 O
                        @.HasOrder := true;
) r. f; K/ o% B; e1 \                end;2 f! v0 ]8 K* V- B" a3 {& f
        end;
+ ]7 D* L" l! ^end;        -- of the method
+ f7 f, o# |: r$ l* S% H! a. V
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
, r( {) _& _& ]/ G# g# K8 O+ f. Q/ r2 k# y' j
这是AGV_putin中arrive的method。( B; \. B' y" M8 M6 i; p

" _# K# K4 @& ^8 {当到达物料速度越高时,这个报警更多,# u* U& _! M8 ^: I8 W' ?
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。2 H& F) m) `+ n
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?$ m9 @4 @4 P8 K

" n4 v2 w8 b: ^4 |( c另外一个小建议,就是move,所有的move都可以这样+ d) {6 c* d' K
if not move() then debug end6 _) U5 K& x5 Q7 P" @5 r! f
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。1 K! N1 d4 S. V  |
plant simulation中的free libraries有AGV模板,
% ~, c3 B1 c9 y- b+ n7 r里面也有案例。
8 v" Y- D6 W" M+ R" U1 [* ^4 N我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。7 i" G) `$ }' U! @& Y1 p

! o( w9 g# _( B我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
6 H! g2 y2 L2 q5 u" o( @
; d" P0 @) G% A  C& w) F) ^6 r那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
/ X# b8 y. g) ^5 i; r' q4 p$ U这是AGV_putin中arrive的method。
8 M1 ~- q. b. I8 S  l
7 _  j9 l9 t7 |当到达物料速度越高时,这个报警更多,
# G3 G, Q; f2 ^5 ?& u0 y
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-17 18:05 , Processed in 0.015339 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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