设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9616|回复: 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'7 z( e6 Z$ T5 b# T: q
*/- H) Y7 D  N3 J
is
+ Z9 w) A; W2 [. ]5 b        part, GlobalDistObj, assignLObj:object;row,Lan:integer;. D* }( X$ i' f3 G
do
3 Z+ v4 r" V( [) C5 t5 G        Lan := rootfolder.Internal.Tools.AOLlanguage;
$ j+ F) @  B, p4 g- u! l        if current = @.Destination -- else return! H2 Q: W8 p4 \" y" L5 C
        then
, m. C* X, |/ Y) `7 ~                @.Destination := void;1 G% i; j* L  e) C; ]
                if @.occupied then
4 L, D) w* O2 u/ E% f' [, f0 l                        part := @.cont;! o3 S+ M" Z' D" q) ]9 G
                        @.transpOrder := void;0 V6 t7 k$ Y9 t& \7 D+ |  @
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 S7 ?/ K% B8 ~% T9 m% {, p1 `
                                @,root.eventcontroller.simTime);4 b$ P5 d5 _) K
                        @.HasOrder := false;# H8 U' I9 n" w  O( L* s6 J; f- {
                        @.DrivingHome := true;
0 P. _0 M) X$ W                        rgManager.tryToStartTransOrder;
/ z/ j' ?1 T' ]# {8 s2 b                        if @.Destination = void
( h3 h* v% N7 b5 P                        then -- no transport order for vehicle @
9 X0 @  E% F3 P/ x                                @.Destination :=
* Q% b; p3 Y. T3 t                                rgManager.nearestFreeStation(@,track.~);3 i/ S# O( P- W) W
                                newDirection(@);   2 \: n3 ?5 G  N0 Q5 L
                                if @.Destination /= void then
' a- n) N; S. x9 Y5 _                                        @.Destination.NumReservation :=* X0 V3 V$ o$ D8 C
                                        @.Destination.NumReservation + 1;
0 p* z/ ~: K# X; [( ]- y1 J                                end;
! k& g% q; ]7 ^% D                                @.CurrIcon := "drivingHome";9 e# F6 r% z/ ~
                                @.DrivingHome := true;) J* q$ y1 f1 ?
                        end;* G) l$ y7 Z7 C& {: u, u- J
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 d- i3 o3 f% z4 D3 L
                        part := @.transpOrder;: h1 |4 G2 ^' ?& a
                        part.move(@);-- load part
; ], t8 I. P% s3 }4 i5 E! Z4 k0 [8 U                        @.CurrIcon := "load";2 h, \9 g+ E, [+ E
                        GlobalDistObj := part.globDestination;# R# g0 g# j  A( N) o, b" a2 s) s
                        assignLObj := rgmanager.rgAssignL;% p$ X/ z9 M$ a5 V6 u
                        row := assignLObj.getRowNo(GlobalDistObj);/ i$ H4 P" A  |9 T3 x* `
                        if Row = -1 then -- since 70& i2 @& E2 G. _) ]% }
                                if lan=1 then
. Q/ a4 F/ h4 ~! I% Y                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
) I* u4 {+ D. {& ?% W- p. a" `                                                to_str("in der Andockstation: \"",?.~.name,"\""));
* s/ g9 V  _6 _' U: Z9 g                                else" p, `& W+ i$ v1 V' ?
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 b2 y% k1 K0 @7 {0 p5 I
                                                to_str("in docking station: \"",?.~.name,"\""));                               
+ F  `' y0 M! G( C* p, l% ~# ]                                end;
( k4 f' Y* W5 Q2 J$ [) t% Z5 _2 }                        else# t3 f# g  v6 `  l5 ^) t& H1 z
                                @.Destination := assignLObj[1,row];
8 d! W, ?6 f- S5 L8 h0 l" A                        end;                        " p6 M% K& ^0 g4 l( J+ }
                        newDirection(@);
. H# s2 P. P4 ^                        @.HasOrder := true;
4 V$ H! m( i! r4 F( u3 i                end;; R$ ~& F% i. g
        end;
5 ~0 @) }3 @" W5 ~end;        -- of the method' t. F! m- L' i8 T3 c% N% J
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
) N9 F8 ~: h( R$ Y
0 r% v  L6 V: m& J8 V2 f2 O, p这是AGV_putin中arrive的method。
, h" O, T. \. u4 L$ ?! w1 Z' R0 Y5 ~% m1 j$ z) ?* N6 o
当到达物料速度越高时,这个报警更多,
0 V( H* u2 ]8 d# y8 ]可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
/ A" h9 ~3 E6 A3 Q1 X5 F程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
+ ~+ ?7 z" j  t1 s8 y' ~/ n: i) R$ z5 `9 f9 M+ C( ~
另外一个小建议,就是move,所有的move都可以这样
- c/ ~3 y0 I7 U8 l+ ?* [8 ~9 dif not move() then debug end* P! Y6 r! [' f' c
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
' J/ g0 u& Y1 Lplant simulation中的free libraries有AGV模板,
0 l  Y* [  R% I# W0 B& I+ v' X里面也有案例。. R' f/ g6 N- }' f0 Q& t7 T% }) O4 K
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
+ z  ~" }1 m9 k# M9 E' t3 t
: }+ s# L1 s2 R1 o3 r2 v我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
% c7 J& T. U3 l4 j$ c' n
) B' s, a) o5 p% j9 i那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 $ H; O' L! x$ ^
这是AGV_putin中arrive的method。
/ B5 |/ j. A. l+ }3 d2 G$ e  o
! U! V) u5 c2 z; Q( _' n; L! ?当到达物料速度越高时,这个报警更多,
3 R) R- ~  |& @% \
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-8-11 21:32 , Processed in 0.020067 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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