设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8692|回复: 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'# q6 j/ ?! R) J$ _5 E
*/
$ H( q: j8 `+ ^& B, c! zis
9 O  q* h; I- x        part, GlobalDistObj, assignLObj:object;row,Lan:integer;6 I3 {# r) M) v% [, x
do
# Z3 v$ f7 R0 w  H        Lan := rootfolder.Internal.Tools.AOLlanguage;' @) d# Q( Y3 l6 {# c$ z
        if current = @.Destination -- else return
# \: }: k) Q8 _' }        then
2 O; i; W+ m1 }7 w& w6 n                @.Destination := void;
8 y" \$ D) P/ H# a  r5 m( @/ r, f                if @.occupied then
: k: V( s+ {: V  S7 {                        part := @.cont;& C! a2 A$ |3 L) ?
                        @.transpOrder := void;
' a# o0 J8 U$ o* A2 P                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,6 E0 f5 t- j/ Z, a
                                @,root.eventcontroller.simTime);
/ O( Z+ u% e/ J9 B8 ^( F& R# P                        @.HasOrder := false;# x; m$ L. v0 b2 K6 b- q; ~- \$ i/ w
                        @.DrivingHome := true;
' _! ^$ w  z) C! r                        rgManager.tryToStartTransOrder;4 [2 l. @0 K+ P0 G2 {/ q
                        if @.Destination = void
1 ]( _, z; v% j1 a; Q& u$ O                        then -- no transport order for vehicle @: U9 a9 S: ?4 M% x5 M3 _) [
                                @.Destination :=
0 `/ A" H: P2 @( B5 ^, N3 e/ M                                rgManager.nearestFreeStation(@,track.~);: o1 L# ]4 t8 m1 v$ @& i( n
                                newDirection(@);   ( S" M3 `0 \0 e8 {9 t# L8 _& W- F
                                if @.Destination /= void then2 ^9 K, e  [: ~
                                        @.Destination.NumReservation :=  q' k2 h# s2 j* }! X
                                        @.Destination.NumReservation + 1;
7 f6 X; }8 V9 Z2 z0 Y/ D+ i. c  N4 v                                end;
7 U' {4 {7 I' z. f                                @.CurrIcon := "drivingHome";
* \- K7 p' [" D  y# g7 W+ k* y) [                                @.DrivingHome := true;/ U9 ?" F4 t* E4 i: U0 U( P
                        end;) P9 s" ?- J1 v( \
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
, n1 @' e* r$ L                        part := @.transpOrder;* X! W* Q5 A  i$ E8 b1 Y3 p% y* X9 o
                        part.move(@);-- load part
/ ?5 ~* d7 o, k2 J                        @.CurrIcon := "load";
+ s. m+ x) v; I                        GlobalDistObj := part.globDestination;4 V- }, h* U+ Q1 j5 S
                        assignLObj := rgmanager.rgAssignL;4 n& X+ n: w3 O2 q0 A
                        row := assignLObj.getRowNo(GlobalDistObj);
* Q/ \) e" _/ o) F9 _0 U                        if Row = -1 then -- since 70
" m! J4 c4 }* j                                if lan=1 then
* U+ U0 Y& {" |2 L9 m% P                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),, {# F: [: i6 B* p
                                                to_str("in der Andockstation: \"",?.~.name,"\""));, S2 _* Q% g, q" S, `( E' H6 v
                                else
* Y5 r' o- ^. \9 u8 z/ n7 A* a                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
1 R/ C4 k0 y# [3 }7 f. V2 v+ c                                                to_str("in docking station: \"",?.~.name,"\""));                               
7 i9 P4 [1 J& ^( p4 K, ^# X5 K                                end;
, J6 J- j/ U; o' s4 t                        else4 N3 j9 N/ \  {, ?" L& r; G, _# G
                                @.Destination := assignLObj[1,row];
' Q2 {9 e' M! \5 e, a0 i                        end;                       
8 l. L6 j& {/ U& ?                        newDirection(@);4 J2 L- q, `; E
                        @.HasOrder := true;
3 w4 b# N1 k* P                end;, c% {2 U9 |6 ^: u; G, q
        end;# U* b* S& F& H- N: k
end;        -- of the method
  r  r! P" m  D1 K  E. y! U, ^5 ?
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
' M$ H  E' ~+ q# k; I, y# d. j* y) M+ [, y( y
这是AGV_putin中arrive的method。
6 G7 A1 @' ^9 t. ~0 H3 ]& a# x) u% o: r
当到达物料速度越高时,这个报警更多,
. \; ~9 v7 N0 z可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
, N! d  Z( I8 v9 _程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?4 S- v& P7 _# ]
6 s; Y+ W) T4 @+ y3 z
另外一个小建议,就是move,所有的move都可以这样5 e& K5 k9 K4 A' j. N
if not move() then debug end
+ Z9 {7 t, l6 j这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。; [# k: x1 O) X- @4 x, ]  H. {
plant simulation中的free libraries有AGV模板,5 c% G6 c4 @3 T% X1 m! p
里面也有案例。
, m, W1 G9 ^4 g8 y* |! `我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。! o6 G8 c% v3 K. J# P4 ?
, O' a6 y" q: {: V% s# |
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 8 z/ P& ^( K  d3 M

- Z- }! |' J- g+ |  o: x那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
/ C! ~* B, M$ p0 B- F! v: {5 @9 t这是AGV_putin中arrive的method。2 Y* N9 U2 }! A6 x) r* e- P

2 i, L8 U3 P( [! L" |% l2 i+ N5 T当到达物料速度越高时,这个报警更多,
  _7 H1 G2 T$ w
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-20 17:16 , Processed in 0.016401 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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