设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7842|回复: 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 L7 C- j5 g; g+ l4 N8 w; ~
*/
$ V! \9 S& p8 L8 O$ e! V7 bis) t6 N9 e& E# z! [6 F& q
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 M4 r, I1 n/ U( d
do! L: B0 v6 R4 o4 h2 _) [" C8 ?
        Lan := rootfolder.Internal.Tools.AOLlanguage;) z+ d% q" {2 f# L( X0 D
        if current = @.Destination -- else return7 j) l# {) w% n! Q+ E4 P
        then
" v- c  b, }' c( _( N2 m                @.Destination := void;( l4 d% V& x+ ]  R7 M! a8 W
                if @.occupied then$ V. S  y. A8 m
                        part := @.cont;
5 P: F+ t0 V0 M                        @.transpOrder := void;0 Z6 L9 r4 \" o: u$ U2 ]
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) T# F- X: {8 N2 c0 [: {                                @,root.eventcontroller.simTime);
: w& e, D& p2 x; @; f2 j! r& m                        @.HasOrder := false;
# ^! b7 \- q- Y% Y& H" |                        @.DrivingHome := true;
- F3 j0 a- X  R( f+ C                        rgManager.tryToStartTransOrder;* {$ |  i. X. m( t  a7 C6 z! L
                        if @.Destination = void3 M6 m% }$ i% j( `
                        then -- no transport order for vehicle @
4 m* m1 D1 X8 }: Y) m5 k5 F2 n                                @.Destination :=
+ g" ?1 @1 [( Q$ P8 |1 E  j                                rgManager.nearestFreeStation(@,track.~);) d7 q1 Q  B& T/ I( Y
                                newDirection(@);   
6 v$ m& a3 n/ g1 Q& h7 I' b. E) s- m' l                                if @.Destination /= void then2 m; i' {4 E$ e: t6 ^
                                        @.Destination.NumReservation :=8 [" V4 L, [+ g# ~1 u! [
                                        @.Destination.NumReservation + 1;) L: ^) i# T9 w
                                end;4 h5 i% U: J: S6 t. \
                                @.CurrIcon := "drivingHome";
8 k' D6 P9 E+ v7 @  a2 R$ w7 s7 z                                @.DrivingHome := true;
4 j1 c+ z" n, T3 U& u  F5 W                        end;
. t7 ^+ T( T# N+ Z! o                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
8 I( f5 }  x% E  \3 p                        part := @.transpOrder;# u, A+ q" I2 ?+ |; ?1 d
                        part.move(@);-- load part
" V9 S4 |  H* l6 D" G; @                        @.CurrIcon := "load";: v8 k# F, l: \# v, i  L
                        GlobalDistObj := part.globDestination;7 T  Q: E: u/ A( Y! D: L
                        assignLObj := rgmanager.rgAssignL;
% ~& x# V( ^4 W  Q6 I4 Q                        row := assignLObj.getRowNo(GlobalDistObj);, Z" I3 T4 p4 O  m( U4 L
                        if Row = -1 then -- since 70' g, b, r# z9 B4 O
                                if lan=1 then
0 G2 t" q+ l! j% o6 Y7 _) t                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),+ u& H4 u. m- |; V
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
6 m  z- G( b+ M                                else
$ o7 H4 ~8 D! o; k2 K8 F                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- m% I% e7 p0 f! z) M                                                to_str("in docking station: \"",?.~.name,"\""));                               
8 P  R* L. e# y# p- Y4 e& V4 V                                end;
, @- |! n7 X0 ]8 d5 G# l7 b                        else! B. y3 u6 z. R- ?3 d. ?7 E; L& R
                                @.Destination := assignLObj[1,row];
# _% N: M' X( k9 ?' \( Y                        end;                        # S- E7 Y5 L8 x; P* s$ W4 Y
                        newDirection(@);
0 F9 F& s3 ?+ x& X! c3 Z                        @.HasOrder := true;
- P+ A! q8 E, \, T, ?: U6 T                end;) C0 A' C4 M' g. I& M( S% P
        end;
% h6 _% U  e5 M) h; m" Vend;        -- of the method
3 V& B( T: w( U+ W$ `" |1 D* d
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
9 o# Q1 q' ~4 S3 u1 t+ M4 M3 I6 U2 }" u: @
这是AGV_putin中arrive的method。1 U0 a3 J0 w$ r/ }
+ y% K0 X4 x+ n& Q3 w0 c1 ~6 X% y
当到达物料速度越高时,这个报警更多,
# y$ t( E  \7 s& A1 s6 X9 T( I# T可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
( k% M2 i* E) h9 C/ {* f! L- N程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
. Y1 Y. r4 q/ f! p) f, R( G5 }
另外一个小建议,就是move,所有的move都可以这样' j* V0 t# T+ z2 q$ N- H
if not move() then debug end
  g1 g3 ?' A0 r- p: |这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
8 A' I2 g' \! n* k3 Yplant simulation中的free libraries有AGV模板,; |( \& Y! K5 J6 P1 ^2 J
里面也有案例。
' Y0 X" G# G; m) ?我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
# `1 o, b4 Q/ n+ \7 e- o, H# l- O0 P% s
6 X6 j& F: R- g5 Q我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 ( e. V7 L5 e# r! i4 H. H
8 Q- J0 a: ~) }% a  F
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
9 \5 {4 i$ \  X这是AGV_putin中arrive的method。  S( q$ k) b9 r3 J+ A

) ?" ?! N+ D& g* U& O/ D  B当到达物料速度越高时,这个报警更多,
5 Z- |3 g, A6 P3 P; W
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-1 13:13 , Processed in 0.023006 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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