设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7190|回复: 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'
2 A+ n! b- J& ?9 r0 Y*/
' e2 t+ `6 E/ i+ u! Iis" i& v2 l3 ]2 q6 K" w4 M% R( t
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;2 |% ?7 j( g+ W% y
do. [- z0 Z0 R' Q$ w! w
        Lan := rootfolder.Internal.Tools.AOLlanguage;! F% a9 n9 o2 n- d9 ^0 x
        if current = @.Destination -- else return
5 A5 U! q% P" u; K9 f5 D8 |4 ~        then
, U1 p5 z) \. u* y                @.Destination := void;
* x$ B6 v* |" p1 x1 r+ j" W                if @.occupied then$ }( C, P) Z; u; V. ^
                        part := @.cont;* }  o7 R" o7 A
                        @.transpOrder := void;7 g1 k; A9 \0 p6 p# g, I
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,5 X  ~1 s6 H8 K/ \& q+ s5 x1 j. D
                                @,root.eventcontroller.simTime);& C* A8 X( b  j# }, t% i8 O" Q
                        @.HasOrder := false;  R2 W# Y# V4 X- j
                        @.DrivingHome := true;) ^  w9 @4 e( @% j( i
                        rgManager.tryToStartTransOrder;& h; y2 s) E: S: r7 N( K8 U
                        if @.Destination = void0 E) k& x" |& H8 ]
                        then -- no transport order for vehicle @
( g) z- }# C1 @, X# x/ T2 y                                @.Destination :=
* @' Y! y! l  M, ^& k                                rgManager.nearestFreeStation(@,track.~);+ ?7 Q5 g7 R  R
                                newDirection(@);   
, n; t% ~% J9 c' o6 t! m6 X/ j                                if @.Destination /= void then
4 C' x$ x- w; W+ u' P$ U, g                                        @.Destination.NumReservation :=
1 n$ F8 \/ h% e( L- G0 F                                        @.Destination.NumReservation + 1;$ ^$ c0 w+ ~1 _6 w  \
                                end;
- {+ g" `* ]' C! @' e+ P                                @.CurrIcon := "drivingHome";
. }- ]& N8 T+ N" m( x4 G: G: a4 |                                @.DrivingHome := true;. F& I& |9 f& |" ^$ H
                        end;4 w7 y2 q7 q. @1 t$ ~/ I
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
( Q( e( b! o, i) p4 R. O+ y! U                        part := @.transpOrder;5 [2 f( d1 j, d) H: g; a1 u
                        part.move(@);-- load part
; V/ o0 B- z. U9 k                        @.CurrIcon := "load";0 r" \1 u: a9 }5 n3 B5 n" m
                        GlobalDistObj := part.globDestination;# N( {+ i$ B4 `5 q+ h5 b- D
                        assignLObj := rgmanager.rgAssignL;
3 j$ c/ K2 u! D/ E, M% [8 P+ V                        row := assignLObj.getRowNo(GlobalDistObj);/ U/ V+ ~: k- f1 K
                        if Row = -1 then -- since 70
9 W7 e* c% d' Z  C( z5 l. _+ B                                if lan=1 then
. w( o4 W$ i6 U                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," c6 Y/ L$ n* M3 s
                                                to_str("in der Andockstation: \"",?.~.name,"\""));9 y( ]3 k# Y: d! A" z8 L
                                else4 I+ s4 ^6 I0 h& F/ f0 }
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),) e; S9 ]& O. t* C1 o/ i
                                                to_str("in docking station: \"",?.~.name,"\""));                               
' T0 n5 Z2 C2 e+ E  W                                end;" e- d$ n. l# y( v6 y+ B
                        else
) ?# Y8 K& C% K1 ~, `' R! q+ }                                @.Destination := assignLObj[1,row];5 a; p9 i. S& V" N, ?( |
                        end;                       
4 N$ K1 ^- C3 \3 T- k2 n: _                        newDirection(@);
/ s* }3 q8 A8 |4 E                        @.HasOrder := true;
& i+ h& ^2 u0 z0 A8 Z' c                end;  |5 p2 \( p) h8 b
        end;
4 W. N% N1 Y* u6 H; yend;        -- of the method
! N% E$ f+ ]) U/ T1 L" M1 m) t
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
$ j; F7 N  Y% O) D
+ E# M9 \7 M4 H: f/ Q0 A, S- L4 R这是AGV_putin中arrive的method。
3 a# F6 B% ^0 a' e7 P( Y
- F% H5 b( W# k, ]2 J当到达物料速度越高时,这个报警更多,
! K) N4 ]. J( s) w可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
  ]4 w6 \$ B( M3 U/ h( Y程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?5 E( s# O* i  I8 ?+ c3 N: I" U
0 ?5 |: N& [/ E
另外一个小建议,就是move,所有的move都可以这样
1 k& I% ]$ M+ A( T$ G* g( g& l! fif not move() then debug end; }8 L- m2 w4 Z" A- C/ [
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。' w3 `( r) F  d9 ^2 R; D* m
plant simulation中的free libraries有AGV模板,; n  a0 E% L: r  o$ T, C
里面也有案例。
4 _# l% L- ~& X- s/ R& r' j0 c我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。9 z+ {; r$ Z9 ^0 i/ ^

) z, w! O6 i* d我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
% W7 h$ R# e8 @! V: R0 v; m. A
# V. D5 B5 Q+ ~7 A( |' S那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
5 |' h' J" L2 \& e这是AGV_putin中arrive的method。: K  J# w# _3 D- o" ^
4 D& \) f1 l( X
当到达物料速度越高时,这个报警更多,

0 A9 M0 J) b$ s) G" f; |: G另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-25 23:21 , Processed in 0.019427 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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