From 29b94f0f1b3154ecfa5aaa11ad93ebd86e2fd6f5 Mon Sep 17 00:00:00 2001 From: joylink_zhangsai <1021828630@qq.com> Date: Fri, 24 Nov 2023 10:52:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E2=80=9C=E9=A9=BE=E9=A9=B6?= =?UTF-8?q?=E2=80=9D=E5=91=BD=E4=BB=A4=E8=AE=BE=E7=BD=AE=E7=9B=AE=E7=9A=84?= =?UTF-8?q?=E5=9C=B0=E6=97=B6=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../rtss/simulation/cbtc/ATS/service/AtsTrainService.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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, "无法到达的位置"); }