设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6445|回复: 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'
( T. b7 t; _: r*/
/ N5 t( v0 g" `6 Yis9 F2 T) e4 ?" a/ o- o, ]
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;3 K/ @3 m" D4 ]; z! F& c8 a
do
2 g2 z9 r0 X0 \) t1 }* K7 e        Lan := rootfolder.Internal.Tools.AOLlanguage;
5 J) Y( N! Z2 p  h2 Y- k2 [        if current = @.Destination -- else return% K; R" s8 _8 A% e
        then* [0 r! o. d: p/ F) w5 b
                @.Destination := void;
8 U1 R2 y8 f. g* q; u) m) F7 Z                if @.occupied then
( {; i5 O, p. l1 n5 L- U# @* {) m- o                        part := @.cont;
$ b1 m; g: H  b: A- K8 g1 c% Z- V, t                        @.transpOrder := void;
0 {+ l+ I) H1 R4 K( e6 W$ y/ J                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 n$ }: D5 r% P6 _1 f$ e/ Q                                @,root.eventcontroller.simTime);
3 W8 w4 F0 [2 s- @  s$ [2 @* j0 t3 `                        @.HasOrder := false;
1 t% T# v8 n! a                        @.DrivingHome := true;
, C; S- G; x6 k8 x3 ?7 n( T                        rgManager.tryToStartTransOrder;3 p2 w3 o$ @9 e8 `% Y
                        if @.Destination = void  t2 f" G& h: d8 J
                        then -- no transport order for vehicle @: o$ V3 h& Z  H- [& j  ?
                                @.Destination :=
$ @4 h' @: o  I+ u                                rgManager.nearestFreeStation(@,track.~);
, u8 s6 {; @$ _- f                                newDirection(@);   
5 e$ g' e% l- H0 c                                if @.Destination /= void then+ L7 R# Z9 y! u. ?$ m( {
                                        @.Destination.NumReservation :=. S: t, J7 g3 h& {+ m
                                        @.Destination.NumReservation + 1;
* Y" W# F1 j  J6 H  U' P7 d" [                                end;3 ^1 w6 h4 O% R
                                @.CurrIcon := "drivingHome";
0 D% o2 L2 g( v8 U) c                                @.DrivingHome := true;
* `& Z  J7 w5 u8 G" d: J, t# O                        end;% Y1 I/ B8 N6 l1 }% s4 ?
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; Q- v# A& V$ l) H, a% i: Y4 X                        part := @.transpOrder;
/ d; ]% k- [& E) F                        part.move(@);-- load part
+ G# s7 I- V2 ~5 f2 a                        @.CurrIcon := "load";6 b5 A: ?3 z( }' Z1 a; n
                        GlobalDistObj := part.globDestination;
; s$ r5 S9 \/ J$ l! J/ e                        assignLObj := rgmanager.rgAssignL;0 t9 |! F& ^5 y, }! Z% l
                        row := assignLObj.getRowNo(GlobalDistObj);
9 c( G* c; \2 W# ?( N( M# g5 z                        if Row = -1 then -- since 70
6 \5 a6 \0 j" Y% e' A9 ]                                if lan=1 then
9 W7 @# e9 P: U1 F- E! g  H& ?3 M$ U                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
2 A8 i+ P8 w8 J                                                to_str("in der Andockstation: \"",?.~.name,"\""));. c0 d) K& H( o5 _/ a7 \
                                else9 v. D' b. D4 i; z% n% _! A
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),' \: e7 j& O. w  J( V# |
                                                to_str("in docking station: \"",?.~.name,"\""));                                ! R/ [$ n9 Z( {9 s; w
                                end;9 Y: e7 r8 k8 m6 Y. p; Z% P
                        else2 T0 x  h  `. u- b2 z; T6 ], R
                                @.Destination := assignLObj[1,row];
4 X2 |; d8 \" Y/ U7 N: A% \                        end;                        6 j- J1 x8 O, a. T
                        newDirection(@);
8 b+ B( }3 t' X5 @; {7 g                        @.HasOrder := true;
8 z, F$ F5 g; \4 b0 B; X                end;
9 J4 C1 P4 R# c# a# t7 k  {        end;
5 B2 Q& L$ E2 Bend;        -- of the method
7 N$ }, J) L- v. a+ N
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 # j5 Q4 m7 D8 [" T/ W

! q0 h% a6 w* a, r; ]3 v这是AGV_putin中arrive的method。
. F. ?6 t# [4 t' Q+ g% B# [2 C( P( I! S5 [
当到达物料速度越高时,这个报警更多,
: L6 S& y4 ~# G5 _; J: Q可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。) e6 p" p6 _1 J* p0 n* S
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?  z) a, a2 j+ y0 c2 R0 l

. [9 c+ S; P. v& v" @+ a% S3 [( e: @另外一个小建议,就是move,所有的move都可以这样
# L$ n* A6 C* b! q* nif not move() then debug end
) j  b- b+ M4 d: a1 v这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。2 f6 V- A( Z" L0 n! ?/ T
plant simulation中的free libraries有AGV模板,8 u+ D6 }$ d6 r% A+ @& r
里面也有案例。6 b6 z8 n% ~- X9 ?
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
* w/ Y  c5 T- c( F5 Q# }% }  t
1 S2 l8 x3 ~, ?7 E我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
, _/ k$ g% }8 z( _" n; @% L( e! f& h
; |: f3 d  ~; S8 g4 U- n那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
- f" t/ L6 i8 W: L6 I! m/ |这是AGV_putin中arrive的method。/ U4 V1 w5 }' P& }0 V7 W9 D
& m' G& D: x( y+ w* B1 a
当到达物料速度越高时,这个报警更多,
  K5 h# x/ }: a8 Q
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-7 06:21 , Processed in 0.018906 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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