Compare commits

...

4 Commits

3 changed files with 35 additions and 2 deletions

View File

@ -2,6 +2,8 @@
- Changes from 5.27.0
- Routing:
- CHANGED: Add support for surface=metal,grass_paver,woodchips in bicyle profile. [#6395](https://github.com/Project-OSRM/osrm-backend/pull/6395)
- Tools:
- FIXED: Always use original weights when handling `--parse-conditionals-from-now` option. [#6399](https://github.com/Project-OSRM/osrm-backend/pull/6399)
# 5.27.0
- Changes from 5.26.0

View File

@ -353,6 +353,28 @@ Feature: Car - Turn restrictions
| b | a | bj,jc,jc,aj,aj |
| b | d | bj,jd,jd |
# here we check that conditional restrictions can be updated via re-run of `contract`/`customize` with updated `--parse-conditionals-from-now`
# 10am utc, sat
When I run "osrm-contract {osm_file} --time-zone-file=test/data/tz/{timezone_names}/guinea.geojson --parse-conditionals-from-now=1494064800"
When I run "osrm-customize {osm_file} --time-zone-file=test/data/tz/{timezone_names}/guinea.geojson --parse-conditionals-from-now=1494064800"
When I route I should get
| from | to | route |
| b | c | bj,jc,jc |
| b | a | bj,aj,aj |
| b | d | bj,jd,jd |
# 10am utc, wed
When I run "osrm-contract {osm_file} --time-zone-file=test/data/tz/{timezone_names}/guinea.geojson --parse-conditionals-from-now=1493805600"
When I run "osrm-customize {osm_file} --time-zone-file=test/data/tz/{timezone_names}/guinea.geojson --parse-conditionals-from-now=1493805600"
When I route I should get
| from | to | route |
| b | c | bj,jc,jc |
| b | a | bj,jc,jc,aj,aj |
| b | d | bj,jd,jd |
@no_turning @conditionals
Scenario: Car - Conditional restriction with multiple time windows
Given the extract extra arguments "--parse-conditional-restrictions"

View File

@ -583,8 +583,17 @@ Updater::LoadAndUpdateEdgeExpandedGraph(std::vector<extractor::EdgeBasedEdge> &e
[&] { extractor::files::readNodeData(config.GetPath(".osrm.ebg_nodes"), node_data); },
[&] {
extractor::files::readTurnWeightPenalty(
config.GetPath(".osrm.turn_weight_penalties"), turn_weight_penalties);
// 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 guarantee that subsequent runs of this code will work on top of original
// weights
auto path = config.GetPath(".osrm.turn_weight_penalties").string() + ".original";
if (!boost::filesystem::exists(path))
{
boost::filesystem::copy_file(config.GetPath(".osrm.turn_weight_penalties"),
path);
}
extractor::files::readTurnWeightPenalty(path, turn_weight_penalties);
},
[&] {
extractor::files::readTurnDurationPenalty(