优化loadDepotInOutRoutePath

This commit is contained in:
xiazengbin 2021-12-07 09:12:32 +08:00
parent 76876c6818
commit b9a550a6a5

View File

@ -87,13 +87,13 @@ public class SimulationBuilder {
/** /**
* 加载进出depot的route path * 加载进出depot的route path
*/ */
private static void loadDepotInOutRoutePath(Simulation simulation) { private static void loadDepotInOutRoutePath(Simulation simulation) {
final Map<String, List<RoutePath>> srps = simulation.getRepository().getRoutePathMap();
// 仿真车辆段站台停车轨列表 // 仿真车辆段站台停车轨列表
Map<Station, List<Section>> parkingTracksMap = simulation.getRepository().getParkingTracksMap(); Map<Station, List<Section>> parkingTracksMap = simulation.getRepository().getParkingTracksMap();
if (CollectionUtils.isEmpty(parkingTracksMap)) { if (CollectionUtils.isEmpty(parkingTracksMap)) {
return; return;
} }
final Map<String, List<RoutePath>> srps = simulation.getRepository().getRoutePathMap();
parkingTracksMap.forEach((station, secs) -> { parkingTracksMap.forEach((station, secs) -> {
if (station.isDepot()) {// 车站为车辆段 if (station.isDepot()) {// 车站为车辆段
List<Section> transferList = station.getTransferList();// 转换轨列表 List<Section> transferList = station.getTransferList();// 转换轨列表