设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8437|回复: 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'. c; Q2 e# d0 P/ e
*/* v/ @! D4 t" m: w: \3 ?
is
' e1 L) p3 n$ b( W9 T! ~        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
7 I( T/ n/ [, ^5 Q/ u. [! X2 Xdo
2 ], Z6 @6 W& V) L1 R& h+ d, q        Lan := rootfolder.Internal.Tools.AOLlanguage;$ e7 j6 r4 |# L. s' w
        if current = @.Destination -- else return; g3 s) t0 C6 D* [+ A: ?
        then' q6 x- a9 K) ~
                @.Destination := void;$ l/ Q/ D" ~+ @: x% G9 q
                if @.occupied then
, I% \! G) k; u/ E9 N% l                        part := @.cont;' k% f* M: n- j
                        @.transpOrder := void;3 ^( G0 b* Q2 u4 a: Q
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: T5 u3 P5 M! e* H" _                                @,root.eventcontroller.simTime);( N9 K+ b1 ~5 k' O9 x; J
                        @.HasOrder := false;0 ]; p5 _8 U$ t4 [! F' Y; D% S
                        @.DrivingHome := true;7 ?( n& Q! c; i5 C, N
                        rgManager.tryToStartTransOrder;
6 m. `; ]! p0 p                        if @.Destination = void( B' B% P" g# e0 L! X
                        then -- no transport order for vehicle @" u5 F6 E, C% w3 N$ S
                                @.Destination :=
# P. A) w' n* G: q9 f                                rgManager.nearestFreeStation(@,track.~);* U( d$ D& g4 `% G2 u5 t
                                newDirection(@);   
5 V4 K8 @9 P& ^. _7 H6 T4 X5 p1 E                                if @.Destination /= void then$ j4 B( Q( M2 c9 D* Z1 B
                                        @.Destination.NumReservation :=0 u7 L8 U$ D" Y7 {; c, U! ~0 s
                                        @.Destination.NumReservation + 1;# w1 w" n5 d7 u! z- E$ T; B1 r
                                end;
6 Z0 k* W* ?) U" a5 g0 v                                @.CurrIcon := "drivingHome";
0 X/ q2 o1 H( q4 W! z7 G                                @.DrivingHome := true;6 |9 r! R) v& J% K, f* l! ]
                        end;
- h& e4 C$ ?9 y; L5 |; G0 Z                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 T2 o: m% X" C3 R                        part := @.transpOrder;
% C, L' o7 z( P0 H1 g3 {% ]                        part.move(@);-- load part+ K  |2 s: ?; s4 B% Q& O
                        @.CurrIcon := "load";' s5 A7 h3 m' x' s+ N
                        GlobalDistObj := part.globDestination;
. a1 u/ {* A1 [7 w9 Y                        assignLObj := rgmanager.rgAssignL;4 C+ T5 P+ j* V+ l: o
                        row := assignLObj.getRowNo(GlobalDistObj);: ]) ]5 Q) M0 u3 D- e+ p
                        if Row = -1 then -- since 70( p- u. Y& G* J
                                if lan=1 then
5 d: ]) o$ ]) }                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( m! g+ p* Q2 V                                                to_str("in der Andockstation: \"",?.~.name,"\""));% }/ [: W/ D5 w7 f- B& }5 C
                                else
$ a) d* p. ?% @4 ?+ B; Z. K4 h                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# Q5 ]. ?' _' S% e' a                                                to_str("in docking station: \"",?.~.name,"\""));                               
9 @$ H; B& c( h' B' w# s) h                                end;
6 h: P6 q/ t: c                        else
' L4 o+ X, ?7 ?                                @.Destination := assignLObj[1,row];; ?! `' V& [) A; l( h5 j$ D% F% [
                        end;                       
! Y0 m# d7 m- m; G) f                        newDirection(@);
& i6 G3 }0 ]4 C  c" V, J                        @.HasOrder := true;
. c$ n+ U$ o# Y* p% X/ }                end;. r1 B) ^# m, B$ G! A2 d6 T: M
        end;4 [2 D' W( ?2 {3 c
end;        -- of the method8 L9 \4 T9 J, o9 z8 Z& v1 ~
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
: `& J, ^. S& Y( f2 c- ~1 k/ V( K  Q' d, s( B
这是AGV_putin中arrive的method。+ v$ Q$ ?* ~+ Q/ B( h+ B
0 ^6 \! W  ?& i& I2 i( |
当到达物料速度越高时,这个报警更多,
* @! m; t" [) ^8 w可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。% d1 t$ i" K% t- F7 C- }- N6 Q
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?' m% v/ Q) U: G, E

. _' Q1 [7 D) J$ O( F( z0 M  i另外一个小建议,就是move,所有的move都可以这样. ]6 W$ d, b( |$ }/ E3 ~+ `
if not move() then debug end3 n+ @3 U2 L8 V1 d. J8 C
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。# {1 f" F: b, |9 Q
plant simulation中的free libraries有AGV模板,
# C! M3 M# V4 {. Q里面也有案例。
; m1 Q- J" ]# M0 [我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
2 w! Z8 x) c6 T' w5 @0 ]: ^) R2 _* G* |2 _8 o5 L$ u* {9 H
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
' R/ A$ h# z6 @
. }% H3 F& L, i4 j# A那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
6 l* z! r' V  i: \  b# I& f这是AGV_putin中arrive的method。- T) U. a: r/ A, u& q7 ?4 y

; m* Z, Z1 a2 L0 _- `当到达物料速度越高时,这个报警更多,
" X, `# y2 a- N. S
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-3 21:40 , Processed in 0.016721 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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