设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9691|回复: 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 Z0 \, l# Z: [* h/ H- K- T
*/
) H4 D+ J: Y! s2 His0 _1 D' ~, z9 I& K: [' J4 c/ |
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
0 m. X3 y) s' o, R8 U0 Kdo
5 `5 M3 [9 R; ~& U        Lan := rootfolder.Internal.Tools.AOLlanguage;, p$ b: r( z' G! U1 k
        if current = @.Destination -- else return
5 S: j! ^8 R4 C        then
8 u2 ^. h1 h: W4 k4 P3 ~                @.Destination := void;% F7 Y/ ^  I6 U
                if @.occupied then. S3 \4 I4 b# G+ ~  D8 h. ^$ @
                        part := @.cont;1 L4 s0 @0 ]5 _
                        @.transpOrder := void;
( q! B; `+ F: Y4 a- x  T2 h1 ?                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,8 j. B: |8 X" m5 p9 W  J
                                @,root.eventcontroller.simTime);; i9 z$ X$ k- A# G- A  d' L+ v
                        @.HasOrder := false;- S7 f' T+ h3 X0 k4 `& ]8 Z: o! f) G
                        @.DrivingHome := true;
  J( i  h& [2 M, [# j                        rgManager.tryToStartTransOrder;
4 [0 O7 r  [3 }                        if @.Destination = void
* D7 u4 C( i+ V( @* L. z                        then -- no transport order for vehicle @
* U" G1 U+ \8 v( t- H6 d' {                                @.Destination :=. U0 t1 L$ e; x1 W8 n
                                rgManager.nearestFreeStation(@,track.~);
( p" F  y4 p( a4 ^                                newDirection(@);   ! M  I, H$ x1 m3 n7 X) Q; S
                                if @.Destination /= void then
- v9 ?& |2 {5 |6 N* {  S; W                                        @.Destination.NumReservation :=% g  J6 t: h8 J9 Z# k; k
                                        @.Destination.NumReservation + 1;
+ b& i5 k3 t; m; I( B                                end;
& l- j+ Q0 @6 \! S6 F                                @.CurrIcon := "drivingHome";, N! M- l2 d7 w' V6 R1 X4 E
                                @.DrivingHome := true;9 @9 b% A+ Y- b. t; X" T% \
                        end;
7 y5 q/ Y0 Y. D0 S( z$ a                else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 Q. Y0 F! @6 N; z. b
                        part := @.transpOrder;
' \$ j  D+ z- \4 F( \                        part.move(@);-- load part; h5 n# B4 n: D
                        @.CurrIcon := "load";
4 Z* i5 w' ^# A6 l5 L# Y                        GlobalDistObj := part.globDestination;1 R" N( H" j) g2 ^* G' s
                        assignLObj := rgmanager.rgAssignL;& ^8 N' H6 w6 D& H% e- t
                        row := assignLObj.getRowNo(GlobalDistObj);; {2 w* U% q9 t% x4 R6 }
                        if Row = -1 then -- since 70
( ?& x/ q1 N7 r4 t: e                                if lan=1 then
* s% }0 y, c" t' ?- t3 y6 T* B. W                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),4 a$ G- R! e9 S/ V& X
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
5 u; @' v8 ]$ ^" ?                                else0 E9 c/ w* ]1 @5 `
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),' A" y, @+ x- C9 G, \& f
                                                to_str("in docking station: \"",?.~.name,"\""));                                  y& G9 B: E8 l. G$ B
                                end;
. q4 H% u6 m) r                        else. E; P/ Q- t3 ]' k% i
                                @.Destination := assignLObj[1,row];
/ K! E# }  L% K1 r                        end;                        2 Z" |1 I& [; r( ?0 W
                        newDirection(@);
( w8 `/ \5 m, t2 ?" f) q* P% c                        @.HasOrder := true;
' i8 @8 `/ M& I7 ^* k1 H4 l7 _                end;
# k+ G" m) E. h/ \8 r        end;* p) B$ t0 }* L- b
end;        -- of the method3 U. m9 n3 c8 q" z5 N
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 ) p, E4 q3 M& ?( [+ [
" O& Y, E+ y- }! h9 Q3 H" \4 q
这是AGV_putin中arrive的method。
% N/ V$ z/ {" B0 x3 I5 o1 D* H- u. ?4 e) n1 w# }
当到达物料速度越高时,这个报警更多,
; S$ N0 X% E" a  b7 p+ n7 p9 D可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
% r3 w* D2 E' k, V程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
: a  J: b0 s% f; A: U3 S  t) H
9 n9 I1 \+ I4 ~! L9 C8 y另外一个小建议,就是move,所有的move都可以这样" M" J% @3 K5 X+ o* e
if not move() then debug end# {4 ~) X1 r  h" P
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。; b2 G; d. j  j( s
plant simulation中的free libraries有AGV模板,
4 l0 W0 B! h9 K3 `- b2 [里面也有案例。( J$ ^2 Q. d( {$ j( r: T- \
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。/ Q: p. ]( X3 u; h

  ~3 b$ _/ L" Z& B3 n我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
% f$ y+ J% G* d3 L, n: d; j5 I
* @' }( z$ H; N: W% F5 G* {& g那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
7 u' K/ @) p9 y6 H  D这是AGV_putin中arrive的method。% Z7 I( s$ w2 p/ n+ T- k3 H

8 U* J9 H, w( L2 f5 n当到达物料速度越高时,这个报警更多,
7 N  t; s9 Z1 v2 P+ K4 S7 S# F
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-8-17 20:15 , Processed in 0.022548 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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