From f2de22e0d8a5a578c8c557acd79680211f43ee00 Mon Sep 17 00:00:00 2001 From: joylink_zhangsai <1021828630@qq.com> Date: Thu, 27 May 2021 13:33:43 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BB=B6=E7=BB=AD=E4=BF=9D=E6=8A=A4=E4=B8=AD?= =?UTF-8?q?=E7=9A=84=E8=AE=BE=E5=A4=87=E7=8A=B6=E6=80=81=E4=B8=8D=E6=AD=A3?= =?UTF-8?q?=E7=A1=AE=E6=97=B6=EF=BC=8C=E5=8F=96=E6=B6=88=E5=BB=B6=E7=BB=AD?= =?UTF-8?q?=E4=BF=9D=E6=8A=A4=E9=94=81=E9=97=AD=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cbtc/CI/service/RouteService.java | 27 ++++++++++++++----- .../cbtc/data/vr/VirtualRealityTrain.java | 4 +-- 2 files changed, 23 insertions(+), 8 deletions(-) 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;