设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5488|回复: 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'" P6 l( `& M5 m% K# f- \
*/
5 n& y! {/ W1 p; Tis
- D9 ?8 ^# T& x  J0 g3 w        part, GlobalDistObj, assignLObj:object;row,Lan:integer;4 ]; X+ B' D0 C
do
6 K: b  n- w' I' P* _        Lan := rootfolder.Internal.Tools.AOLlanguage;
7 F- g; Q' o) e/ E# ?! x3 \: G; }        if current = @.Destination -- else return" x! |# z; M6 G; S
        then& J& l3 H+ T! d3 k1 j% L
                @.Destination := void;
  w! J% Z# [7 g5 R" _                if @.occupied then: R# A2 _3 F6 Q4 n3 h7 N/ ]
                        part := @.cont;
7 E6 h, H; A. O) v, K; s5 C7 i                        @.transpOrder := void;
6 M% X$ K9 _$ V$ {' S! N7 Y                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
; Q' S3 O& d; j3 N: \# \$ @9 m- M$ A                                @,root.eventcontroller.simTime);+ ~5 p) t9 R2 w$ t
                        @.HasOrder := false;. V  G1 V; X* Y, U% R( f
                        @.DrivingHome := true;
! O6 r2 A- q, Y+ h# t# F7 A                        rgManager.tryToStartTransOrder;
$ z- K, }, H1 @: X7 G$ l                        if @.Destination = void0 I" [5 V. g4 f" c
                        then -- no transport order for vehicle @
0 Z: q& x* t- C# Q9 ~$ i& r                                @.Destination :=5 h% O4 e6 {5 f% V# H- L0 I
                                rgManager.nearestFreeStation(@,track.~);* d/ y# Q8 F' o3 x
                                newDirection(@);   + q3 I" j! I$ r! t& x$ K+ |
                                if @.Destination /= void then  g" o! Y8 R/ y4 i, n* ]9 |
                                        @.Destination.NumReservation :=' ]- T6 ]  r+ r- n6 Q) @* X, j
                                        @.Destination.NumReservation + 1;- b( @6 T+ s- S4 m
                                end;/ P) s$ y$ q: H8 p( D+ R
                                @.CurrIcon := "drivingHome";7 p/ y7 [1 L- f$ C/ D5 p# S
                                @.DrivingHome := true;
. _( y+ o# h0 Z5 Z                        end;
8 y6 b# s$ f  v                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
* y6 O; [" \- `% C; u                        part := @.transpOrder;
4 y: A% V1 j* f, l. x$ {7 A                        part.move(@);-- load part
, }) `  ~5 {" I1 I) f0 _" c; Q                        @.CurrIcon := "load";
1 J' i" m; p' K" m; i8 B8 E0 n                        GlobalDistObj := part.globDestination;# B/ u8 {* l* U. F: I
                        assignLObj := rgmanager.rgAssignL;
# @2 ^, m2 r' d3 V, x                        row := assignLObj.getRowNo(GlobalDistObj);! S- c8 o; V7 X4 R& ]* [" c# \' @
                        if Row = -1 then -- since 70
( m' }( z1 Y) v( D5 ^+ r, C* [7 k' n4 F                                if lan=1 then
3 Q% H( p& C5 o2 e                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& p; w0 }8 m& z; W9 `7 b, y: g4 t) M
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
2 Y+ s+ X! J0 U: u8 |                                else7 k, v& C6 b* y6 y3 t
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
8 k  \; ]# ~6 i; k) l                                                to_str("in docking station: \"",?.~.name,"\""));                               
0 ?1 E3 E. \& f4 ~# n$ X                                end;
4 @0 \6 [) Z7 x7 ]0 N% L4 S* |                        else( z: b2 t+ ]4 y" Y5 ]/ n
                                @.Destination := assignLObj[1,row];% A/ [, ]1 u. b% b+ w6 U5 A8 B
                        end;                        : w, a7 q" o1 k: P2 `
                        newDirection(@);# d7 [$ _% j& y* d5 F0 e
                        @.HasOrder := true;5 F+ E. r4 p. B9 I- X  o- w- z) G0 ~, Q
                end;
- E; J9 a0 F; K8 P        end;8 b! c/ O. R" N7 c9 f1 I3 F
end;        -- of the method
5 {' H+ k' o+ R; J
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 - V" N7 q1 a* U! w# N3 o

9 N5 u4 l$ ^2 r" H& f. }- X这是AGV_putin中arrive的method。
. m$ s2 C8 h/ d) N" |* S- r3 G4 B* Y3 t2 k3 g
当到达物料速度越高时,这个报警更多,# [$ g4 y& _# L
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。* x. Q3 A+ V  v) ]4 K
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?  {4 F* j' O% ^
! s- L3 ?4 V& z
另外一个小建议,就是move,所有的move都可以这样
* V% j1 a& G% j* {2 S! Bif not move() then debug end( J& k! E; v( V- b  N3 n2 M
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。8 A7 p) N5 u+ _/ q3 _
plant simulation中的free libraries有AGV模板,
1 U* R/ a( r: Z, K. S  L" N里面也有案例。' e& ]. \0 h! r2 A" D2 ~
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。0 y- j3 u  g/ |, L  g
1 i3 D7 _/ ^' }: p3 X
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 ! v, }( Y# z9 a, j* C+ U# @5 Y
, o0 e2 ^- j+ x& |+ q- |
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
! e1 }" l3 A1 F这是AGV_putin中arrive的method。7 \6 q' k3 |$ J, E
. C- c" u7 O" H( z" ?3 w
当到达物料速度越高时,这个报警更多,

# N; b% ?. r% Q! X7 {另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-11-27 08:25 , Processed in 0.018140 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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