设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9195|回复: 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'5 P7 J4 K4 H7 a3 P  V5 \' f6 U. M7 B
*/
+ V7 P( Q1 f" \0 qis
  l8 C( M9 q7 u0 [  ~        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
8 n$ {( b( N% A4 u, Y3 G* w& wdo
: a1 J0 E& ]1 l6 p0 ~        Lan := rootfolder.Internal.Tools.AOLlanguage;1 h# b! \- C9 y. N
        if current = @.Destination -- else return
& h! w7 d& J% Q( t* c        then) k+ Z( {& E2 T! N- l; h% l! |
                @.Destination := void;
. T+ s+ ?3 o  J, \% ^) x7 e) X, y2 W                if @.occupied then
7 l6 P% Q6 o; V                        part := @.cont;2 @  y( N: L! f- V# u
                        @.transpOrder := void;
) I( ^  I5 g8 O                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ L2 F% C# d) _* ~" c' {: y                                @,root.eventcontroller.simTime);
! ^' W4 Y, x( i5 |                        @.HasOrder := false;2 l$ s/ j) A1 O4 g( G! T
                        @.DrivingHome := true;
2 r+ D! y) {3 c9 U# f1 q" H- m                        rgManager.tryToStartTransOrder;
+ E. u# u  [  \5 r                        if @.Destination = void
" G1 d+ L- J0 ~, J) u$ m                        then -- no transport order for vehicle @0 ~7 y; K* }4 W% \/ b% n) r
                                @.Destination :=
3 o/ l& L+ @& W+ G+ X8 j9 G% C                                rgManager.nearestFreeStation(@,track.~);8 x  J- P2 s$ h: |, E
                                newDirection(@);   
- E6 w  s+ n  u) q                                if @.Destination /= void then
) z$ F- z. R/ C& S5 A: r* I1 ^                                        @.Destination.NumReservation :=
( A8 G- o8 F4 p' Z% |                                        @.Destination.NumReservation + 1;6 O1 U  s7 x' I( b' u1 J
                                end;
/ J, Z- l5 l1 ]0 \; K                                @.CurrIcon := "drivingHome";
2 Z* U: {) J" f; u1 W                                @.DrivingHome := true;* e6 t+ @" F# v2 B4 ~
                        end;
- s' i$ w" T3 e8 J8 S                else -- the vehicle @ is empty, both vehicle and part are in the same dock station" c' ^5 B3 ]. N" \( N
                        part := @.transpOrder;+ H  K# t6 ^" h0 b( {; F& Y6 _, y
                        part.move(@);-- load part
: K7 s; ]2 J0 j4 o1 E2 J8 a  I% u                        @.CurrIcon := "load";
% Q9 P: W+ n/ [. S0 M. x                        GlobalDistObj := part.globDestination;
- S, o+ ~/ Y5 V, R( j; x                        assignLObj := rgmanager.rgAssignL;" N6 U( B. o# Z  x" y( ~5 Q
                        row := assignLObj.getRowNo(GlobalDistObj);. p9 C( ^9 c3 Z0 K2 t
                        if Row = -1 then -- since 70
0 ~; ?, ]% f0 G) c                                if lan=1 then
: p- Z( w2 W% V. O2 [& I9 n                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 k' U  ?" Z" z0 Y: v1 O! H& r8 m                                                to_str("in der Andockstation: \"",?.~.name,"\""));
6 f7 f: f* y1 u. N. k6 `                                else
3 i$ \: C2 r" c' W8 x/ h7 c3 M6 D4 Z  f                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) F7 w' w/ V- a. \2 M9 G: N                                                to_str("in docking station: \"",?.~.name,"\""));                               
  }: W( H1 H- A/ x. j! c, D/ a% ?% c" E                                end;
8 ^( i+ {) e3 k/ l" x                        else
2 U+ A9 T/ W% N& b                                @.Destination := assignLObj[1,row];" [" ~1 d, `$ X
                        end;                        0 C# S5 |- g0 F- Q% R1 G# L! }8 V
                        newDirection(@);
9 f( Y4 X( m% X- f# y                        @.HasOrder := true;
1 O" ~8 V0 u' a+ L                end;/ L. [1 n! [* a/ K  H; F; |+ e: z/ D) V
        end;+ d  \' c! N+ I) ~2 y
end;        -- of the method0 k% b9 t6 @) ~0 d
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
! f  l( @" D& k3 {4 Y4 w9 N: E8 ~
这是AGV_putin中arrive的method。% s" m3 c( M; Q, A# N
8 U. c* x- h- c
当到达物料速度越高时,这个报警更多,
4 p; g; x' x" `9 Y# H+ G可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
& n- i; _3 g! [+ B8 B程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?; p( J& V! x% R2 _9 U. p0 N# B

7 b+ Q: v# [% G/ b3 A+ M4 m3 x. {2 d另外一个小建议,就是move,所有的move都可以这样
) u! [6 `7 K* Gif not move() then debug end) m# U8 p1 G: h! v3 D
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。5 a6 B6 d! W. ]
plant simulation中的free libraries有AGV模板,
6 p. F6 R3 y( u3 D里面也有案例。( c' D' J. Q% c3 x- J+ p
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。  j% ~, d9 g. v- P- {5 M

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

: V$ S7 B7 {( d7 @1 l' S那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
: ~9 R. `8 L8 }4 c) e8 I5 s这是AGV_putin中arrive的method。
8 u* Y. A1 C, f7 s6 S! y8 {/ `( r( _8 y3 ~8 ?
当到达物料速度越高时,这个报警更多,
& q) a+ @7 U5 q0 H& z, G
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-18 21:38 , Processed in 0.016828 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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