设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9157|回复: 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'  h/ g: g6 n3 e% I4 Y
*/  E5 K, W9 X: @0 P
is7 O+ u, E+ g. G( a  B
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
2 }9 r0 x# m! F5 x& Ndo# w) H" ], K+ w& v: l7 a
        Lan := rootfolder.Internal.Tools.AOLlanguage;
- \4 ?7 I: U" i. y        if current = @.Destination -- else return4 b! w; O# r6 |/ }- U6 {0 N
        then4 E- W+ A1 ?9 t% X+ F# ]' S, G
                @.Destination := void;
* F, B8 D7 [& D5 V+ ]1 O: {# L4 u                if @.occupied then: u5 M. U( {! S% a/ y. b$ @, @
                        part := @.cont;7 m* K" r4 G# q" T) A
                        @.transpOrder := void;5 a8 y6 f" m, E
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,% s, z& _. |5 _/ }; i# E
                                @,root.eventcontroller.simTime);* s) T- d0 w; Q
                        @.HasOrder := false;
& N6 T, c$ S3 h' Q7 J9 r- j0 M                        @.DrivingHome := true;% Y( X, w% f5 w
                        rgManager.tryToStartTransOrder;
! h$ L# V8 t3 N) j6 d                        if @.Destination = void
; W( H1 Q6 ]8 q1 ?* v/ ^) M7 ]8 f                        then -- no transport order for vehicle @6 u1 c4 d) x' r4 p8 G2 o% W6 o
                                @.Destination :=+ N& n1 }+ @& l) i* ^8 K9 f( ^
                                rgManager.nearestFreeStation(@,track.~);' o$ H7 G0 C4 Y3 {+ `3 z
                                newDirection(@);   4 h5 p( g# }( ^  Q
                                if @.Destination /= void then! r& J$ @4 Y$ ~$ E# x; b
                                        @.Destination.NumReservation :=1 {. h# Q  g& l6 Q; `
                                        @.Destination.NumReservation + 1;9 y5 s6 L  K/ v) D) a' q8 {
                                end;7 f2 N0 ^( J) W
                                @.CurrIcon := "drivingHome";4 }% u2 K! q5 d2 \( u
                                @.DrivingHome := true;
6 x# e. Z' a' W+ J                        end;3 U& l; l! w. T$ ^, M( X% F
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station) T5 a6 f1 F" n8 y: ]
                        part := @.transpOrder;7 D9 z; d6 x  p" K; T5 S
                        part.move(@);-- load part
! Z4 Q% v$ \$ e                        @.CurrIcon := "load";6 r% Z1 h$ ~% t7 m- R  K! D  M; N
                        GlobalDistObj := part.globDestination;
- M( }8 c1 i- _8 _                        assignLObj := rgmanager.rgAssignL;
! B( Y  K, s7 [9 b7 L& U: ]                        row := assignLObj.getRowNo(GlobalDistObj);5 ]: k5 `0 V. E! I( o
                        if Row = -1 then -- since 709 Q! C% x: D* W+ ]9 l/ c
                                if lan=1 then2 A( `" U* y( Z$ K- K
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),! B! `9 \  `0 B8 F! _8 a& Y. ^
                                                to_str("in der Andockstation: \"",?.~.name,"\""));5 v4 ?( p, }( T" n' e
                                else9 [" p/ v9 X2 J) d: V5 N8 n
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! S! r: B* j9 P
                                                to_str("in docking station: \"",?.~.name,"\""));                                2 e$ f* E' T' H! A/ O. ^
                                end;( ]7 ^) j8 E" |2 I' j  ]/ T( x
                        else
# ~6 _+ z; I1 F3 f- V! V                                @.Destination := assignLObj[1,row];
2 g$ Z7 u3 t% L/ e  D                        end;                        9 W3 s0 m. h  w
                        newDirection(@);/ ]+ e  z9 w7 q9 J& \  G3 o( c7 q
                        @.HasOrder := true;* L) K4 q. Y/ L/ R0 [6 O
                end;+ \- H3 |" q& m$ ?
        end;- a' h# J0 J" q
end;        -- of the method
& m+ T- e& h  i  _$ K' c- [2 n* s/ d
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 $ v0 O& @- l* [- ^- ?( \; o5 u/ E

& ^+ c" m; r/ K% B$ H9 r9 P; I这是AGV_putin中arrive的method。" t0 \' p$ o  t- m6 O/ \/ I4 k

7 b+ q3 i  z0 a/ _+ O' b" F5 u当到达物料速度越高时,这个报警更多,
* A7 V7 H' Q( W# t9 g8 R可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
( e9 ]4 Y3 b# u0 x9 b4 \程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?: O; `1 l( j- a# `1 R

( V8 z& v8 R& `' S另外一个小建议,就是move,所有的move都可以这样
3 ^3 I# ]5 l6 k1 \8 X* Kif not move() then debug end9 c! H' j* d7 X9 H! X9 j) T
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
% R# [1 I; m, o% Rplant simulation中的free libraries有AGV模板,
* k+ \3 ^+ A5 [& L( I0 V' Q8 E里面也有案例。" ^+ H" C2 r2 T2 l4 B0 r: n! X  z
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。$ Y4 S6 L& D  L  n" w
; }2 y- `- c' \1 ]
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
9 W+ ?  K4 G7 G; w% |& T
2 L3 z& N# e$ ^( m那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 1 y" E7 X- l4 m# R# |# G3 C
这是AGV_putin中arrive的method。
: x+ i% B; l9 C0 P) g* [1 t' c
, Y$ g9 H9 L4 G& g当到达物料速度越高时,这个报警更多,

# }1 a+ l1 o8 |3 M另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-17 00:45 , Processed in 0.018260 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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