设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5667|回复: 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'
" g  K. R3 ~) C+ Q, q: E  f*/
+ Z; w. W) Z& D2 t2 s1 D' I1 mis) x8 x8 K* j5 f, V4 p: u
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;# G; x& N2 y0 n: R) k. v# t
do! _! \6 F* F: T2 s, \! c9 |( @
        Lan := rootfolder.Internal.Tools.AOLlanguage;
/ v7 X1 m* d9 B+ Z! ^: D        if current = @.Destination -- else return% F/ S# ~* N$ B$ ?( O2 S' j/ n$ W: x
        then
9 W! ~' K  u! j) U- P6 s5 r9 r; d                @.Destination := void;4 \1 i' r: h, Y) Y& u* M
                if @.occupied then" r9 g1 I  ^& \  H
                        part := @.cont;
9 j. s. E$ w2 _' O! @; C                        @.transpOrder := void;' B+ f1 R# p( h5 a# z* [1 {. G
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! O& ~' x# q; i& L: Q8 u2 Z8 |
                                @,root.eventcontroller.simTime);
7 @/ p) x3 ^: q6 B- }: }: ^                        @.HasOrder := false;5 M1 Y4 j+ r* n# A7 }/ u$ f
                        @.DrivingHome := true;" H; |# S4 y+ E& R9 U5 z0 d) K
                        rgManager.tryToStartTransOrder;  }3 M( @# h) t- u0 O
                        if @.Destination = void  D5 z/ i# l) W, c9 V
                        then -- no transport order for vehicle @' `( _* P( W  h7 X# b1 \# R' ~
                                @.Destination :=/ b9 e( H8 M: W- {5 [
                                rgManager.nearestFreeStation(@,track.~);
2 j/ D1 i3 T6 i4 D                                newDirection(@);   6 A9 |% b; V5 @# x& v- r( }
                                if @.Destination /= void then) b9 {: g# U% b+ r& Q
                                        @.Destination.NumReservation :=1 K; l, _! Y4 t
                                        @.Destination.NumReservation + 1;
0 p' J  T6 j, ]                                end;
% X, {( _+ Y! ]% y# C6 {                                @.CurrIcon := "drivingHome";/ r2 u7 R* ?5 j3 c: l
                                @.DrivingHome := true;
$ X' ~  H8 \* \: q                        end;9 [1 n0 u* b* m7 c. H
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station0 L% o' a) i, _6 P. z5 U% x4 Z8 E* r
                        part := @.transpOrder;; v$ Z# Q8 f9 O) c2 e4 v
                        part.move(@);-- load part+ \# g0 W8 W+ \+ ]3 }& N. Y" m
                        @.CurrIcon := "load";" ]5 W" B3 }, y/ Z! s2 A9 m9 ~
                        GlobalDistObj := part.globDestination;
3 B% }: \: R9 `9 `% A0 _( r5 \                        assignLObj := rgmanager.rgAssignL;
. o5 u# |, D8 J5 X9 M$ G. ~/ R                        row := assignLObj.getRowNo(GlobalDistObj);
( n2 [9 _* n2 Y                        if Row = -1 then -- since 706 l4 l" i, Z; B- g
                                if lan=1 then
) W- X- x" P' @7 c* Y) z" c* d$ p7 c                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
/ U9 N& j7 E# a2 T  S. S! g                                                to_str("in der Andockstation: \"",?.~.name,"\""));
% F+ G0 e+ ]8 i1 Z3 ^                                else7 S! \, K9 B4 D8 H9 F
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),0 L: s' s5 P+ H' U7 F, B
                                                to_str("in docking station: \"",?.~.name,"\""));                                " K1 r' u0 \: p9 J3 O5 H
                                end;$ K6 X# V8 T! Z% j8 f
                        else
2 U& `  t3 e5 K                                @.Destination := assignLObj[1,row];
: b+ ], v. z! J4 a# ^                        end;                       
1 Z$ Z% m% v( A* M# C2 F8 U: w                        newDirection(@);0 R/ D( l# f+ ^& y& @6 w3 ]2 {0 ]
                        @.HasOrder := true;
+ T* {3 v* O3 x  X1 S* C                end;
" B" B. ~4 D0 t% n) ^- }        end;
. E. o  ^  `/ [) V7 rend;        -- of the method8 F$ R7 }3 ~- a3 b
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 5 |, D3 N" q8 W& k
' c) l  v% s) |" a9 A' h
这是AGV_putin中arrive的method。
4 A0 q4 e+ c# ]! c. A2 e+ G0 Z& f2 d3 U
当到达物料速度越高时,这个报警更多,
  r. m7 x+ S3 \0 a4 H, ^可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
. K. ~! N. a( E, h) V程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
0 w6 z% w7 l/ y0 `
% X0 K( q6 D! m1 D: `% J) M另外一个小建议,就是move,所有的move都可以这样4 I/ ]" ], x+ C4 O0 u5 s
if not move() then debug end" q  t" l, M0 z3 e# K9 p# }6 P( ]
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
0 |; K, Q; \0 q$ d2 Y# C$ [7 q) s/ \plant simulation中的free libraries有AGV模板,2 t, \# b$ B" l) S5 }) H" G; N- C# ?8 Q
里面也有案例。
8 b$ G- f5 m. v5 t8 Q" {: u+ x: M" Q我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
- |5 H) M+ `) Q. {9 E9 T0 t0 H) k+ m. X  Q
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
9 Z8 g9 Y$ }% ?( X9 X
- I8 j0 ?8 a5 p+ Q, ]那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
$ N/ S8 ]' G# c/ |+ o这是AGV_putin中arrive的method。
6 c. C! h* X/ U5 {8 ~1 W! G; a# y) k% s" W4 S5 z" q9 P( y& P4 X
当到达物料速度越高时,这个报警更多,

+ a5 ?1 R. D1 |# s3 r/ @* v$ `/ B另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-12-12 15:52 , Processed in 0.017403 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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