设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5430|回复: 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'6 F  l/ c6 Y& _. s/ w5 q9 t) v
*/+ {8 C8 m' z0 A3 R6 C
is
, v% g8 w6 u% q9 t        part, GlobalDistObj, assignLObj:object;row,Lan:integer;; P9 k' B3 R5 k9 v# q8 K
do! v- N/ b# l7 x$ b( z; i
        Lan := rootfolder.Internal.Tools.AOLlanguage;+ z8 J5 o9 m0 l
        if current = @.Destination -- else return
0 q% o0 F, ^! q& m; a        then& Y4 C, x# i' W5 H& a
                @.Destination := void;
# L8 W5 O1 i% ?7 W                if @.occupied then% G! t# U; Z" A6 w: ]
                        part := @.cont;
5 l- M) o( m( W) A$ w/ b# ?6 x' K                        @.transpOrder := void;' l" f) D, Z! Z+ `" y  p4 I8 [* J2 _! L0 D
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,, F/ w5 t& A9 Q4 A
                                @,root.eventcontroller.simTime);
  P- O; d0 e1 Q                        @.HasOrder := false;
# Z0 F; s- Z; d3 J                        @.DrivingHome := true;  P# p, C- c7 d$ V- }8 |1 s
                        rgManager.tryToStartTransOrder;( O# ~# Q% o! w" P: `% y+ `
                        if @.Destination = void
$ N/ v* N* K. O+ `* n                        then -- no transport order for vehicle @
# P% {0 h& B# i2 c/ ]; g5 I                                @.Destination :=5 h8 \* M) ]6 K5 q
                                rgManager.nearestFreeStation(@,track.~);
' x: P5 m# t5 Z3 |4 x- X" F                                newDirection(@);   
" s2 h/ S& i; z+ ]                                if @.Destination /= void then
6 ?- v5 l( Z+ w# ]  Y. L                                        @.Destination.NumReservation :=
( {7 z+ @$ Z( u: G                                        @.Destination.NumReservation + 1;
1 Q) p+ ~' r( \3 I1 u! c                                end;
: \& ~3 i% D: R; z. H. f. D! A                                @.CurrIcon := "drivingHome";- ]& N$ V* I& m2 B
                                @.DrivingHome := true;1 b. x/ W, I# O7 g
                        end;
8 Z! {0 H( l7 I                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
7 C) a& q6 O& x+ l: b                        part := @.transpOrder;
8 V& `8 Q/ @1 @4 x; Q                        part.move(@);-- load part
0 _+ y% r9 n+ q                        @.CurrIcon := "load";
& Q, W& p( s' g9 K& p( _1 z" \                        GlobalDistObj := part.globDestination;) b8 @8 ]9 \& Q% F. I: S# E; {2 ^
                        assignLObj := rgmanager.rgAssignL;
/ J: r, Z5 Z0 O8 X8 E                        row := assignLObj.getRowNo(GlobalDistObj);4 m- v% L9 r/ t3 ^9 M; c7 t6 i$ ]
                        if Row = -1 then -- since 70! a7 ~/ y4 A- A3 \  u
                                if lan=1 then
& p( Z- e4 v3 D' B* G                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),' X& u0 ?' i' N# |  P& p
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
: L" G$ k) B# f/ M6 \' K) U                                else" B/ q$ q5 y% p' I
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 N/ j0 f8 i& s' ^                                                to_str("in docking station: \"",?.~.name,"\""));                               
# N7 ]! d; z" A7 ]' b- |                                end;
+ f5 p; U% e- T                        else
1 Z8 K5 o) ~7 Q- ?( S                                @.Destination := assignLObj[1,row];
7 @0 C, X) b  ~) ^) F" i                        end;                       
! l) `/ {( T0 p9 E2 T% H. F2 A                        newDirection(@);
5 r& {- t+ Y4 y0 X4 l( [                        @.HasOrder := true;$ [5 S2 E7 y5 U
                end;1 @; s/ v! p; m: b
        end;
/ H6 c  b0 b+ O  r" send;        -- of the method
2 \9 b1 }- Q: T% `- A
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
( S/ Z" w& }: A; |( s  {5 u- G' u5 o
这是AGV_putin中arrive的method。4 p7 e' s# r$ S/ C( u
. g+ o9 N0 X2 m+ N; v# q
当到达物料速度越高时,这个报警更多,
: J5 U$ v2 O7 k. `可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。. \- m! i7 r3 M7 }
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
+ f* Z7 J; v  n) y1 d! g, f$ K- y4 _
另外一个小建议,就是move,所有的move都可以这样
# x% h. E! Q. a$ D% Q2 ~' {if not move() then debug end
  Y+ z7 ^) t6 h/ Y这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。7 D, L% H6 R1 W
plant simulation中的free libraries有AGV模板,
6 J3 }4 P5 u- w$ X6 [里面也有案例。6 N$ `' R9 M/ S4 t- x/ d& l
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
  E) h  [8 w1 L5 x2 l) C2 G# E% \* q. i8 [. p2 t: e, W" r
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
3 H$ W4 x$ q' e+ e0 {) B
6 H* W! y" a" \4 y; h5 @, U2 |那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ) M' n& |& J4 r- e
这是AGV_putin中arrive的method。
8 K& z7 k1 c# _
8 {7 Q9 z( y# x0 E$ {当到达物料速度越高时,这个报警更多,

3 w: U1 |# D8 G2 O3 J8 ?另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-11-23 15:53 , Processed in 0.023682 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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