Added weight multipliers for speed and turn updates

This commit is contained in:
Michael Krasnyk
2017-01-17 09:24:52 +01:00
committed by Patrick Niklaus
parent 279f8aabfb
commit c059d15cb9
12 changed files with 117 additions and 124 deletions
+2 -14
View File
@@ -78,21 +78,9 @@ class Contractor
private:
ContractorConfig config;
EdgeID LoadEdgeExpandedGraph(const std::string &edge_based_graph_path,
EdgeID LoadEdgeExpandedGraph(const ContractorConfig &config,
std::vector<extractor::EdgeBasedEdge> &edge_based_edge_list,
std::vector<EdgeWeight> &node_weights,
const std::string &edge_segment_lookup_path,
const std::string &turn_weight_penalties_path,
const std::string &turn_duration_penalties_path,
const std::string &turn_penalties_index_path,
const std::vector<std::string> &segment_speed_path,
const std::vector<std::string> &turn_penalty_path,
const std::string &nodes_filename,
const std::string &geometry_filename,
const std::string &datasource_names_filename,
const std::string &datasource_indexes_filename,
const std::string &rtree_leaf_filename,
const double log_edge_updates_factor);
std::vector<EdgeWeight> &node_weights);
};
}
}
+4 -1
View File
@@ -39,7 +39,7 @@ namespace contractor
struct ContractorConfig
{
ContractorConfig() : requested_num_threads(0) {}
ContractorConfig() : requested_num_threads(0), weight_multiplier(10.) {}
// Infer the output names from the path of the .osrm file
void UseDefaultOutputNames()
@@ -57,6 +57,7 @@ struct ContractorConfig
rtree_leaf_path = osrm_input_path.string() + ".fileIndex";
datasource_names_path = osrm_input_path.string() + ".datasource_names";
datasource_indexes_path = osrm_input_path.string() + ".datasource_indexes";
profile_properties_path = osrm_input_path.string() + ".properties";
}
boost::filesystem::path config_file_path;
@@ -78,6 +79,7 @@ struct ContractorConfig
unsigned requested_num_threads;
double log_edge_updates_factor;
double weight_multiplier;
// A percentage of vertices that will be contracted for the hierarchy.
// Offers a trade-off between preprocessing and query time.
@@ -89,6 +91,7 @@ struct ContractorConfig
std::vector<std::string> turn_penalty_lookup_paths;
std::string datasource_indexes_path;
std::string datasource_names_path;
std::string profile_properties_path;
};
}
}