Implements Compressed Node Based Graph (De-)Serialization Skeleton
Implements parallel recursion for the partitioner Fixes osrm-extract's -dump-partition-graph: accept no further tokens References: - http://www.boost.org/doc/libs/1_55_0/doc/html/boost/program_options/bool_switch.html Pulls parameters through to make them configurable from the outside Defaults are equivalent to: ./osrm-partition \ berlin-latest.osrm \ --max-cell-size 4096 \ --balance 1.2 \ --boundary 0.25 \ --optimizing-cuts 10 Fixes parallel_do call for Intel TBB 4.2 (Trusty): no range-based overload
This commit is contained in:
committed by
Patrick Niklaus
parent
786be6f570
commit
b9ed20bb9b
@@ -91,6 +91,11 @@ class Extractor
|
||||
|
||||
void WriteTurnLaneData(const std::string &turn_lane_file) const;
|
||||
|
||||
// Writes compressed node based graph and its embedding into a file for osrm-partition to use.
|
||||
static void WriteCompressedNodeBasedGraph(const std::string &path,
|
||||
const util::NodeBasedDynamicGraph &graph,
|
||||
const std::vector<QueryNode> &externals);
|
||||
|
||||
// globals persisting during the extraction process and the graph generation process
|
||||
|
||||
// during turn lane analysis, we might have to combine lanes for roads that are modelled as two
|
||||
|
||||
@@ -77,6 +77,7 @@ struct ExtractorConfig
|
||||
edge_based_node_weights_output_path = basepath + ".osrm.enw";
|
||||
profile_properties_output_path = basepath + ".osrm.properties";
|
||||
intersection_class_data_output_path = basepath + ".osrm.icd";
|
||||
compressed_node_based_graph_output_path = basepath + ".osrm.cnbg";
|
||||
}
|
||||
|
||||
boost::filesystem::path input_path;
|
||||
@@ -108,6 +109,9 @@ struct ExtractorConfig
|
||||
std::string edge_segment_lookup_path;
|
||||
|
||||
bool use_metadata;
|
||||
|
||||
bool dump_compressed_node_based_graph;
|
||||
std::string compressed_node_based_graph_output_path;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,15 +31,22 @@ struct PartitionConfig
|
||||
}
|
||||
|
||||
edge_based_graph_path = basepath + ".osrm.ebg";
|
||||
compressed_node_based_graph_path = basepath + ".osrm.cnbg";
|
||||
partition_path = basepath + ".osrm.partition";
|
||||
}
|
||||
|
||||
// might be changed to the node based graph at some point
|
||||
boost::filesystem::path base_path;
|
||||
boost::filesystem::path edge_based_graph_path;
|
||||
boost::filesystem::path compressed_node_based_graph_path;
|
||||
boost::filesystem::path partition_path;
|
||||
|
||||
unsigned requested_num_threads;
|
||||
|
||||
std::size_t maximum_cell_size;
|
||||
double balance;
|
||||
double boundary_factor;
|
||||
std::size_t num_optimizing_cuts;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -125,7 +125,7 @@ template <typename NodeEntryT, typename EdgeEntryT> class RemappableGraph
|
||||
const auto remaining_edges = std::distance(BeginEdges(node), center);
|
||||
node.edges_end = node.edges_begin + remaining_edges;
|
||||
return center;
|
||||
};
|
||||
}
|
||||
|
||||
protected:
|
||||
std::vector<NodeT> nodes;
|
||||
|
||||
@@ -19,6 +19,7 @@ class RecursiveBisection
|
||||
RecursiveBisection(std::size_t maximum_cell_size,
|
||||
double balance,
|
||||
double boundary_factor,
|
||||
std::size_t num_optimizing_cuts,
|
||||
BisectionGraph &bisection_graph);
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user