libosmscout  0.1
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules
osmscout::FastestPathRoutingProfile Class Reference

#include <RoutingProfile.h>

+ Inheritance diagram for osmscout::FastestPathRoutingProfile:

Public Member Functions

 FastestPathRoutingProfile (const TypeConfigRef &typeConfig)
 
double GetCosts (const Area &area, const Distance &distance) const override
 Estimated cost for specific area with given distance. More...
 
double GetCosts (const Distance &distance) const override
 Estimated cost for distance when are no limitations (max. More...
 
double GetCosts (const RouteNode &currentNode, const std::vector< ObjectVariantData > &objectVariantData, size_t inPathIndex, size_t outPathIndex) const override
 Estimated cost for outgoing path (outPathIndex) from currentNode when currentNode is entered from inPathIndex. More...
 
double GetCosts (const Way &way, const Distance &distance) const override
 Estimated cost for specific way with given distance. More...
 
std::string GetCostString (double cost) const override
 Textual representation of cost. More...
 
HourDuration GetMaxPenalty () const
 
Distance GetPenaltyDifferentType () const
 
Distance GetPenaltySameType () const
 
double GetUTurnCost () const override
 
bool HasJunctionPenalty () const
 
void ParametrizeForBicycle (const TypeConfig &typeConfig, double maxSpeed) override
 Setup profile for bicycle, it also setup junction penalty and multiply cost limit and cost limit factor. More...
 
bool ParametrizeForCar (const TypeConfig &typeConfig, const std::map< std::string, double > &speedMap, double maxSpeed) override
 Setup profile for car, it also setup junction penalty and multiply cost limit and cost limit factor. More...
 
void ParametrizeForFoot (const TypeConfig &typeConfig, double maxSpeed) override
 
void SetJunctionPenalty (bool b)
 
void SetMaxPenalty (const HourDuration &d)
 
void SetPenaltyDifferentType (const Distance &d)
 
void SetPenaltySameType (const Distance &d)
 
- Public Member Functions inherited from osmscout::AbstractRoutingProfile
 AbstractRoutingProfile (const TypeConfigRef &typeConfig)
 
void AddType (const TypeInfoRef &type, double speed)
 Setup same speed for all grades of route type. More...
 
void AddType (const TypeInfoRef &type, SpeedVariant speed)
 Setup speed for various grades of route type. More...
 
bool CanUse (const Area &area) const override
 
bool CanUse (const RouteNode &currentNode, const std::vector< ObjectVariantData > &objectVariantData, size_t pathIndex) const override
 
bool CanUse (const Way &way) const override
 
bool CanUseBackward (const Way &way) const override
 
bool CanUseForward (const Way &way) const override
 
Distance GetCostLimitDistance () const override
 
double GetCostLimitFactor () const override
 
Duration GetTime (const Area &area, const Distance &distance) const override
 
Duration GetTime (const Way &way, const Distance &distance) const override
 
Vehicle GetVehicle () const override
 
double GetVehicleMaxSpeed () const
 
void SetCostLimitDistance (const Distance &costLimitDistance)
 seet SetCostLimitFactor() More...
 
void SetCostLimitFactor (double costLimitFactor)
 The router tries to minimize the actual costs of the route. More...
 
void SetVehicle (Vehicle vehicle)
 
void SetVehicleMaxSpeed (double maxSpeed)
 
- Public Member Functions inherited from osmscout::RoutingProfile
virtual ~RoutingProfile ()=default
 

Protected Attributes

bool applyJunctionPenalty =true
 
HourDuration maxPenalty =std::chrono::seconds(10)
 
Distance penaltyDifferentType =Meters(250)
 
Distance penaltySameType =Meters(40)
 
- Protected Attributes inherited from osmscout::AbstractRoutingProfile
AccessFeatureValueReader accessReader
 
Distance costLimitDistance
 
double costLimitFactor
 
GradeFeatureValueReader gradeReader
 
double maxSpeed
 
MaxSpeedFeatureValueReader maxSpeedReader
 
double minSpeed
 
std::vector< SpeedVariantspeeds
 maximum vehicle speed on route type and its grade More...
 
TypeConfigRef typeConfig
 
Vehicle vehicle
 
double vehicleMaxSpeed
 
uint8_t vehicleRouteNodeBit
 

Additional Inherited Members

- Protected Member Functions inherited from osmscout::AbstractRoutingProfile
template<typename Obj >
Duration GetTime2 (const Obj &obj, const Distance &distance) const
 

Detailed Description

Profile that defines costs base of the time the traveling device needs for a certain way resulting in the fastest path chosen (cost=distance/speedForWayType).

Constructor & Destructor Documentation

◆ FastestPathRoutingProfile()

osmscout::FastestPathRoutingProfile::FastestPathRoutingProfile ( const TypeConfigRef typeConfig)
explicit

Member Function Documentation

◆ GetCosts() [1/4]

double osmscout::FastestPathRoutingProfile::GetCosts ( const Area area,
const Distance distance 
) const
inlineoverridevirtual

Estimated cost for specific area with given distance.

Implements osmscout::RoutingProfile.

◆ GetCosts() [2/4]

double osmscout::FastestPathRoutingProfile::GetCosts ( const Distance distance) const
inlineoverridevirtual

Estimated cost for distance when are no limitations (max.

speed on the way)

Implements osmscout::RoutingProfile.

References osmscout::Distance::As().

◆ GetCosts() [3/4]

double osmscout::FastestPathRoutingProfile::GetCosts ( const RouteNode currentNode,
const std::vector< ObjectVariantData > &  objectVariantData,
size_t  inPathIndex,
size_t  outPathIndex 
) const
inlineoverridevirtual

Estimated cost for outgoing path (outPathIndex) from currentNode when currentNode is entered from inPathIndex.

Implements osmscout::RoutingProfile.

References osmscout::debugRouting, osmscout::log, osmscout::RouteNode::objects, osmscout::RouteNode::paths, osmscout::ObjectVariantData::type, and osmscout::Log::Warn().

◆ GetCosts() [4/4]

double osmscout::FastestPathRoutingProfile::GetCosts ( const Way way,
const Distance distance 
) const
inlineoverridevirtual

Estimated cost for specific way with given distance.

Implements osmscout::RoutingProfile.

◆ GetCostString()

std::string osmscout::FastestPathRoutingProfile::GetCostString ( double  cost) const
inlineoverridevirtual

Textual representation of cost.

Reimplemented from osmscout::AbstractRoutingProfile.

References osmscout::DurationString().

◆ GetMaxPenalty()

HourDuration osmscout::FastestPathRoutingProfile::GetMaxPenalty ( ) const
inline

◆ GetPenaltyDifferentType()

Distance osmscout::FastestPathRoutingProfile::GetPenaltyDifferentType ( ) const
inline

◆ GetPenaltySameType()

Distance osmscout::FastestPathRoutingProfile::GetPenaltySameType ( ) const
inline

◆ GetUTurnCost()

double osmscout::FastestPathRoutingProfile::GetUTurnCost ( ) const
inlineoverridevirtual

◆ HasJunctionPenalty()

bool osmscout::FastestPathRoutingProfile::HasJunctionPenalty ( ) const
inline

◆ ParametrizeForBicycle()

void osmscout::FastestPathRoutingProfile::ParametrizeForBicycle ( const TypeConfig typeConfig,
double  maxSpeed 
)
inlineoverridevirtual

Setup profile for bicycle, it also setup junction penalty and multiply cost limit and cost limit factor.

Reimplemented from osmscout::AbstractRoutingProfile.

References osmscout::AbstractRoutingProfile::ParametrizeForBicycle().

◆ ParametrizeForCar()

bool osmscout::FastestPathRoutingProfile::ParametrizeForCar ( const TypeConfig typeConfig,
const std::map< std::string, double > &  speedMap,
double  maxSpeed 
)
inlineoverridevirtual

Setup profile for car, it also setup junction penalty and multiply cost limit and cost limit factor.

Reimplemented from osmscout::AbstractRoutingProfile.

References osmscout::AbstractRoutingProfile::ParametrizeForCar().

◆ ParametrizeForFoot()

void osmscout::FastestPathRoutingProfile::ParametrizeForFoot ( const TypeConfig typeConfig,
double  maxSpeed 
)
inlineoverridevirtual

◆ SetJunctionPenalty()

void osmscout::FastestPathRoutingProfile::SetJunctionPenalty ( bool  b)
inline

◆ SetMaxPenalty()

void osmscout::FastestPathRoutingProfile::SetMaxPenalty ( const HourDuration d)
inline

◆ SetPenaltyDifferentType()

void osmscout::FastestPathRoutingProfile::SetPenaltyDifferentType ( const Distance d)
inline

◆ SetPenaltySameType()

void osmscout::FastestPathRoutingProfile::SetPenaltySameType ( const Distance d)
inline

Member Data Documentation

◆ applyJunctionPenalty

bool osmscout::FastestPathRoutingProfile::applyJunctionPenalty =true
protected

◆ maxPenalty

HourDuration osmscout::FastestPathRoutingProfile::maxPenalty =std::chrono::seconds(10)
protected

◆ penaltyDifferentType

Distance osmscout::FastestPathRoutingProfile::penaltyDifferentType =Meters(250)
protected

◆ penaltySameType

Distance osmscout::FastestPathRoutingProfile::penaltySameType =Meters(40)
protected

The documentation for this class was generated from the following files: