设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6976|回复: 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'* q0 h% d. Y( I# y: j
*/
% j+ k3 h. N1 q, b# W$ _$ `9 c( fis$ g5 R$ s5 N+ M! J. g
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 I" b5 t) |" i. {
do4 E) C$ L& ^- ?# \0 Z1 ]& |( w# ?
        Lan := rootfolder.Internal.Tools.AOLlanguage;, G1 @" t4 B: I" H" F5 j2 S( d
        if current = @.Destination -- else return
  k2 Z: f. x8 J4 \( K1 y2 M        then6 k6 W/ o0 t( _  Y" A1 l
                @.Destination := void;0 f1 b  }9 R" l) c
                if @.occupied then8 M& b9 t# q5 S$ v! u! V5 A- s2 J9 t
                        part := @.cont;" ~6 T8 m/ S6 E" N: r; h* S
                        @.transpOrder := void;
$ f, R& p; x$ ?. X7 J* J                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 I& ^5 |9 J; E2 G; B/ d* d
                                @,root.eventcontroller.simTime);/ Z* y, @. J4 p9 F
                        @.HasOrder := false;% p# c; G) V6 ]" ?! X: T, [- p- J
                        @.DrivingHome := true;
- {+ f* d3 F1 T+ z                        rgManager.tryToStartTransOrder;
9 C' D5 `  K6 g7 y9 j/ X0 N                        if @.Destination = void
8 l! K( ?6 R' h, b5 y- J2 K                        then -- no transport order for vehicle @2 v1 p) H0 u2 Z- \9 P3 A* f* v
                                @.Destination :=
- X8 k5 V: O3 b% e0 H3 q0 Y- w                                rgManager.nearestFreeStation(@,track.~);
) w, X  s* U! o  L- O                                newDirection(@);   
! w4 Z5 v, z+ v9 g6 e                                if @.Destination /= void then
9 u5 M+ o2 H6 `5 _# M! I                                        @.Destination.NumReservation :=. L% r2 [2 i- q5 F
                                        @.Destination.NumReservation + 1;
4 D: B' E1 F+ {$ Y9 F0 h                                end;/ B. B4 _; q3 h. d; a! c; D$ ~9 d
                                @.CurrIcon := "drivingHome";- A  }- Y% a# s& b! ^, |4 _( u
                                @.DrivingHome := true;3 A/ y3 v+ }% F8 i" F
                        end;* M  v2 ~+ {- r
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 G8 u, w  z, f4 i, j8 p  l                        part := @.transpOrder;3 s6 N( ?# F. v% F  x3 p
                        part.move(@);-- load part( p% o8 h1 N  Y
                        @.CurrIcon := "load";, L" Q: q- L+ t( P
                        GlobalDistObj := part.globDestination;, ^- i0 x# a% C. P
                        assignLObj := rgmanager.rgAssignL;
' u, C, a4 S) W# W) L0 x                        row := assignLObj.getRowNo(GlobalDistObj);
% M- [4 c3 r- Y9 l7 Y# k9 A  K                        if Row = -1 then -- since 70
2 {( f# I! c6 T* c& q5 X3 G                                if lan=1 then4 L% Z* ^, [" l/ X8 w- n* \3 g3 P
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),+ p" J) w  N  z+ _4 S
                                                to_str("in der Andockstation: \"",?.~.name,"\""));  R6 L( C+ X1 c1 v& e0 L
                                else
; o" A! H0 u, E0 \! T# b: J                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
3 G( _5 s% @  ?9 N  m                                                to_str("in docking station: \"",?.~.name,"\""));                                ; ~* j0 l' Q( q6 n
                                end;
4 u8 K0 H+ C/ O% K7 d                        else
+ s; e- ?1 x( l% q' Q                                @.Destination := assignLObj[1,row];
9 F( l4 p. |' x) `) J& j                        end;                       
/ x: i& d  e; K: T4 `                        newDirection(@);% N8 }3 u7 v0 V; J! q( O9 U
                        @.HasOrder := true;  J! G8 }) Q( g* L2 A  i. L) v) R+ v
                end;/ k! g7 ?7 z# b- {
        end;" j) w# d% @8 k) m# S7 x  S
end;        -- of the method
% q4 Z. L& [) {
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
( |) Z3 b5 x# z0 ]& u& u0 `# g2 d- j( n
这是AGV_putin中arrive的method。: ^* Q2 s3 m! U. _' Y

3 a7 O& n* r1 o当到达物料速度越高时,这个报警更多,
* Z- D/ H0 i0 P: v1 j可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。& o2 i) ]( \& s- j6 n0 @
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?2 p' Z8 p8 o3 A

, b$ X& a3 K9 B' o另外一个小建议,就是move,所有的move都可以这样& o& f. e4 f3 o* R; [
if not move() then debug end
  D, }/ C3 t  H& e/ [- n这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
. f2 |( H' h6 j1 Uplant simulation中的free libraries有AGV模板,
2 N8 k0 w! ?$ v里面也有案例。
% |+ \% Y: M5 D( n1 z" Y我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。/ J% T3 F5 r. L; z: Y7 |6 f

$ o: @9 K- A3 j. e4 O+ U0 @我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 * M9 e) q1 x8 \3 u5 I

0 ^+ Q( S5 F1 N6 s6 d那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 2 f& E% G& U7 y# X5 o+ h
这是AGV_putin中arrive的method。+ o6 ]8 t* f/ Y( a

% \& x. m' R+ \& a当到达物料速度越高时,这个报警更多,

$ \+ g8 ]& E7 u9 F( f另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-9 13:48 , Processed in 0.015680 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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