设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9976|回复: 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'
! C; @+ K* J& |* V& u" j*/. V; f/ l7 B0 H, Z. D8 ~3 s
is
/ k2 h7 W5 L# ^! x9 y0 [$ G  v        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) h- [+ W) _" F' e( q3 J! ido
/ ^4 G- ~! a3 F; n        Lan := rootfolder.Internal.Tools.AOLlanguage;
9 g$ ]' ]2 Y. s) Y) c8 S" X( u$ R        if current = @.Destination -- else return
. ]0 j& z: a. m. C0 B) t1 Y/ k1 X# K% c        then
3 L2 o# y( _5 F+ }. z# G/ V                @.Destination := void;
# z+ O+ P/ |% s: I                if @.occupied then
' G9 F  F/ L+ f3 S4 q% @2 [                        part := @.cont;# j# L# S# b) l4 D& R
                        @.transpOrder := void;3 c1 g' X7 k! A" c) \( _* m
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," l) d4 L9 `7 r( w
                                @,root.eventcontroller.simTime);& g0 D7 Z6 c% v$ i' N. [
                        @.HasOrder := false;
. M3 n& s; Q- R/ t5 _' ]9 `' t                        @.DrivingHome := true;
& W/ \: ^+ Y2 g/ q                        rgManager.tryToStartTransOrder;, `7 I0 S& c; _9 J/ Y5 Y0 D
                        if @.Destination = void8 d8 H( J2 F7 Z& G) }2 k
                        then -- no transport order for vehicle @
1 p' V9 U' ~; J( e- C, f% o$ `                                @.Destination :=
1 Z& ]5 ?% i# n9 d2 o) r+ E& I7 R                                rgManager.nearestFreeStation(@,track.~);# R9 G5 J+ `7 T: j9 J
                                newDirection(@);   0 V8 U. }* `6 i: \+ S- O! m
                                if @.Destination /= void then
+ J: r9 @6 l6 a3 G" G                                        @.Destination.NumReservation :=2 e: @% |- b! N0 L. M2 }) U2 d0 b
                                        @.Destination.NumReservation + 1;
+ Y! H) O# k9 t+ K: e                                end;7 g( P2 u; @! A) r/ C3 E; Z
                                @.CurrIcon := "drivingHome";
( C1 q2 N& H3 d5 l7 a                                @.DrivingHome := true;
. @! Y% I0 `" G5 D4 W                        end;
7 c, ]5 L& |, b: n                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
7 m0 r9 Z( O+ M8 ]& n* v( }& X                        part := @.transpOrder;7 [/ s. Z/ @5 W; t
                        part.move(@);-- load part+ Q0 {) S, c/ e, ?0 h
                        @.CurrIcon := "load";
9 S- P9 p" F! s( F2 |1 G                        GlobalDistObj := part.globDestination;
# H: v2 f& u3 Z' h                        assignLObj := rgmanager.rgAssignL;" G8 x, j0 T* `5 l
                        row := assignLObj.getRowNo(GlobalDistObj);
0 p9 u9 |# k& J, z                        if Row = -1 then -- since 70
; `( Q' ~8 _5 h$ h6 b+ d                                if lan=1 then
( `6 y% l2 k2 V: h( q& b7 ]                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
4 e  D) D, F" t3 k                                                to_str("in der Andockstation: \"",?.~.name,"\""));
! |3 A8 W% U  j. t                                else$ G& s6 K4 M6 C
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),, O) j/ B6 }, E, T5 C
                                                to_str("in docking station: \"",?.~.name,"\""));                               
% ?; u% Q; `% g& ^; M1 J                                end;
1 E7 H, g; r  ^, E, V                        else" g7 E! o* N* {; D8 i" ]
                                @.Destination := assignLObj[1,row];
6 k. y0 O7 Q( i8 p6 a1 I                        end;                       
" d* R/ h! Q; D& o                        newDirection(@);) F' z2 h7 f5 a+ I
                        @.HasOrder := true;& M2 K# {: a, E
                end;
* X1 z5 F* a! D9 h; o- }9 t. X        end;
0 Z& P( b8 N( H6 R- }  Mend;        -- of the method% ?0 k. F$ J1 F" N
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 & }' N; d3 R8 D$ K
, c* l+ f% o# z5 c
这是AGV_putin中arrive的method。4 [$ v, M( P$ R# V  d+ x% a8 r
+ C4 D' Y* U( ~5 _1 P3 R, \# U# }
当到达物料速度越高时,这个报警更多,
9 K# U7 t0 N) P+ w/ M1 s可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
# O, ~3 L  G6 c- m( H  x* m6 r: q程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?- m7 C7 ?* v7 \8 }4 S: q
$ L: D* E) F0 b# Y( L! M$ _
另外一个小建议,就是move,所有的move都可以这样
: l3 V4 J0 k: }* N( e3 N9 C4 ~if not move() then debug end2 @+ E; `& @# r
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。6 f+ H, A; B- t" K0 e. d! q
plant simulation中的free libraries有AGV模板,
; Y% B# J1 S9 ^( z  C里面也有案例。
6 y# e+ J% `* M我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。0 p0 ?$ q, j7 h0 k7 o

+ |* @& C/ n; t8 u6 I) r" o9 ?; _我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 3 A0 p8 f$ o' h* o9 |! [" h

$ E/ k$ L, l! q$ R7 D  Y3 M那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
" ^6 F9 r1 ^9 E: R- |, S: a这是AGV_putin中arrive的method。
% y! p$ r' [  o6 N; r. b
8 T+ s& h8 B4 Q( M当到达物料速度越高时,这个报警更多,

5 L& z1 m; r' \- `+ s6 ]另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-9-5 12:42 , Processed in 0.020783 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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