From 5618276a3a9b7a83296b64b80cca7e564a9d1ff7 Mon Sep 17 00:00:00 2001 From: joylink_zhangsai <1021828630@qq.com> Date: Thu, 12 Aug 2021 17:33:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9ats=E8=BF=9B=E8=B7=AF?= =?UTF-8?q?=E8=A7=A6=E5=8F=91=E6=97=B6=E9=97=B4=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/ars/AtsPlanTrainRouteSelectServiceImpl.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/service/ars/AtsPlanTrainRouteSelectServiceImpl.java b/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/service/ars/AtsPlanTrainRouteSelectServiceImpl.java index 98cac52f3..e455f5bd7 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/service/ars/AtsPlanTrainRouteSelectServiceImpl.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/service/ars/AtsPlanTrainRouteSelectServiceImpl.java @@ -56,7 +56,8 @@ public class AtsPlanTrainRouteSelectServiceImpl extends AtsRouteSelectService { List planList = tripPlan.getPlanList(); for (StationPlan stationPlan : planList) { if (!stationPlan.getStation().isDepot()) { //第一个非停车场的车站 - if (stationPlan.getSection().getCode().equals(trainInfo.getPlanStandTrack())) { //车站是列车的计划 + if (stationPlan.getSection().getCode().equals(trainInfo.getPlanStandTrack()) + && !section.equals(stationPlan.getSection())) { //车站是列车的计划 if (!systemTime.toLocalTime().plusSeconds(60).isAfter(tripPlan.getStartTime())) { //当前时间不早于计划开始时间60秒 log.debug(String.format("列车[%s]未到发车时间,不触发进路", trainInfo.getGroupNumber())); return null; @@ -79,6 +80,7 @@ public class AtsPlanTrainRouteSelectServiceImpl extends AtsRouteSelectService { /** * 先选取需要征用的进路,再根据计划判断是否存在冲突的未完成计划 + * * @param simulation * @param trainInfo * @param tripPlan @@ -127,6 +129,7 @@ public class AtsPlanTrainRouteSelectServiceImpl extends AtsRouteSelectService { /** * 检查进路是否和未完成的计划冲突 + * * @param repository * @param trainInfo * @param tripPlan @@ -165,7 +168,7 @@ public class AtsPlanTrainRouteSelectServiceImpl extends AtsRouteSelectService { } if (!temp.isFinished()) { if (!start.equals(temp.getSection())) { - if(this.isConflict(repository, route, aheadTrain, start, temp.getSection())){ + if (this.isConflict(repository, route, aheadTrain, start, temp.getSection())) { conflictStationPlan = temp; break; } @@ -195,6 +198,7 @@ public class AtsPlanTrainRouteSelectServiceImpl extends AtsRouteSelectService { /** * 查询所需办理进路所需到达的计划时间 + * * @param repository * @param route * @param trainInfo