设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6041|回复: 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'
- L8 M1 a4 C( u$ x* a; s$ |* ?& A*/0 v9 s& ]' O/ ]( C
is
) ?+ q8 x! Q! E6 Y$ D0 f        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
8 V/ i) e$ ~. O7 e1 Vdo5 T) E5 c  M6 ~8 w& O3 G$ |- Z" h
        Lan := rootfolder.Internal.Tools.AOLlanguage;" F" K2 [- f' K' r4 K9 S/ ?
        if current = @.Destination -- else return
4 e# ~* J: X4 x( p        then
* m6 e1 E$ o$ y* M. S- A                @.Destination := void;" h. Q4 ^- y! o
                if @.occupied then
1 \4 b- E  D) l/ W4 t8 s                        part := @.cont;( H2 P* R: u8 W
                        @.transpOrder := void;! F+ O2 _) ^6 V. p. [- d! ~) Y  g
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 {; U9 J( i8 G3 g- l
                                @,root.eventcontroller.simTime);
6 ~3 [  H8 G! O- Y4 \9 j" d. a  {                        @.HasOrder := false;
' K" @. l# z0 e+ G5 i$ b: X6 a# j0 v( v                        @.DrivingHome := true;% p( [2 ~' e% S. o5 R
                        rgManager.tryToStartTransOrder;
8 _/ t5 e7 @! ^5 f; O( }$ Q                        if @.Destination = void
3 \; E7 c& i6 ~) \; q+ H  R8 q                        then -- no transport order for vehicle @
9 h( S, n, R. M# u$ i9 v* h                                @.Destination :=
. ~/ Y" i+ R( f8 O! z                                rgManager.nearestFreeStation(@,track.~);0 `) g7 j( ?6 m+ P- M2 Q0 n
                                newDirection(@);   & k) G! f# g" j3 A  z: i! k
                                if @.Destination /= void then) o% d  W2 Q# L0 {* N2 a/ T8 C
                                        @.Destination.NumReservation :=
; f5 s7 e( K1 ]5 [! J3 t% Y                                        @.Destination.NumReservation + 1;" |. r& t5 \3 P0 V$ i* E
                                end;
+ ?: N& ~) _/ f6 o* |' ?+ w4 ~$ M% C                                @.CurrIcon := "drivingHome";
5 H4 i( i/ v7 y                                @.DrivingHome := true;  N1 U' c0 {' h6 v; ^8 O4 h
                        end;* v' }4 Z: J( w$ S6 x6 x. X$ h2 ~+ p
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station( x5 A+ {0 \+ l7 p9 g
                        part := @.transpOrder;: }% \% m0 d) p  k8 p
                        part.move(@);-- load part% X# {4 V% B1 D8 }9 j; t4 Z
                        @.CurrIcon := "load";
' I2 m; T& @( x4 o9 L                        GlobalDistObj := part.globDestination;/ T& Z. U5 k: U; M) N$ x% J
                        assignLObj := rgmanager.rgAssignL;; o4 |8 A5 }; W, W, p
                        row := assignLObj.getRowNo(GlobalDistObj);# n4 c7 _( K  j  k' j* t* T
                        if Row = -1 then -- since 700 C& _4 l" P! w* }; G; k+ u1 M/ {4 I
                                if lan=1 then% {4 c# W+ x3 x) r! X$ h$ k
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),2 p# _& R5 Z" C1 q
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
& A" j2 C$ N* U  a% d                                else
3 I4 a3 P* b. q                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),9 a. m  X' ~# [! D# b7 X! }
                                                to_str("in docking station: \"",?.~.name,"\""));                                & O0 U2 j7 H. g5 Z
                                end;- W& d2 E' r3 C% ]* B
                        else
/ f% }5 x6 H2 f% k9 ~" a                                @.Destination := assignLObj[1,row];
: b% V: g) U, Z# f6 q5 @                        end;                        2 l0 c( n0 E" ?6 M0 V' H
                        newDirection(@);! }% V! o, [: w0 p4 q0 n& C( j8 ~
                        @.HasOrder := true;
3 I! A% q/ [( I4 G$ _+ z7 g# J                end;
5 G2 f7 t+ ?* ]$ L        end;& R9 w* _/ V9 Y
end;        -- of the method
4 o! F2 Y" S) S
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
7 }: N9 X  Y3 Y; i4 v* u" u" ?4 @
1 `6 F3 y, j) x; }这是AGV_putin中arrive的method。- p! S2 U; P9 H* w$ C

# Q- m: \: j. H3 I当到达物料速度越高时,这个报警更多,
8 ^+ Z, ?$ S, q% q) ]4 H$ K0 k: |可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。7 t- {8 ^( {6 P' n8 e6 y& T
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?( i0 W5 A! z# \' V; {! V- i9 K
( H3 x. n. Q  d& E
另外一个小建议,就是move,所有的move都可以这样
8 R6 v9 c& N9 Z$ Eif not move() then debug end1 t/ D: n5 R0 x9 D
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。& h) E+ L  u0 K1 l6 D) B6 C
plant simulation中的free libraries有AGV模板,
' w; r( `" G# G) ?% G! t里面也有案例。- i( k$ S# h- O3 B2 |$ ~+ F4 M; K
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。; t; ?' s. N; Y, O& q. U; x

- Z+ K+ F+ f! Q; C' O* @' P我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
8 p' v7 b7 i+ {+ ~
: F% H: q6 h( W' ^, ~那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ' |% l& r; _* u: x: A# @
这是AGV_putin中arrive的method。
# b- Q) U+ D! L, \) S
5 w: N, x6 P% N0 ^# p' |当到达物料速度越高时,这个报警更多,
3 b, I5 n: q/ [6 V9 ]5 B
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-1-14 06:12 , Processed in 0.022591 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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