设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9886|回复: 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'  F% M; }9 h. \1 c1 J) P( C
*/
4 `' o7 }9 ?- ?( e, Iis$ K4 R8 p: x7 w+ f6 x
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;, {9 h, m: M4 z; g- k+ a5 L& m
do% p# l1 x6 L8 u7 O  w8 l
        Lan := rootfolder.Internal.Tools.AOLlanguage;- K- G1 `* b* m/ L9 s! }3 E" S
        if current = @.Destination -- else return! q5 [# `! \- V# t4 q; L
        then
8 p7 a8 K3 I+ W5 w$ ]5 X                @.Destination := void;$ ^/ a8 w2 X3 M( i6 _" z
                if @.occupied then
' h7 y- c6 N# y9 R! ~                        part := @.cont;6 ^3 l9 `  }4 L! A, b& F2 P
                        @.transpOrder := void;
: [8 a( {7 l% w- `. h, S5 d% i                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,; v' u/ a9 [: C3 M- A. `9 B
                                @,root.eventcontroller.simTime);0 G; A3 v% A* a
                        @.HasOrder := false;
& I2 U/ [- k" L) u# a3 V                        @.DrivingHome := true;/ G; |( ~& i* ~# Q4 i* e+ M0 B
                        rgManager.tryToStartTransOrder;
  \: q( n3 F* H5 Y" g5 Z                        if @.Destination = void
7 p) {. A: [. k2 T                        then -- no transport order for vehicle @; q, p! m6 N' ^" u
                                @.Destination :=& g: s$ O7 I$ E- @1 W4 V
                                rgManager.nearestFreeStation(@,track.~);- F- ^- \& @1 d6 r4 f
                                newDirection(@);   
$ z% {0 D+ U( J! P# ~8 K                                if @.Destination /= void then
# P! p# r0 S  C. `1 i6 Z" E                                        @.Destination.NumReservation :=
" I& I  w* X+ y                                        @.Destination.NumReservation + 1;& w& g4 D5 G( M. `2 ^7 f# s: h
                                end;
$ J  Y7 x2 ?2 z2 g. b6 B8 d                                @.CurrIcon := "drivingHome";
* U% U; Z5 D2 A5 ^5 q- ~) j) o                                @.DrivingHome := true;
% J3 E) r  e  Y7 B7 }                        end;: p+ P/ M1 e+ m, I' K9 s3 V# t
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station0 g/ S2 b8 d  o% p( ?
                        part := @.transpOrder;
# G9 D# b0 L8 i                        part.move(@);-- load part
) R+ l6 h( w! z) u                        @.CurrIcon := "load";
- U: u* t. N+ K) r                        GlobalDistObj := part.globDestination;
6 ~  i& [2 ]' Y1 p0 l                        assignLObj := rgmanager.rgAssignL;
& a& D5 A7 z  @2 u2 n  p                        row := assignLObj.getRowNo(GlobalDistObj);
& q7 ~' K4 L) l$ q- t2 W, H                        if Row = -1 then -- since 70, H# f- h) ?6 [* n/ K& X
                                if lan=1 then
8 z, n, O' \+ a6 e" P                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," I: N7 o* Y" h4 e
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
, f$ z3 Z; O, d8 B9 Q- O$ O7 [                                else
; }1 ^5 E8 d" n; }; D( W5 Y5 D                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! z9 h; [0 V: M- ?
                                                to_str("in docking station: \"",?.~.name,"\""));                                ) z/ p1 c; A' h4 n7 n  `* Y/ ?
                                end;
; o3 K  w' `3 x+ I/ G: C; |                        else
: {" Y/ y# ]0 _/ A  c* U# |4 ~8 g( {                                @.Destination := assignLObj[1,row];
1 v' T1 f' @) [0 j% D+ j1 b                        end;                       
3 r" A! T1 w. t8 Z+ Q) u2 f3 O                        newDirection(@);  M6 y5 E4 Q/ J, A% N: `, k
                        @.HasOrder := true;
2 n/ V: l; g3 Q& g. e                end;% Q; R% F7 e6 M! b
        end;
% J" J# E3 `% E4 ]end;        -- of the method1 s1 R& C/ ?$ m9 w/ t
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 7 L- |) `0 S  ~+ W% N8 d3 J
0 u8 b) L  ^( b: b
这是AGV_putin中arrive的method。
8 c* D4 G  U$ j
6 X- Z6 [! R" \当到达物料速度越高时,这个报警更多,
. k+ }% s7 b$ `# \0 a可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。' k  p: z4 G/ |8 e
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?# H& Q8 \5 {8 h
! A0 k* Z- }. D
另外一个小建议,就是move,所有的move都可以这样
  ]" \0 n" |" E# e1 qif not move() then debug end
9 G/ H1 M5 O& H& U这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。7 k5 x: ]5 j& a
plant simulation中的free libraries有AGV模板,1 l& T0 L3 p" K% I7 |, ]6 u
里面也有案例。
! h0 ^+ n. `2 u+ f8 |我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
, t0 x2 [' W% X* y% X5 n6 n, M# }
+ S( Z" k6 ?* c- l我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
- ?. P* j! ]5 |' k
3 U% ]- o7 }5 s! O: d6 U那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ' I2 D2 h( v/ T7 Y, y: f* j$ \9 X
这是AGV_putin中arrive的method。; C- G' K$ [4 r8 P
) e7 }; c/ d, d& [! ]7 d, N
当到达物料速度越高时,这个报警更多,

  J* `: I$ Q0 |, i# n另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-8-31 12:56 , Processed in 0.025965 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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