设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5425|回复: 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'
, y. b: X6 N2 {' `' X: B" S; K*/* e/ s3 `8 m8 @
is2 V4 U- n# M8 U3 z; Z7 h' O
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
  L" m; X3 O" m4 x: Ldo/ o, O, C9 @) t3 P1 m! S
        Lan := rootfolder.Internal.Tools.AOLlanguage;! G2 A  P9 _& t; s' J7 k
        if current = @.Destination -- else return
$ M( y2 ~' U0 A9 D9 ?7 m        then6 e: m) [9 b, l% c
                @.Destination := void;
( z' `- {' h, y                if @.occupied then
5 k  X8 c* W' D5 D4 p7 _                        part := @.cont;
; q! B4 E. e( b& a  y                        @.transpOrder := void;
: X5 O* x  Z! S, ?. C                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
& T9 c+ ]! u4 n% _1 T( X                                @,root.eventcontroller.simTime);  F+ t! I( f9 P6 b- f$ K
                        @.HasOrder := false;$ q. M  }2 J/ F! L# Y# q
                        @.DrivingHome := true;
5 b# I5 S  A! K" M; U, e4 g* O                        rgManager.tryToStartTransOrder;! C1 J! I" y; |2 p) x6 F
                        if @.Destination = void
' W. R# ^: T/ V+ i$ @- b                        then -- no transport order for vehicle @( g; [% r) A; r2 D
                                @.Destination :=
0 q. X7 V$ a9 j) O% F                                rgManager.nearestFreeStation(@,track.~);: x1 G9 P6 |; V
                                newDirection(@);   
6 F- v3 Y0 `2 o2 J8 j5 T3 T( k, N                                if @.Destination /= void then
9 [0 X  M& Y$ x  P; e6 Q( A                                        @.Destination.NumReservation :=
5 t; \& c4 W( i5 @+ R& e# T0 z                                        @.Destination.NumReservation + 1;
& Y) y& e- q3 u4 M$ M5 o0 \                                end;' g0 u/ P4 z+ F  C. ?: b
                                @.CurrIcon := "drivingHome";
, m4 F/ w+ R8 F7 ]7 u+ N                                @.DrivingHome := true;
  K' _1 g/ U; H; C  K* K0 [- n                        end;
! A6 I2 E" e' ^, c0 @                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
3 ?) i/ j  W7 Y1 a                        part := @.transpOrder;' C0 b. \$ Y. G' Q* r2 S% g/ D& g
                        part.move(@);-- load part
4 N2 W, J  w' @4 L( f$ f                        @.CurrIcon := "load";
2 |& f$ G8 ]! n! d- z6 D2 j                        GlobalDistObj := part.globDestination;9 z% ?  {+ s9 G
                        assignLObj := rgmanager.rgAssignL;
8 y% q: w/ D; h/ e; ?+ o+ ?7 e                        row := assignLObj.getRowNo(GlobalDistObj);4 h& R5 Q( ~' ]7 `7 [. P7 _
                        if Row = -1 then -- since 701 k' }& Y; q& b2 P' g6 [9 B
                                if lan=1 then
, _8 m. j& T; n; [$ Q) R0 e$ x0 f1 c                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),5 T7 F' ]# B0 I7 ~1 L
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
6 _# V9 V* s* ?+ b                                else
& Y  c0 E' @. R                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 b' U7 e: i% w" G- `                                                to_str("in docking station: \"",?.~.name,"\""));                                ! e- l+ {( I+ C
                                end;7 q+ o- h; ]3 J  l/ ?. f+ s( k
                        else1 W0 J! g) F+ B! L: p; K
                                @.Destination := assignLObj[1,row];
7 ]3 j' {9 v' |" F                        end;                       
8 n3 @9 K" {/ `+ g4 k5 W                        newDirection(@);
. E: b" H" S- F- k7 W                        @.HasOrder := true;
) N- B1 P0 d* ]9 `                end;
  z0 k2 L9 Q* _* A        end;5 c; C) b, Q7 R
end;        -- of the method
9 g, ^8 _8 ~- w
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
7 u  X9 }3 s; e: g" |: `1 R( I  g) j& u7 v$ x  h
这是AGV_putin中arrive的method。
7 H) m, R: J# d: p6 j8 g  `: P* M' j( B5 p6 Y
当到达物料速度越高时,这个报警更多,
5 ^  Y; T" `5 w: S' v可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
3 J% Z" Z' I, ^7 f程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?5 \( ]* i/ _0 }3 X+ Y" t. O
4 O4 F" J8 L0 O3 j
另外一个小建议,就是move,所有的move都可以这样
8 {/ g- }5 `6 ?3 a4 D/ r9 hif not move() then debug end8 f$ \8 d" @3 o' k7 C
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。/ t/ M6 Z' [! D; }$ k" v
plant simulation中的free libraries有AGV模板,1 ~# w1 K" n( W2 Q6 }+ H
里面也有案例。0 K# a0 m- K& t: C2 t+ k
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
" t; w/ k5 \6 |) c* A0 P9 u/ Y
9 Y- v3 \0 [4 l* `, Y+ h5 F% r我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 8 [2 f: V0 U- c$ @8 p- u. K: ^6 i3 `

0 f4 V$ `1 O5 o& V那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 % [, \" }! A9 C+ L
这是AGV_putin中arrive的method。8 c4 x9 P9 p* Z2 K
( @8 a0 N5 K1 J4 t" i7 @0 c
当到达物料速度越高时,这个报警更多,
5 k  Q( M0 [. I/ {0 x2 V& z
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-11-23 07:11 , Processed in 0.018739 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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