设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 10072|回复: 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'
3 ?) R/ \2 z% r/ a*/8 e; G: O" ^# \/ }
is0 l& {0 g8 q8 U8 Y& _: W  X. @" m8 S0 y
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
* b- J9 N. y$ S) q- Ldo
! \/ E) X+ |6 n        Lan := rootfolder.Internal.Tools.AOLlanguage;3 f0 I0 y, T5 C3 _& y
        if current = @.Destination -- else return
$ h% v7 R5 [+ w* h7 K2 U# V        then* ~8 O3 G& U+ K! L
                @.Destination := void;
! H0 L! ?- u% i) E. _* q6 z/ I                if @.occupied then( u$ M9 t6 r: C: r1 @2 _9 C  A
                        part := @.cont;
. T, e9 i" t/ V! y8 Z                        @.transpOrder := void;+ E- w0 o& s3 R4 K+ e& T% Q1 N/ W
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
3 _9 i# f9 t* n6 {, I0 D( ~4 Q                                @,root.eventcontroller.simTime);
% {4 w% V5 v- J" q. s                        @.HasOrder := false;
4 ~# b; G3 E: h! S                        @.DrivingHome := true;1 d4 I' h4 i7 ?& i* i% ]' O; p
                        rgManager.tryToStartTransOrder;1 N. i- p: f/ P! O( y
                        if @.Destination = void- g3 z5 [1 O7 C" y- g/ g# W
                        then -- no transport order for vehicle @
5 ?) ?9 C+ I5 y' X( E                                @.Destination :=
) N2 W, f* N2 C4 a                                rgManager.nearestFreeStation(@,track.~);0 p/ y( L6 A6 Q& E
                                newDirection(@);   7 l% f/ z4 P" Z( k" o
                                if @.Destination /= void then7 E0 ]" m% o  X: H) g& \
                                        @.Destination.NumReservation :=
! l" l( \/ I+ n3 l3 U1 s3 P- u                                        @.Destination.NumReservation + 1;
( |: d" @! r5 [: m                                end;
6 m, T' \5 t% c1 b                                @.CurrIcon := "drivingHome";
7 d" T' V  O. n; u                                @.DrivingHome := true;
; t9 G  x7 X* d! D9 b, |' l* K; d                        end;0 k" k" K3 s  v* z$ S
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station$ s0 L* t. j! R7 n: u7 z
                        part := @.transpOrder;* }; p  M- Z2 J( a6 @
                        part.move(@);-- load part
1 j' r  A0 a2 x! G1 }3 [1 j                        @.CurrIcon := "load";) n) r" w6 A+ k) F
                        GlobalDistObj := part.globDestination;4 x6 r$ p- {1 T1 v6 v6 |
                        assignLObj := rgmanager.rgAssignL;
0 z1 _  Q7 b" I; _0 c% |5 S' W" Q                        row := assignLObj.getRowNo(GlobalDistObj);
* K. N: p7 E% _( @! u. \                        if Row = -1 then -- since 702 H- K2 L+ z2 s5 L5 V' g
                                if lan=1 then# Q/ K% u1 v) s5 {+ H* k& M
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
* s6 ^4 u6 D# M0 N0 {                                                to_str("in der Andockstation: \"",?.~.name,"\""));* [2 W$ @0 w! B2 A
                                else
# J5 \3 C2 h3 V# ], L                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
! D: _' H* C2 ?6 S                                                to_str("in docking station: \"",?.~.name,"\""));                               
  O, s& u4 L5 |+ M* F                                end;
  c" U% N, ]/ t' R9 f# Q, L                        else
# \& w3 e* S0 r  U% Q% o                                @.Destination := assignLObj[1,row];' U+ ~; ~: t6 u& W* ]
                        end;                       
; I/ h' B% f/ J+ ?5 B' W                        newDirection(@);7 _' i) e% H* W
                        @.HasOrder := true;& |9 s: \  M; v" U- n* X/ {
                end;
3 L, B7 ^$ E& ]. |' _1 [4 h! w* z        end;. F8 N& `. [4 c' ^
end;        -- of the method
# @2 P; y( `2 T0 V" }" C* n# A6 E
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 ! h2 v" O6 t! @# _7 C7 ], f& n
8 ]. L, ~& i& _6 g( b- [( s% m7 d
这是AGV_putin中arrive的method。
* C( k5 _7 I7 ]! U  W0 k$ `/ q# [$ V) X
当到达物料速度越高时,这个报警更多,
" L1 h0 D' j/ i6 i2 d可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。, |2 N8 F, Y2 s# E' L
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
1 }6 Y1 a7 v* d9 C# Q1 Y8 C$ u1 t) n$ Q" F  c# r
另外一个小建议,就是move,所有的move都可以这样* ~8 c! E; w* v6 u% |
if not move() then debug end
, @) U0 R4 U% Y. c$ p6 n6 y这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
- x. S+ B, K. kplant simulation中的free libraries有AGV模板,3 I, G7 O5 \4 V2 A# G$ X' l
里面也有案例。
' a6 ^+ @+ e( `5 E( S+ a我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
& a" R" V$ N; ?# R& [' S; r, m2 j2 r2 p' t( m
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
! M3 x1 K) {) A4 O- p0 R
' p, j- b" @% x+ m* X$ X/ y那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
3 a2 Y8 O5 Q2 Q7 k, q8 X3 e& [7 k1 ?这是AGV_putin中arrive的method。) Z" {" [+ A/ C- j6 @* i$ Z
( |) T  H* e/ |# D
当到达物料速度越高时,这个报警更多,

9 a! _. m' r/ F& k* r& X另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-9-11 17:16 , Processed in 0.015167 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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