设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7866|回复: 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 ?4 k& r# z& a; f* {5 ]- {  n*/
& X3 T  A% |, i6 kis/ c& t3 O6 z$ P2 E* ~8 f9 w
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
9 l) M7 m4 O* bdo5 K6 W9 n8 m! S5 v, C  s7 w% _
        Lan := rootfolder.Internal.Tools.AOLlanguage;+ L5 x# |9 j3 c+ Z
        if current = @.Destination -- else return
# \( w, x( C8 Z8 Q) ]% e        then1 E8 m+ N+ S  T; _9 f2 [2 E4 C
                @.Destination := void;2 s9 h  _  l! h" I, m: N8 J9 [5 w
                if @.occupied then
# i" B4 N, e2 z6 K8 m6 P1 x                        part := @.cont;
: K' g8 W$ ?1 g                        @.transpOrder := void;1 V1 ~- X- h  O; o0 _' P% V
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," ^3 Y" W# L5 n  b8 r
                                @,root.eventcontroller.simTime);
$ z: O9 @2 c4 u4 g& ?                        @.HasOrder := false;
( q) q; W* v; M0 t% d" ]                        @.DrivingHome := true;
8 S& J) F" e' a, A. I. l0 ]! @                        rgManager.tryToStartTransOrder;9 T+ ]5 n6 D* D8 w6 }9 C+ K
                        if @.Destination = void
  V, H) s* c- C9 o( T                        then -- no transport order for vehicle @" h) c" m) Q6 D3 P4 F- b% r
                                @.Destination :=
* c4 Z& e+ Z- Y# x" Z9 X& d8 M                                rgManager.nearestFreeStation(@,track.~);
6 X  ~. q) W( R2 |                                newDirection(@);   
. ]( H# O; d$ _' l! P                                if @.Destination /= void then& R; g. t- _! y! F  `
                                        @.Destination.NumReservation :=
4 z$ v) d2 B, n! S. t/ d                                        @.Destination.NumReservation + 1;+ i& ~6 W2 Q! L, l/ \: R) D7 W
                                end;! M6 ~$ I5 x1 h, g  N
                                @.CurrIcon := "drivingHome";3 \# ]9 ]; }" ]; J3 W) W
                                @.DrivingHome := true;* t7 a9 M  B4 x7 k  s
                        end;
+ M5 i3 S! V- W                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
1 b3 H6 E, J7 h" a( O7 x, a                        part := @.transpOrder;
) f3 p3 Y. B- ]6 t                        part.move(@);-- load part5 ~- k5 ?9 {: I
                        @.CurrIcon := "load";$ o0 G/ y) u4 U" J
                        GlobalDistObj := part.globDestination;* p7 [: }. q; \- L$ V$ c1 I0 V
                        assignLObj := rgmanager.rgAssignL;
, d( [" P, n6 H6 w/ Z                        row := assignLObj.getRowNo(GlobalDistObj);
4 Q( z. @# S% |. U; T5 D                        if Row = -1 then -- since 70
/ _% d, Q+ u2 h: u/ o                                if lan=1 then2 W. D& K6 E' @& f* d4 X8 \. ?
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 |) W- `  O. C) x) r8 O                                                to_str("in der Andockstation: \"",?.~.name,"\""));
  I' z5 M- b) F2 X                                else
1 o. H' z! k: f% j5 E                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),# V( j. l# q; X# V  q
                                                to_str("in docking station: \"",?.~.name,"\""));                               
$ |! m. x9 j" E- C. Y                                end;
9 Z( @5 ?- C  J( B: f                        else! |5 N! E( i- m9 ~
                                @.Destination := assignLObj[1,row];
6 K4 T+ E  f0 Y; q5 V7 e& z# z                        end;                        & q+ [$ }- i4 d1 }7 W% q/ t; c% @1 i
                        newDirection(@);
7 r: A' u8 D! U; u7 d2 V                        @.HasOrder := true;; o/ j+ t" W- F7 D5 I1 f
                end;
3 t6 i  ^( v! z0 ?5 Z. n5 y        end;
( X! \4 [5 J. ~! B6 jend;        -- of the method
2 P6 @0 z( `% }' [; _/ z
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
: I4 p" B/ y) `, s8 b: g" q2 u3 y( h/ m5 x* X0 c7 ^
这是AGV_putin中arrive的method。
# A4 s8 f4 a3 V1 h
* `- i5 t- Y( k当到达物料速度越高时,这个报警更多,$ ]; s3 X6 Z1 I* j% {+ o
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。  ?' L" S3 H6 p  a& N
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?, X! y! r4 z( `- M
3 g* h! T6 A. @: z0 D. Q
另外一个小建议,就是move,所有的move都可以这样
0 V# c( {, l% ]2 b) Dif not move() then debug end9 }8 {- D8 U5 a* y  ]6 W3 }
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。# }. d2 r7 J8 f, C! x
plant simulation中的free libraries有AGV模板,
. H/ m  h2 H! ^7 i里面也有案例。- E5 V0 U, _/ y6 n' r: c
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
* b; T, l; L: n( j
# U/ b9 a" D6 B: Y$ V- h我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 & M) H2 f0 ~3 f% ~7 x

2 m( {2 L: a% B% n5 y3 n, V/ {那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 / l7 k: v9 Z6 w
这是AGV_putin中arrive的method。
! D) t, d# _1 U% \. D7 E9 ~
* V/ B. x& {" c# V/ l当到达物料速度越高时,这个报警更多,

; n7 i  k8 V0 @另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-2 13:10 , Processed in 0.016818 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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