设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7410|回复: 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 p0 u; Y/ F# p% s( G$ q2 j*/
& a: z2 ?' M0 m( p- F9 Nis1 b: X: l. L$ U+ P% ^6 H
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;+ Y) ?5 T" m5 I, k2 ]
do
; W2 w' ?4 T! S, @' \- z+ f: r        Lan := rootfolder.Internal.Tools.AOLlanguage;- C+ \2 W  w/ q/ N2 ]/ B
        if current = @.Destination -- else return
0 L; Z! T$ z* g8 n+ K        then' n  X1 i/ E. M/ \+ U/ m4 @
                @.Destination := void;, {3 F) m; @2 {3 X4 G) {6 `8 }
                if @.occupied then& p/ y7 t8 q( x4 b0 t5 r2 @$ q
                        part := @.cont;
) N! }8 a% N% B1 W8 t                        @.transpOrder := void;  i5 c, G" g  ]5 u- v
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
" h! R! _. a2 r: A% o! `6 p- J                                @,root.eventcontroller.simTime);
9 G' S0 i- C5 x: R1 i4 p                        @.HasOrder := false;
9 B; H' c3 I9 A$ P                        @.DrivingHome := true;
* h- |& C8 Z1 A( ^! P5 s2 L! U                        rgManager.tryToStartTransOrder;. z2 d) s2 |' U# y  e1 S, h' |
                        if @.Destination = void& d  n" N; W' p7 Z& P3 l1 }: ]
                        then -- no transport order for vehicle @
2 g$ O7 W- y  O( c  e+ {, D- W5 i                                @.Destination :=
* G3 ^$ H3 F! g+ Z1 l6 }1 _9 g& l4 p                                rgManager.nearestFreeStation(@,track.~);
- J3 R2 J3 z& D. N7 x7 o1 W                                newDirection(@);   ) }* M: s4 I* p3 R. x2 v' S
                                if @.Destination /= void then
6 `5 Z; I0 S" |. H* H! o                                        @.Destination.NumReservation :=
; s! b$ n9 \+ v  a: r0 c+ g( g                                        @.Destination.NumReservation + 1;
% l. f% z# p! [  ^                                end;* p4 q. ]  O- }2 c! d
                                @.CurrIcon := "drivingHome";
& y$ @7 T+ {+ ?% }* @7 U                                @.DrivingHome := true;
8 d6 I- M7 X3 ?$ W2 Y0 k% \+ a& b1 O' I( r                        end;
' \, Y/ v4 c# J                else -- the vehicle @ is empty, both vehicle and part are in the same dock station% @' f8 F+ d# z3 d, M3 l
                        part := @.transpOrder;
+ C& a+ O5 O% I4 H                        part.move(@);-- load part
( ~( r3 s) H+ N3 m                        @.CurrIcon := "load";3 Z. O0 f2 r  l' i. X
                        GlobalDistObj := part.globDestination;
+ B% H) j6 H8 A% k8 G5 n1 T+ m                        assignLObj := rgmanager.rgAssignL;+ z/ z4 U$ o6 i( e
                        row := assignLObj.getRowNo(GlobalDistObj);
/ ~/ a6 h# R) h3 M8 ]                        if Row = -1 then -- since 70
9 N3 ^% Y- ^5 F# j                                if lan=1 then
. Q- L+ D' c* B8 J: z                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: x! r, E& K! i
                                                to_str("in der Andockstation: \"",?.~.name,"\""));2 s$ E0 T8 F3 L
                                else9 J6 {' l3 H- l: U/ |9 f4 j( e
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),5 X8 m8 H2 }4 J
                                                to_str("in docking station: \"",?.~.name,"\""));                               
% W  F& i( @* E                                end;
+ t2 q" L  F& j' R- [* b                        else
  r5 i) |3 X' R7 T$ V9 U- E. r  ^$ C                                @.Destination := assignLObj[1,row];
& I$ z1 }+ W) `& u                        end;                       
. j3 q0 a! q8 k8 e$ c$ ]2 I6 j                        newDirection(@);2 R% J, t* F4 n% _+ x/ P* D
                        @.HasOrder := true;
9 v# X5 W; @  _! M                end;$ U  j) G: M; x3 K% o
        end;
4 s# _6 e$ H) u0 l  t, Uend;        -- of the method; Y3 Z  f$ O' a3 ^
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 5 U& ~5 k3 K+ H- ]1 C* X" c3 ~9 J

/ \  e+ w4 n, |3 u4 M' I这是AGV_putin中arrive的method。% D7 P* w# K( h. z) V9 ?" c: \
# V1 n. R: c9 {7 v$ V
当到达物料速度越高时,这个报警更多,5 N- e, L% n2 L  ^
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。$ r# M& R+ _% {! ?4 I
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?; j$ {7 v3 @. z6 s9 @, s& w
& |6 T5 A' `' L/ l$ T2 Z
另外一个小建议,就是move,所有的move都可以这样
& F( x/ P+ X2 f6 H+ P" `  v. d& eif not move() then debug end' i# C2 Y' Q2 T9 K- |
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。8 A, {1 q/ `3 Z1 x: W
plant simulation中的free libraries有AGV模板,
6 \+ J/ d' e$ p% p/ S$ |里面也有案例。
+ O6 C' p: F7 W  O- [9 c, m9 Z我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。6 Z3 ^3 l6 d+ h3 t: u

" Q) O5 k2 z1 x2 k& e我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
, d% f! G2 ~  t8 E& ?! H2 Q
/ ?3 f7 I" A* o7 l8 W% [! V那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
  U2 I- ?3 O1 c1 E# ]' E( L这是AGV_putin中arrive的method。+ h, {: P- u6 }! C4 Z: O, K: }
( e  h9 l; G1 ?! @/ O
当到达物料速度越高时,这个报警更多,
. G' p! J% p0 A3 h6 D4 K
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-10 03:46 , Processed in 0.020084 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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