diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/CI/service/RouteService.java b/src/main/java/club/joylink/rtss/simulation/cbtc/CI/service/RouteService.java index b0a602c0c..025527689 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/CI/service/RouteService.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/CI/service/RouteService.java @@ -423,7 +423,7 @@ public class RouteService { this.sectionLock(simulation, route); route.getStart().setLevel(Signal.LEVEL_2); // 侧防检查 - boolean flsOnPosition = this.isFlsSwitchOnPosition(route.getFlsList()); + boolean flsOnPosition = this.isFlsCheckPass(route.getFlsList()); if (flsOnPosition) { // 侧防锁闭 this.routeFlsLock(route.getFlsList()); @@ -455,9 +455,10 @@ public class RouteService { SwitchElement pSwitch = flsElement.getPSwitch(); if (pSwitch != null) { switchElementList.add(pSwitch); - } else if (flsElement.getFpae() != null) { - switchElementList.add(flsElement.getFpae()); } +// else if (flsElement.getFpae() != null) { +// switchElementList.add(flsElement.getFpae()); +// } } } this.routeSwitchTurn(simulation, switchElementList); @@ -552,7 +553,7 @@ public class RouteService { } } // 道岔是否转换到位置 - boolean onPosition = this.checkRouteSwitchPosition(switchList) && this.isFlsSwitchOnPosition(flsList); + boolean onPosition = this.checkRouteSwitchPosition(switchList) && this.isFlsCheckPass(flsList); if (!onPosition) return; // 未到位,返回 if (!overlap.getSection().isRouteLock()) { return; @@ -562,7 +563,10 @@ public class RouteService { log.debug(String.format("进路延续保护[%s]办理成功", overlap.debugStr())); } - private boolean isFlsSwitchOnPosition(List flsList) { + /** + * 侧防检查是否通过 + */ + private boolean isFlsCheckPass(List flsList) { if (!CollectionUtils.isEmpty(flsList)) { for (RouteFls routeFls : flsList) { List level1List = routeFls.getLevel1List(); @@ -1293,11 +1297,22 @@ public class RouteService { } } } + RouteOverlap overlap = route.getOverlap(); if (route.isOpen()) { - if (this.checkCanOverlapSet(simulation, route) && !route.getOverlap().isLock()) { + if (this.checkCanOverlapSet(simulation, route) && !overlap.isLock()) { this.checkAndSetLockedRouteOverlap(simulation, route); } } + //延续保护锁闭后持续监视 + if (overlap != null && overlap.isLock()) { + SectionPath sectionPath = overlap.selectPath(); + List switchList = sectionPath.getSwitchList(); + List flsList = sectionPath.getFlsList(); + boolean onPosition = this.checkRouteSwitchPosition(switchList) && this.isFlsCheckPass(flsList); + if (!onPosition) { + overlap.setLock(false); + } + } } public void checkAndSetLockedRouteOverlap(Simulation simulation, Route route) { diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/data/vr/VirtualRealityTrain.java b/src/main/java/club/joylink/rtss/simulation/cbtc/data/vr/VirtualRealityTrain.java index d04aaab72..3a2dd6f53 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/data/vr/VirtualRealityTrain.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/data/vr/VirtualRealityTrain.java @@ -597,14 +597,14 @@ public class VirtualRealityTrain extends VirtualRealityDevice { if (Fault.DRIVE_FAULT.equals(fault) && fk > 0) { return; } - if (isNeedDepartureCommand()) { + if (isNeedDepartureCommand() && fk > 0) { return; } enforceUpdateTBForce(fk, fb); } /** - * 强制改变牵引制动力(暂时只用于连挂操作) + * 强制改变牵引制动力 */ public void enforceUpdateTBForce(float fk, float fb) { this.fk = fk;