设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8410|回复: 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'4 g: \0 w  Y1 b0 e
*/
# y: J) b8 _3 Q% W& Sis
1 D. M( j9 g  @        part, GlobalDistObj, assignLObj:object;row,Lan:integer;! ]  K9 ~5 o, q) t7 u- Q  l% ?5 z
do
- l  Z# q7 s3 z2 ?3 i; i3 ?; E        Lan := rootfolder.Internal.Tools.AOLlanguage;- s) E  T8 m5 j- F! A9 s! C5 a* y
        if current = @.Destination -- else return2 B/ a" }0 q1 n% s7 X
        then
9 W  Z. j7 m4 h6 M, y1 X5 ~  d                @.Destination := void;0 o; d1 u) W0 q& m+ _2 W* D! ?9 b
                if @.occupied then
; z  F# I! E4 w5 Y# k) ]9 i8 G                        part := @.cont;: _( A0 e; d# V
                        @.transpOrder := void;
' M& R2 }! B- |6 v) T0 m                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," q, [9 l5 B- j, c1 [
                                @,root.eventcontroller.simTime);9 P+ N6 x' q$ {* G( V1 B* B
                        @.HasOrder := false;
( U& F; O6 f1 V# Q" Y& _                        @.DrivingHome := true;' H" h: H: U3 [" p
                        rgManager.tryToStartTransOrder;) g  n, D7 P" W/ i9 n& h9 _7 `4 D; E' `
                        if @.Destination = void2 i0 v9 p, \4 r& f' ~7 l' C: b
                        then -- no transport order for vehicle @' [1 e7 f4 M4 I/ _2 W* g
                                @.Destination :=2 R8 T+ H9 X0 [5 k( y6 [
                                rgManager.nearestFreeStation(@,track.~);
& M. _2 f7 t) \) g1 D. l5 g                                newDirection(@);   
/ @/ k, k& D4 @4 n0 d                                if @.Destination /= void then
2 H1 z0 Q3 a, X                                        @.Destination.NumReservation :=
+ r! p# Q2 f8 x7 P) Z                                        @.Destination.NumReservation + 1;* S5 X; }# n0 t- h. Z9 j
                                end;2 \5 ]" l7 H. B7 h5 y4 ^
                                @.CurrIcon := "drivingHome";% P2 S7 X& M  Q; J4 `% w
                                @.DrivingHome := true;  N2 q+ V, G' H% f
                        end;
' ?, @; l. a# K+ E1 u( {                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
) u2 {3 ~8 p; N+ b                        part := @.transpOrder;; c) R% F! W  e; L1 ?: S# q
                        part.move(@);-- load part& M9 D) S: e/ ?7 [0 s9 K$ a5 V+ r
                        @.CurrIcon := "load";7 g; J9 C2 p' j, Z+ \
                        GlobalDistObj := part.globDestination;
* e  J* [5 C% v8 j) W% J6 q! ]5 f                        assignLObj := rgmanager.rgAssignL;
, }8 G% v" |* B% }4 g$ m                        row := assignLObj.getRowNo(GlobalDistObj);/ a9 D3 ~% Y: h- T8 E7 G+ _
                        if Row = -1 then -- since 70
. t* A2 d& c  l9 Q9 u" {                                if lan=1 then
1 j% q" D% Z) [' i+ R$ O                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),6 H4 S; L; q3 f" `
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
' S/ A& |! f8 N1 `% d                                else
9 g4 T8 T+ h6 y& V# I7 t0 A3 Y                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. u# j: j1 L) _9 l! u$ I1 ^$ W
                                                to_str("in docking station: \"",?.~.name,"\""));                               
/ O" ]- _. ?. |. c                                end;  X$ a0 K8 z( [# P1 U3 ?- I
                        else
. e1 }% U  J& L0 n, n                                @.Destination := assignLObj[1,row];! |( q7 A$ j8 f5 T/ B# r  o- J
                        end;                        - s, T$ S$ a8 e. C; X
                        newDirection(@);
# r- `6 d; G: C- d: C& M6 Z                        @.HasOrder := true;: u1 V8 I5 h# [; y, t3 [& L
                end;
7 Z3 D  a6 r/ L3 G8 U$ U4 s, b        end;
4 c; U& c% r. C  {# Y( U. |1 s( [end;        -- of the method- H8 D  x2 t! t- r
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 4 s: [$ R0 l0 V; N

4 o! m3 f9 v- D6 Z/ T这是AGV_putin中arrive的method。
/ A- j' \: N0 {# i. e4 {- d
, D( _; j3 N; v( J当到达物料速度越高时,这个报警更多,
) k0 R  Z0 j$ h可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
9 R! X, C# W- `7 t# `6 j! @程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
( @1 ]) q. H2 ~& Y
* P" f% {4 V' z另外一个小建议,就是move,所有的move都可以这样
6 l- R( J3 {6 O' L6 n* @% H& {0 Kif not move() then debug end
; G! N* d; x8 q4 p% l" G, U1 v这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
) [' f6 _5 K5 U) d6 Fplant simulation中的free libraries有AGV模板,
- [: E9 }, \5 t& d, Y) U3 f, q  L里面也有案例。6 k8 b8 n9 F4 ~0 L/ \) i% n8 Y9 L
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
  J8 y* N, T( A: A! T0 {9 C5 e1 \7 B7 X5 X1 x
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 : A( V! \3 B$ k9 [7 M% B8 @
( a/ b. O' _2 y. @) Y4 k
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 & Z$ R- u3 a2 W2 J3 O, `5 J! x
这是AGV_putin中arrive的method。
1 r) M  L' U# a) l" f' J# C% y7 c+ p4 a  b0 ]
当到达物料速度越高时,这个报警更多,
1 o* q" w0 p5 I/ ~2 ^/ e6 X
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-2 05:47 , Processed in 0.014822 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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