设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7572|回复: 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'5 l3 q5 e* M5 F+ U6 \* _  ^" t( K. s
*/
* q1 W8 T  i- u/ i5 I: Q' ais+ g/ V" h: D! [, g' `0 I
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;- A: z% f6 u: g! G. ?
do
3 [! [( M, Z4 P. k" K+ L  P$ {. p' ]        Lan := rootfolder.Internal.Tools.AOLlanguage;
+ h8 u  s; R6 }; B  ]        if current = @.Destination -- else return  x; A  y' X5 [- ]$ V! m
        then+ i, t- F; Y; m' n+ z& p2 {
                @.Destination := void;* t3 {( \8 |1 V
                if @.occupied then, [* ]4 u( ^! A
                        part := @.cont;) {2 m7 g0 x( L/ h) n9 F
                        @.transpOrder := void;  ?5 U. S0 `" @8 V$ d+ @! H
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! F% s' _1 s% X" W3 e
                                @,root.eventcontroller.simTime);
) V1 ^6 e8 Q# }& e5 b! @                        @.HasOrder := false;2 S$ Q! S& B2 ]' a
                        @.DrivingHome := true;
. f" ^$ g+ s1 c) Y8 n& q* {1 W                        rgManager.tryToStartTransOrder;& P8 i$ R* D/ s6 x2 P- k
                        if @.Destination = void
# U( z( L( K. t* R% t( X  B8 K                        then -- no transport order for vehicle @
+ q( c1 D2 {% g" u, m" s                                @.Destination :=: D' ^* w) P6 y* m: A
                                rgManager.nearestFreeStation(@,track.~);) C/ C2 o2 r+ l' \0 i! [( q
                                newDirection(@);   
" n; o. D7 v, K  S$ `1 h3 ~) a                                if @.Destination /= void then
! i" _' i4 \3 e! F                                        @.Destination.NumReservation :=( T% s0 j3 C, }  R6 j/ w/ Y& D. e
                                        @.Destination.NumReservation + 1;
/ o3 g% z3 k( Y6 ^6 Y2 L                                end;
% _9 i3 {0 j; h% {8 T9 Z6 [                                @.CurrIcon := "drivingHome";
; k5 y- H1 x5 @+ g  H+ M; W1 s                                @.DrivingHome := true;
  T5 c( `9 e' c- _6 {1 }' G0 E                        end;
) ?+ S2 A- C2 o- k1 }/ H0 h                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
0 g5 ~" T1 m" k+ @7 k3 A                        part := @.transpOrder;$ {: `* n! T- U/ U
                        part.move(@);-- load part
0 E4 ^, F- G) ^& s& ^                        @.CurrIcon := "load";
  A& j; ^" P2 v* m: C% m                        GlobalDistObj := part.globDestination;6 M) {" M/ M8 l4 z& y& ]  L, h
                        assignLObj := rgmanager.rgAssignL;
% p7 Q: J  P+ n$ c! T                        row := assignLObj.getRowNo(GlobalDistObj);% ^- G' Y5 Z6 b2 j) g  e
                        if Row = -1 then -- since 709 _* k% S4 U: N; v
                                if lan=1 then' S4 Y/ o" ~6 S6 e( r
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- N- f1 F* A+ g( C! ^5 q
                                                to_str("in der Andockstation: \"",?.~.name,"\""));$ T0 n' {  m. r9 w* B1 t
                                else
5 V" h7 k7 d# s# }' t2 T                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 O: g" @( l# q% g' U$ u  C$ M$ P                                                to_str("in docking station: \"",?.~.name,"\""));                               
0 v% t5 V5 D+ |+ y2 M* b7 R& ^: y                                end;
1 {4 l" t# L* Q6 g3 V9 \* r6 R7 o5 N                        else
2 C( Y' `3 g- {( D                                @.Destination := assignLObj[1,row];
/ e5 z) a# C+ Z/ {                        end;                        * |- `, f7 v# k3 T  ]5 j9 c
                        newDirection(@);
& `, u- g$ U# @                        @.HasOrder := true;
8 G$ {, J4 ]4 G& M0 s# H) s, C& E                end;4 ~4 ?$ L) \, ]/ d; _! W
        end;4 N. H, R: D$ A' ?2 Z7 O, u
end;        -- of the method' e+ p7 D( O( Y) Z' K/ l( H! ~2 D- Y
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
% p7 `9 `( L. C8 R# I
2 b# j; J8 k* I% o% d5 W1 `这是AGV_putin中arrive的method。# e6 b! Z: [* O* ~$ Z( {
$ D/ @# q& s8 `
当到达物料速度越高时,这个报警更多,7 @4 B3 K3 e5 J& d: p
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。+ F6 S7 i! M( z) x* F
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
+ {2 b, E2 R6 P( y- v" `, P  E. ~% n- m0 x6 ~& L
另外一个小建议,就是move,所有的move都可以这样8 c6 _; H# d! d6 f, b( ~, k, r
if not move() then debug end
7 j+ n4 Y5 b( W9 @" _* E5 C1 J这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。% a) b4 {, E4 Y
plant simulation中的free libraries有AGV模板,& O' M/ u( \* R" g! N9 y
里面也有案例。0 [4 n. c9 y* `6 A' w3 ~! _4 V
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
+ J! Q& K4 F! ], r2 v, J6 Q
6 ]% ~* K# {2 G8 d我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 ' R, R( l; k+ s- z
% c" q9 w0 g- R
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
$ ?! Z6 y# b: ~" g, V" g$ {这是AGV_putin中arrive的method。. y0 ^- W9 z% t0 q2 X0 d8 L
1 B5 f8 e# Q5 n: l- d% F3 U
当到达物料速度越高时,这个报警更多,
5 h& Q! }) J) K. H
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-18 05:02 , Processed in 0.018505 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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