设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8253|回复: 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'
! i. y  n/ ?9 B% n4 L& C0 Q*/
; A7 m5 r' C5 ~" bis
: z  u5 X( N6 d6 h% M% f! M, N: I4 m        part, GlobalDistObj, assignLObj:object;row,Lan:integer;% e. F6 y& e) N$ }( g( n  G
do
% q& x5 a+ K+ [        Lan := rootfolder.Internal.Tools.AOLlanguage;
& q$ R* A& ?' k( F& r        if current = @.Destination -- else return7 ?1 ~7 ^( [8 g$ S
        then8 [1 F# N! E7 a( H. I) s& z2 A
                @.Destination := void;: v8 l' \- [% N! S6 ]/ ?4 [8 o
                if @.occupied then
1 w$ y3 S! x& w# \' @  G                        part := @.cont;
0 B0 e. c% H( P+ A/ K                        @.transpOrder := void;: w# \" F7 A% v* p
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
, f" p4 w' x8 E: p! `2 r                                @,root.eventcontroller.simTime);
  E8 @3 G4 P7 z  U+ h2 K                        @.HasOrder := false;  P. @& c4 P. P, H  G$ [) Y
                        @.DrivingHome := true;
/ [# V5 j4 z) @8 l' M7 k                        rgManager.tryToStartTransOrder;
' S7 g- Z# I0 w. |                        if @.Destination = void
1 c8 i% I! p  f                        then -- no transport order for vehicle @0 _9 }+ O  ~; t. v' l
                                @.Destination :=
  v( ~. o& J: o: F6 }                                rgManager.nearestFreeStation(@,track.~);# d3 T5 d3 n6 D7 A+ ]7 y
                                newDirection(@);   3 ^  w% \3 d7 @' a
                                if @.Destination /= void then
5 Y5 U4 D7 t( A) ~. d, H                                        @.Destination.NumReservation :=6 w# _% _( c2 t  @& J1 v+ S1 |
                                        @.Destination.NumReservation + 1;
9 s! f, k# |, I% B" J$ U& i                                end;
5 {% Q. n2 {" A! O                                @.CurrIcon := "drivingHome";
" O0 i& q8 F1 k& C' }3 @6 p- [                                @.DrivingHome := true;
3 @: a1 c) H- r/ M                        end;
. h4 Y4 K2 O& ~6 f/ ]# C3 g                else -- the vehicle @ is empty, both vehicle and part are in the same dock station0 l$ z( d7 Y: O& G
                        part := @.transpOrder;  e  V! _; Q9 B& ^' W  J  }1 Q. @, Y
                        part.move(@);-- load part
) I) k: h) x+ i0 u9 k7 b$ u9 d. \                        @.CurrIcon := "load";
: C7 W$ J7 Z+ R: _- G& u                        GlobalDistObj := part.globDestination;1 G; x0 I5 K. M' S0 H
                        assignLObj := rgmanager.rgAssignL;# @5 Y8 C" S6 A* q
                        row := assignLObj.getRowNo(GlobalDistObj);
$ l9 e- v+ I9 @* e/ l* V                        if Row = -1 then -- since 70
2 B' k7 `+ P7 v$ ]$ N- Z                                if lan=1 then8 ^* s% A; k# p7 G
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),' U' [. t3 k- Z  H6 e' X/ W
                                                to_str("in der Andockstation: \"",?.~.name,"\""));8 P( T$ D# y  V& Q& i% I6 |5 y
                                else
5 e" |/ f1 j/ j) |: ]                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. p1 B9 ~7 q& z& }" |
                                                to_str("in docking station: \"",?.~.name,"\""));                               
7 B2 m3 {! Z& A% S. Z' o, ~' z& ^                                end;
8 t% W9 f$ l1 [- t                        else& Q1 k3 V8 C. M8 h" e
                                @.Destination := assignLObj[1,row];& J$ s- |6 u4 Z# G8 y$ z3 v
                        end;                       
: G/ I  O. X8 i( d$ L% Y, ^* ^) }                        newDirection(@);; |# O- _: |4 {7 w( _
                        @.HasOrder := true;
0 e2 m4 l& Q9 F$ `# w                end;
# s+ h" p( _5 ~; i, y# q        end;
9 C/ g3 T# c+ g- }" fend;        -- of the method. w0 A: U6 Y6 H# _
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
! |2 \8 y. U1 T& m. @: o
  W7 T- A# L, b这是AGV_putin中arrive的method。" Y8 t9 O  B. j( u4 U
3 L/ n$ W# g& R9 ~- m
当到达物料速度越高时,这个报警更多,
1 g- |5 B. g; K" w可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。4 x# F8 |7 t+ r& j$ M+ l5 O
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
) e3 E3 t8 T8 u+ [/ Q. d6 g1 w" P6 ^! w
另外一个小建议,就是move,所有的move都可以这样' s5 n* y  R9 r9 O. z* `! F. A
if not move() then debug end( x9 x# N  ~8 s& f% I& a# F
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
: X' V" O. ^: ~% |$ cplant simulation中的free libraries有AGV模板,
$ @0 L1 j0 ^+ ?4 W) X5 K里面也有案例。
5 j* C0 O) E7 M% o# `我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。6 n5 x( h$ l8 l- E

3 I' [! ]4 M" [$ W3 n+ q/ C6 R我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
& y0 k1 O+ O' t* R5 Y2 N/ g$ s
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 & M" W1 H& h4 V) L; v  r+ i
这是AGV_putin中arrive的method。
( Z  Q; ~: U8 @  D% _6 ^
* p( z( t3 w9 A- ]3 w0 t当到达物料速度越高时,这个报警更多,

$ u6 M) R, D6 h: `: @) U另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-23 09:06 , Processed in 0.019144 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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