From c2a00f26e978b1226de37c958124f9d57926ca9d Mon Sep 17 00:00:00 2001 From: thesai <1021828630@qq.com> Date: Tue, 14 Sep 2021 17:00:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=B0=8Fbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../rtss/simulation/cbtc/ATP/ground/MaService.java | 2 +- .../rtss/simulation/cbtc/CI/service/StandService.java | 2 +- .../rtss/simulation/cbtc/data/map/Section.java | 11 +++++++++++ .../simulation/cbtc/onboard/ATP/ATPLogicLoop.java | 2 ++ 4 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/ATP/ground/MaService.java b/src/main/java/club/joylink/rtss/simulation/cbtc/ATP/ground/MaService.java index ed944f8e0..b4b3b6f00 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/ATP/ground/MaService.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/ATP/ground/MaService.java @@ -431,7 +431,7 @@ public class MaService { } } } else if(front) { - if (!section.isRouteLock() && !section.isOverlapLock()) {//列车前方区段未锁闭 + if (!section.isRouteLock() && !section.isOverlapLock() && !section.isLogicOverlapLock()) {//列车前方区段未锁闭 Signal aheadSignal = section.getSignalOf(right); if (aheadSignal == null || aheadSignal.getLockedRoute() == null || !aheadSignal.getLockedRoute().isOpen()) { diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/CI/service/StandService.java b/src/main/java/club/joylink/rtss/simulation/cbtc/CI/service/StandService.java index 006574916..eb11bcce0 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/CI/service/StandService.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/CI/service/StandService.java @@ -72,7 +72,7 @@ public class StandService { if (vrPsd.isPslControl()) { return; } - vrPsdService.controlVrPSD(simulation, vrPsd, true, VrPsdService.CommandSource.SIG); + vrPsdService.controlVrPSD(simulation, vrPsd, false, VrPsdService.CommandSource.SIG); } /** diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/data/map/Section.java b/src/main/java/club/joylink/rtss/simulation/cbtc/data/map/Section.java index 25792c5e6..539761142 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/data/map/Section.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/data/map/Section.java @@ -1148,6 +1148,17 @@ public class Section extends MayOutOfOrderDevice { return !this.isNormalStandTrack() && this.isTurnBackTrack(); } + public boolean isLogicOverlapLock() { + if (!CollectionUtils.isEmpty(this.logicList)) { + for (Section section : this.logicList) { + if (section.isOverlapLock()) { + return true; + } + } + } + return false; + } + public enum SectionRoadType { /** * 左行线 diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/onboard/ATP/ATPLogicLoop.java b/src/main/java/club/joylink/rtss/simulation/cbtc/onboard/ATP/ATPLogicLoop.java index f711d7912..57abed8d6 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/onboard/ATP/ATPLogicLoop.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/onboard/ATP/ATPLogicLoop.java @@ -234,6 +234,8 @@ public class ATPLogicLoop { private void driveModeControl(Simulation simulation, VirtualRealityTrain train) { DriveMode preDriveMode = train.getPreDriveMode(); + if (preDriveMode == null) + return; DriveMode driveMode = train.getDriveMode(); SectionPosition headPosition = train.getHeadPosition(); SectionPosition tailPosition = train.getTailPosition();