设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5605|回复: 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'
6 Y5 n& k6 `" U7 L/ |; d: I*/
1 }& ]! W+ b. w$ Pis6 |6 [: W- i, a5 x, m
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ X1 _2 T& \1 f& T. C2 L4 r+ Fdo
6 x* l" x. k$ |        Lan := rootfolder.Internal.Tools.AOLlanguage;9 s- U3 z# r% @* ?4 m9 V3 N* j  y
        if current = @.Destination -- else return
- I7 a. w- A5 A8 ]2 \        then
5 X" z7 N; E: A/ @                @.Destination := void;# G& {' H- M1 ?
                if @.occupied then: D8 A2 ^9 S4 N  ~, d) P" q
                        part := @.cont;
3 ~# f# G  F9 D" e; J                        @.transpOrder := void;, }8 g& Y5 q: B9 o
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
7 w. i" w; q2 x                                @,root.eventcontroller.simTime);
4 f% \" \' @& K( x) ~+ g/ C                        @.HasOrder := false;  y& |5 `' p3 \; e4 A& u" s
                        @.DrivingHome := true;
( a" v" \- y# ~) h3 h                        rgManager.tryToStartTransOrder;
6 E8 a, |4 H& ]) D; l  g2 n1 I' ]                        if @.Destination = void
! g+ ]9 ~- }) Z- @3 }                        then -- no transport order for vehicle @
8 j  G; [1 z+ z  c. ~                                @.Destination :=
  f+ F% K! G1 y! m/ Q, f. D2 b                                rgManager.nearestFreeStation(@,track.~);
) _! I% s9 ~1 K; T8 d. b                                newDirection(@);   
: p: F3 R% y, V8 G! {' r, P3 E0 P                                if @.Destination /= void then" m2 h1 [1 ]9 m& S- m3 E
                                        @.Destination.NumReservation :=8 Q% x" o" p- r2 P
                                        @.Destination.NumReservation + 1;  q5 H2 e/ x' E. j3 c- P3 c
                                end;
3 ^% {+ ~5 K% p* F1 K$ m% I! {                                @.CurrIcon := "drivingHome";8 E) n5 N% ^  E0 m# K, p8 O
                                @.DrivingHome := true;  |9 j- d- l" h  T
                        end;( V& p: l9 G+ c9 I
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 i! ?; E! m2 }- i
                        part := @.transpOrder;4 Q5 p2 }8 ~2 A8 e) n
                        part.move(@);-- load part( R  P  K0 k3 c
                        @.CurrIcon := "load";" H6 _2 V  P! Y/ b& s
                        GlobalDistObj := part.globDestination;( e3 E3 h  Z$ R0 @: ~4 j( R# k* {
                        assignLObj := rgmanager.rgAssignL;% h8 s$ f  Z6 t# n6 q: \+ ^5 X
                        row := assignLObj.getRowNo(GlobalDistObj);
5 w$ C- Z/ R( F: l. u                        if Row = -1 then -- since 707 ?! c1 B* ^7 U6 N: W, k- d9 I1 [
                                if lan=1 then2 B4 ~" S8 M! F5 B- @
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),' G/ l+ [- D5 g" e! ]& s; o9 T
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
1 c& n- y6 R7 O9 J                                else4 x/ h  R5 _. j2 M" Q, W
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
3 ^; l5 u3 a9 ^7 y; T) Z1 w                                                to_str("in docking station: \"",?.~.name,"\""));                               
0 Y# H4 X# t. ?9 U                                end;
- [* e! a' |) s' t6 ?+ F* \" C- N/ B                        else2 `5 ]' r7 x# r5 ?1 n
                                @.Destination := assignLObj[1,row];
8 E; C6 S3 r  y& ^2 F6 D0 q                        end;                       
5 D& V& c; \3 ~% }( q                        newDirection(@);7 d! y1 `  F$ G
                        @.HasOrder := true;7 L( i  J5 Q: n( K
                end;' J# F. J. o" g0 e4 m
        end;! |* ?" V! Z6 P! R) f0 A
end;        -- of the method" V" f5 ^( q4 V! ~6 ^- s/ y9 F
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 % B& |& v$ \$ D8 T# a
- a: c3 }+ Z3 ?
这是AGV_putin中arrive的method。8 A& {* M' g1 N% e1 ^8 ~
- }$ {: K( `5 ?; X
当到达物料速度越高时,这个报警更多,
7 M9 d: k: V) P- T8 @/ O( V& D6 e可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。) p) y' r: D2 i; n. \" U
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
: W  D8 m8 P9 F
5 w* l7 ]! r! W- |- }- {+ @另外一个小建议,就是move,所有的move都可以这样
% H4 Y& `2 F& X: L& Hif not move() then debug end: U, n5 [; o; P! H% O( ^2 y) P
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。. R3 q; |! j4 v/ J
plant simulation中的free libraries有AGV模板,
) \. U) K, p! `! N7 y里面也有案例。) m1 A' P; W& y
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。9 C( A) q0 E2 |1 C& B9 s. u. F! j2 y7 J

# I( O6 ~- ]& }8 }! B我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
! n% z" @( k; [$ ]; x* m- N" R% y- c0 L
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
! p' {! D" O8 M; {* Q# X! Y2 k这是AGV_putin中arrive的method。( Y) k2 t( F6 U+ u' y( U$ H
+ s  l7 t( k0 x6 n4 A8 c
当到达物料速度越高时,这个报警更多,
0 ?$ Q/ O' R  K& ^
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-12-8 11:50 , Processed in 0.021592 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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