设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7912|回复: 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'- O' A" m) X+ g
*/
3 r! l/ j% Z3 |3 x- Gis* ~: I; e: c( Z1 i$ s+ ~' x1 B
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
$ i1 ^# j. T3 I5 D( V' Sdo& b/ o3 r. H& M) b/ r
        Lan := rootfolder.Internal.Tools.AOLlanguage;
- \7 H7 R* F4 W4 v0 p+ ^' r        if current = @.Destination -- else return4 L! V; E6 x- ^3 F7 m: }! S  r7 T
        then+ m: O% R4 Q4 ^" H/ ]! A* M
                @.Destination := void;0 _' \) ~( E; G4 w, q# F
                if @.occupied then9 B& T% ?% A6 Y6 }* Z% i# k
                        part := @.cont;: C$ {4 ^# P; p% |
                        @.transpOrder := void;
0 f: W# s* ?* e; F) m                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,' q# o- [$ |6 @# s1 _/ L; g* F
                                @,root.eventcontroller.simTime);6 ^! Y; E- C! _7 q
                        @.HasOrder := false;
1 B2 u4 Y7 Z6 x* K                        @.DrivingHome := true;$ B9 C; x0 V& i7 z% i
                        rgManager.tryToStartTransOrder;
' V8 r/ _5 _, F7 g# \8 ?" M2 j                        if @.Destination = void
/ t0 V7 ^3 V8 k; {9 @                        then -- no transport order for vehicle @
3 T8 R$ \" t4 I, Q                                @.Destination :=& V4 r( M$ I/ C9 l/ \+ x' k
                                rgManager.nearestFreeStation(@,track.~);& S" ]! Q6 B- P
                                newDirection(@);   
# ~! z% c% ]/ s/ P6 [7 x' x                                if @.Destination /= void then
$ J1 @: T' \4 M/ Q5 o                                        @.Destination.NumReservation :=# z' q& S7 D, {( ~/ H6 n0 s" }+ W, `
                                        @.Destination.NumReservation + 1;% Y* R" D+ L  r' Q) `
                                end;
, S% z- {9 Z+ q% t" W                                @.CurrIcon := "drivingHome";, u' R5 L5 T, y! ^
                                @.DrivingHome := true;/ m7 Y! [1 C7 o: d( C+ k4 `
                        end;
7 b8 @+ h/ L! C5 w- _- E# V+ ?                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- ?% }' p# a% O1 n. z                        part := @.transpOrder;
) q- }$ S, t1 l! L4 w6 M1 S2 Z  I                        part.move(@);-- load part
0 C$ g) n1 d$ {2 v( {                        @.CurrIcon := "load";
1 b3 _1 \3 o5 g, ^. W                        GlobalDistObj := part.globDestination;6 t( L$ @0 }2 V2 }; b" z/ E' e) ]: E
                        assignLObj := rgmanager.rgAssignL;) c/ P; ^, `! ~
                        row := assignLObj.getRowNo(GlobalDistObj);2 X3 r' A4 B0 P* D  \/ Z
                        if Row = -1 then -- since 70
. m; u1 R$ }: M- H; L6 _                                if lan=1 then) t) Y' p+ a* n, A1 s
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),) g$ T7 P) {1 S' \; V8 q
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
  `8 |7 _+ n( O, C" D3 x                                else
3 A$ z: f/ g2 V3 G  a                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
+ v/ {9 d3 D0 o$ l: B. Z7 V                                                to_str("in docking station: \"",?.~.name,"\""));                                8 Q, r/ o* o2 s, R2 v. A/ L
                                end;
  L! {; y8 W. @7 t                        else4 ~/ C, K$ [/ N/ Y  B6 A/ D
                                @.Destination := assignLObj[1,row];' d5 J3 Y# ~! |4 s# t6 S" \
                        end;                       
; v6 c8 h! X' b. S                        newDirection(@);
0 P; i4 K8 J7 l2 B' W: `- ~1 p5 u                        @.HasOrder := true;
$ A) c5 v  o; ^9 s) U                end;
" A. A6 J5 d8 v% p: j% D; T8 ~        end;% C* |( u5 b( i/ `
end;        -- of the method
; y- k" V% ]1 [- u* W; k& T
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
) D* Z9 F% [7 J0 {! k9 h# `
, r. f4 ?8 x( P) g% b( c% Z$ D这是AGV_putin中arrive的method。
  n) ?* D0 e2 ^, T, w; K" I) Y, E$ N" n: ]5 S; Q
当到达物料速度越高时,这个报警更多,- P. `  j7 a& @+ }3 i% ^
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
9 n* Z/ X7 ?2 N$ m程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
. m3 u" m* _! L2 q
6 |1 O2 W! o$ t" y- c另外一个小建议,就是move,所有的move都可以这样
% j/ R# [  h( }- I; ~' eif not move() then debug end' z. J. v; \) B4 d
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
7 I# q* Y, {1 e. _5 a' Yplant simulation中的free libraries有AGV模板,7 E! ?0 n, \4 T' ^8 }  G& q, O6 K
里面也有案例。: h8 l" }0 _  Z- b3 V7 u4 M6 m
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
* l9 Q# G% ~9 t, Q/ Z. q8 R* w  Y" T4 Y$ c
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
8 N: K3 c( z7 Z" t+ ]. e8 v$ v: W! P& M7 g0 g+ f
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
1 s, C$ x- z# q$ @7 J: T这是AGV_putin中arrive的method。" k$ y: N9 U; c7 L# A' [, J
! X& x& c4 [6 Z4 X8 T
当到达物料速度越高时,这个报警更多,

9 c, d+ B; V  P+ B$ U: y另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-4 22:56 , Processed in 0.020766 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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