Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| adee18468c | |||
| 9a9abf4c11 | |||
| 331eeca4c1 | |||
| f8d6e4750a | |||
| cf505386f9 | |||
| e346e9ae07 |
@@ -6,6 +6,7 @@
|
|||||||
- FIXED: Remove the last short annotation segment in `trimShortSegments` [#4946](https://github.com/Project-OSRM/osrm-backend/pull/4946)
|
- FIXED: Remove the last short annotation segment in `trimShortSegments` [#4946](https://github.com/Project-OSRM/osrm-backend/pull/4946)
|
||||||
- FIXED: Properly calculate annotations for speeds, durations and distances when waypoints are used with mapmatching [#4949](https://github.com/Project-OSRM/osrm-backend/pull/4949)
|
- FIXED: Properly calculate annotations for speeds, durations and distances when waypoints are used with mapmatching [#4949](https://github.com/Project-OSRM/osrm-backend/pull/4949)
|
||||||
- FIXED: Don't apply unimplemented SH and PH conditions in OpeningHours and add inversed date ranges [#4992](https://github.com/Project-OSRM/osrm-backend/issues/4992)
|
- FIXED: Don't apply unimplemented SH and PH conditions in OpeningHours and add inversed date ranges [#4992](https://github.com/Project-OSRM/osrm-backend/issues/4992)
|
||||||
|
- FIXED: integer overflow in `DynamicGraph::Renumber` [#5021](https://github.com/Project-OSRM/osrm-backend/pull/5021)
|
||||||
- Profile:
|
- Profile:
|
||||||
- CHANGED: Handle oneways in get_forward_backward_by_key [#4929](https://github.com/Project-OSRM/osrm-backend/pull/4929)
|
- CHANGED: Handle oneways in get_forward_backward_by_key [#4929](https://github.com/Project-OSRM/osrm-backend/pull/4929)
|
||||||
- FIXED: Do not route against oneway road if there is a cycleway in the wrong direction; also review bike profile [#4943](https://github.com/Project-OSRM/osrm-backend/issues/4943)
|
- FIXED: Do not route against oneway road if there is a cycleway in the wrong direction; also review bike profile [#4943](https://github.com/Project-OSRM/osrm-backend/issues/4943)
|
||||||
|
|||||||
@@ -117,6 +117,19 @@ template <typename Data> struct SharedMonitor
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void remove() { bi::shared_memory_object::remove(Data::name); }
|
static void remove() { bi::shared_memory_object::remove(Data::name); }
|
||||||
|
static bool exists()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
bi::shared_memory_object shmem_open =
|
||||||
|
bi::shared_memory_object(bi::open_only, Data::name, bi::read_only);
|
||||||
|
}
|
||||||
|
catch (const bi::interprocess_exception &exception)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
#if USE_BOOST_INTERPROCESS_CONDITION
|
#if USE_BOOST_INTERPROCESS_CONDITION
|
||||||
|
|||||||
@@ -2,6 +2,8 @@
|
|||||||
#define DYNAMICGRAPH_HPP
|
#define DYNAMICGRAPH_HPP
|
||||||
|
|
||||||
#include "util/deallocating_vector.hpp"
|
#include "util/deallocating_vector.hpp"
|
||||||
|
#include "util/exception.hpp"
|
||||||
|
#include "util/exception_utils.hpp"
|
||||||
#include "util/integer_range.hpp"
|
#include "util/integer_range.hpp"
|
||||||
#include "util/permutation.hpp"
|
#include "util/permutation.hpp"
|
||||||
#include "util/typedefs.hpp"
|
#include "util/typedefs.hpp"
|
||||||
@@ -411,7 +413,7 @@ template <typename EdgeDataT> class DynamicGraph
|
|||||||
util::inplacePermutation(node_array.begin(), node_array.end(), old_to_new_node);
|
util::inplacePermutation(node_array.begin(), node_array.end(), old_to_new_node);
|
||||||
|
|
||||||
// Build up edge permutation
|
// Build up edge permutation
|
||||||
auto new_edge_index = 0;
|
EdgeID new_edge_index = 0;
|
||||||
std::vector<EdgeID> old_to_new_edge(edge_list.size(), SPECIAL_EDGEID);
|
std::vector<EdgeID> old_to_new_edge(edge_list.size(), SPECIAL_EDGEID);
|
||||||
for (auto node : util::irange<NodeID>(0, number_of_nodes))
|
for (auto node : util::irange<NodeID>(0, number_of_nodes))
|
||||||
{
|
{
|
||||||
@@ -419,6 +421,11 @@ template <typename EdgeDataT> class DynamicGraph
|
|||||||
// move all filled edges
|
// move all filled edges
|
||||||
for (auto edge : GetAdjacentEdgeRange(node))
|
for (auto edge : GetAdjacentEdgeRange(node))
|
||||||
{
|
{
|
||||||
|
if (new_edge_index == std::numeric_limits<EdgeID>::max())
|
||||||
|
{
|
||||||
|
throw util::exception("There are too many edges, OSRM only supports 2^32" +
|
||||||
|
SOURCE_REF);
|
||||||
|
}
|
||||||
edge_list[edge].target = old_to_new_node[edge_list[edge].target];
|
edge_list[edge].target = old_to_new_node[edge_list[edge].target];
|
||||||
BOOST_ASSERT(edge_list[edge].target != SPECIAL_NODEID);
|
BOOST_ASSERT(edge_list[edge].target != SPECIAL_NODEID);
|
||||||
old_to_new_edge[edge] = new_edge_index++;
|
old_to_new_edge[edge] = new_edge_index++;
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "osrm",
|
"name": "osrm",
|
||||||
"version": "5.17.0-rc.2",
|
"version": "5.17.0-rc.4",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "The Open Source Routing Machine is a high performance routing engine written in C++14 designed to run on OpenStreetMap data.",
|
"description": "The Open Source Routing Machine is a high performance routing engine written in C++14 designed to run on OpenStreetMap data.",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
+6
-4
@@ -27,12 +27,15 @@ void deleteRegion(const storage::SharedRegionRegister::ShmKey key)
|
|||||||
|
|
||||||
void listRegions()
|
void listRegions()
|
||||||
{
|
{
|
||||||
|
osrm::util::Log() << "name\tshm key\ttimestamp\tsize";
|
||||||
|
if (!storage::SharedMonitor<storage::SharedRegionRegister>::exists())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
storage::SharedMonitor<storage::SharedRegionRegister> monitor;
|
storage::SharedMonitor<storage::SharedRegionRegister> monitor;
|
||||||
std::vector<std::string> names;
|
std::vector<std::string> names;
|
||||||
const auto &shared_register = monitor.data();
|
const auto &shared_register = monitor.data();
|
||||||
shared_register.List(std::back_inserter(names));
|
shared_register.List(std::back_inserter(names));
|
||||||
osrm::util::Log() << "name\tshm key\ttimestamp\tsize";
|
|
||||||
for (const auto &name : names)
|
for (const auto &name : names)
|
||||||
{
|
{
|
||||||
auto id = shared_register.Find(name);
|
auto id = shared_register.Find(name);
|
||||||
@@ -105,8 +108,7 @@ bool generateDataStoreOptions(const int argc,
|
|||||||
boost::program_options::value<bool>(&list_datasets)
|
boost::program_options::value<bool>(&list_datasets)
|
||||||
->default_value(false)
|
->default_value(false)
|
||||||
->implicit_value(true),
|
->implicit_value(true),
|
||||||
"Name of the dataset to load into memory. This allows having multiple datasets in memory "
|
"List all OSRM datasets currently in memory") //
|
||||||
"at the same time.") //
|
|
||||||
("only-metric",
|
("only-metric",
|
||||||
boost::program_options::value<bool>(&only_metric)
|
boost::program_options::value<bool>(&only_metric)
|
||||||
->default_value(false)
|
->default_value(false)
|
||||||
|
|||||||
Reference in New Issue
Block a user