From a93df56e55fca580f044e26ada2019df1df128dd Mon Sep 17 00:00:00 2001 From: joylink_zhangsai <1021828630@qq.com> Date: Mon, 5 Jul 2021 16:15:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=EF=BC=9A=E8=BF=9B=E8=B7=AF?= =?UTF-8?q?=E6=8E=92=E5=88=97=E5=A2=9E=E5=8A=A0=E9=81=93=E5=B2=94=E5=8D=A0?= =?UTF-8?q?=E7=94=A8=E6=A3=80=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../rtss/simulation/cbtc/CI/service/RouteService.java | 6 +++++- .../club/joylink/rtss/simulation/cbtc/data/map/Route.java | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) 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 70e2a2b66..6753a2c33 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 @@ -175,7 +175,7 @@ public class RouteService { return new Route.CheckFailMessage(Route.CheckFailReason.SectionLockOppositeDirection, section); } } - // 进路内道岔封锁/锁闭位置检查 + // 进路内道岔封锁/锁闭/占用位置检查 List switchList = route.getSwitchList(); for (SwitchElement element : switchList) { Switch aSwitch = element.getASwitch(); @@ -187,6 +187,10 @@ public class RouteService { if (aSwitch.isLocked() && !aSwitch.isOnPosition(element.isNormal())) { return new Route.CheckFailMessage(Route.CheckFailReason.SwitchLockPositionError, aSwitch); } + // 是否占用在另一个位置 + if (aSwitch.isSectionOccupied() && !aSwitch.isOnPosition(element.isNormal())) { + return new Route.CheckFailMessage(Route.CheckFailReason.SwitchOccupiedPositionError, aSwitch); + } // // 道岔是否故障 // if (aSwitch.isFaultOnPosition(element.isNormal()) && aSwitch.isLoss()) { // return new Route.CheckFailMessage(Route.CheckFailReason.SwitchFault, aSwitch); diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/data/map/Route.java b/src/main/java/club/joylink/rtss/simulation/cbtc/data/map/Route.java index 9ddcff5b2..12432b3d9 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/data/map/Route.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/data/map/Route.java @@ -594,6 +594,8 @@ public class Route extends MapNamedElement { SwitchBlockade, /** 道岔锁闭的方向不对 */ SwitchLockPositionError, + /** 道岔占用位置不对 */ + SwitchOccupiedPositionError, /** 道岔位置失表故障 */ SwitchFault, /** 区段封锁 */