设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5659|回复: 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'
9 f/ G8 F* z; X* g$ v*/7 _6 r! @" ~$ C8 c/ p
is3 s1 J$ f; J# M6 Z
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
" G9 M$ k# A; j- ^' tdo5 `9 F$ c# G1 I: K" J2 W3 T0 L
        Lan := rootfolder.Internal.Tools.AOLlanguage;# m/ f7 w$ Z/ Z1 b
        if current = @.Destination -- else return
" S! x% Z8 F( M; }4 f0 d: t: {        then
3 h! g9 ?. p( ?1 I: n' D& J                @.Destination := void;7 u+ [8 t& |: C; S2 C
                if @.occupied then& T* _2 i: O/ i  ?# X! D
                        part := @.cont;
7 U/ M: T. j* y7 Q                        @.transpOrder := void;; v  K6 e9 O- S, g) s3 y
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,8 P4 U- l8 P$ m- E! F
                                @,root.eventcontroller.simTime);
* @% y" C" y0 O2 O1 T& _" i                        @.HasOrder := false;
6 E; E+ r, v9 J% M5 n                        @.DrivingHome := true;
) @4 `* R8 I" v) h5 r. n                        rgManager.tryToStartTransOrder;
' ], d  ]- Y8 |9 ?7 p9 E                        if @.Destination = void
* I$ n& R3 A) n* b                        then -- no transport order for vehicle @6 W5 g& c: b5 q# I8 _! X
                                @.Destination :=
1 Q6 d2 c$ v6 W4 p, z5 Q                                rgManager.nearestFreeStation(@,track.~);! B" U0 b9 A4 R# S, W" z
                                newDirection(@);   
+ ?( ^* v% A9 O                                if @.Destination /= void then
" D" y& Y  S% T1 P/ m  L                                        @.Destination.NumReservation :=3 S( N/ \. C) R- s' M% `
                                        @.Destination.NumReservation + 1;, t! O3 T, t. e7 y7 U% }# j9 L3 N
                                end;4 Q" M' x+ [- w& |6 j  J
                                @.CurrIcon := "drivingHome";
6 \+ @7 |. b$ j                                @.DrivingHome := true;
2 W0 }/ b# e) ?0 ?; c8 ~                        end;5 q# ?1 ^4 R4 l4 {4 M
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station/ `. W; H0 s, Q
                        part := @.transpOrder;
/ J3 c1 @( R) p- R. D2 |2 `                        part.move(@);-- load part
9 L( O3 [8 ?( K6 o# Z5 `$ V                        @.CurrIcon := "load";5 B9 c/ r9 o$ X( Z  W/ u- R
                        GlobalDistObj := part.globDestination;
3 u1 q) z' h7 }) Y- F5 z0 y6 m                        assignLObj := rgmanager.rgAssignL;5 U* C  P4 M$ A' L+ u- D8 _2 I/ O# F
                        row := assignLObj.getRowNo(GlobalDistObj);0 c: H9 {1 v: ~: B* o) J
                        if Row = -1 then -- since 70
% Z( j" T3 _' f9 O( l4 T                                if lan=1 then
0 `  {: ]6 b+ ^" d                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),) n9 R$ X& T, q9 C
                                                to_str("in der Andockstation: \"",?.~.name,"\""));* L' V5 Y! |# U$ Q% S, x; _
                                else) v- q, D; e  w( O
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) _3 _; g4 D/ s  c+ e' q                                                to_str("in docking station: \"",?.~.name,"\""));                                - J% F  l& p6 B! W
                                end;4 A0 e  ?% l+ h$ a, F3 O
                        else
& I8 V% t! p% A: I! `- U                                @.Destination := assignLObj[1,row];
0 U: b1 M' S9 {$ o3 f                        end;                       
% j- d  E$ R8 p- ~' f: C# s                        newDirection(@);) V" }) f) x, ^6 S
                        @.HasOrder := true;
& }7 z& k/ b4 R" R' f5 x                end;
, c( g8 R3 Z( x        end;: z$ c) N+ \2 K, y6 l
end;        -- of the method4 R! j9 z; R5 f+ B, o& y6 f
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 , [, g2 W7 s, T: d, @
0 M; k# Y2 K- f# b$ q" f9 ~) G
这是AGV_putin中arrive的method。0 L- n- c7 F- {4 o# r& t5 h3 D

% i& m3 n0 S; R& O' }当到达物料速度越高时,这个报警更多,
8 E. v3 F$ b9 u4 I8 B4 E可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。8 ?, t* ]3 f6 m" p/ j3 A
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?0 r9 `7 P7 W1 v9 Q" T( r: B

9 N5 E, u" B# P0 V另外一个小建议,就是move,所有的move都可以这样
) \) y9 k0 `9 b) fif not move() then debug end$ c& u) w) [3 l/ K# N, ?9 D
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
8 ]' L5 h* j! i1 H0 Q  _! p4 Uplant simulation中的free libraries有AGV模板,7 y/ I" P- n  t& u9 `
里面也有案例。( \4 Q, N$ n; J+ |) ], m1 n9 K9 I
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。1 q- g+ W- b% p" q/ u# ]: ~

) l7 J1 A. S8 d我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 ; ?9 e. ?- C: K) Z3 h/ d

# k* _& o: S. o1 e  m那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 $ {# c4 O; K. ]& H% f
这是AGV_putin中arrive的method。
9 H7 M# y3 q2 q7 h- s& l- o' n
: \8 Q* Z( e! c$ v4 D当到达物料速度越高时,这个报警更多,
9 b* y/ l  v% J2 \+ R
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-12-12 02:17 , Processed in 0.017755 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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