Always use original weights when handling --parse-conditionals-from-now
This commit is contained in:
parent
9fd452f6af
commit
db82cecce4
@ -584,12 +584,14 @@ Updater::LoadAndUpdateEdgeExpandedGraph(std::vector<extractor::EdgeBasedEdge> &e
|
|||||||
|
|
||||||
[&] {
|
[&] {
|
||||||
// we are going to overwrite this `.turn_weight_penalties` afterwards,
|
// we are going to overwrite this `.turn_weight_penalties` afterwards,
|
||||||
// so here we backup the original turn penalties if we didn't do that yet in order to
|
// so here we backup the original turn penalties if we didn't do that yet in order
|
||||||
// guarantee that subsequent runs of this code will work on top of original weights
|
// to guarantee that subsequent runs of this code will work on top of original
|
||||||
|
// weights
|
||||||
auto path = config.GetPath(".osrm.turn_weight_penalties").string() + ".original";
|
auto path = config.GetPath(".osrm.turn_weight_penalties").string() + ".original";
|
||||||
if (!boost::filesystem::exists(path))
|
if (!boost::filesystem::exists(path))
|
||||||
{
|
{
|
||||||
boost::filesystem::copy_file(config.GetPath(".osrm.turn_weight_penalties"), path);
|
boost::filesystem::copy_file(config.GetPath(".osrm.turn_weight_penalties"),
|
||||||
|
path);
|
||||||
}
|
}
|
||||||
extractor::files::readTurnWeightPenalty(path, turn_weight_penalties);
|
extractor::files::readTurnWeightPenalty(path, turn_weight_penalties);
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user