From 0f81295f3f1b6297fa119dba2e2b5bed59a0d6e9 Mon Sep 17 00:00:00 2001 From: thesai <1021828630@qq.com> Date: Thu, 18 Mar 2021 18:58:31 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=A3=80=E6=9F=A5=E7=AB=99?= =?UTF-8?q?=E5=8F=B0=E7=8A=B6=E6=80=81=E4=BB=A5=E5=8F=96=E6=B6=88=E5=88=97?= =?UTF-8?q?=E8=BD=A6=E6=89=A3=E8=BD=A6=E7=8A=B6=E6=80=81=E7=9A=84=E5=BE=AA?= =?UTF-8?q?=E7=8E=AF=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../club/joylink/rtss/simulation/cbtc/ATS/ATSLogicLoop.java | 3 +++ .../rtss/simulation/cbtc/ATS/service/AtsStandService.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/ATSLogicLoop.java b/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/ATSLogicLoop.java index 524353e0c..56c24aec6 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/ATSLogicLoop.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/ATSLogicLoop.java @@ -52,6 +52,9 @@ public class ATSLogicLoop { this.atsStandService.countDown(simulation); // 车站随时间变化的属性更新 this.atsStationService.updateField(simulation); + // 如果站台没有扣车,取消列车的扣车状态 + simulation.getRepository().getStandList().stream().filter(stand -> !stand.isHoldTrain()) + .forEach(stand -> atsStandService.checkAndCancelTrainHold(simulation, stand)); // long end = System.currentTimeMillis(); // System.out.println(String.format("------------ATS自动排列进路逻辑耗时: %s ms", (end-start))); } diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/service/AtsStandService.java b/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/service/AtsStandService.java index b923e7eb2..78d1e3c54 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/service/AtsStandService.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/service/AtsStandService.java @@ -384,7 +384,7 @@ public class AtsStandService { } } - private void checkAndCancelTrainHold(Simulation simulation, Stand stand) { + public void checkAndCancelTrainHold(Simulation simulation, Stand stand) { if (!stand.isHoldTrain()) { // 先默认CBTC模式,取消扣车发送给列车 List superviseTrainList = simulation.getRepository().getSuperviseTrainList();