Compare commits

..

3 Commits

Author SHA1 Message Date
Patrick Niklaus 9224158835 Update changelog and bump to 5.2.7 2016-07-20 17:14:15 +02:00
Michael Krasnyk 3414519cb8 Fix ambiguity in edge weights by using minimal weight 2016-07-20 17:00:48 +02:00
Moritz Kobitzsch 16cee3a7d3 fix 2672 2016-07-20 16:59:39 +02:00
8 changed files with 40 additions and 10 deletions
+5
View File
@@ -1,3 +1,8 @@
# 5.2.7
- Bugfixes
- BREAKING: Fix bug that could result in failure to load 'osrm.icd' files. This breaks the dataformat
- Fix deduplication of parallel edges. Now uses correct weight.
# 5.2.6
- Bugfixes
- Fix numeric overflow in roundabout center calculation which throws an exception
+1 -1
View File
@@ -10,7 +10,7 @@ endif()
project(OSRM C CXX)
set(OSRM_VERSION_MAJOR 5)
set(OSRM_VERSION_MINOR 2)
set(OSRM_VERSION_PATCH 6)
set(OSRM_VERSION_PATCH 7)
# these two functions build up custom variables:
# OSRM_INCLUDE_PATHS and OSRM_DEFINES
+16 -1
View File
@@ -233,7 +233,7 @@ Feature: Basic Routing
| d | a | abcd,abcd |
| a | m | aeim,aeim |
| m | a | aeim,aeim |
Scenario: Testbot - Triangle challenge
Given the node map
| | | | d |
@@ -251,3 +251,18 @@ Feature: Basic Routing
| from | to | route |
| d | c | de,ce,ce |
| e | d | de,de |
Scenario: Ambiguous edge weights - Use minimal edge weight
Given the node map
| a | b |
And the ways
| nodes | highway | name |
| ab | tertiary | |
| ab | primary | |
| ab | secondary | |
When I route I should get
| from | to | route | time |
| a | b | , | 10s |
| b | a | , | 10s |
@@ -330,7 +330,7 @@ class InternalDataFacade final : public BaseDataFacade
std::vector<util::guidance::BearingClass> bearing_classes;
// and the actual bearing values
std::uint64_t num_bearings;
intersection_stream >> num_bearings;
intersection_stream.read(reinterpret_cast<char*>(&num_bearings),sizeof(num_bearings));
m_bearing_values_table.resize(num_bearings);
intersection_stream.read(reinterpret_cast<char *>(&m_bearing_values_table[0]),
sizeof(m_bearing_values_table[0]) * num_bearings);
+7
View File
@@ -62,6 +62,13 @@ class EntryClass
friend std::size_t std::hash<EntryClass>::operator()(const EntryClass &) const;
};
#if not defined __GNUC__ or __GNUC__ > 4
static_assert(std::is_trivially_copyable<EntryClass>::value,
"Class is serialized trivially in "
"the datafacades. Bytewise writing "
"requires trivially copyable type");
#endif
} // namespace guidance
} // namespace utilr
} // namespace osrm
+2
View File
@@ -417,11 +417,13 @@ void ExtractionContainers::PrepareEdges(lua_State *segment_state)
all_edges_list[i].result.weight < min_forward_weight)
{
min_forward_idx = i;
min_forward_weight = all_edges_list[i].result.weight;
}
if (all_edges_list[i].result.backward &&
all_edges_list[i].result.weight < min_backward_weight)
{
min_backward_idx = i;
min_backward_weight = all_edges_list[i].result.weight;
}
// this also increments the outer loop counter!
+7 -6
View File
@@ -661,7 +661,7 @@ void Extractor::WriteIntersectionClassificationData(
util::RangeTable<> bearing_class_range_table(bearing_counts);
file_out_stream << bearing_class_range_table;
file_out_stream << total_bearings;
file_out_stream.write(reinterpret_cast<const char *>(&total_bearings), sizeof(total_bearings));
for (const auto &bearing_class : bearing_classes)
{
const auto &bearings = bearing_class.getAvailableBearings();
@@ -669,17 +669,18 @@ void Extractor::WriteIntersectionClassificationData(
sizeof(bearings[0]) * bearings.size());
}
// FIXME
// This should be here, but g++4.8 does not have it...
// static_assert(std::is_trivially_copyable<util::guidance::EntryClass>::value,
// "EntryClass Serialization requires trivial copyable entry classes");
if (!static_cast<bool>(file_out_stream))
{
throw util::exception("Failed to write to " + output_file_name + ".");
}
util::serializeVector(file_out_stream, entry_classes);
TIMER_STOP(write_edges);
util::SimpleLogger().Write() << "ok, after " << TIMER_SEC(write_edges) << "s for "
<< node_based_intersection_classes.size() << " Indices into "
<< bearing_classes.size() << " bearing classes and "
<< entry_classes.size() << " entry classes";
<< entry_classes.size() << " entry classes and " << total_bearings
<< " bearing values." << std::endl;
}
}
}
+1 -1
View File
@@ -360,7 +360,7 @@ int Storage::Run()
}
std::uint64_t num_bearings;
intersection_stream >> num_bearings;
intersection_stream.read(reinterpret_cast<char*>(&num_bearings),sizeof(num_bearings));
std::vector<DiscreteBearing> bearing_class_table(num_bearings);
intersection_stream.read(reinterpret_cast<char *>(&bearing_class_table[0]),