设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8397|回复: 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'
6 v7 R" _; e" X5 G*/
* J5 W" q+ l8 o; p6 jis
1 E- b; e# \; p2 @/ T8 F5 ^4 l+ _3 u+ C        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
" z2 f# ?; B. ?( ?do
5 v& Y* O: y% ?4 U( x        Lan := rootfolder.Internal.Tools.AOLlanguage;
% n$ j$ V$ ~8 W9 Z/ Q( s- g  F        if current = @.Destination -- else return
' t6 W6 f) x, L# s& |        then
, L6 ^+ Z" a$ Y$ n) L( J" j  o8 A$ U                @.Destination := void;0 H( A) P$ D% G7 o+ z. l$ H, D3 M/ p
                if @.occupied then
4 U( m4 P! b9 ~0 i4 @2 x  |" I                        part := @.cont;9 Y7 K1 y8 H: L7 [5 f1 {% Q5 @
                        @.transpOrder := void;
) n6 q: }- U* q) B9 F# Y! N                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,7 ?5 M: w* N7 L8 Y4 S- A5 x
                                @,root.eventcontroller.simTime);
% D4 m' Q1 G( ~! J                        @.HasOrder := false;* n6 t6 [6 D+ N* K
                        @.DrivingHome := true;
) K5 ~" A2 Y; W* i* g4 k                        rgManager.tryToStartTransOrder;  i+ F2 l3 c. D5 ~5 O! Q
                        if @.Destination = void7 V; W" j7 D2 j$ s
                        then -- no transport order for vehicle @
& v+ k3 F5 n2 y% @# w7 t) c                                @.Destination :=
% c' z* _$ j/ R# ^' ^1 t9 o# Z                                rgManager.nearestFreeStation(@,track.~);
/ [" p3 x8 L8 e1 c                                newDirection(@);   7 c( V) [  j! p  c1 v/ J
                                if @.Destination /= void then, e+ ]6 D) X) @" u
                                        @.Destination.NumReservation :=
7 Q( M/ f# g# r# T( ~) S3 R8 k                                        @.Destination.NumReservation + 1;
# d9 \5 ~' k+ I+ e, x. H, r/ J                                end;# N! z/ [) U; E4 \5 p$ Q, w5 z- u
                                @.CurrIcon := "drivingHome";* Y) \) j5 Q0 g" T
                                @.DrivingHome := true;0 e) B! l0 ]. w
                        end;+ ]" |0 \6 W4 C+ \/ i
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
' ~" |! y0 a- i: W, |3 l$ Z                        part := @.transpOrder;
. ~( x7 V0 N- ^) [* i0 d% ?; c                        part.move(@);-- load part- b. c6 |2 o' ^' J: Y* L1 S. i9 ?2 A* ^
                        @.CurrIcon := "load";( F/ V$ b" B4 V4 m1 U
                        GlobalDistObj := part.globDestination;
, O8 |3 a  R- [( p. V5 V                        assignLObj := rgmanager.rgAssignL;4 r, J5 L# E; _7 s
                        row := assignLObj.getRowNo(GlobalDistObj);
  y( `2 q' X6 R* }, J                        if Row = -1 then -- since 70
- b$ m9 V, P4 `  D                                if lan=1 then
! ^2 ?4 w+ y, Y4 H: _+ j0 S2 Q3 ?                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
' C/ u* P/ w2 ~  v+ T' s                                                to_str("in der Andockstation: \"",?.~.name,"\""));+ N; p* E: U' [/ b5 p  Y1 y
                                else+ \* {- E) z# R$ F; Z! f' F
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
' y" p2 a7 j+ Z8 }                                                to_str("in docking station: \"",?.~.name,"\""));                               
' H$ \/ b) Z2 A: J2 q% z                                end;6 o8 {% I& E5 w2 K$ a: H
                        else$ I1 }+ Z( B- {# q3 i) o% d
                                @.Destination := assignLObj[1,row];
9 s/ W8 x. S2 Z% e* F# K                        end;                        * h+ H( U' l; D, c8 d; b
                        newDirection(@);! g: V) z6 o1 m: n: M& d
                        @.HasOrder := true;9 _  j2 o) J4 y% C$ {; M4 D  V
                end;3 s6 F8 t, I8 g0 [
        end;
# N* e6 A4 n3 @% N% |  a$ _end;        -- of the method& k( |: @" d  O9 D, s2 H
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 3 P6 }, S9 q% U& Z% w

. v( i' _1 i0 U3 m0 @1 N9 Q这是AGV_putin中arrive的method。6 _+ y, i; Y( [

% E% R6 T6 k; b1 Z; L0 k当到达物料速度越高时,这个报警更多,
7 ~6 p; Z3 [( P( q可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。9 s# h# j$ Z% r7 _- E( l
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?7 n3 v1 b, m( _  N

: _6 n: v- h- Z3 X* R另外一个小建议,就是move,所有的move都可以这样
1 l( R3 D6 K$ O+ E' kif not move() then debug end
5 C* B  o2 ?0 Y5 c8 H* M' i这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
& W4 m: l6 N* G+ pplant simulation中的free libraries有AGV模板,
8 Y7 i/ l! T. O: G+ N% ?8 m里面也有案例。
! J4 ]$ R2 Q- K/ \. [& {, M我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
1 ~# s7 f. M- p9 G" E6 {1 @. V  C& ?! x
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 ) k, P2 u; j0 L" j# E9 S+ x

0 a4 z2 V7 e8 }0 S1 E5 g5 f( ]那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 : G9 V& X2 \) `' V( Y. O. G* X
这是AGV_putin中arrive的method。
% B! @4 b- w1 f3 e; H) V2 G
' G2 Q: T) l. j# C+ d/ [" O" w当到达物料速度越高时,这个报警更多,
2 g6 H: |5 ?" n3 [. o
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-1 15:54 , Processed in 0.015384 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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