Add stoppage penalty - consider acceleration and braking time, which can dominate short route ETAs.
This commit is contained in:
committed by
Daniel Patterson
parent
6c37b71046
commit
05647adcc6
@@ -384,54 +384,84 @@ class ContiguousInternalMemoryDataFacadeBase : public BaseDataFacade
|
||||
input_coordinate, max_results, max_distance, bearing, bearing_range, approach);
|
||||
}
|
||||
|
||||
std::pair<PhantomNode, PhantomNode>
|
||||
NearestPhantomNodeWithAlternativeFromBigComponent(const util::Coordinate input_coordinate,
|
||||
const Approach approach,
|
||||
const bool use_all_edges) const override final
|
||||
std::pair<PhantomNode, PhantomNode> NearestPhantomNodeWithAlternativeFromBigComponent(
|
||||
const util::Coordinate input_coordinate,
|
||||
const Approach approach,
|
||||
const bool use_all_edges,
|
||||
const double minimum_stoppage_penalty,
|
||||
const double maximum_stoppage_penalty) const override final
|
||||
{
|
||||
BOOST_ASSERT(m_geospatial_query.get());
|
||||
|
||||
return m_geospatial_query->NearestPhantomNodeWithAlternativeFromBigComponent(
|
||||
input_coordinate, approach, use_all_edges);
|
||||
input_coordinate,
|
||||
approach,
|
||||
use_all_edges,
|
||||
minimum_stoppage_penalty,
|
||||
maximum_stoppage_penalty);
|
||||
}
|
||||
|
||||
std::pair<PhantomNode, PhantomNode>
|
||||
NearestPhantomNodeWithAlternativeFromBigComponent(const util::Coordinate input_coordinate,
|
||||
const double max_distance,
|
||||
const Approach approach,
|
||||
const bool use_all_edges) const override final
|
||||
std::pair<PhantomNode, PhantomNode> NearestPhantomNodeWithAlternativeFromBigComponent(
|
||||
const util::Coordinate input_coordinate,
|
||||
const double max_distance,
|
||||
const Approach approach,
|
||||
const bool use_all_edges,
|
||||
const double minimum_stoppage_penalty,
|
||||
const double maximum_stoppage_penalty) const override final
|
||||
{
|
||||
BOOST_ASSERT(m_geospatial_query.get());
|
||||
|
||||
return m_geospatial_query->NearestPhantomNodeWithAlternativeFromBigComponent(
|
||||
input_coordinate, max_distance, approach, use_all_edges);
|
||||
input_coordinate,
|
||||
max_distance,
|
||||
approach,
|
||||
use_all_edges,
|
||||
minimum_stoppage_penalty,
|
||||
maximum_stoppage_penalty);
|
||||
}
|
||||
|
||||
std::pair<PhantomNode, PhantomNode>
|
||||
NearestPhantomNodeWithAlternativeFromBigComponent(const util::Coordinate input_coordinate,
|
||||
const double max_distance,
|
||||
const int bearing,
|
||||
const int bearing_range,
|
||||
const Approach approach,
|
||||
const bool use_all_edges) const override final
|
||||
std::pair<PhantomNode, PhantomNode> NearestPhantomNodeWithAlternativeFromBigComponent(
|
||||
const util::Coordinate input_coordinate,
|
||||
const double max_distance,
|
||||
const int bearing,
|
||||
const int bearing_range,
|
||||
const Approach approach,
|
||||
const bool use_all_edges,
|
||||
const double minimum_stoppage_penalty,
|
||||
const double maximum_stoppage_penalty) const override final
|
||||
{
|
||||
BOOST_ASSERT(m_geospatial_query.get());
|
||||
|
||||
return m_geospatial_query->NearestPhantomNodeWithAlternativeFromBigComponent(
|
||||
input_coordinate, max_distance, bearing, bearing_range, approach, use_all_edges);
|
||||
input_coordinate,
|
||||
max_distance,
|
||||
bearing,
|
||||
bearing_range,
|
||||
approach,
|
||||
use_all_edges,
|
||||
minimum_stoppage_penalty,
|
||||
maximum_stoppage_penalty);
|
||||
}
|
||||
|
||||
std::pair<PhantomNode, PhantomNode>
|
||||
NearestPhantomNodeWithAlternativeFromBigComponent(const util::Coordinate input_coordinate,
|
||||
const int bearing,
|
||||
const int bearing_range,
|
||||
const Approach approach,
|
||||
const bool use_all_edges) const override final
|
||||
std::pair<PhantomNode, PhantomNode> NearestPhantomNodeWithAlternativeFromBigComponent(
|
||||
const util::Coordinate input_coordinate,
|
||||
const int bearing,
|
||||
const int bearing_range,
|
||||
const Approach approach,
|
||||
const bool use_all_edges,
|
||||
const double minimum_stoppage_penalty,
|
||||
const double maximum_stoppage_penalty) const override final
|
||||
{
|
||||
BOOST_ASSERT(m_geospatial_query.get());
|
||||
|
||||
return m_geospatial_query->NearestPhantomNodeWithAlternativeFromBigComponent(
|
||||
input_coordinate, bearing, bearing_range, approach, use_all_edges);
|
||||
input_coordinate,
|
||||
bearing,
|
||||
bearing_range,
|
||||
approach,
|
||||
use_all_edges,
|
||||
minimum_stoppage_penalty,
|
||||
maximum_stoppage_penalty);
|
||||
}
|
||||
|
||||
std::uint32_t GetCheckSum() const override final { return m_check_sum; }
|
||||
|
||||
@@ -157,28 +157,36 @@ class BaseDataFacade
|
||||
const double max_distance,
|
||||
const Approach approach) const = 0;
|
||||
|
||||
virtual std::pair<PhantomNode, PhantomNode>
|
||||
NearestPhantomNodeWithAlternativeFromBigComponent(const util::Coordinate input_coordinate,
|
||||
const Approach approach,
|
||||
const bool use_all_edges) const = 0;
|
||||
virtual std::pair<PhantomNode, PhantomNode>
|
||||
NearestPhantomNodeWithAlternativeFromBigComponent(const util::Coordinate input_coordinate,
|
||||
const double max_distance,
|
||||
const Approach approach,
|
||||
const bool use_all_edges) const = 0;
|
||||
virtual std::pair<PhantomNode, PhantomNode>
|
||||
NearestPhantomNodeWithAlternativeFromBigComponent(const util::Coordinate input_coordinate,
|
||||
const double max_distance,
|
||||
const int bearing,
|
||||
const int bearing_range,
|
||||
const Approach approach,
|
||||
const bool use_all_edges) const = 0;
|
||||
virtual std::pair<PhantomNode, PhantomNode>
|
||||
NearestPhantomNodeWithAlternativeFromBigComponent(const util::Coordinate input_coordinate,
|
||||
const int bearing,
|
||||
const int bearing_range,
|
||||
const Approach approach,
|
||||
const bool use_all_edges = false) const = 0;
|
||||
virtual std::pair<PhantomNode, PhantomNode> NearestPhantomNodeWithAlternativeFromBigComponent(
|
||||
const util::Coordinate input_coordinate,
|
||||
const Approach approach,
|
||||
const bool use_all_edges,
|
||||
const double minimum_stoppage_penalty,
|
||||
const double maximum_stoppage_penalty) const = 0;
|
||||
virtual std::pair<PhantomNode, PhantomNode> NearestPhantomNodeWithAlternativeFromBigComponent(
|
||||
const util::Coordinate input_coordinate,
|
||||
const double max_distance,
|
||||
const Approach approach,
|
||||
const bool use_all_edges,
|
||||
const double minimum_stoppage_penalty,
|
||||
const double maximum_stoppage_penalty) const = 0;
|
||||
virtual std::pair<PhantomNode, PhantomNode> NearestPhantomNodeWithAlternativeFromBigComponent(
|
||||
const util::Coordinate input_coordinate,
|
||||
const double max_distance,
|
||||
const int bearing,
|
||||
const int bearing_range,
|
||||
const Approach approach,
|
||||
const bool use_all_edges,
|
||||
const double minimum_stoppage_penalty,
|
||||
const double maximum_stoppage_penalty) const = 0;
|
||||
virtual std::pair<PhantomNode, PhantomNode> NearestPhantomNodeWithAlternativeFromBigComponent(
|
||||
const util::Coordinate input_coordinate,
|
||||
const int bearing,
|
||||
const int bearing_range,
|
||||
const Approach approach,
|
||||
const bool use_all_edges,
|
||||
const double minimum_stoppage_penalty,
|
||||
const double maximum_stoppage_penalty) const = 0;
|
||||
|
||||
virtual bool HasLaneData(const EdgeID id) const = 0;
|
||||
virtual util::guidance::LaneTupleIdPair GetLaneData(const EdgeID id) const = 0;
|
||||
|
||||
Reference in New Issue
Block a user