设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7835|回复: 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'
1 l" O) @2 ?5 y6 a: g( M. H*/) l: ?( H3 b! J+ W% @/ m1 o8 E
is: q: {' F6 t. D! A
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;; r/ p1 d- M" z- A( b3 H
do
) c+ R9 }. E/ D0 d; \9 x- |        Lan := rootfolder.Internal.Tools.AOLlanguage;% E" O4 g" ~/ z7 T
        if current = @.Destination -- else return
& J9 v# G3 i9 n* N: S/ J- ?6 x        then! u7 p4 W# R4 w# x6 O* v
                @.Destination := void;9 u5 A/ D$ [6 @+ F
                if @.occupied then
3 ?- J, U0 c6 Y& C                        part := @.cont;
/ H$ \+ ~6 _2 B                        @.transpOrder := void;
. Q9 [9 u5 h* o1 P! z                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) u/ Z+ b7 a- h7 U8 X4 Z                                @,root.eventcontroller.simTime);
% N' l2 s: z  h& S* s, E$ v                        @.HasOrder := false;& H+ p/ C) l( g
                        @.DrivingHome := true;9 v+ M6 V. J. A7 q) |2 [6 n* `
                        rgManager.tryToStartTransOrder;
8 L7 X& t% M* c2 s  j                        if @.Destination = void
9 w6 ]" O7 k, @9 w                        then -- no transport order for vehicle @! Z# Y7 \8 K- C8 r+ F
                                @.Destination :=
, h" p; h2 ^* ^. O  v' [                                rgManager.nearestFreeStation(@,track.~);/ \: n# u3 c$ J- k1 I! K1 \
                                newDirection(@);   3 F# V) i6 f; y( R6 O% H6 P
                                if @.Destination /= void then& M5 d, \; ]/ y; p$ t$ S9 b
                                        @.Destination.NumReservation :=) h) r% L( f+ m- u# @( q: O& S
                                        @.Destination.NumReservation + 1;
" a7 P8 V; N/ j3 w1 x                                end;
0 Y' y" J/ R* M8 p7 V; B                                @.CurrIcon := "drivingHome";
1 D  ^- b) Z3 `" Z* f                                @.DrivingHome := true;0 @7 ?! Y4 o' w5 f
                        end;2 u  Z/ Z* m1 L+ y, @/ s
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station/ N) a! D; |8 {/ Z; g( F
                        part := @.transpOrder;
( e, [0 ]" h3 B, z9 ]                        part.move(@);-- load part% x* i) u$ Q# V
                        @.CurrIcon := "load";
# Y! G+ q0 w/ z& ]9 n1 U                        GlobalDistObj := part.globDestination;( w7 |* W: t$ D3 q
                        assignLObj := rgmanager.rgAssignL;
" W" l$ D2 G- u# _7 C                        row := assignLObj.getRowNo(GlobalDistObj);
* t. w0 P1 n1 n2 z! d3 Z                        if Row = -1 then -- since 70
4 }6 V  r/ u4 e& C$ F                                if lan=1 then0 ]; y; U: ^" j# N- V- ^; j+ ]
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
2 I5 p, T1 B: z                                                to_str("in der Andockstation: \"",?.~.name,"\""));
' G  f6 l: k  A0 a' ~, `4 U                                else
8 z0 C% D0 w7 {4 L4 }4 _1 a                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 q! C& N; {) }+ ?. z1 [                                                to_str("in docking station: \"",?.~.name,"\""));                                3 ~# l; |: k' p5 N) M" ?1 G  a' ~
                                end;
- M* o& w/ L% y: J8 W& Z1 f                        else
) m  o8 J5 F+ K! x4 h                                @.Destination := assignLObj[1,row];
3 h, X& X" Q# a' c1 i. Q                        end;                        6 u5 e! |2 R! v5 K
                        newDirection(@);' D6 h' `; B5 ~* a0 W5 g  S
                        @.HasOrder := true;
* H9 P! W6 L" q/ C/ Z                end;
' j& B4 t/ a$ j, ^, z, T% O        end;
  e- n8 R  b! q$ Z8 ~( Nend;        -- of the method- }' ?5 D3 R: c1 n( f8 C; ^' N6 Y
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 ' d+ y$ t: ^9 {3 J. J
, }5 E$ F* e; [  a
这是AGV_putin中arrive的method。
1 M4 j9 i/ g$ I/ f
4 ]2 S4 w# ^1 Y9 C# g, M% ]当到达物料速度越高时,这个报警更多,
- ^2 U- P1 P4 A: @* k可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。+ t# U% i) R3 f, C9 O, k
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
7 f9 L( @  m' Z* S! Z) t/ W, K2 [8 z1 G# ~) ]7 ]
另外一个小建议,就是move,所有的move都可以这样
6 O7 n7 k4 S0 eif not move() then debug end
. o0 F3 C5 G* v- S. r! l! y这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。5 c. {. z9 t1 U& d4 y
plant simulation中的free libraries有AGV模板,3 ?2 f6 b7 ~2 X: f0 E; w' Q
里面也有案例。
: @5 `$ G9 N2 ^' a. o' e. N* T我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。& D* N& t0 u+ b' B( F. P

* g" l* _0 \' O( r# z6 t. n我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 + G* Z# T! _, n' I
& M' b9 J6 h1 x$ u) v7 p
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 6 F) D4 t' `* [
这是AGV_putin中arrive的method。
- t3 {# p7 K7 ?  t7 e) U( L- o: W0 _4 U1 W& z
当到达物料速度越高时,这个报警更多,

9 X& _8 @0 d+ B) r另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-1 04:45 , Processed in 0.024512 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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