设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6547|回复: 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'( R. N8 t) s% T/ A' ~; h* g
*/
" U% G0 J# K9 M+ _% W& Pis) T, D, x, s( D2 m0 b
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;, e6 H: J1 S; L1 T8 v) ]
do
0 j' j0 {" y1 |$ k9 \        Lan := rootfolder.Internal.Tools.AOLlanguage;4 H* E# N1 D7 F8 I: v- }
        if current = @.Destination -- else return4 X  U8 ?) Y( o$ r, ~4 h
        then
. W1 J' \# V. N. c, w8 i% s2 I                @.Destination := void;; `' g" J' Q1 o- \2 N- R) N
                if @.occupied then
* w1 U5 c5 P3 F/ o0 J                        part := @.cont;; q# R& Q0 t/ V) G2 z; z9 c3 I
                        @.transpOrder := void;
! l) |6 \$ T3 D# I, a& C/ Q2 `                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
# }, u% J4 }7 v% a+ m                                @,root.eventcontroller.simTime);- F+ u: ], k5 U4 q  ~9 e7 ^
                        @.HasOrder := false;( {3 @$ ^9 `8 {' T) g
                        @.DrivingHome := true;7 O5 c& t+ ]' `
                        rgManager.tryToStartTransOrder;
+ J3 {* i: p/ `5 [1 m% b                        if @.Destination = void
# V, Q4 S: a8 t6 e' y' N                        then -- no transport order for vehicle @
1 c  `; e, ]$ }4 @$ ]                                @.Destination :=
* _- c: s+ @& }: A) _5 M2 b                                rgManager.nearestFreeStation(@,track.~);
. A6 E' |& H* K& k, ~7 t                                newDirection(@);   
$ W# |( e0 T# O$ \                                if @.Destination /= void then
" q3 w/ Y8 \" \% V# e, G5 o                                        @.Destination.NumReservation :=
) r7 T6 ~7 c9 d( x8 A; T1 b' v                                        @.Destination.NumReservation + 1;
0 C- F1 g; l4 n                                end;& Q9 o$ W4 ~9 I/ i, L6 U0 u
                                @.CurrIcon := "drivingHome";( ^# b! Y/ M( K1 y7 \! T9 U& ~
                                @.DrivingHome := true;! ^+ i2 O' @5 K! X( X9 F! T
                        end;
3 X; y9 ^3 d  n                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; S7 Q% j# v6 U- e5 V4 [+ A7 [                        part := @.transpOrder;
, q8 d0 k+ u9 g' d" q" T. a/ h' r                        part.move(@);-- load part' H6 [3 c2 w+ g6 T. f" Q
                        @.CurrIcon := "load";" k9 O3 h& m' F: v. f  x
                        GlobalDistObj := part.globDestination;0 c, k/ a+ R! I4 W. k
                        assignLObj := rgmanager.rgAssignL;
* B  i3 \. y! n; [9 ?                        row := assignLObj.getRowNo(GlobalDistObj);! p* ^" Z  h- r" Y' X! ~6 k6 F
                        if Row = -1 then -- since 70
6 e2 i& |" a3 o/ q                                if lan=1 then
$ h; n) o6 v, |$ V0 p                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 F8 ^; E4 v" d9 w  V
                                                to_str("in der Andockstation: \"",?.~.name,"\""));/ A8 f' V: n4 |  m) X* i3 Z
                                else# A1 o5 X% }. B8 I- W2 I
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),% }* S1 W  t; t3 |" l
                                                to_str("in docking station: \"",?.~.name,"\""));                                6 \1 {6 i: z" V; j
                                end;& v0 f# e% ~7 }
                        else. j( J7 A5 a! l' o  I3 L
                                @.Destination := assignLObj[1,row];
6 o5 @& T) ]; Z& ^0 E                        end;                       
7 ?. A7 W7 M/ K                        newDirection(@);' C$ M$ E2 Z  ~5 n9 o5 |
                        @.HasOrder := true;7 V+ C! v( G0 P6 i4 f' E
                end;  @  q. \& o$ D0 b7 t
        end;' p, U% V2 r/ g9 m& i7 ^
end;        -- of the method
: x7 |2 @1 h( d+ X' X$ E
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
4 X+ e& q, O2 Z
5 t* b8 H8 r5 u& H5 v这是AGV_putin中arrive的method。
) z$ T( J  @) p, A/ `3 [7 B" w& X/ R
当到达物料速度越高时,这个报警更多,
( z% q9 G9 f$ |5 N; z0 K- Z) H可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。. C3 u1 W) b2 x# O  U+ I3 x4 Z
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
. U; c5 h5 M4 X: J9 E, r" P, Y  V9 g9 z: z3 |
另外一个小建议,就是move,所有的move都可以这样# B" m! i0 W) T9 o9 N  y
if not move() then debug end
* m3 q1 U2 [& H这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。1 F& R# g- ?/ ^: d; y% Y
plant simulation中的free libraries有AGV模板,6 h% I% p4 d6 M1 y8 s5 m
里面也有案例。
* n' Q2 O3 ?1 r4 Q, W1 u9 H我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。: p$ a: X+ f, {* g9 L/ E$ a

. e4 {, @: ^8 n我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
0 T2 r& d) D/ L- w' b6 v8 b
$ Y7 p, T8 C" j; b那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 6 M2 l! Z4 q& z8 ~5 S( V( r
这是AGV_putin中arrive的method。# K8 P' V8 F( w5 U  I0 i
0 B8 [8 J( r3 O
当到达物料速度越高时,这个报警更多,
  q8 I+ ^+ ~2 K3 N  V$ x# v- S
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-12 07:55 , Processed in 0.019010 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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