Add EBG node durations
This commit is contained in:
committed by
Patrick Niklaus
parent
db18e8669f
commit
fd9bebbfa7
@@ -75,13 +75,14 @@ void printUnreachableStatistics(const Partition &partition,
|
||||
auto LoadAndUpdateEdgeExpandedGraph(const CustomizationConfig &config,
|
||||
const partitioner::MultiLevelPartition &mlp,
|
||||
std::vector<EdgeWeight> &node_weights,
|
||||
std::vector<EdgeDuration> &node_durations,
|
||||
std::uint32_t &connectivity_checksum)
|
||||
{
|
||||
updater::Updater updater(config.updater_config);
|
||||
|
||||
std::vector<extractor::EdgeBasedEdge> edge_based_edge_list;
|
||||
EdgeID num_nodes = updater.LoadAndUpdateEdgeExpandedGraph(
|
||||
edge_based_edge_list, node_weights, connectivity_checksum);
|
||||
edge_based_edge_list, node_weights, node_durations, connectivity_checksum);
|
||||
|
||||
auto directed = partitioner::splitBidirectionalEdges(edge_based_edge_list);
|
||||
|
||||
@@ -123,8 +124,10 @@ int Customizer::Run(const CustomizationConfig &config)
|
||||
partitioner::files::readPartition(config.GetPath(".osrm.partition"), mlp);
|
||||
|
||||
std::vector<EdgeWeight> node_weights;
|
||||
std::vector<EdgeDuration> node_durations; // TODO: to be removed later
|
||||
std::uint32_t connectivity_checksum = 0;
|
||||
auto graph = LoadAndUpdateEdgeExpandedGraph(config, mlp, node_weights, connectivity_checksum);
|
||||
auto graph = LoadAndUpdateEdgeExpandedGraph(
|
||||
config, mlp, node_weights, node_durations, connectivity_checksum);
|
||||
BOOST_ASSERT(graph.GetNumberOfNodes() == node_weights.size());
|
||||
std::for_each(node_weights.begin(), node_weights.end(), [](auto &w) { w &= 0x7fffffff; });
|
||||
util::Log() << "Loaded edge based graph: " << graph.GetNumberOfEdges() << " edges, "
|
||||
@@ -163,7 +166,6 @@ int Customizer::Run(const CustomizationConfig &config)
|
||||
util::Log() << "MLD customization writing took " << TIMER_SEC(writing_mld_data) << " seconds";
|
||||
|
||||
TIMER_START(writing_graph);
|
||||
std::vector<EdgeDuration> node_durations; // TODO: save an empty vector, to be removed later
|
||||
MultiLevelEdgeBasedGraph shaved_graph{
|
||||
std::move(graph), std::move(node_weights), std::move(node_durations)};
|
||||
customizer::files::writeGraph(
|
||||
|
||||
Reference in New Issue
Block a user