设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8958|回复: 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'( W5 y. L2 D4 K" M# Y
*/
0 h( }# W0 y9 p: g9 f/ @8 T- Vis9 b4 Z3 z; m7 w. Z: c! Q
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
. c' g5 X6 @2 O3 K8 m2 E5 N7 c1 Z7 \do5 Y# Z4 s- t/ _8 B: ^" W
        Lan := rootfolder.Internal.Tools.AOLlanguage;% C1 n9 J; k# L" R9 f, W: X$ v
        if current = @.Destination -- else return6 z: ^& G# ?5 t
        then1 y% z2 W. S6 ~' z  S
                @.Destination := void;+ f: t8 h8 ~/ s: L
                if @.occupied then
; z" B4 v5 v! Z3 S1 q% @# K                        part := @.cont;! I  E9 r, T% s" T: z
                        @.transpOrder := void;
6 B1 V' g4 \, ~- F  y                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
; I% @1 H0 u6 m- y8 [, ?* f                                @,root.eventcontroller.simTime);
: {3 D6 H0 z& R' }  g! Q1 B; s/ [                        @.HasOrder := false;
/ u: R. O% k% N                        @.DrivingHome := true;
9 @, k! M. o: o" Q- k                        rgManager.tryToStartTransOrder;
1 h5 c; Y) K9 R+ x                        if @.Destination = void# r5 x7 |" q9 T" [- H! [# Z) }
                        then -- no transport order for vehicle @* b; K0 i3 g0 F5 M: F
                                @.Destination :=4 B1 S9 c9 N1 z* i" E0 X
                                rgManager.nearestFreeStation(@,track.~);
4 _0 I  d* {# W+ f, t                                newDirection(@);   
3 [1 k. i0 Y; S& Q                                if @.Destination /= void then
  A7 i1 Q0 D7 ~/ V7 q2 o# `                                        @.Destination.NumReservation :=
% d6 o( a( p9 ^% h                                        @.Destination.NumReservation + 1;+ t& @. F7 N* g; L6 ]5 i
                                end;
+ I5 ^4 X" O, a: `                                @.CurrIcon := "drivingHome";
2 L2 _4 L# m- d+ i* g& ?" i2 ~                                @.DrivingHome := true;. \2 b, b1 H7 D( ?8 q) C, f; T
                        end;
& w' i. _  O$ {8 z  n                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 t) p0 I& [" [, J) W                        part := @.transpOrder;; c; R  f' y, G9 g
                        part.move(@);-- load part' f2 E4 N( E; v- c. t1 Q
                        @.CurrIcon := "load";/ M$ F4 }3 |  r+ f) A+ Z, m
                        GlobalDistObj := part.globDestination;; C# @7 C- G8 }3 O
                        assignLObj := rgmanager.rgAssignL;' u, X* U+ k. R+ n4 a. x2 v
                        row := assignLObj.getRowNo(GlobalDistObj);
  U- Z, c4 ]$ O( w7 q                        if Row = -1 then -- since 70. ?  m  a! H) {# O5 i
                                if lan=1 then
6 z. p6 I7 P( g# N! {+ v( n                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),1 d9 A, _' Q+ A
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
+ ~: G* E3 `; N- _% }8 i. Z                                else
9 _- l/ l, \0 g5 D- z                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 O+ O9 {2 h$ t5 `! h                                                to_str("in docking station: \"",?.~.name,"\""));                               
" n: p8 \. H! f! F9 ~: |: A' E8 Y4 L                                end;
5 X+ l$ S% u, ]; t2 R7 G9 @  l6 L                        else. i* _4 n( S$ l7 Z# X
                                @.Destination := assignLObj[1,row];
4 [+ C, T: b& {                        end;                        " t* G& x" \7 A/ }
                        newDirection(@);
/ [- j1 |; \' Y/ j% y+ f3 A1 |                        @.HasOrder := true;
& h% {7 L0 t+ l; {% ]. G* S                end;
, `& n2 W4 I$ h% {  x' I$ @& v, `0 F        end;
" W9 c. l, j# b8 Q2 J2 [+ Yend;        -- of the method9 ~+ n0 W+ ^4 i/ R" ?, W
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 ! m. v' L9 u0 Q# z

7 x4 J) T' M$ y7 r这是AGV_putin中arrive的method。# L; q' e9 m2 I8 r! X2 @

# i. t5 h0 x3 {/ k  y当到达物料速度越高时,这个报警更多,
/ T, J6 l0 l3 ]$ ~' U0 Y6 R/ n* y可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。% j6 S9 c( ?' _7 F3 \
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
% Q7 Y4 d4 K6 R: j1 F2 G$ f" D. @& |8 E0 Q8 T/ {
另外一个小建议,就是move,所有的move都可以这样7 P) f* Q/ K7 H6 u
if not move() then debug end
6 Q9 V( Q9 h/ s- h% [+ t, h" M这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。. T& u# n3 n, k5 Z' P
plant simulation中的free libraries有AGV模板,! [% Y* \4 i" ^+ R
里面也有案例。
# a! N# u5 C: o: J5 _我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
5 Q- i) p' a: P8 W; i9 W( A5 w
5 f! I3 S4 g# ?& z6 {& y( \! J我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
) b# a6 t1 ~2 d# S' F2 n, h/ y
. X& k/ x0 N7 z2 M' J  W那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
, j6 z) d+ ]4 {3 ^8 {( l" _: I这是AGV_putin中arrive的method。
" `: |$ }3 j" E& s8 s: j8 ~
& E' o" C: ?1 Z/ z- U& h- {当到达物料速度越高时,这个报警更多,

% C4 S. F4 g% U6 J另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-6 11:27 , Processed in 0.015685 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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