设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9546|回复: 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'/ {% l( y4 n, J) n% C% D
*/) T) W0 L* _6 U
is8 Y! w1 t9 b& ]: T! T
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
0 k1 U: X5 _7 q  A8 P( qdo( @$ S* n' q& \8 F
        Lan := rootfolder.Internal.Tools.AOLlanguage;
' I) N: J5 ?) S& r        if current = @.Destination -- else return$ W, [+ ~1 }9 s& U4 A
        then1 c8 j, L% J; [# W  Q
                @.Destination := void;* S$ @# L2 K) V  ~$ c7 Q
                if @.occupied then
% l. w' E' i' w# b                        part := @.cont;
! I' Y. i& u% ?  w                        @.transpOrder := void;
1 o: N9 P/ ^9 u8 F9 L                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
' \" g7 c" d5 H5 ?) [                                @,root.eventcontroller.simTime);" k& W3 w' B7 P: A& u+ L
                        @.HasOrder := false;
, |; M, |/ I( p" z# F4 b/ e7 }* J                        @.DrivingHome := true;. h, Y* o; D! u! V# m9 C/ N* e9 _
                        rgManager.tryToStartTransOrder;' e9 M, G; E+ k2 W$ U* \
                        if @.Destination = void! U# ?/ w- [6 y- [0 P7 `, w
                        then -- no transport order for vehicle @
- E) _; i) |) e( M- T                                @.Destination :=0 h( ?8 \4 Z! ^5 ^& L
                                rgManager.nearestFreeStation(@,track.~);
5 H/ }6 k- @: V* a+ z                                newDirection(@);   7 |& m! P+ M. f- M' F" s( ?
                                if @.Destination /= void then5 l* n: ?  V0 x- o3 g! G
                                        @.Destination.NumReservation :=# a' X2 W7 t; [/ w" ]
                                        @.Destination.NumReservation + 1;
# S  y: T3 }2 n' s0 m- l( w4 t                                end;
  \6 N2 i$ N% O5 r8 r8 s3 ]7 o                                @.CurrIcon := "drivingHome";; \# c; @1 L% w& b) l0 p3 Z0 R
                                @.DrivingHome := true;
& O: p: x- Z6 I0 o! @# x. h3 m7 s                        end;0 `1 O0 s2 }# b: d/ R3 i
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station6 U+ A' a' }0 e4 b. o; a$ a7 z0 y! Y
                        part := @.transpOrder;
5 h0 K( q% f  t- ~: q                        part.move(@);-- load part, t% J6 E5 c! }% e
                        @.CurrIcon := "load";
/ j( V! R: l% `                        GlobalDistObj := part.globDestination;. [6 q" \2 v& n4 }- q9 r; |
                        assignLObj := rgmanager.rgAssignL;& W, ]) F& K& e$ N
                        row := assignLObj.getRowNo(GlobalDistObj);
, i, o' p7 R0 u                        if Row = -1 then -- since 70
+ e: S7 u! E) o                                if lan=1 then) x0 i) s7 M! L* s* K
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& H$ l: E1 [" o# S) Z                                                to_str("in der Andockstation: \"",?.~.name,"\""));
# R! a7 ~; @  K/ ^. W                                else
' r4 P! \0 x! k. k3 e                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) Q1 y4 o, H" S' Y" X) z& l' W                                                to_str("in docking station: \"",?.~.name,"\""));                                % s1 j: x; C# M% G7 l
                                end;$ Y5 u$ p, U& v  `- l
                        else) v6 F% U1 f8 ~- |# K) W: Q
                                @.Destination := assignLObj[1,row];
0 K0 l4 D; i2 x! G3 X% }& h' j                        end;                          B8 t: n; O) X. C0 V. u9 Y  a4 T
                        newDirection(@);
5 y2 X+ a! Q1 s' \; z                        @.HasOrder := true;
7 t/ q. ?6 a4 [: X2 [) o; L                end;$ a: l2 P5 {7 Q
        end;
. ^# ^, W2 _! fend;        -- of the method2 G; M2 {9 o8 ^) A9 ?# }( m: I. D7 T
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 % l8 e7 |" V, \0 [( Y! b

1 n, C6 a% ]6 a0 H/ C  {$ X6 e6 I这是AGV_putin中arrive的method。( q3 [+ z/ a8 t' [9 ~  m

4 R0 G  p: L. k3 W$ D& Q. P( G$ m当到达物料速度越高时,这个报警更多,
  f/ P' J8 f* x; D  R! h* z5 ^1 q可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
$ ]. j/ L" ?* c' g6 M/ N程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
5 }6 c! I/ V: s; G# O" l; s( H0 L, p# O1 g
另外一个小建议,就是move,所有的move都可以这样
& \/ q# h  X  F; F7 T  Z. yif not move() then debug end
6 a, Y1 ^( i; N' J! I2 k% R, Y这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
! [% x' V0 J) Lplant simulation中的free libraries有AGV模板,# ?* {% p, S' x  o/ l; l
里面也有案例。3 m# ~+ m, ]8 r9 c) w; M" k  h  Z; s
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。- H* ~( J) ]. O
% H2 R& K  M5 G9 d. v& P' S1 m
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 4 E) l( @2 ]: a% c/ q# [
1 g& V+ }0 @+ @
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
7 n8 X  b  H- I8 L2 ^0 K这是AGV_putin中arrive的method。
9 t5 f0 q. S5 ~% c! I  J0 I6 ]' [! r
当到达物料速度越高时,这个报警更多,
2 d, n8 `+ ^; i* ?& Y9 L
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-8-7 10:02 , Processed in 0.016200 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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