设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9743|回复: 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'# H5 U9 M( L4 s0 r2 ~! e
*/
. n: D  h: s" K9 x4 ris
& P' ?) ?3 W* l- [* y# z1 S; ]        part, GlobalDistObj, assignLObj:object;row,Lan:integer;9 N5 C) P! I  t5 S. B1 v% W  {# j9 m
do: @4 Z: A( ~$ c* T
        Lan := rootfolder.Internal.Tools.AOLlanguage;
4 H1 [7 h& H$ T" s" x+ Q        if current = @.Destination -- else return
$ s- z4 c0 G1 U% r$ N; b2 ~/ x        then
+ O# l. _/ n/ r; l4 i1 A2 u# y% _# D                @.Destination := void;3 O) l- ~" H5 ~6 q' b( D
                if @.occupied then
4 w, m5 ]+ U+ w- M" O2 D7 q3 b) X                        part := @.cont;
+ _2 I+ W2 p; E+ ?/ D                        @.transpOrder := void;, ?7 S" Z* y$ D
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
8 I5 e0 `, V5 O5 i                                @,root.eventcontroller.simTime);8 i/ ?! N6 I' b. h! J2 A3 T
                        @.HasOrder := false;
( N2 O/ K6 \  d( V% R5 r                        @.DrivingHome := true;+ Z, e  N4 M; B8 s- D
                        rgManager.tryToStartTransOrder;# u' ~% l  ?3 N6 S- c
                        if @.Destination = void
5 q1 s* I7 l" F6 c3 U                        then -- no transport order for vehicle @' z. d7 D' L4 t- P) z! j; Z& G
                                @.Destination :=$ z/ A( _7 O7 @' a; L. `- d! C* S- K
                                rgManager.nearestFreeStation(@,track.~);+ X( \+ I9 m0 x( V
                                newDirection(@);   
$ ?( V$ S7 i0 o/ n5 h7 n                                if @.Destination /= void then
& e3 Z- f# @/ c$ e2 k2 T                                        @.Destination.NumReservation :=; Q6 Q6 Z- h/ j
                                        @.Destination.NumReservation + 1;4 `6 B7 F  u, ?6 L& p4 f4 I
                                end;5 n1 ~- w; Z& w& }% p
                                @.CurrIcon := "drivingHome";2 A+ T7 z- J1 Q* r
                                @.DrivingHome := true;0 o3 }- ^0 u* N- @- w" o
                        end;
3 Y  P8 {3 e  f5 \3 {                else -- the vehicle @ is empty, both vehicle and part are in the same dock station9 ~$ @* W5 X- ?6 @+ I& s
                        part := @.transpOrder;/ ?2 |8 a8 @2 T+ X! U# v, |
                        part.move(@);-- load part8 q( V+ b  |1 P, \& x' U
                        @.CurrIcon := "load";
3 \% [1 s  o  j4 @  A* j- j) [                        GlobalDistObj := part.globDestination;
9 }' Q8 J6 Q; k, U- q/ ?                        assignLObj := rgmanager.rgAssignL;6 ~+ p% ?* h+ Q) C3 ^1 l
                        row := assignLObj.getRowNo(GlobalDistObj);, S+ |: f2 [' e9 r1 H: ]
                        if Row = -1 then -- since 70
9 `% J/ C" H6 N                                if lan=1 then! S7 M: @" Q& P. l0 I3 [7 k9 n9 w
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),5 B" M7 f) K1 P; H# s3 R( v( }8 i! I: d
                                                to_str("in der Andockstation: \"",?.~.name,"\""));+ T0 s( W% h! h/ q- x& D) {3 t7 I
                                else9 J; q- X! y  l* o/ b
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
: \# s6 R1 H/ v1 y                                                to_str("in docking station: \"",?.~.name,"\""));                                " w2 K) H8 Y2 ]
                                end;
; a1 s$ Q" F3 M+ a                        else
+ A1 m- b) R! S1 ~9 P; k                                @.Destination := assignLObj[1,row];( P  a  \  y; h: i
                        end;                       
6 K( v4 B9 i" _+ C1 @  R- X                        newDirection(@);
2 L( o. }6 \8 q' _% i1 U1 r                        @.HasOrder := true;
1 s3 L8 p2 I( @- p5 G                end;! D2 a; u, k2 n! s2 Y$ R, e6 L9 e6 v
        end;
/ z2 ]6 ?1 K1 e; r' n; Mend;        -- of the method8 h% k0 H$ Y: a* T3 `) y: L
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
* E+ {4 g4 f* K* j8 \' M. Y, w  s3 g0 Z
这是AGV_putin中arrive的method。
! h6 @: {: F7 i5 D
' X, S+ k' r, t2 h$ w当到达物料速度越高时,这个报警更多,
  _) G9 O! {- O% I5 u/ e可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
! H6 B4 W' B' T程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?# S, u' R. G9 R  x1 E, v* o! M* n- o( B3 o

0 E; Q$ b2 N3 s另外一个小建议,就是move,所有的move都可以这样' n( G, r% F1 \3 O: B. ~
if not move() then debug end# N) A7 m* r+ G0 P
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。! G. N( f& j' z' g& y( R
plant simulation中的free libraries有AGV模板,
' s9 y3 S& x5 x. Z* |3 o# H. |& k6 t% ]里面也有案例。
, Z' Q! ?& n! V; m我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。# I6 o4 x9 O. j$ u) X2 _" `8 N
5 C* ^6 |' D8 L& U0 D9 N2 l) t0 u
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 & I: E  A3 Z- w7 M; s/ F+ _
. Z. u* V  d+ j: i- e
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
9 a! E2 c' T0 Z$ b! e% _* w这是AGV_putin中arrive的method。
+ w+ E% t; y9 U9 e/ `5 H1 r% c3 i+ i/ a/ x" k, C' _& r
当到达物料速度越高时,这个报警更多,
$ Y1 r5 E  e( t& \. v# F
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-8-21 16:40 , Processed in 0.038423 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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