设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9312|回复: 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'
& H0 `$ I5 E2 m+ r" P3 c% H1 h. \*/" _' @9 `5 a& \: W+ B' v; L2 i
is1 M1 f0 b8 }5 u
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
  i& G! P* e* h' Y6 l! ?% \3 s  u7 _do& S. s+ X  z% f" J6 ^5 D8 U$ l4 t
        Lan := rootfolder.Internal.Tools.AOLlanguage;
! H) l( ^( R! j, _6 f        if current = @.Destination -- else return- i4 E* {1 i- r3 h" n% K1 l
        then! |4 X5 Y8 ?- I! h5 f9 }
                @.Destination := void;4 c, N' D4 J( S, @
                if @.occupied then, F! s3 H+ ?, A; ]3 E
                        part := @.cont;1 e6 C, u+ a8 c: f$ p6 A7 b
                        @.transpOrder := void;7 {0 V- v# E0 B7 _6 _0 y3 p
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
6 `/ {9 r$ G. s- Q                                @,root.eventcontroller.simTime);* u8 h( ~& G; O. S4 A7 y8 C
                        @.HasOrder := false;
& i5 S3 _  Y! a2 ^  X4 C! g2 ~! m$ S) b                        @.DrivingHome := true;8 Z/ p, @% k: N0 Z9 H8 w$ x
                        rgManager.tryToStartTransOrder;4 k; Q( Z) Q) ?5 @
                        if @.Destination = void6 m# c7 P3 e3 J% A; u+ D/ H
                        then -- no transport order for vehicle @' M6 C6 o* H0 B7 m4 i& {; s+ j
                                @.Destination :=
8 C/ }# c! U. w5 D. _: O; c5 B                                rgManager.nearestFreeStation(@,track.~);
, Y4 [1 V  J; O' H1 R                                newDirection(@);   
: S2 |& r- l* B9 z) s& }                                if @.Destination /= void then7 g) @- a4 n3 Q. T; i
                                        @.Destination.NumReservation :=
' o$ h% \$ z9 g6 s; |                                        @.Destination.NumReservation + 1;# C1 _( ^) ~) Z% T2 g7 h% ^" |
                                end;" D9 T! B! S- l
                                @.CurrIcon := "drivingHome";/ G. o" ]4 C6 {9 [0 P. k; k) C
                                @.DrivingHome := true;
+ ?% S, }" P- R! A7 M                        end;$ N! X- m5 |; Q5 l/ z1 S. [
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
: s. \9 I0 Y# d$ {4 F                        part := @.transpOrder;
  O7 u2 f: d* x4 K! a# P, A                        part.move(@);-- load part2 e1 }! z# W3 ?1 Z& b6 D
                        @.CurrIcon := "load";/ L- [% r$ ?6 ^2 g9 r6 H* w% i  q
                        GlobalDistObj := part.globDestination;
  m- a3 C: Q6 X7 T; q                        assignLObj := rgmanager.rgAssignL;; u4 w( Z( Q- t
                        row := assignLObj.getRowNo(GlobalDistObj);2 s" Z- x! E% O/ f( ^8 A
                        if Row = -1 then -- since 704 L$ k* x' O+ q  p0 Z" x  @
                                if lan=1 then
# q. C. d0 {* E( A                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& t/ u. x' ?1 z2 y
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
) S* p7 O, W1 f6 A# ?                                else
. X5 ]9 d! S5 F                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),  `+ L( @. x( x( N8 _
                                                to_str("in docking station: \"",?.~.name,"\""));                                ) I" h* O0 ]2 p* o
                                end;
- f2 C* l7 O3 Q8 u: @7 {                        else
7 L  T7 W$ E: n0 C2 U5 Z. Z                                @.Destination := assignLObj[1,row];
. @7 s- a' u" O3 N. E5 p- p: o                        end;                       
7 G) j1 C" N( O3 ~: H                        newDirection(@);$ O1 ?8 C$ N' Q6 M( K/ v
                        @.HasOrder := true;9 p  s8 [8 @7 d. {2 I3 {! V3 J
                end;
: H8 o8 d; P/ M6 h7 H* m2 Q        end;# g/ }  e. \; u6 N
end;        -- of the method9 c" U" `9 b3 j. Z4 M. ~
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 + v( |0 H5 ], o- P% x5 z

* }2 Z! p! h$ m6 |7 S这是AGV_putin中arrive的method。) m/ X" g9 T* [* K

9 S3 N" r6 L7 r: V* P) m) N当到达物料速度越高时,这个报警更多,: ]  i; ^; w, s0 t2 V
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
9 |9 [0 ^" s! ^3 S. A程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
3 _' P9 h5 x5 n- @1 ~7 ~" v1 Q* w  M. @4 l
另外一个小建议,就是move,所有的move都可以这样
& B* X7 i' U+ v% G9 ~if not move() then debug end/ F0 j! j: H0 z. ]* k' L9 X+ W0 u
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。- ]* ~5 L1 U, {% f" U
plant simulation中的free libraries有AGV模板,- i  m2 {7 d5 s% U9 s
里面也有案例。: q+ `& O$ _5 p$ j( o- X1 d
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。1 p$ u# k' m7 S$ Y$ w$ G& A. D

: _# M6 z. }8 p8 i1 `3 ]' o我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
' T& ]9 [/ M3 z  {6 @
9 e* U0 q- j; a那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 # ?8 S! j. N9 N6 I" j
这是AGV_putin中arrive的method。
8 w- A/ }+ m+ m) R: g( o  Z% G  h  |6 ~# u9 g/ p
当到达物料速度越高时,这个报警更多,
- L3 q1 N7 m% F) Y  T- S
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-24 18:44 , Processed in 0.023943 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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