设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5829|回复: 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'6 K+ p: ~' l' G- r# i
*/5 g! ~3 P, A7 N, z$ j6 P& |0 x! s
is& c# n" F# W' R/ k
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
7 J% h- N) [  gdo
/ s. W( L, I: r/ Q: ~        Lan := rootfolder.Internal.Tools.AOLlanguage;
9 G) @% R" `1 V1 _7 Q# E        if current = @.Destination -- else return2 J+ ^# y9 k  t
        then( ^# g  n. Q) L& l
                @.Destination := void;
3 s6 T! x8 ]* Q) ]0 h$ o                if @.occupied then2 F* ^  O5 Z! K3 V
                        part := @.cont;% X' `  }; @) W, C2 P1 M8 Y
                        @.transpOrder := void;5 ], `+ T# C0 g1 O8 V3 L# S! D! q
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,, i; u! I* _1 z6 A2 F, a
                                @,root.eventcontroller.simTime);
4 S  M  ~% P5 d0 R( ?                        @.HasOrder := false;6 l0 W+ Y1 T/ R( n
                        @.DrivingHome := true;" p/ _7 g3 J! x0 s: x2 e' x- ^1 \
                        rgManager.tryToStartTransOrder;
! `( o' B! h- q# m# }8 r                        if @.Destination = void1 V, i" e! s5 u% E( }7 S* h6 W
                        then -- no transport order for vehicle @
; r4 W- [/ G# a/ x5 g% a! a+ A0 @% R                                @.Destination :=
# f( ?& q* {) l* `7 T7 G                                rgManager.nearestFreeStation(@,track.~);9 F' u3 K6 X  _- L. Y
                                newDirection(@);   
3 p$ L# m' g! G# V                                if @.Destination /= void then
  y( e+ n7 i, t/ `/ |% X                                        @.Destination.NumReservation :=9 P  V3 c& l. K
                                        @.Destination.NumReservation + 1;( B3 _* T" W; L
                                end;
, r$ D' L4 A; F                                @.CurrIcon := "drivingHome";
; u% t, {5 Z* g: a! B                                @.DrivingHome := true;. K+ @+ G0 \7 Q, ]. o* P! f
                        end;
0 y; S: h/ [0 i0 F                else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 w7 V/ n# F, h% d8 |+ O
                        part := @.transpOrder;( N, C& M3 K$ @+ G
                        part.move(@);-- load part
3 A* x* ~6 K* G, O! {                        @.CurrIcon := "load";( l# x- O, M$ y' F5 j' L6 C2 I( N
                        GlobalDistObj := part.globDestination;4 O" M! p( X& O1 P8 A2 C
                        assignLObj := rgmanager.rgAssignL;8 w6 u) M7 \! H; o0 Q
                        row := assignLObj.getRowNo(GlobalDistObj);
2 y+ @; l  m7 u                        if Row = -1 then -- since 70
0 D! @! l$ K) b( t! w% o                                if lan=1 then: R+ _, J/ Y% T/ R3 e/ S: P* Y, K
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& X- j. @, N& D" X8 v5 ~/ R/ d- r1 @7 `                                                to_str("in der Andockstation: \"",?.~.name,"\""));
7 {' B9 m0 {* |9 j- a! @" p2 k9 E2 A) ]1 g6 o                                else) ?2 }, t/ [% R- _
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
% v5 s5 l; S7 g" C" l                                                to_str("in docking station: \"",?.~.name,"\""));                                3 @& P+ v$ z; {' W; }1 m, l: I- i
                                end;
+ B0 [( L  f6 C2 y                        else
5 P" d8 I! b3 c                                @.Destination := assignLObj[1,row];
( F$ V; d$ ?: a4 K' \6 H                        end;                        5 S# `% s5 p% K$ U) v% T0 ?
                        newDirection(@);
2 ^+ s# l+ `% |                        @.HasOrder := true;. U6 P* [* G( N& @$ `) M4 R; g
                end;% A5 A; t& J' L, y9 u& s+ w
        end;$ G+ B( C( B% M
end;        -- of the method, u7 g" |8 B8 r2 G2 i5 R
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
# Q% X- R# _' o; o5 e' h
) V0 x. Y4 W3 a- J5 n4 t2 ~这是AGV_putin中arrive的method。
6 z5 h0 Q3 q2 Y( m: `
; d* u; G: T2 j! p当到达物料速度越高时,这个报警更多,
/ m- D. ~& f2 g8 t& S$ Z' S3 l可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。# j& D1 u* Z3 |* G6 |1 x, S- z
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?/ ~+ y8 L2 V+ C' z

4 a. k7 Q1 Y7 f5 A, m$ N5 h" k另外一个小建议,就是move,所有的move都可以这样$ D% Y) D0 O. O: h
if not move() then debug end
% V+ z8 Q2 A8 i: T8 x( D( }这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。! k2 {% }# W, J! q' o% t
plant simulation中的free libraries有AGV模板,% Y$ R- G' r7 D! Q6 S1 A0 G
里面也有案例。
! d) K% c7 d; m我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。- l6 o: A) u1 L0 U& I2 M! g. x
% S6 w7 M7 x  ~. n, ~
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
( S5 T; A" `# S, m3 P" x, \4 h+ v! ~% k" ^
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 . {$ G* x1 M; y
这是AGV_putin中arrive的method。  g1 |, X' n- j6 n/ X4 W
2 h7 A/ `: y& E/ O+ V
当到达物料速度越高时,这个报警更多,

) T! R) }) d! T- x" q3 D另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-12-24 17:12 , Processed in 0.014622 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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