设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8774|回复: 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'
. I- m3 D1 a4 o0 I$ @3 P*/0 I7 E; D4 O0 ~- a
is
& p$ W  _3 E" {+ {        part, GlobalDistObj, assignLObj:object;row,Lan:integer;, x! {& K3 l9 {
do) J. g. G  e+ _& {. ?) i+ n# T
        Lan := rootfolder.Internal.Tools.AOLlanguage;* G) I+ H" [. B5 w0 U
        if current = @.Destination -- else return4 y6 O7 L) X, [: {) T! j( E/ U! _
        then+ ]  L9 h) z: D* I6 h* o
                @.Destination := void;% @9 z" B" d3 U/ F% A* ?% g
                if @.occupied then
9 G& c( x# q( `                        part := @.cont;
$ {, J! z2 D4 X& [6 x                        @.transpOrder := void;
  U. C" @* D( {* L2 \1 C) }                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
' L4 V# f, O* Y- Y& y6 h* F% N                                @,root.eventcontroller.simTime);
  J& n0 y0 U' D( `6 z7 E7 ?' C9 n+ }                        @.HasOrder := false;
4 B1 s7 o. F$ T7 ~. T                        @.DrivingHome := true;
' I4 e8 T# s- L& i% g                        rgManager.tryToStartTransOrder;. F2 ?# N& c" j; P6 U- B
                        if @.Destination = void
9 [% \6 B3 ]4 D8 T' I/ l                        then -- no transport order for vehicle @2 g$ H: [) M! A  J/ W: I' ]
                                @.Destination :=2 A+ [' }' v6 V2 \6 x
                                rgManager.nearestFreeStation(@,track.~);4 d) |- M1 p- N- q% v% A8 f
                                newDirection(@);   1 u+ ^& B9 Y/ i% B  d
                                if @.Destination /= void then
6 `8 V$ ~' M) S/ b6 o                                        @.Destination.NumReservation :=
0 l5 \, U8 e* i1 z5 h3 D5 [2 r                                        @.Destination.NumReservation + 1;5 j6 |! @, G. \* E- y
                                end;+ j9 c" B2 P/ r4 i1 n) O: l( j8 Y' F
                                @.CurrIcon := "drivingHome";
# b# d) _% E& O! p6 _4 H2 i                                @.DrivingHome := true;) [4 S+ K: ~1 [
                        end;
* N" p) k0 G7 Q( t9 Y                else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 v% l/ x0 n: Z
                        part := @.transpOrder;$ n, ?/ ?3 _4 U/ J% U$ G4 a( t2 }
                        part.move(@);-- load part: O" U% Y( i. G
                        @.CurrIcon := "load";; s5 Z& C2 p4 j! |  Q0 k: X
                        GlobalDistObj := part.globDestination;
  |( s2 \8 Z4 l. G9 a                        assignLObj := rgmanager.rgAssignL;
& ]/ s$ k& g( F% G4 n  K                        row := assignLObj.getRowNo(GlobalDistObj);
( N$ {3 q4 G8 q0 R& ]. t; |                        if Row = -1 then -- since 70
, y  @8 R0 Q/ n5 l                                if lan=1 then; P1 t- C( v% X  ~0 Q# b* l$ z& r
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
; E" `& j$ m) c* ^$ i1 c                                                to_str("in der Andockstation: \"",?.~.name,"\""));
. ~' G" q& p3 x) a/ v# y                                else. z& e3 m5 M# L/ Q
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
* I, V6 @. h6 `9 Z9 ]5 Y) M" ~, H% r# ~                                                to_str("in docking station: \"",?.~.name,"\""));                                8 q, x* q" J1 o) r5 p- B) p
                                end;8 Q8 @; E: B" c) X
                        else! i4 `' Z) @4 k
                                @.Destination := assignLObj[1,row];7 p5 O! E5 z/ v$ p' d6 g- F  V+ E
                        end;                       
4 q9 v4 B! g: F1 S                        newDirection(@);, {7 _. i+ j; |
                        @.HasOrder := true;
" s- }: a& B0 m$ \                end;3 M1 C( M: a6 G4 Q, K1 ^3 @+ P
        end;
: x, U7 C1 w" \4 l5 gend;        -- of the method
, H- P& V  L9 ~8 {5 a6 ^( y
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
/ a/ J& L8 X6 _, D' a2 U# C% c- p7 k7 C- @$ n" L& n
这是AGV_putin中arrive的method。
8 R- H2 \% r; Z4 r2 p* Z# _% O% x2 Z8 z( R* y4 P* _! r6 L
当到达物料速度越高时,这个报警更多,
5 r, ?$ |  K' q' D可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。8 c. }* Y4 }( M* H# p( a! Q
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
' K$ C: a* b% d; E
5 ^; T& A+ F* K9 P" W( l! z5 @, M8 w另外一个小建议,就是move,所有的move都可以这样' x$ R( e6 R- ]8 S7 |
if not move() then debug end
3 R' D1 S6 e) c2 Z& R- |0 k" s: q这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
; k& R) `- F0 A6 Iplant simulation中的free libraries有AGV模板,- E) \+ x: F6 ]) Y6 l; ]# L( D
里面也有案例。! ^5 W' e2 f4 Q* O! ]2 F4 l. Y
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。8 j. w9 B8 ^/ @( R, p6 l
/ d5 g" Z% J" L
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 9 G/ X- N0 L7 |$ [/ |* j

9 T$ Y' P* P; n1 x那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
# u# }! d0 S* `( M% v+ `这是AGV_putin中arrive的method。/ }! C! Q7 E8 p7 v
4 J# ?# u+ W! S4 p& ]' [; E
当到达物料速度越高时,这个报警更多,
3 m$ o! Q5 [* z$ {+ H
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-25 21:11 , Processed in 0.015063 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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