Public Member Functions | Static Private Member Functions | Private Attributes | List of all members
lanelet::routing::RoutingCostTravelTime Class Reference

A basic travel time-based routing cost module. Uses maximum allowed speed or the maximum speed of the participant (what every is lower) and a fixed lane chance cost. More...

#include <RoutingCost.h>

Inheritance diagram for lanelet::routing::RoutingCostTravelTime:
Inheritance graph
[legend]

Public Member Functions

double getCostLaneChange (const traffic_rules::TrafficRules &trafficRules, const ConstLanelets &from, const ConstLanelets &) const noexcept override
 Get the cost of the lane change between two adjacent lanelets. More...
 
double getCostSucceeding (const traffic_rules::TrafficRules &trafficRules, const ConstLaneletOrArea &from, const ConstLaneletOrArea &to) const override
 Get the cost of the transistion from one to another lanelet. More...
 
 RoutingCostTravelTime ()=delete
 
 RoutingCostTravelTime (double laneChangeCost, double minLaneChangeTime=0.)
 
- Public Member Functions inherited from lanelet::routing::RoutingCost
virtual ~RoutingCost ()=default
 

Static Private Member Functions

static double travelTime (const traffic_rules::TrafficRules &trafficRules, const ConstArea &ar)
 
static double travelTime (const traffic_rules::TrafficRules &trafficRules, const ConstLanelet &ll)
 

Private Attributes

const double laneChangeCost_
 
const Velocity maxSpeed_
 
const double minChangeTime_
 

Detailed Description

A basic travel time-based routing cost module. Uses maximum allowed speed or the maximum speed of the participant (what every is lower) and a fixed lane chance cost.

Definition at line 82 of file RoutingCost.h.

Constructor & Destructor Documentation

◆ RoutingCostTravelTime() [1/2]

lanelet::routing::RoutingCostTravelTime::RoutingCostTravelTime ( )
delete

◆ RoutingCostTravelTime() [2/2]

lanelet::routing::RoutingCostTravelTime::RoutingCostTravelTime ( double  laneChangeCost,
double  minLaneChangeTime = 0. 
)
inlineexplicit

Time cost of a lane change [s]. If the time is not sufficient for the lane change (i.e. minLaneChangeTime is not reached), no lane change will possible at this position. Instead the relation between the involved lanelets is "adjacent".

Definition at line 89 of file RoutingCost.h.

Member Function Documentation

◆ getCostLaneChange()

double lanelet::routing::RoutingCostTravelTime::getCostLaneChange ( const traffic_rules::TrafficRules trafficRules,
const ConstLanelets from,
const ConstLanelets to 
) const
inlineoverridevirtualnoexcept

Get the cost of the lane change between two adjacent lanelets.

Parameters
trafficRulesTrafficRules module to apply
fromThe lanelet or area the traffic participant is on (assumed to be in the middle)
toThe lanelet or area the traffic participant is reaching for (reference is the middle again)
Returns
Routing cost of the lane change
Note
The calculated cost will be assigned to the edge in the graph between 'from' and 'to'. So typically this should represent some artificial cost for a lane change.

Implements lanelet::routing::RoutingCost.

Definition at line 96 of file RoutingCost.h.

◆ getCostSucceeding()

double lanelet::routing::RoutingCostTravelTime::getCostSucceeding ( const traffic_rules::TrafficRules trafficRules,
const ConstLaneletOrArea from,
const ConstLaneletOrArea to 
) const
inlineoverridevirtual

Get the cost of the transistion from one to another lanelet.

Parameters
trafficRulesTrafficRules module to apply
fromThe lanelet or area the traffic participant is on (assumed to be in the middle)
toThe lanelet or area the traffic participant is reaching for (reference is the middle again)
Returns
Routing cost for passing this lanelet
Note
The calculated cost will be assigned to the edge in the graph between 'from' and 'to'. So typically this should represent the cost of passing the 'from'-lanelet with regards of going into the 'to'-lanelet.

Implements lanelet::routing::RoutingCost.

Definition at line 106 of file RoutingCost.h.

◆ travelTime() [1/2]

double lanelet::routing::RoutingCostTravelTime::travelTime ( const traffic_rules::TrafficRules trafficRules,
const ConstArea ar 
)
staticprivate

Definition at line 29 of file RoutingCost.cpp.

◆ travelTime() [2/2]

double lanelet::routing::RoutingCostTravelTime::travelTime ( const traffic_rules::TrafficRules trafficRules,
const ConstLanelet ll 
)
staticprivate

Definition at line 24 of file RoutingCost.cpp.

Member Data Documentation

◆ laneChangeCost_

const double lanelet::routing::RoutingCostTravelTime::laneChangeCost_
private

Definition at line 118 of file RoutingCost.h.

◆ maxSpeed_

const Velocity lanelet::routing::RoutingCostTravelTime::maxSpeed_
private

Definition at line 117 of file RoutingCost.h.

◆ minChangeTime_

const double lanelet::routing::RoutingCostTravelTime::minChangeTime_
private

Definition at line 118 of file RoutingCost.h.


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


lanelet2_routing
Author(s): Matthias Mayr
autogenerated on Sun Oct 27 2024 02:27:49