设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5833|回复: 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'! G. k: ?$ ^8 r6 z8 I% R2 R+ D  U5 j) @
*/4 ]& x9 `) u6 \/ x7 V4 g
is1 b! d9 \$ A- U9 r, q7 H, b! E
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;4 q* w* j2 @( ~6 B9 G% i# \
do
; q4 @: d$ a; A# w5 r0 B. {        Lan := rootfolder.Internal.Tools.AOLlanguage;; ~4 _  h$ c9 B# s8 v: z
        if current = @.Destination -- else return( S5 e: d7 X7 N9 D% `: c. U8 l$ W% X
        then
" h* X, v$ R5 t5 J( K                @.Destination := void;( K6 Y; _7 ~) K
                if @.occupied then
- T; @$ k7 ?! b: x                        part := @.cont;) B3 Z4 c) y* ^2 t$ {7 p' M
                        @.transpOrder := void;. Y: i; s5 k* _( O( j% v1 l
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,* _3 \) {: F+ ~/ ]  I2 a: V
                                @,root.eventcontroller.simTime);
, g- F2 b, j0 E  v                        @.HasOrder := false;
* X, }4 I9 a4 ^3 R$ {                        @.DrivingHome := true;
: X% b3 D% h9 {8 e% z4 \& u                        rgManager.tryToStartTransOrder;7 e6 b; j3 i% p6 f1 m
                        if @.Destination = void' O/ d( y) O% h3 ~: j9 d
                        then -- no transport order for vehicle @3 J% A+ l; W0 ~' r# f! R) o8 B5 P
                                @.Destination :=- P: P# l. F7 w. z; |2 B
                                rgManager.nearestFreeStation(@,track.~);
: F4 Z( x# x2 i. ^1 k8 Y1 C                                newDirection(@);   ' W: Q3 O3 ?, C" c! M. H
                                if @.Destination /= void then
/ [; n7 b; U, @% ]# E  ~  H6 [                                        @.Destination.NumReservation :=
5 u4 d% G" [2 Q' v6 r                                        @.Destination.NumReservation + 1;
2 V7 u$ B1 b! p+ W% V2 b                                end;0 R" J9 B# o7 {
                                @.CurrIcon := "drivingHome";
+ N) x9 z9 i# M2 }# I6 n                                @.DrivingHome := true;0 V# v/ j( x3 C0 {" G/ N4 p
                        end;
2 M. |0 f, i2 u1 `                else -- the vehicle @ is empty, both vehicle and part are in the same dock station$ I: j8 ?- Q6 q' `
                        part := @.transpOrder;
  h- R+ b$ z8 c' ]+ S$ k1 U                        part.move(@);-- load part
: P+ R" z' g7 j5 z, }- M                        @.CurrIcon := "load";
8 ^1 y; E- S4 ]( k  x                        GlobalDistObj := part.globDestination;; w( \: n. X/ H9 D
                        assignLObj := rgmanager.rgAssignL;
' H4 v2 ~7 ?1 q6 ^! O8 {7 e# ^                        row := assignLObj.getRowNo(GlobalDistObj);
8 z% _! ^5 i6 v4 _! z1 ~                        if Row = -1 then -- since 701 E' {: y* h7 i" N9 n( s- K/ K
                                if lan=1 then
8 Q: a) C/ o2 x  O5 u" f                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
/ Y7 l# K% \. }, I( s" o                                                to_str("in der Andockstation: \"",?.~.name,"\""));
' R8 c+ f& M2 @- Q) s                                else
' |" [/ n/ A7 i  s                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
: u  v  \" b; T6 j% C: j6 a( X! ?                                                to_str("in docking station: \"",?.~.name,"\""));                               
% V$ _2 y  `) Q& f$ P' ~+ O, H2 P. S                                end;
1 h$ C) e3 b8 z3 \                        else
( \1 h7 C, n1 B                                @.Destination := assignLObj[1,row];
3 c6 N: S0 j7 F5 a1 X8 n                        end;                       
. I$ _6 c( O5 _4 d0 a( U                        newDirection(@);; q% i* m, O8 g. p" W! D7 d
                        @.HasOrder := true;
1 J7 |- m9 `# ?- U                end;
/ m& a4 S! j# U7 t. o        end;8 M3 \- z& n7 [& Q3 j
end;        -- of the method
5 I9 H! H$ n) `' ^
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 . v0 y' J; C$ [, _
# a6 J0 Z' H& Z! o, r
这是AGV_putin中arrive的method。1 D3 Z' r2 m$ Q7 W# c+ v& F
( t/ {* B; W8 v! O4 v: Q+ l8 l& d: M
当到达物料速度越高时,这个报警更多,
, d) @3 j# C7 G) u" [- f可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。& s  f9 F5 Q. O( P
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
/ k! _+ W( `) p/ R- P. I% u2 g3 J; R( O
另外一个小建议,就是move,所有的move都可以这样5 W+ c# h6 _3 }7 U
if not move() then debug end
  I  k9 |3 A' r; j3 k这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。- O6 y8 M# e& ^' W
plant simulation中的free libraries有AGV模板,8 a3 h( U' ^* e4 v! Y# o
里面也有案例。4 F0 W  P- ~! Q- t% ]1 H; G
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。) U" R0 [" ?" V  `: T# a8 _
" t6 }0 D$ {) L! l! P5 l
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 2 L/ ?0 w, n6 n2 X

: o: f9 N/ I8 V4 p: H那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
1 D: N) o2 `) k6 O这是AGV_putin中arrive的method。/ ?. g3 y. H3 M* H3 `& O+ a
. F! q7 G: N& T
当到达物料速度越高时,这个报警更多,

- o* F9 q, \1 l8 h1 @另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-12-25 08:54 , Processed in 0.016324 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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