设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5483|回复: 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 m4 k) R) r5 F. ^+ L4 K
*/
) V+ O; Q# b# H0 O) @# p4 _is! i. C# [9 G& Y- M* ^9 D% X3 v
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
6 N( F' G0 p) Edo
+ m* U. b/ z- }. B; E4 V        Lan := rootfolder.Internal.Tools.AOLlanguage;) m0 {9 S( c: b  h* d
        if current = @.Destination -- else return* ~" K& Q1 f9 _  }4 H- ?
        then  @# J- ~! {+ t" E2 [& m* X
                @.Destination := void;+ t. ?9 t! g: K
                if @.occupied then
0 W! ]7 i, Q: @                        part := @.cont;
  e+ I+ V* A/ S  L                        @.transpOrder := void;1 y0 O. B; z% _0 G& L! b" d% ?
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,) R; m! ?8 n5 x4 }
                                @,root.eventcontroller.simTime);
1 i# D% l7 `  R; e+ m                        @.HasOrder := false;$ f2 M/ O* o. k; y. B/ d
                        @.DrivingHome := true;/ N, l$ v' Z. n2 r% _/ L/ @
                        rgManager.tryToStartTransOrder;
9 S" H* s" Z( J* i  {                        if @.Destination = void% s; @0 j( H9 {' ^
                        then -- no transport order for vehicle @
0 V+ r5 C5 w% ?6 `- V1 K                                @.Destination :=
3 I) ?8 i& f8 ?                                rgManager.nearestFreeStation(@,track.~);& x; V- o, }; v
                                newDirection(@);   
) Y$ ]- s) h1 G                                if @.Destination /= void then
% k2 [: [8 ?  T% f                                        @.Destination.NumReservation :=9 I/ c' s; R+ p4 B
                                        @.Destination.NumReservation + 1;. o$ p( B2 I1 g" S2 w: V6 m
                                end;
3 {# j6 [: q# c8 c                                @.CurrIcon := "drivingHome";8 g) B+ n* e0 C# A% L, u8 l
                                @.DrivingHome := true;) S* s6 D0 N, U
                        end;- N8 u+ C7 S3 C0 s2 x  Z
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
1 D( I0 d; e9 f+ R                        part := @.transpOrder;
# q0 U- [  p, j5 J, U                        part.move(@);-- load part  p3 C5 [4 O: ?+ W3 k6 }6 A$ J
                        @.CurrIcon := "load";
# G# M% c% \! R2 _1 X" \                        GlobalDistObj := part.globDestination;/ q* W; M# D8 J. a+ T# n
                        assignLObj := rgmanager.rgAssignL;) @- [: h" l/ n! f' c# X
                        row := assignLObj.getRowNo(GlobalDistObj);6 o* q3 S0 o: m" D0 F1 R
                        if Row = -1 then -- since 70
( W7 u' }5 `/ B! M1 \& H# I                                if lan=1 then
. [! v0 p9 V! c$ f- ~$ N4 @! A                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
6 J) }  W$ Z! p& @; J% J* e2 u                                                to_str("in der Andockstation: \"",?.~.name,"\""));
; d6 v8 I; j9 e' {: w, \. D3 h  N/ E                                else! i3 q( f! Z8 X/ I; O8 t
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 @, O( p0 S. }( j. ?! A2 |                                                to_str("in docking station: \"",?.~.name,"\""));                               
4 l2 b6 q6 i) i3 F! ]) u                                end;, f4 X# A) ^/ \* k, V3 r. B9 L8 Q2 D: p
                        else( S" l; p9 a+ M# b1 W5 f& w2 X3 v1 t
                                @.Destination := assignLObj[1,row];
0 D% s" L# I! P* L                        end;                        1 Q8 U2 @7 m1 ?7 |- k1 s
                        newDirection(@);; x1 y0 i" \* O, [) y4 B
                        @.HasOrder := true;  S; p2 Y7 Y/ S+ G+ b2 c
                end;/ N& ]4 K: F5 t3 h6 `
        end;* d( J+ ?1 y& J
end;        -- of the method
% [7 y$ |5 A2 t9 q1 U
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 $ b3 S% G- I8 [; h  G$ e/ T7 c

& L1 L0 k" I1 ?& a6 _这是AGV_putin中arrive的method。
/ C5 H; b" l4 L& `( }* m( k1 u0 r! l+ k- d
当到达物料速度越高时,这个报警更多,8 F4 `) c: V  m; u
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
5 ?) X/ _. [1 a0 Z9 `程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?6 c& T7 a# M' @4 e- C
$ x8 [9 F, ]$ l0 W
另外一个小建议,就是move,所有的move都可以这样
# a4 B: H7 W) N8 ^6 b) q  {( h' yif not move() then debug end1 v0 Z3 M9 l+ j9 C2 F
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
& E+ I9 \$ F) xplant simulation中的free libraries有AGV模板,; Y" v( J; ~1 f! S1 V+ k
里面也有案例。2 g' |( S. {) d" V2 R
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
0 k- k( Y3 i5 y. K) L4 b+ T' E$ y3 K" g8 M. w9 p
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 8 n5 A( y& |" A; h7 T

: O/ Q9 u+ y0 c那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
$ [* a8 [, {! w; t9 b( a& n这是AGV_putin中arrive的method。
3 T, m2 Y5 \" B7 N  t4 H" h' Q+ Q8 P; s$ w
当到达物料速度越高时,这个报警更多,

2 _! }; d1 n7 _8 V另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-11-26 18:07 , Processed in 0.021822 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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