Eclipse SUMO - Simulation of Urban MObility
SUMOAbstractRouter< E, V > Class Template Referenceabstract

#include <SUMOAbstractRouter.h>

Inheritance diagram for SUMOAbstractRouter< E, V >:
[legend]
Collaboration diagram for SUMOAbstractRouter< E, V >:
[legend]

Data Structures

class  EdgeInfo
 

Public Types

typedef double(* Operation) (const E *const, const V *const, double)
 Type of the function that is used to retrieve the edge effort. More...
 

Public Member Functions

virtual SUMOAbstractRouterclone ()=0
 
virtual bool compute (const E *from, const E *to, const V *const vehicle, SUMOTime msTime, std::vector< const E * > &into, bool silent=false)=0
 Builds the route between the given edges using the minimum effort at the given time The definition of the effort depends on the wished routing scheme. More...
 
bool compute (const E *from, double fromPos, const E *to, double toPos, const V *const vehicle, SUMOTime msTime, std::vector< const E * > &into, bool silent=false)
 Builds the route between the given edges using the minimum effort at the given time, also taking into account position along the edges to ensure currect handling of looped routes The definition of the effort depends on the wished routing scheme. More...
 
bool computeLooped (const E *from, const E *to, const V *const vehicle, SUMOTime msTime, std::vector< const E * > &into, bool silent=false)
 Builds the route between the given edges using the minimum effort at the given time if from == to, return the shortest looped route. More...
 
void endQuery (int visits)
 
double getEffort (const E *const e, const V *const v, double t) const
 
double getTravelTime (const E *const e, const V *const v, const double t, const double effort) const
 
const std::string & getType () const
 
bool isProhibited (const E *const edge, const V *const vehicle) const
 
virtual void prohibit (const std::vector< E * > &)
 
double recomputeCosts (const std::vector< const E * > &edges, const V *const v, double fromPos, double toPos, SUMOTime msTime, double *lengthp=nullptr) const
 
double recomputeCosts (const std::vector< const E * > &edges, const V *const v, SUMOTime msTime, double *lengthp=nullptr) const
 
virtual void reset (const V *const vehicle)
 reset internal caches, used by CHRouter More...
 
void setAutoBulkMode (const bool mode)
 
void setBulkMode (const bool mode)
 
void startQuery ()
 
 SUMOAbstractRouter (const std::string &type, bool unbuildIsWarning, Operation operation, Operation ttOperation, const bool havePermissions, const bool haveRestrictions)
 Constructor. More...
 
 SUMOAbstractRouter (SUMOAbstractRouter *other)
 Copy Constructor. More...
 
void updateViaCost (const E *const prev, const E *const e, const V *const v, double &time, double &effort, double &length) const
 
void updateViaEdgeCost (const E *viaEdge, const V *const v, double &time, double &effort, double &length) const
 
virtual ~SUMOAbstractRouter ()
 Destructor. More...
 

Protected Attributes

bool myAutoBulkMode
 whether we are currently trying to detect bulk mode automatically More...
 
bool myBulkMode
 whether we are currently operating several route queries in a bulk More...
 
MsgHandler *const myErrorMsgHandler
 the handler for routing errors More...
 
const bool myHavePermissions
 whether edge permissions need to be considered More...
 
const bool myHaveRestrictions
 whether edge restrictions need to be considered More...
 
Operation myOperation
 The object's operation to perform. More...
 
std::vector< E * > myProhibited
 
Operation myTTOperation
 The object's operation to perform for travel times. More...
 

Private Member Functions

SUMOAbstractRouteroperator= (const SUMOAbstractRouter &s)
 Invalidated assignment operator. More...
 

Private Attributes

long long int myNumQueries
 
long long int myQueryStartTime
 the time spent querying in milliseconds More...
 
long long int myQueryTimeSum
 
long long int myQueryVisits
 counters for performance logging More...
 
const std::string myType
 the type of this router More...
 

Detailed Description

template<class E, class V>
class SUMOAbstractRouter< E, V >

The interface for routing the vehicles over the network.

Definition at line 44 of file SUMOAbstractRouter.h.

Member Typedef Documentation

◆ Operation

template<class E , class V >
typedef double(* SUMOAbstractRouter< E, V >::Operation) (const E *const, const V *const, double)

Type of the function that is used to retrieve the edge effort.

Definition at line 94 of file SUMOAbstractRouter.h.

Constructor & Destructor Documentation

◆ SUMOAbstractRouter() [1/2]

template<class E , class V >
SUMOAbstractRouter< E, V >::SUMOAbstractRouter ( const std::string &  type,
bool  unbuildIsWarning,
Operation  operation,
Operation  ttOperation,
const bool  havePermissions,
const bool  haveRestrictions 
)
inline

Constructor.

Definition at line 97 of file SUMOAbstractRouter.h.

◆ SUMOAbstractRouter() [2/2]

template<class E , class V >
SUMOAbstractRouter< E, V >::SUMOAbstractRouter ( SUMOAbstractRouter< E, V > *  other)
inline

Copy Constructor.

Definition at line 113 of file SUMOAbstractRouter.h.

◆ ~SUMOAbstractRouter()

Member Function Documentation

◆ clone()

template<class E , class V >
virtual SUMOAbstractRouter* SUMOAbstractRouter< E, V >::clone ( )
pure virtual

Implemented in RailwayRouter< E, V >, PedestrianRouter< E, L, N, V >, IntermodalRouter< E, L, N, V >, DijkstraRouter< E, V >, CHRouterWrapper< E, V >, CHRouter< E, V >, AStarRouter< E, V >, and ROJTRRouter.

Referenced by LandmarkLookupTable< E, V >::LandmarkLookupTable().

Here is the caller graph for this function:

◆ compute() [1/2]

◆ compute() [2/2]

template<class E , class V >
bool SUMOAbstractRouter< E, V >::compute ( const E *  from,
double  fromPos,
const E *  to,
double  toPos,
const V *const  vehicle,
SUMOTime  msTime,
std::vector< const E * > &  into,
bool  silent = false 
)
inline

Builds the route between the given edges using the minimum effort at the given time, also taking into account position along the edges to ensure currect handling of looped routes The definition of the effort depends on the wished routing scheme.

Definition at line 157 of file SUMOAbstractRouter.h.

References SUMOAbstractRouter< E, V >::compute(), and SUMOAbstractRouter< E, V >::computeLooped().

◆ computeLooped()

template<class E , class V >
bool SUMOAbstractRouter< E, V >::computeLooped ( const E *  from,
const E *  to,
const V *const  vehicle,
SUMOTime  msTime,
std::vector< const E * > &  into,
bool  silent = false 
)
inline

Builds the route between the given edges using the minimum effort at the given time if from == to, return the shortest looped route.

Definition at line 172 of file SUMOAbstractRouter.h.

References SUMOAbstractRouter< E, V >::compute(), MsgHandler::informf(), SUMOAbstractRouter< E, V >::myErrorMsgHandler, SUMOAbstractRouter< E, V >::recomputeCosts(), and SVC_IGNORING.

Referenced by SUMOAbstractRouter< E, V >::compute(), MSBaseVehicle::reroute(), and MSTriggeredRerouter::rerouteParkingArea().

Here is the caller graph for this function:

◆ endQuery()

template<class E , class V >
void SUMOAbstractRouter< E, V >::endQuery ( int  visits)
inline

Definition at line 279 of file SUMOAbstractRouter.h.

References SysUtils::getCurrentMillis(), SUMOAbstractRouter< E, V >::myQueryStartTime, SUMOAbstractRouter< E, V >::myQueryTimeSum, and SUMOAbstractRouter< E, V >::myQueryVisits.

Referenced by AStarRouter< E, V >::compute(), CHRouter< E, V >::compute(), and DijkstraRouter< E, V >::compute().

Here is the caller graph for this function:

◆ getEffort()

template<class E , class V >
double SUMOAbstractRouter< E, V >::getEffort ( const E *const  e,
const V *const  v,
double  t 
) const
inline

◆ getTravelTime()

template<class E , class V >
double SUMOAbstractRouter< E, V >::getTravelTime ( const E *const  e,
const V *const  v,
const double  t,
const double  effort 
) const
inline

Definition at line 207 of file SUMOAbstractRouter.h.

References SUMOAbstractRouter< E, V >::myTTOperation.

Referenced by AStarRouter< E, V >::compute(), DijkstraRouter< E, V >::compute(), SUMOAbstractRouter< E, V >::updateViaCost(), and SUMOAbstractRouter< E, V >::updateViaEdgeCost().

Here is the caller graph for this function:

◆ getType()

template<class E , class V >
const std::string& SUMOAbstractRouter< E, V >::getType ( ) const
inline

Definition at line 143 of file SUMOAbstractRouter.h.

References SUMOAbstractRouter< E, V >::myType.

◆ isProhibited()

template<class E , class V >
bool SUMOAbstractRouter< E, V >::isProhibited ( const E *const  edge,
const V *const  vehicle 
) const
inline

Definition at line 201 of file SUMOAbstractRouter.h.

References SUMOAbstractRouter< E, V >::myHavePermissions, and SUMOAbstractRouter< E, V >::myHaveRestrictions.

Referenced by SUMOAbstractRouter< E, V >::recomputeCosts().

Here is the caller graph for this function:

◆ operator=()

template<class E , class V >
SUMOAbstractRouter& SUMOAbstractRouter< E, V >::operator= ( const SUMOAbstractRouter< E, V > &  s)
private

Invalidated assignment operator.

◆ prohibit()

template<class E , class V >
virtual void SUMOAbstractRouter< E, V >::prohibit ( const std::vector< E * > &  )
inlinevirtual

Reimplemented in RailwayRouter< E, V >, PedestrianRouter< E, L, N, V >, IntermodalRouter< E, L, N, V >, DijkstraRouter< E, V >, and AStarRouter< E, V >.

Definition at line 205 of file SUMOAbstractRouter.h.

Referenced by IntermodalRouter< E, L, N, V >::prohibit(), and RailwayRouter< E, V >::prohibit().

Here is the caller graph for this function:

◆ recomputeCosts() [1/2]

template<class E , class V >
double SUMOAbstractRouter< E, V >::recomputeCosts ( const std::vector< const E * > &  edges,
const V *const  v,
double  fromPos,
double  toPos,
SUMOTime  msTime,
double *  lengthp = nullptr 
) const
inline

◆ recomputeCosts() [2/2]

◆ reset()

template<class E , class V >
virtual void SUMOAbstractRouter< E, V >::reset ( const V *const  vehicle)
inlinevirtual

reset internal caches, used by CHRouter

Reimplemented in CHRouter< E, V >.

Definition at line 139 of file SUMOAbstractRouter.h.

References UNUSED_PARAMETER.

Referenced by computeRoutes(), and ROMAAssignments::incremental().

Here is the caller graph for this function:

◆ setAutoBulkMode()

template<class E , class V >
void SUMOAbstractRouter< E, V >::setAutoBulkMode ( const bool  mode)
inline

Definition at line 288 of file SUMOAbstractRouter.h.

References SUMOAbstractRouter< E, V >::myAutoBulkMode.

Referenced by LandmarkLookupTable< E, V >::LandmarkLookupTable().

Here is the caller graph for this function:

◆ setBulkMode()

template<class E , class V >
void SUMOAbstractRouter< E, V >::setBulkMode ( const bool  mode)
inline

Definition at line 284 of file SUMOAbstractRouter.h.

References SUMOAbstractRouter< E, V >::myBulkMode.

Referenced by ROMAAssignments::incremental().

Here is the caller graph for this function:

◆ startQuery()

template<class E , class V >
void SUMOAbstractRouter< E, V >::startQuery ( )
inline

Definition at line 274 of file SUMOAbstractRouter.h.

References SysUtils::getCurrentMillis(), SUMOAbstractRouter< E, V >::myNumQueries, and SUMOAbstractRouter< E, V >::myQueryStartTime.

Referenced by AStarRouter< E, V >::compute(), CHRouter< E, V >::compute(), and DijkstraRouter< E, V >::compute().

Here is the caller graph for this function:

◆ updateViaCost()

template<class E , class V >
void SUMOAbstractRouter< E, V >::updateViaCost ( const E *const  prev,
const E *const  e,
const V *const  v,
double &  time,
double &  effort,
double &  length 
) const
inline

Definition at line 221 of file SUMOAbstractRouter.h.

References SUMOAbstractRouter< E, V >::getEffort(), SUMOAbstractRouter< E, V >::getTravelTime(), and SUMOAbstractRouter< E, V >::updateViaEdgeCost().

Referenced by IntermodalRouter< E, L, N, V >::compute(), and SUMOAbstractRouter< E, V >::recomputeCosts().

Here is the caller graph for this function:

◆ updateViaEdgeCost()

template<class E , class V >
void SUMOAbstractRouter< E, V >::updateViaEdgeCost ( const E *  viaEdge,
const V *const  v,
double &  time,
double &  effort,
double &  length 
) const
inline

Definition at line 211 of file SUMOAbstractRouter.h.

References SUMOAbstractRouter< E, V >::getEffort(), and SUMOAbstractRouter< E, V >::getTravelTime().

Referenced by AStarRouter< E, V >::compute(), DijkstraRouter< E, V >::compute(), and SUMOAbstractRouter< E, V >::updateViaCost().

Here is the caller graph for this function:

Field Documentation

◆ myAutoBulkMode

template<class E , class V >
bool SUMOAbstractRouter< E, V >::myAutoBulkMode
protected

whether we are currently trying to detect bulk mode automatically

Definition at line 306 of file SUMOAbstractRouter.h.

Referenced by DijkstraRouter< E, V >::clone(), DijkstraRouter< E, V >::compute(), and SUMOAbstractRouter< E, V >::setAutoBulkMode().

◆ myBulkMode

template<class E , class V >
bool SUMOAbstractRouter< E, V >::myBulkMode
protected

whether we are currently operating several route queries in a bulk

Definition at line 303 of file SUMOAbstractRouter.h.

Referenced by AStarRouter< E, V >::compute(), DijkstraRouter< E, V >::compute(), and SUMOAbstractRouter< E, V >::setBulkMode().

◆ myErrorMsgHandler

◆ myHavePermissions

template<class E , class V >
const bool SUMOAbstractRouter< E, V >::myHavePermissions
protected

◆ myHaveRestrictions

template<class E , class V >
const bool SUMOAbstractRouter< E, V >::myHaveRestrictions
protected

◆ myNumQueries

template<class E , class V >
long long int SUMOAbstractRouter< E, V >::myNumQueries
private

◆ myOperation

template<class E , class V >
Operation SUMOAbstractRouter< E, V >::myOperation
protected

◆ myProhibited

template<class E , class V >
std::vector<E*> SUMOAbstractRouter< E, V >::myProhibited
protected

◆ myQueryStartTime

template<class E , class V >
long long int SUMOAbstractRouter< E, V >::myQueryStartTime
private

the time spent querying in milliseconds

Definition at line 324 of file SUMOAbstractRouter.h.

Referenced by SUMOAbstractRouter< E, V >::endQuery(), and SUMOAbstractRouter< E, V >::startQuery().

◆ myQueryTimeSum

template<class E , class V >
long long int SUMOAbstractRouter< E, V >::myQueryTimeSum
private

◆ myQueryVisits

template<class E , class V >
long long int SUMOAbstractRouter< E, V >::myQueryVisits
private

counters for performance logging

Definition at line 321 of file SUMOAbstractRouter.h.

Referenced by SUMOAbstractRouter< E, V >::endQuery(), and SUMOAbstractRouter< E, V >::~SUMOAbstractRouter().

◆ myTTOperation

template<class E , class V >
Operation SUMOAbstractRouter< E, V >::myTTOperation
protected

The object's operation to perform for travel times.

Definition at line 300 of file SUMOAbstractRouter.h.

Referenced by DijkstraRouter< E, V >::clone(), and SUMOAbstractRouter< E, V >::getTravelTime().

◆ myType

template<class E , class V >
const std::string SUMOAbstractRouter< E, V >::myType
private

the type of this router

Definition at line 318 of file SUMOAbstractRouter.h.

Referenced by SUMOAbstractRouter< E, V >::getType(), and SUMOAbstractRouter< E, V >::~SUMOAbstractRouter().


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