设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9987|回复: 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'4 ~) E" H. X5 \/ r" _! c% l9 [- v9 ^
*/
; k, ~2 r; j, l* |, [is. d2 o% @( H' P+ G0 \1 T
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
- S+ Q* S1 e5 ndo6 b+ Y* X- d' D0 o# C
        Lan := rootfolder.Internal.Tools.AOLlanguage;
* ^- v2 I! Q  E! J) }$ _. x        if current = @.Destination -- else return, p, |  \- i* V, v* K, y
        then- E9 U0 O) T  G
                @.Destination := void;0 c. K( t3 W4 A8 A; X+ B1 u
                if @.occupied then
7 r3 r+ x9 L$ {, B                        part := @.cont;
: w& p6 B9 V3 X- ~9 a! k" V                        @.transpOrder := void;
) b0 w0 y) J8 i6 N4 x                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,* y8 x- c$ H6 k2 \4 x  c
                                @,root.eventcontroller.simTime);: N- K& U0 F+ L# x2 d  f- e
                        @.HasOrder := false;/ y2 R1 B( G" U3 n3 J7 V/ D
                        @.DrivingHome := true;
- D: @- T" N+ J$ _+ r/ ~                        rgManager.tryToStartTransOrder;
/ f9 L1 G( ~% o- ^                        if @.Destination = void5 L6 ~& u. C: k. v8 w" `
                        then -- no transport order for vehicle @
* f4 T6 e6 l: \8 ^7 l: w2 g                                @.Destination :=
( r: O3 E2 \' A) D0 q$ r+ J                                rgManager.nearestFreeStation(@,track.~);9 K+ f% H9 B$ v3 W# D  ^
                                newDirection(@);   
4 b, [6 u* u; Z( i& |6 C6 {                                if @.Destination /= void then
0 x( F& W; M, G" c, l5 }9 R                                        @.Destination.NumReservation :=' [1 n; |1 w; g) j/ z5 x% B
                                        @.Destination.NumReservation + 1;
3 V: c( a/ t! }( Y                                end;
, H& S  w+ i7 F" b                                @.CurrIcon := "drivingHome";5 k! `: @! W5 ?, k
                                @.DrivingHome := true;
3 V0 X! n( c! L+ V                        end;: u# x* r- ?4 w0 s& ~5 l
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station9 s' A" S5 Z7 G5 ?& u
                        part := @.transpOrder;6 U" X, y, k/ [1 z) i3 t
                        part.move(@);-- load part
" v4 y- p; L6 t) J5 p- n% ]                        @.CurrIcon := "load";+ i) g8 [) g) a* N+ R# P( u
                        GlobalDistObj := part.globDestination;
5 b3 `& _4 T- y3 O8 L4 O1 o                        assignLObj := rgmanager.rgAssignL;* a6 q% T7 {2 o- Q. D: n0 F
                        row := assignLObj.getRowNo(GlobalDistObj);
0 d* m; \( V3 ~. |                        if Row = -1 then -- since 70& J9 l. t2 g+ Q
                                if lan=1 then
/ [9 \6 R+ N' c                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),5 C! _2 v6 V# g& [( Q4 I* x$ K5 L
                                                to_str("in der Andockstation: \"",?.~.name,"\""));$ c2 {/ Y$ Z1 u- `& c+ U$ a
                                else+ p9 |6 O3 @7 p( F  r
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 C) G2 n" `9 O/ s2 @                                                to_str("in docking station: \"",?.~.name,"\""));                                , ^: ~# s8 u1 e: ~9 o
                                end;" F: T- ^1 h& ~. O: X: B6 l: e
                        else! q! E0 x# I) e0 W  M1 T0 ]
                                @.Destination := assignLObj[1,row];( l& e  ~: w# r$ N$ p6 r% k
                        end;                       
' H) w. E0 q) D6 U                        newDirection(@);  V3 D5 U3 _1 @  e. h
                        @.HasOrder := true;
9 z, c! @/ u0 E' A                end;$ l2 C/ E5 S* T0 H# t& R$ P
        end;5 O" G/ f- G; K9 d4 G  j4 t. O% g+ |
end;        -- of the method5 c7 ]( x. q6 y, d% }
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 # }; |! d. n; @/ O0 B' Z! I9 `. U

+ @7 z' w. _5 g+ M0 c4 P9 q7 }这是AGV_putin中arrive的method。7 ?: e5 L2 T! B% ^, f$ @8 S
& W+ Y, P& I: e& y6 |6 W; B
当到达物料速度越高时,这个报警更多,
( ~9 k9 t( o4 v2 q可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。* t; c0 Z  b4 S0 f! x& U' C! f( e, |
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
5 ^0 x, o- M; T- |% K/ W0 p
2 `$ s- H$ z3 N' E" r4 v7 I, u另外一个小建议,就是move,所有的move都可以这样
! i5 w3 W4 @0 a/ sif not move() then debug end
  I3 g- Y3 [: v6 _% q. K这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
4 E8 F/ _( x/ A% rplant simulation中的free libraries有AGV模板,5 g3 r* J  h  N
里面也有案例。) W% k) [) J4 i  C7 e3 r
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
2 H- F: T/ |7 i! F1 J0 r) L, X$ J8 i/ C2 [( C
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
6 ~% w( B! T  m4 I& B
8 i- j6 @% ]1 g. z; X那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
5 X0 e) B, e, z2 J% P' A7 o1 A这是AGV_putin中arrive的method。' b. Y! e7 s- `( x( s/ _/ v

6 P+ Q% l$ h: {& r: ~当到达物料速度越高时,这个报警更多,
  F- ]6 C+ o( u
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-9-6 01:32 , Processed in 0.022439 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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