设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5852|回复: 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  v4 ^& d  @% D
*/
( Z$ a4 I5 M, z* ]is
5 i5 A  J: V0 y1 u. e( @        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
' n& U( \8 [* j9 e/ k) q, D2 odo7 {. o  z7 [; w
        Lan := rootfolder.Internal.Tools.AOLlanguage;
+ i- Z# z3 S, ^7 l        if current = @.Destination -- else return
" U% c8 ^$ a! G7 B4 B2 i        then. D2 C* Q: A0 \1 t' D1 r
                @.Destination := void;% W% S# z  w; ^9 x! ]' E5 \
                if @.occupied then0 n, I" T8 D# o- d
                        part := @.cont;
. |  k' j) W6 S) X9 v  G  ]- z                        @.transpOrder := void;! Q: p( V9 s- Z! g, I9 M. d
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
% _; T; i6 I6 G                                @,root.eventcontroller.simTime);5 J/ H& x/ Q! x- V+ b7 u+ U0 W7 U' Q
                        @.HasOrder := false;6 G, \, n+ ?6 S) g
                        @.DrivingHome := true;
/ {, F, o3 u+ {7 z0 L1 D/ `2 B                        rgManager.tryToStartTransOrder;: u( ?$ u3 Y: G. q9 _
                        if @.Destination = void. q2 W% D. m& t) d/ t
                        then -- no transport order for vehicle @7 U" ?7 k( E- x5 X" A+ Y
                                @.Destination :=, O) w& f- H6 z. S8 z
                                rgManager.nearestFreeStation(@,track.~);% I" X6 O1 e% B( Z) c$ W$ g
                                newDirection(@);   
" Q6 w3 ]3 T% {5 T                                if @.Destination /= void then
6 c" Y; o+ T& \3 x' v                                        @.Destination.NumReservation :=
1 k, K2 t: i- B% _                                        @.Destination.NumReservation + 1;3 K# e/ m; ^1 c/ v
                                end;9 k+ A5 M  ]% W4 j# s
                                @.CurrIcon := "drivingHome";  g% h4 y; W0 j) q8 d( Y
                                @.DrivingHome := true;
  q4 W8 f6 N$ B* x! R8 p, p( }. C                        end;5 z9 F& c5 M% U: T; Z
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
& B" ?2 k7 T; ~$ J                        part := @.transpOrder;
# Y. f" u$ ?) v/ F& \                        part.move(@);-- load part
1 w3 X# }+ r3 Z  \/ r" g) K) C                        @.CurrIcon := "load";$ Q$ n1 O; d$ F* V+ `9 h( D
                        GlobalDistObj := part.globDestination;
0 x; a! |. }8 g. L+ V) n4 X                        assignLObj := rgmanager.rgAssignL;! u+ c3 ~' r0 g+ ]+ }
                        row := assignLObj.getRowNo(GlobalDistObj);1 ^9 a# Z/ T- g" O# U! i
                        if Row = -1 then -- since 709 ?9 V2 G$ d& i5 W( o4 U
                                if lan=1 then* t: K3 X9 U5 d0 y1 m
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
  `0 z# M) n- s# m2 o4 R+ p                                                to_str("in der Andockstation: \"",?.~.name,"\""));
0 y% C0 C" B  H9 Z9 ^                                else6 @6 v) ?- b3 s, F& @( ~7 z; l
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),9 ~: B  s& G$ O/ Z2 v6 B
                                                to_str("in docking station: \"",?.~.name,"\""));                               
" u. X+ [6 l7 y' [, B- Q                                end;2 l- k- h' [5 S* Z1 D) s
                        else
0 Q1 F" |8 X, i4 [                                @.Destination := assignLObj[1,row];
3 G! P2 t1 ]: Q  Z                        end;                        8 n! o  y( m3 u: G0 s
                        newDirection(@);
' S7 g( j9 |! u) o% s: D                        @.HasOrder := true;
1 U- G4 E2 A& Z+ A' e$ L- X) C3 i. s                end;( ?$ T. `4 n6 H* T+ x9 O* a
        end;# \4 Z& r0 N, g* [( e4 J+ r
end;        -- of the method4 m/ d# Z$ s0 x/ I& @' l
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 8 V" Z7 k  @8 |* C! \, o; y; \
% P% y9 c: j" {) e& ?  e& c& g
这是AGV_putin中arrive的method。! p" ]. f% e. c) |5 X! `

+ r) B0 z8 n# z* d4 {( D当到达物料速度越高时,这个报警更多,8 C" D5 W; K; y! |
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。5 p" T: A/ A1 \$ i  V2 c
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
; O6 @% _) V' r8 L7 M; d  v
2 m2 S( P. V2 g1 S: c% t另外一个小建议,就是move,所有的move都可以这样% E( X8 i/ Z) }/ \' A
if not move() then debug end, e( A" l0 u& W# p3 C; [" O2 h+ o
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
8 `8 s" H5 _2 p1 N; C6 I: t3 Nplant simulation中的free libraries有AGV模板,, I8 F2 ?2 `8 `% P9 M5 T; E+ Q
里面也有案例。
6 R+ R% k# G: y6 U9 M7 i- N我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。* \/ M0 x# [1 j: F" A% o! f1 \$ \" v
. D( ?4 E) Q" u+ e' a6 F
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
% D2 ^: S/ H% g9 }1 O! X) T% V8 F, Y. e
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 3 V3 F& N: }  c9 x: v
这是AGV_putin中arrive的method。
) [; S. ^8 }6 f9 q$ G% m; L6 d( \7 b/ u
当到达物料速度越高时,这个报警更多,
3 R* {% A5 Y- W5 D0 P- k  o
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-12-26 18:01 , Processed in 0.019826 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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