设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6849|回复: 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'+ s' F) H  k, m) J3 \
*/3 o4 Q- p& V4 F0 @$ O* s
is; o; f  H# @4 j( B$ V" A
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;0 P% Y: n% `$ N, J% U6 o$ A% e
do# x4 K# l2 _& C
        Lan := rootfolder.Internal.Tools.AOLlanguage;/ W" V$ s  N9 s5 M9 v$ [' M
        if current = @.Destination -- else return
( f5 |  t5 Q3 c; E0 M8 F        then
' S! W4 ], M, t5 {1 u. F% u1 k3 b                @.Destination := void;* T, r9 D3 `3 E# d% W$ W
                if @.occupied then
6 i9 j6 ]1 c' X( M$ [                        part := @.cont;
3 ^- J  i- K9 l7 t. g. I                        @.transpOrder := void;& u6 h% n$ \& Q0 a4 B
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
, q" N1 S/ j! F: Z                                @,root.eventcontroller.simTime);
& e5 _7 p- a& ?# o* S/ D- Z                        @.HasOrder := false;
6 ~/ d) g& ~$ j# B2 t! L/ C- L                        @.DrivingHome := true;5 @% [; i; H4 R1 m6 V2 y5 h9 Z
                        rgManager.tryToStartTransOrder;- d) I8 B  c5 g* K6 @
                        if @.Destination = void
; R8 I- @+ }$ @' p8 d                        then -- no transport order for vehicle @0 W+ c6 Q7 @& {  w( y; ]# D
                                @.Destination :=5 v+ w1 k+ {7 p
                                rgManager.nearestFreeStation(@,track.~);
: {" ^* g2 k! {* Z                                newDirection(@);   
- [( M6 n. x0 b% p                                if @.Destination /= void then
7 d: z3 y1 g7 n- B/ u                                        @.Destination.NumReservation :=; Q# S! Q/ s' i
                                        @.Destination.NumReservation + 1;
- h* c) t- A  @, c( C# E( k9 B$ P                                end;; f' k9 Z/ Q7 z, B
                                @.CurrIcon := "drivingHome";0 E* a9 }: ]/ }, W
                                @.DrivingHome := true;
7 C7 a3 y* G" z1 Y! n* _$ s                        end;
" E- x! s# q+ ^0 Q: f                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
: l3 \, n4 g1 E, y7 G9 a                        part := @.transpOrder;
, r- u( \! p) M! l# t                        part.move(@);-- load part
. t+ G$ T! G( t& a+ Q                        @.CurrIcon := "load";, \6 g: y+ U6 p  P; N% r4 Z
                        GlobalDistObj := part.globDestination;
* g6 ^  k3 h+ g7 a/ l' s1 s; t                        assignLObj := rgmanager.rgAssignL;# f' y! ~# H6 V1 _5 J+ U. b
                        row := assignLObj.getRowNo(GlobalDistObj);5 l9 J- I3 D% Z! Z# H5 L2 G7 U1 ^) M
                        if Row = -1 then -- since 70
3 S6 h: C/ Y( F7 b" w" K9 L1 _/ |                                if lan=1 then
3 }* Z; Y! D1 ~: b8 P  o9 P                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: t1 N8 H& l: l) L
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
& |# i7 f2 O' i+ I# U" i7 L: O                                else
1 v& \5 X0 c, O* Y* P6 K                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
" n0 p* i4 Y/ g0 g8 s                                                to_str("in docking station: \"",?.~.name,"\""));                                . t. x- ?9 M# h& c# z+ ?' N
                                end;
+ c3 _, l# d! j! a4 R: N2 c                        else
/ a; g: O7 O" j8 {                                @.Destination := assignLObj[1,row];( I- m" x+ ~! Y% _/ b# V& l
                        end;                        ( P/ A1 \, ~: h+ P& u9 M
                        newDirection(@);
8 r4 `8 s0 T! R9 m) ?+ H: z1 e                        @.HasOrder := true;
1 [* d* j3 E. x                end;
1 y, ?! i! e1 M3 D0 h, i        end;
) L; c$ a! C* s+ F/ d& U" V( Wend;        -- of the method$ K  ~2 i1 a) r% J
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 9 w2 T4 P' A8 ]. y$ M  Z' F
5 u( h/ F9 F( V3 D; F% s) M5 s
这是AGV_putin中arrive的method。
) y' H% i- _; U" Q' \
4 p( ^/ a% a* T* {- y; z' U当到达物料速度越高时,这个报警更多,
* P$ e/ n: ?# |0 ~+ a可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
4 j! f! u, a3 d5 I* C程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
6 m! w  {) L% g0 H3 }! K- ~, Y0 O3 k& ?" E* `
另外一个小建议,就是move,所有的move都可以这样- R+ D5 c$ w1 I1 V0 v" h' O: ?
if not move() then debug end. D2 v, w9 k) g
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
$ S0 }0 p) z) u% w! k$ jplant simulation中的free libraries有AGV模板,/ X4 Z# G+ G$ ~. J! @5 k
里面也有案例。; H+ M! X" l. g% V! Q
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。* ]; ~4 n! e+ S

  o3 \* @: f' f: I' I) s5 u我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
' h2 ~% c" D3 B& a) s+ Y
6 k- X7 A, g# e. |/ w& v, A那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 0 g7 e' b# F9 x- O, B8 m
这是AGV_putin中arrive的method。
, Z4 z% |0 B; W' d0 i4 l+ F/ I1 h* l) F. |8 _- w& `
当到达物料速度越高时,这个报警更多,

3 e- @# t! ~1 _& M6 }另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-2 12:03 , Processed in 0.020949 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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