设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7667|回复: 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'
8 @* k0 G1 a. z! u' Y# n; M/ H*/( g" f% i4 r% J
is
+ l2 A, O. x! ]0 b, O1 u3 g+ r! f        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
0 V: [. p" G  vdo
7 }; n! O4 A0 M% i% s9 T        Lan := rootfolder.Internal.Tools.AOLlanguage;
5 }0 e) w5 z' j$ ]        if current = @.Destination -- else return
# |. k/ t- C$ V5 N2 R        then
' }% s6 t4 m- [/ U2 g& Q, ^- e                @.Destination := void;5 B/ Q* v3 l- U
                if @.occupied then1 {7 _. f5 i2 l5 j" \- m
                        part := @.cont;
3 O; U  o; m9 S& B1 d; [! l                        @.transpOrder := void;6 h- l. P) o' L- |& ^5 b& r
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,$ ]) d/ @* l0 Q- R, ?4 Z
                                @,root.eventcontroller.simTime);
, o- @  F% K* l9 A( d                        @.HasOrder := false;& [' ]0 E3 `5 j3 w* |* t" o
                        @.DrivingHome := true;
/ `1 P' g4 K& {- J                        rgManager.tryToStartTransOrder;
0 k) `' g: n8 a" Y: s' u                        if @.Destination = void
# o- \+ p9 ]! H                        then -- no transport order for vehicle @
- t* |% c" u" I. s! |7 {3 X                                @.Destination :=3 i0 E% K' r" k, d& C4 S* x5 J+ R
                                rgManager.nearestFreeStation(@,track.~);
1 b7 h) Z6 a8 D1 M/ g                                newDirection(@);   
' R' J' \0 c: M                                if @.Destination /= void then
7 G0 H5 i! J5 z* N0 O" s- F                                        @.Destination.NumReservation :=
0 \6 t" f( P) C: V                                        @.Destination.NumReservation + 1;
- u9 P$ C% Y- Q  ^) A; d- U, Q                                end;
% w0 R8 {! T1 s6 y% n* P- o% ]2 A* Y8 q/ u                                @.CurrIcon := "drivingHome";
' g8 Q: l) x8 i6 _$ p                                @.DrivingHome := true;! w! h& Y/ V" C0 Q) Q0 b
                        end;" ~2 t4 `0 @8 g7 _- v# i
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station2 J0 s# ~. `0 F# o  v
                        part := @.transpOrder;: c8 Z# k( @, H' \
                        part.move(@);-- load part
- K# l4 D5 X+ [                        @.CurrIcon := "load";# I* j; O# F2 [9 W
                        GlobalDistObj := part.globDestination;
2 E5 t( `4 w+ H                        assignLObj := rgmanager.rgAssignL;/ B3 d5 W0 w! I; r
                        row := assignLObj.getRowNo(GlobalDistObj);
: b- J6 A* {* f6 Q3 q) F                        if Row = -1 then -- since 70$ G9 d) R2 G# ?/ z5 i
                                if lan=1 then7 p6 B( u! q& y* H$ f, n. |9 [
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),2 d- f& x4 _$ j8 L3 b% n% U$ U6 O
                                                to_str("in der Andockstation: \"",?.~.name,"\""));3 |9 y+ `' h5 z6 H
                                else
& m( P4 ]: h+ T) A3 Q                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
' ^4 J' D( E0 Z( ~6 |                                                to_str("in docking station: \"",?.~.name,"\""));                               
3 G5 b$ N9 m+ t7 E0 \7 Y                                end;( D# e- ^5 `4 P! ]5 ]0 @* O9 c3 y4 I
                        else  C8 N, t% C5 t4 L
                                @.Destination := assignLObj[1,row];
% |+ B0 l( |: ^                        end;                        0 d/ G7 X& Y1 |( a+ o5 `, K9 }# ]; c; M
                        newDirection(@);3 z1 ?& O& L1 o% a
                        @.HasOrder := true;
1 @1 m* {  ]- n* E9 L- |& A                end;
- u3 ]- I, E7 d$ M% P5 p        end;9 H5 d' n, t! u* ]
end;        -- of the method
" Z) o6 o( T8 O) ]- w
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
# R; N3 ?3 u; C: C. |4 G3 e+ k2 z+ ]( A( G! L  R- x
这是AGV_putin中arrive的method。% _0 l* [. J: Z/ D" D1 K

1 B8 m; q( Q7 m# W0 ^当到达物料速度越高时,这个报警更多,
, Z8 ~& ~2 ?! [( \8 ~: M" d/ M/ Z可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
+ F& ?; g3 Y7 Z9 v" t' D2 V$ U程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?$ x7 y( B$ B% h! w
2 c: K- D1 ~0 X( m( X; `, y
另外一个小建议,就是move,所有的move都可以这样
+ T+ @9 F$ n6 G, Z, mif not move() then debug end$ B. T3 Z  M- ?+ Y: h/ T8 H
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。( C! ~/ o7 p7 ^
plant simulation中的free libraries有AGV模板,
: u$ F  |4 ?, G4 ]" ]里面也有案例。. k0 J) t$ o* Y  J
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。& ~# E: e1 c0 Y. g& {8 X
3 V- s' S0 O0 `7 E  |1 ]$ O% Z2 i
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
( M# b' w. \4 Y* e" N
- m8 B# H' J. X4 o% ^那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 8 C& T( x. \% u6 s; [, b& ~( y
这是AGV_putin中arrive的method。
) ]3 C1 U- c* t& ]" t
* v  _1 j6 {& t& {$ L5 ?) e. a当到达物料速度越高时,这个报警更多,
$ P& t) W) K: d* T  X8 n
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-23 08:08 , Processed in 0.018246 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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