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 503b7704b..31d648d2e 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 @@ -467,11 +467,10 @@ public class AtsTrainService { throw new SimulationException(SimulationExceptionType.System_Fault, "只能选列车或区段"); } Section section = (Section) element; - Section targetSection = section.getNextRunningSectionOf(right); - SectionPosition trainTargetPosition = new SectionPosition(targetSection, - targetSection.getStopPointByDirection(right)); + SectionPosition trainTargetPosition = new SectionPosition(section, + section.getStopPointByDirection(right)); Float distance = CalculateService.calculateDistance(train.getHeadPosition(), - trainTargetPosition, right, false); + trainTargetPosition, right, true); if (distance == null) { throw new SimulationException(SimulationExceptionType.Illegal_Argument, "无法到达的位置"); }