diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/service/AtsTrainService.java b/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/service/AtsTrainService.java index fd8295ab1..b612f7100 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/service/AtsTrainService.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/service/AtsTrainService.java @@ -312,9 +312,9 @@ public class AtsTrainService { RoutePath routePath = routePaths.stream() .min(Comparator.comparingDouble(RoutePath::getReverseSwitchQuantity)) .get(); - List
sections = routePath.getSectionList().stream() - .filter(Section::isSpecialSection) - .collect(Collectors.toList()); + List
sections = new ArrayList<>(); + sections.add(routePath.getStart()); + sections.add(routePath.getEnd()); supervisedTrain.setHctPath(new SectionRunPath(sections, routePath.isRight())); } break; diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/command/CommandBO.java b/src/main/java/club/joylink/rtss/simulation/cbtc/command/CommandBO.java index 697c404b5..357a3fb59 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/command/CommandBO.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/command/CommandBO.java @@ -528,7 +528,7 @@ public class CommandBO { public Step executeOrReturnStep(Simulation simulation, CommandBO command) { SimulationMember targetMember = command.getTargetMember(); VirtualRealityTrain train = (VirtualRealityTrain) targetMember.getDevice(); - if (train.isRMMode()) { + if (DriveMode.RM.equals(train.getPreDriveMode())) { targetMember.setCommand(null); return null; } else { @@ -553,7 +553,7 @@ public class CommandBO { SimulationMember targetMember = command.getTargetMember(); VirtualRealityTrain train = (VirtualRealityTrain) targetMember.getDevice(); targetMember.setCommand(null); - if (train.isCMMode()) { + if (DriveMode.CM.equals(train.getPreDriveMode())) { return null; } else { if (!train.isAtpOn()) { @@ -575,7 +575,7 @@ public class CommandBO { public Step executeOrReturnStep(Simulation simulation, CommandBO command) { SimulationMember targetMember = command.getTargetMember(); VirtualRealityTrain train = (VirtualRealityTrain) targetMember.getDevice(); - if (train.isAMMode()) { + if (DriveMode.AM.equals(train.getPreDriveMode())) { targetMember.setCommand(null); return null; } diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/onboard/ATP/ATPLogicLoop.java b/src/main/java/club/joylink/rtss/simulation/cbtc/onboard/ATP/ATPLogicLoop.java index 81d164615..26ffbf049 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/onboard/ATP/ATPLogicLoop.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/onboard/ATP/ATPLogicLoop.java @@ -235,7 +235,6 @@ public class ATPLogicLoop { private void driveModeControl(Simulation simulation, VirtualRealityTrain train) { DriveMode preDriveMode = train.getPreDriveMode(); DriveMode driveMode = train.getDriveMode(); - MapConfig config = simulation.getRepository().getConfig(); switch (preDriveMode) { case AM: train.setCommunication(true); //恢复列车通信