From 679b5012b3dd74dc2ffb11a54e7317b05759780b Mon Sep 17 00:00:00 2001 From: joylink_zhangsai <1021828630@qq.com> Date: Wed, 7 Jul 2021 09:52:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=EF=BC=9A=E8=BF=9B=E8=B7=AF?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E7=A7=BB=E5=8A=A8=E6=8E=88=E6=9D=83=E8=AE=A1?= =?UTF-8?q?=E7=AE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../rtss/simulation/cbtc/ATP/ground/ZCLogicLoop.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/ATP/ground/ZCLogicLoop.java b/src/main/java/club/joylink/rtss/simulation/cbtc/ATP/ground/ZCLogicLoop.java index 4d40c4ae5..1a3c21bcb 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/ATP/ground/ZCLogicLoop.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/ATP/ground/ZCLogicLoop.java @@ -439,7 +439,7 @@ public class ZCLogicLoop { boolean lock = false; if (!CollectionUtils.isEmpty(settingRoutes)) { for (Route route : settingRoutes) { - if (route.isRouteSection(section) && route.isRight() == right) { + if (route.isRight() == right && (route.isRouteSection(section) || route.isRouteSection(tailSection))) { lock = true; List switches = screenSwitchesInFront(route, tailSection); if (!this.checkRouteSwitchPosition(route, switches) || !this.isFlsCheckPass(route.getFlsList(), switches)) { @@ -497,6 +497,12 @@ public class ZCLogicLoop { boolean right = route.isRight(); List
sectionList = route.getSectionList(); List sectionRelSwitches = new ArrayList<>(); + for (int i = 0; i < 10; i++) { + if (sectionList.contains(section)) + break; + else + section = section.getNextRunningSectionOf(right); + } while (sectionList.contains(section)) { if (section.getRelSwitch() != null) sectionRelSwitches.add(section.getRelSwitch());