Merge remote-tracking branch 'origin/test' into dev
This commit is contained in:
commit
0b77fe4090
@ -886,6 +886,23 @@ public class InterlockBuilder2 {
|
|||||||
routePathMap.put(routePaths.get(0).getKey(), routePaths);
|
routePathMap.put(routePaths.get(0).getKey(), routePaths);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
long l = System.currentTimeMillis();
|
||||||
|
/* 根据交路数据,构建缺失的进路路径 */
|
||||||
|
for (Routing routing : buildResult.getRoutingList()) {
|
||||||
|
List<Section> allSections = routing.getAllSections().stream().distinct().collect(Collectors.toList());
|
||||||
|
for (int i = 0, size = allSections.size(); i < size - 1; i++) {
|
||||||
|
Section one = allSections.get(i);
|
||||||
|
Section two = allSections.get(i + 1);
|
||||||
|
String key = RoutePath.buildKey(one, two);
|
||||||
|
if (!routePathMap.containsKey(key)) {
|
||||||
|
List<RoutePath> routePaths = CalculateService.queryRoutePathsOnDirection(one, two, routing.isRight(), 10);
|
||||||
|
if (!CollectionUtils.isEmpty(routePaths)) {
|
||||||
|
routePathMap.put(routePaths.get(0).getKey(), routePaths);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
System.out.println("用时" + (System.currentTimeMillis() - l));
|
||||||
log.debug("构建进路路径耗时:" + (System.currentTimeMillis() - start));
|
log.debug("构建进路路径耗时:" + (System.currentTimeMillis() - start));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user