大铁线路2增加进路路径生成逻辑(因为没有站间运行等级和交路数据)
This commit is contained in:
parent
af36dd547d
commit
75fc0d0915
@ -251,7 +251,7 @@ public class InterlockBuilder2 {
|
|||||||
// if (!errMsgList.isEmpty()) {
|
// if (!errMsgList.isEmpty()) {
|
||||||
// return;
|
// return;
|
||||||
// }
|
// }
|
||||||
InterlockBuilder2.buildRoutePathFromStationRunLevel(stationRunLevelList, mapDataBuildResult, errMsgList);
|
InterlockBuilder2.buildRoutePathFromStationRunLevel(map.getLineCode(), stationRunLevelList, mapDataBuildResult, errMsgList);
|
||||||
// buildParkTimes(logicData, elementMap, mapDataBuildResult.getParkTimeMap(), errMsgList);
|
// buildParkTimes(logicData, elementMap, mapDataBuildResult.getParkTimeMap(), errMsgList);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1044,23 +1044,25 @@ public class InterlockBuilder2 {
|
|||||||
return stationRunLevelList;
|
return stationRunLevelList;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void buildRoutePathFromStationRunLevel(List<StationRunLevel> stationRunLevelList,
|
private static void buildRoutePathFromStationRunLevel(String lineCode, List<StationRunLevel> stationRunLevelList,
|
||||||
SimulationBuilder.SimulationDeviceBuildResult buildResult,
|
SimulationBuilder.SimulationDeviceBuildResult buildResult,
|
||||||
List<String> errMsgList) {
|
List<String> errMsgList) {
|
||||||
Map<String, List<RoutePath>> routePathMap = buildResult.getRoutePathMap();
|
Map<String, List<RoutePath>> routePathMap = buildResult.getRoutePathMap();
|
||||||
Map<String, MapElement> deviceMap = buildResult.getDeviceMap();
|
Map<String, MapElement> deviceMap = buildResult.getDeviceMap();
|
||||||
List<Section> sections = deviceMap.values().stream()
|
if (lineCode.equals("16")) {
|
||||||
.filter(device -> device instanceof Section)
|
List<Section> sections = deviceMap.values().stream()
|
||||||
.map(device -> (Section) device)
|
.filter(device -> device instanceof Section)
|
||||||
.filter(Section::isFunctionTrack)
|
.map(device -> (Section) device)
|
||||||
.collect(Collectors.toList());
|
.filter(Section::isFunctionTrack)
|
||||||
for (int i = 0; i < sections.size(); i++) {
|
.collect(Collectors.toList());
|
||||||
Section start = sections.get(i);
|
for (int i = 0; i < sections.size(); i++) {
|
||||||
for (int j = 0; j < sections.size() && i != j; j++) {
|
Section start = sections.get(i);
|
||||||
Section end = sections.get(j);
|
for (int j = 0; j < sections.size() && i != j; j++) {
|
||||||
List<RoutePath> routePaths = CalculateService.queryRoutePathsOnDirection(start, end, true, 100);
|
Section end = sections.get(j);
|
||||||
if (!CollectionUtils.isEmpty(routePaths)) {
|
List<RoutePath> routePaths = CalculateService.queryRoutePathsOnDirection(start, end, true, 100);
|
||||||
routePathMap.put(routePaths.get(0).getKey(), routePaths);
|
if (!CollectionUtils.isEmpty(routePaths)) {
|
||||||
|
routePathMap.put(routePaths.get(0).getKey(), routePaths);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user