From 75fc0d0915b326721cfc03879a1bad0f9cb7b4fa Mon Sep 17 00:00:00 2001 From: joylink_zhangsai <1021828630@qq.com> Date: Tue, 26 Apr 2022 14:19:55 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=A7=E9=93=81=E7=BA=BF=E8=B7=AF2=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E8=BF=9B=E8=B7=AF=E8=B7=AF=E5=BE=84=E7=94=9F=E6=88=90?= =?UTF-8?q?=E9=80=BB=E8=BE=91=EF=BC=88=E5=9B=A0=E4=B8=BA=E6=B2=A1=E6=9C=89?= =?UTF-8?q?=E7=AB=99=E9=97=B4=E8=BF=90=E8=A1=8C=E7=AD=89=E7=BA=A7=E5=92=8C?= =?UTF-8?q?=E4=BA=A4=E8=B7=AF=E6=95=B0=E6=8D=AE=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cbtc/build/InterlockBuilder2.java | 30 ++++++++++--------- .../cbtc/data/plan/StationPlan2.java | 28 +++++++++++++++++ 2 files changed, 44 insertions(+), 14 deletions(-) create mode 100644 src/main/java/club/joylink/rtss/simulation/cbtc/data/plan/StationPlan2.java diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/build/InterlockBuilder2.java b/src/main/java/club/joylink/rtss/simulation/cbtc/build/InterlockBuilder2.java index d54a6048e..6f92689a6 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/build/InterlockBuilder2.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/build/InterlockBuilder2.java @@ -251,7 +251,7 @@ public class InterlockBuilder2 { // if (!errMsgList.isEmpty()) { // return; // } - InterlockBuilder2.buildRoutePathFromStationRunLevel(stationRunLevelList, mapDataBuildResult, errMsgList); + InterlockBuilder2.buildRoutePathFromStationRunLevel(map.getLineCode(), stationRunLevelList, mapDataBuildResult, errMsgList); // buildParkTimes(logicData, elementMap, mapDataBuildResult.getParkTimeMap(), errMsgList); } @@ -1044,23 +1044,25 @@ public class InterlockBuilder2 { return stationRunLevelList; } - private static void buildRoutePathFromStationRunLevel(List stationRunLevelList, + private static void buildRoutePathFromStationRunLevel(String lineCode, List stationRunLevelList, SimulationBuilder.SimulationDeviceBuildResult buildResult, List errMsgList) { Map> routePathMap = buildResult.getRoutePathMap(); Map deviceMap = buildResult.getDeviceMap(); - List
sections = deviceMap.values().stream() - .filter(device -> device instanceof Section) - .map(device -> (Section) device) - .filter(Section::isFunctionTrack) - .collect(Collectors.toList()); - for (int i = 0; i < sections.size(); i++) { - Section start = sections.get(i); - for (int j = 0; j < sections.size() && i != j; j++) { - Section end = sections.get(j); - List routePaths = CalculateService.queryRoutePathsOnDirection(start, end, true, 100); - if (!CollectionUtils.isEmpty(routePaths)) { - routePathMap.put(routePaths.get(0).getKey(), routePaths); + if (lineCode.equals("16")) { + List
sections = deviceMap.values().stream() + .filter(device -> device instanceof Section) + .map(device -> (Section) device) + .filter(Section::isFunctionTrack) + .collect(Collectors.toList()); + for (int i = 0; i < sections.size(); i++) { + Section start = sections.get(i); + for (int j = 0; j < sections.size() && i != j; j++) { + Section end = sections.get(j); + List routePaths = CalculateService.queryRoutePathsOnDirection(start, end, true, 100); + if (!CollectionUtils.isEmpty(routePaths)) { + routePathMap.put(routePaths.get(0).getKey(), routePaths); + } } } } diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/data/plan/StationPlan2.java b/src/main/java/club/joylink/rtss/simulation/cbtc/data/plan/StationPlan2.java new file mode 100644 index 000000000..07ee83278 --- /dev/null +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/data/plan/StationPlan2.java @@ -0,0 +1,28 @@ +package club.joylink.rtss.simulation.cbtc.data.plan; + +import club.joylink.rtss.simulation.cbtc.data.map.Route; +import club.joylink.rtss.simulation.cbtc.data.map.Section; +import club.joylink.rtss.simulation.cbtc.data.map.Station; + +import java.time.LocalTime; + +/** + * 车站接发车计划 + */ +public class StationPlan2 { + private TripPlan tripPlan; + + private Station station; + + private Plan receivingPlan; + + private Plan departurePlan; + + class Plan { + private LocalTime time; + + private Section section; + + private Route route; + } +}