From 5a33c35c15e0aa592df628a3b93ec4e26a98e2fb Mon Sep 17 00:00:00 2001 From: tiger_zhou <123456> Date: Wed, 26 Apr 2023 17:59:46 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=97=E8=BD=A6=E5=9B=BE=E4=BE=8B=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E4=BD=8D=E7=BD=AE=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cbtc/ATS/service/diagram/InOutBoundService.java | 2 -- .../cbtc/ATS/service/diagram/PackingService.java | 8 +++++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/service/diagram/InOutBoundService.java b/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/service/diagram/InOutBoundService.java index 6607aff57..219832145 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/service/diagram/InOutBoundService.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/service/diagram/InOutBoundService.java @@ -29,9 +29,7 @@ public class InOutBoundService implements CalculateDiagram{ Station nextStation = train.getNextStation(); SectionPosition headPos = train.getHeadPosition(); SectionPosition tailPos = train.getTailPosition(); - Station startStation = diagramStation.findFirstNotDepotStation(train.isRight()); -// Station lastStation = diagramStation.findLastNotDepotStation(train.getTerminalStation(),train.isRight()); if(Objects.nonNull(headPos.getSection()) && Objects.nonNull(headPos.getSection().getStation()) && headPos.getSection().getStation().isDepot()){ StationDiagram sd = new StationDiagram(train); sd.setShowTrainDiagram(false); diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/service/diagram/PackingService.java b/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/service/diagram/PackingService.java index fa92e838d..c4f0a7cc1 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/service/diagram/PackingService.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/service/diagram/PackingService.java @@ -9,6 +9,7 @@ import club.joylink.rtss.simulation.cbtc.data.vo.TrainInfo; import club.joylink.rtss.simulation.cbtc.data.vr.VirtualRealityTrain; import lombok.extern.slf4j.Slf4j; +import java.time.LocalDateTime; import java.util.Objects; import java.util.Optional; @@ -21,7 +22,8 @@ public class PackingService implements CalculateDiagram{ @Override public Optional calculate(Simulation simulation, TrainInfo trainInfo, VirtualRealityTrain train, SortDiagramStation diagramStation){ Section trainSection = train.getHeadPosition().getSection(); - + Long mapId = simulation.getBuildParams().getMap().getId(); + LocalDateTime simulationDateTime = simulation.getCorrectSystemTime(); if(train.isParkingAt()){ Station startStation = diagramStation.findFirstNotDepotStation(train.isRight()); Station lastStation = diagramStation.findLastNotDepotStation(train.isRight()); @@ -32,7 +34,7 @@ public class PackingService implements CalculateDiagram{ Station nextStation = diagramStation.findNext(trainSection.getStation(),train.isRight()); sd.setEndStation(nextStation); sd.setShowTrainDiagram(true); - log.debug("列车[{}] 方向[{}] 停靠车站[{}] 查找前方车站[{}]",train.getGroupNumber(),train.isRight(),trainSection.getStation().getCode(),nextStation.getCode()); + log.debug("仿真id[{}] 仿真时间[{}] 列车[{}] 方向[{}] 停靠车站[{}] 查找前方车站[{}]",mapId,simulationDateTime,train.getGroupNumber(),train.isRight(),trainSection.getStation().getCode(),nextStation.getCode()); return Optional.of(sd); }else if(trainSection.isStandTrack() || (trainSection.isStandTrack() && Objects.equals(trainSection.getStation().getCode(),lastStation.getCode()))){ //列车停靠车站或到终点站 @@ -41,7 +43,7 @@ public class PackingService implements CalculateDiagram{ Station preStation = diagramStation.findPre(trainSection.getStation(),train.isRight()); sd.setStartStation(preStation); sd.setEndStation(trainSection.getStation()); - log.debug("列车[{}] 方向[{}] 停靠车站[{}] 查找前方车站[{}]",train.getGroupNumber(),train.isRight(),trainSection.getStation().getCode(),preStation.getCode()); + log.debug("仿真id[{}] 仿真时间[{}] 列车[{}] 方向[{}] 停靠车站[{}] 查找前方车站[{}]",mapId,simulationDateTime,train.getGroupNumber(),train.isRight(),trainSection.getStation().getCode(),preStation.getCode()); return Optional.of(sd); } //中途停靠站不处理