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, /** 区段封锁 */