diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/CI/device/CiRouteService.java b/src/main/java/club/joylink/rtss/simulation/cbtc/CI/device/CiRouteService.java index 64ac6e96e..66e7bcb9c 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/CI/device/CiRouteService.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/CI/device/CiRouteService.java @@ -44,7 +44,7 @@ public class CiRouteService { } } // 进路中道岔没有被征用或锁定在相反位置 - Route.CheckFailMessage failMessage = setSwitchCheck(route.getSwitchList()); + Route.CheckFailMessage failMessage = setSwitchCheck(simulation, route.getSwitchList()); if (failMessage != null) { return failMessage; } @@ -110,7 +110,7 @@ public class CiRouteService { RouteOverlap overlap = route.getOverlap(); if (Objects.nonNull(overlap)) { SectionPath sectionPath = overlap.selectPath(); - failMessage = setSwitchCheck(sectionPath.getSwitchList()); + failMessage = setSwitchCheck(simulation, sectionPath.getSwitchList()); } } return failMessage; @@ -133,7 +133,7 @@ public class CiRouteService { return null; } - private static Route.CheckFailMessage setSwitchCheck(List switchList) { + private static Route.CheckFailMessage setSwitchCheck(Simulation simulation, List switchList) { if (switchList != null) { for (SwitchElement switchElement : switchList) { Switch aSwitch = switchElement.getASwitch(); @@ -147,6 +147,13 @@ public class CiRouteService { if (aSwitch.isCiUseOnOppositePosition(switchElement.isNormal())) { // 道岔征用在相反位置 return new Route.CheckFailMessage(Route.CheckFailReason.SwitchCiUseOnOppositePosition, aSwitch); } + // 非预先锁闭,道岔相应位置失表则不排进路 + if (!simulation.getRepository().getConfig().isLockFirst() && aSwitch.isLoss()) { + if ((Switch.SwitchFault.NORMAL_SPLIT.equals(aSwitch.getFault()) && switchElement.isNormal()) + || (Switch.SwitchFault.REVERSE_SPLIT.equals(aSwitch.getFault()) && !switchElement.isNormal())) { + return new Route.CheckFailMessage(Route.CheckFailReason.SwitchFault, aSwitch); + } + } } } return null; diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/CI/device/CiService.java b/src/main/java/club/joylink/rtss/simulation/cbtc/CI/device/CiService.java index 8ef1eaec4..12084c0a2 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/CI/device/CiService.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/CI/device/CiService.java @@ -27,11 +27,23 @@ public class CiService { if (overlap.getSection().isRouteLock()) { SectionPath sectionPath = overlap.selectPath(); for (SwitchElement switchElement : sectionPath.getSwitchList()) { - if (switchElement.getASwitch().isLocked() && !switchElement.isOnPosition()) { + Switch aSwitch = switchElement.getASwitch(); + if (aSwitch.isLocked() && !switchElement.isOnPosition()) { log.debug("延续保护进路[{}]道岔[{}]锁闭在相反位置,不触发办理", overlap.debugStr(), - switchElement.getASwitch().debugStr()); + aSwitch.debugStr()); return; } + // 非预先锁闭,道岔相应位置失表则不排延续保护 + if (!simulation.getRepository().getConfig().isLockFirst() && aSwitch.isLoss()) { + if ((Switch.SwitchFault.NORMAL_SPLIT.equals(aSwitch.getFault()) + && switchElement.isNormal()) + || (Switch.SwitchFault.REVERSE_SPLIT.equals(aSwitch.getFault()) + && !switchElement.isNormal())) { + log.debug("延续保护进路[{}]道岔[{}]位置失表,不触发办理", overlap.debugStr(), + aSwitch.debugStr()); + return; + } + } } overlap.startSetting(simulation.getSystemTime()); }