设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6862|回复: 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'7 X- Z$ N" k% B, \
*/
" [& i7 ]8 w# I3 E% Bis
8 _2 n" Z* G( R" z/ B  T6 q        part, GlobalDistObj, assignLObj:object;row,Lan:integer;) a& Q  n% e8 w# \2 \2 Q
do: V  x3 D( f1 ?# R! j. q
        Lan := rootfolder.Internal.Tools.AOLlanguage;
9 U; I. w* `2 c        if current = @.Destination -- else return" n+ l2 ^- N: c3 x1 T
        then7 _* |% j5 T. C# {/ s7 q; _  g8 X
                @.Destination := void;
4 ^2 E1 j5 p8 x0 \                if @.occupied then
7 [/ k$ U; s, v( q+ |, B                        part := @.cont;
7 ^" w4 d# ]2 I1 ~                        @.transpOrder := void;
9 F  p, G3 J8 O* |$ `8 K' `                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
3 I% L! w; G" {! ~4 D                                @,root.eventcontroller.simTime);
/ a! G! B3 l- h- t                        @.HasOrder := false;
& K" X: c) P  V1 E5 A' j; d* B                        @.DrivingHome := true;- g$ U, R# _8 ?
                        rgManager.tryToStartTransOrder;# o8 }- X6 _  v' r$ y2 r
                        if @.Destination = void) j- T% s8 y+ w9 L7 }; Z
                        then -- no transport order for vehicle @
! p- k5 I# p3 d8 H4 p1 M                                @.Destination :=
0 o- r: D9 ?9 a$ A1 A                                rgManager.nearestFreeStation(@,track.~);
: ~' ~/ q5 H. D9 B6 P1 ^. s" n                                newDirection(@);   # ^8 e9 W* A( ~
                                if @.Destination /= void then
5 k! l; u! |5 W9 Z& ?                                        @.Destination.NumReservation :=
" I1 k% Z1 a9 U$ L                                        @.Destination.NumReservation + 1;
/ J- x& {8 _! n2 t, |1 z                                end;7 K8 K6 A% G% V; \) a( c6 Q8 c; }# s
                                @.CurrIcon := "drivingHome";& n, _+ A( s& ?' ^
                                @.DrivingHome := true;% c% ^9 P7 e' R# F6 p: q! U* S
                        end;% V3 w, ?3 R2 S" O
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station% S5 u# O$ O& i: F0 I
                        part := @.transpOrder;
% T5 n$ L# U1 t" d3 S) T                        part.move(@);-- load part6 d- T8 N1 D1 n1 a
                        @.CurrIcon := "load";- s/ r, H8 [# L1 u2 @
                        GlobalDistObj := part.globDestination;
" s: v2 v# J7 U8 }6 ^1 n                        assignLObj := rgmanager.rgAssignL;
" k" C! n0 |4 e( A! t: i                        row := assignLObj.getRowNo(GlobalDistObj);
9 f# q& A* |5 h/ V1 \                        if Row = -1 then -- since 70' x9 C! r) o4 ]6 B; [( s
                                if lan=1 then  S  ]  p6 b& k$ X6 E: a
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- A  C# f  Q4 P1 U" W2 I
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
+ W4 z6 J1 ?- C' e( r0 _  E                                else  r) k: U  y: E; |( N
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 B1 G% k8 Z) a                                                to_str("in docking station: \"",?.~.name,"\""));                                & B: ]6 n& w) h8 W; k
                                end;
6 h6 B$ F' Y. t$ b                        else
) N0 c1 P. J8 n, E3 n                                @.Destination := assignLObj[1,row];3 [  E2 C  H- f- T7 x( n) E1 u! A
                        end;                       
% k  L% u1 \* y# O! X" p$ Q$ F: A8 e, m                        newDirection(@);* Q$ |4 G2 I  Y) C
                        @.HasOrder := true;. g+ {' G8 X$ E- G) D+ f1 L1 v+ W7 w
                end;
- _& `  J2 X. s; @) F        end;( F2 h& w+ J. \1 K
end;        -- of the method- a3 B" y* |* j( ^$ h% Q/ ]
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
! J* ?2 N) ]/ |% A7 u1 ]9 B  ^& h7 P: e
这是AGV_putin中arrive的method。$ m9 b+ ^2 n0 g( w

2 ?2 g( n4 o5 e6 l当到达物料速度越高时,这个报警更多," j: D) [5 x9 s; ], j  f
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。7 L1 N: k9 R" {, M
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
8 {) d: V1 R8 B3 ]0 V, w& d; W- e" K+ r9 [4 z9 Z
另外一个小建议,就是move,所有的move都可以这样
( M  K2 _8 F0 h- x$ e, U( x" |1 Mif not move() then debug end
- x8 w3 J) g% l6 g* J- g3 \这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。5 ]% H5 L% {: W! u
plant simulation中的free libraries有AGV模板,8 b6 l; F# o( a+ {
里面也有案例。( o" y- z1 e5 C9 o- t
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
$ e5 Z) Q# s$ B6 m& f& W- e" U% |" S) B- U
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
* R' x3 F/ ^  e% e1 F( R! L! |& N. x  f: \: k. q
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ) T' ]7 b2 s7 m% S% G( [
这是AGV_putin中arrive的method。
8 h; P+ [2 \  z1 o/ m  C5 B% l5 h: `8 V
当到达物料速度越高时,这个报警更多,
1 u& L7 e. p- Z( L4 I' L( `' S- X
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-3 07:46 , Processed in 0.018185 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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