ad_map_access
Classes | Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
ad::map::route::planning::RouteExpander< RoutingCostData > Class Template Referenceabstract

Implements routing support functionality on the lane network. More...

#include <ad/map/route/RouteExpander.hpp>

Inheritance diagram for ad::map::route::planning::RouteExpander< RoutingCostData >:
Inheritance graph
[legend]
Collaboration diagram for ad::map::route::planning::RouteExpander< RoutingCostData >:
Collaboration graph
[legend]

Classes

struct  RoutingCost
 definition of the routing cost data More...
 

Public Types

typedef std::pair< RoutingParaPoint, RoutingCostRoutingPoint
 definition of the routing point
 
- Public Types inherited from ad::map::route::planning::Route
enum  Type { Type::INVALID, Type::SHORTEST, Type::SHORTEST_IGNORE_DIRECTION }
 Routing type. More...
 
typedef std::vector< point::ParaPointListBasicRoute
 Basic route description.
 

Public Member Functions

 RouteExpander (const RoutingParaPoint &start, const RoutingParaPoint &dest, physics::Distance const &maxDistance, physics::Duration const &maxDuration, Type const &routingType)
 Constructor. More...
 
 RouteExpander (RouteExpander const &)=delete
 
 RouteExpander (RouteExpander const &&)=delete
 
RouteExpanderoperator= (RouteExpander const &)=delete
 
RouteExpanderoperator= (RouteExpander &&)=delete
 
virtual ~RouteExpander ()=default
 destructor.
 
void expandNeighbors (RoutingPoint const &origin)
 Triggers the expansion of the given routing point origin to its valid neighborhood.
 
void setRelevantLanes (::ad::map::lane::LaneIdSet const &relevantLanes)
 set the lanes that are relevant for routing All the rest of the lanes in the map are ignored.
 
void clearRelevantLanes ()
 clear the list of relevant lanes.
 
- Public Member Functions inherited from ad::map::route::planning::Route
 Route (const RoutingParaPoint &start, const RoutingParaPoint &dest, physics::Distance const &maxDistance, physics::Duration const &maxDuration, Type const &routingType)
 Constructor. Calculates route between two points. More...
 
 Route (Route const &)=delete
 
 Route (Route const &&)=delete
 
Routeoperator= (Route const &)=delete
 
Routeoperator= (Route &&)=delete
 
virtual ~Route ()=default
 Destructor.
 
const point::ParaPointgetStart () const
 
const RoutingParaPointgetRoutingStart () const
 
const point::ParaPointgetDest () const
 
const RoutingParaPointgetRoutingDest () const
 
Type getType () const
 
bool laneDirectionIsIgnored () const
 
virtual bool calculate ()=0
 Performs the routing. More...
 
bool isValid () const
 
const RawRoutegetRawRoute (size_t const routeIndex=0u) const
 
const std::vector< RawRoute > & getRawRoutes () const
 
BasicRoute getBasicRoute (size_t const routeIndex=0u) const
 
std::vector< BasicRoutegetBasicRoutes () const
 

Protected Types

enum  ExpandReason { ExpandReason::SameLaneNeighbor, ExpandReason::LongitudinalNeighbor, ExpandReason::LateralNeighbor, ExpandReason::Destination }
 Definition of the reasons for route expansion. More...
 

Protected Member Functions

virtual void addNeighbor (lane::Lane::ConstPtr originLane, RoutingPoint const &origin, lane::Lane::ConstPtr neighborLane, RoutingPoint const &neighbor, ExpandReason const &expandReason)=0
 a neighbor is added More...
 
bool isStart (RoutingPoint const &origin)
 
bool isEnd (RoutingPoint const &origin)
 
bool isPositiveMovement (lane::Lane::ConstPtr lane, RoutingPoint const &origin)
 
bool isNegativeMovement (lane::Lane::ConstPtr lane, RoutingPoint const &origin)
 
bool isLaneRelevantForExpansion (lane::LaneId const laneId) const
 check if lane is relevant for route expander
 
void expandSameLaneNeighbors (lane::Lane::ConstPtr lane, RoutingPoint const &origin)
 perform the expansion of the neighbor points on the same lane
 
void expandLongitudinalNeighbors (lane::Lane::ConstPtr lane, RoutingPoint const &origin)
 perform the expansion of the neighbor points in longitudinal (contacts: successor/predecessor) lane direction
 
void expandLateralNeighbors (lane::Lane::ConstPtr lane, RoutingPoint const &origin)
 perform the expansion of the neighbor points in lateral (contacts: left/right) lane direction
 
RoutingPoint createNeighbor (lane::Lane::ConstPtr originLane, RoutingPoint const &origin, lane::Lane::ConstPtr neighborLane, RoutingParaPoint neighborRoutingParaPoint)
 create neighbor point and calculate the actual distance/duration to reach it
 
RoutingPoint createLongitudinalNeighbor (RoutingPoint const &origin, RoutingParaPoint neighborRoutingParaPoint)
 create longitudinal neighbor point with minimal actual distance/duration to reach
 

Protected Attributes

::ad::map::lane::LaneIdSet mRelevantLanes
 relevant lanes for the routing
 
- Protected Attributes inherited from ad::map::route::planning::Route
RoutingParaPoint mStart
 Start point.
 
RoutingParaPoint mDest
 Destination point.
 
const physics::Distance mMaxDistance
 prediction distance to be used
 
const physics::Duration mMaxDuration
 prediction duration to be used
 
Type mType
 Type of the route to be calculated.
 
bool mValid
 Indicates if calculation was successful. More...
 
std::vector< RawRoutemRawRoutes
 

Detailed Description

template<class RoutingCostData>
class ad::map::route::planning::RouteExpander< RoutingCostData >

Implements routing support functionality on the lane network.

This class is used to expand a route by its reachable neighbors. The routing cost data is defined by a template type to be defined by the actual routing class.

Member Enumeration Documentation

◆ ExpandReason

template<class RoutingCostData >
enum ad::map::route::planning::RouteExpander::ExpandReason
strongprotected

Definition of the reasons for route expansion.

Enumerator
SameLaneNeighbor 

expand the route by a neighbor point within the same lane

LongitudinalNeighbor 

expand the route by a longitudinal neighbor lane point

LateralNeighbor 

expand the route by a lateral neighbor lane point

Destination 

expand the destination

Constructor & Destructor Documentation

◆ RouteExpander()

template<class RoutingCostData >
ad::map::route::planning::RouteExpander< RoutingCostData >::RouteExpander ( const RoutingParaPoint start,
const RoutingParaPoint dest,
physics::Distance const &  maxDistance,
physics::Duration const &  maxDuration,
Type const &  routingType 
)
inline

Constructor.

Parameters
[in]startStart point.
[in]destDestination point.
[in]maxDistancemaximum route search distance.
[in]maxDurationmaximum route search duration.
[in]typType of the route to be calculated.

Member Function Documentation

◆ addNeighbor()

template<class RoutingCostData >
virtual void ad::map::route::planning::RouteExpander< RoutingCostData >::addNeighbor ( lane::Lane::ConstPtr  originLane,
RoutingPoint const &  origin,
lane::Lane::ConstPtr  neighborLane,
RoutingPoint const &  neighbor,
ExpandReason const &  expandReason 
)
protectedpure virtual

a neighbor is added

Override this function in the derived class to get notified on expanded neighbors.

Parameters
[in]originLanethe lane object of the origin point
[in]originthe origin RoutingPoint provided to the ExpandNeighbors() function
[in]neighborLanethe lane object of the neighbor point
[in]neighborthe neighbor RoutingPoint which is added (RoutingCostData not filled!)
[in]expandReasonthe reason why the origin was expanded to this neighbor

◆ isEnd()

template<class RoutingCostData >
bool ad::map::route::planning::RouteExpander< RoutingCostData >::isEnd ( RoutingPoint const &  origin)
inlineprotected
Returns
true if the given origin point is the parametric end

◆ isNegativeMovement()

template<class RoutingCostData >
bool ad::map::route::planning::RouteExpander< RoutingCostData >::isNegativeMovement ( lane::Lane::ConstPtr  lane,
RoutingPoint const &  origin 
)
inlineprotected
Returns
true if the given origin point on the given lane defines a negative movement

◆ isPositiveMovement()

template<class RoutingCostData >
bool ad::map::route::planning::RouteExpander< RoutingCostData >::isPositiveMovement ( lane::Lane::ConstPtr  lane,
RoutingPoint const &  origin 
)
inlineprotected
Returns
true if the given origin point on the given lane defines a positive movement

◆ isStart()

template<class RoutingCostData >
bool ad::map::route::planning::RouteExpander< RoutingCostData >::isStart ( RoutingPoint const &  origin)
inlineprotected
Returns
true if the given origin point is the parametric start

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