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

#include <SUMOAbstractRouter.h>

Inheritance diagram for SUMOAbstractRouter< E, V >:
Collaboration diagram for SUMOAbstractRouter< E, V >:

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 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
 
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, SUMOTime msTime, double *lengthp=nullptr) const
 
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...
 
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 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 46 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 96 of file SUMOAbstractRouter.h.

Constructor & Destructor Documentation

◆ SUMOAbstractRouter()

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 99 of file SUMOAbstractRouter.h.

◆ ~SUMOAbstractRouter()

template<class E, class V>
virtual SUMOAbstractRouter< E, V >::~SUMOAbstractRouter ( )
inlinevirtual

Destructor.

Definition at line 114 of file SUMOAbstractRouter.h.

Member Function Documentation

◆ clone()

◆ compute()

◆ 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 130 of file SUMOAbstractRouter.h.

Referenced by MSBaseVehicle::reroute(), and MSTriggeredRerouter::rerouteParkingArea().

◆ endQuery()

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

◆ getEffort()

◆ 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

◆ isProhibited()

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

◆ 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

◆ recomputeCosts()

◆ setBulkMode()

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

Definition at line 230 of file SUMOAbstractRouter.h.

Referenced by ROMAAssignments::incremental().

◆ startQuery()

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

◆ 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

◆ 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

Field Documentation

◆ 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 245 of file SUMOAbstractRouter.h.

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

◆ myErrorMsgHandler

◆ myHavePermissions

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

whether edge permissions need to be considered

Definition at line 248 of file SUMOAbstractRouter.h.

Referenced by DijkstraRouter< E, V >::clone(), CHRouter< E, V >::clone(), and SUMOAbstractRouter< E, IntermodalTrip< E, N, V > >::isProhibited().

◆ myHaveRestrictions

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

whether edge restrictions need to be considered

Definition at line 251 of file SUMOAbstractRouter.h.

Referenced by DijkstraRouter< E, V >::clone(), CHRouter< E, V >::clone(), and SUMOAbstractRouter< E, IntermodalTrip< E, N, V > >::isProhibited().

◆ 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

◆ 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

◆ myTTOperation

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

The object's operation to perform for travel times.

Definition at line 242 of file SUMOAbstractRouter.h.

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

◆ myType

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

the type of this router

Definition at line 257 of file SUMOAbstractRouter.h.

Referenced by SUMOAbstractRouter< E, IntermodalTrip< E, N, V > >::~SUMOAbstractRouter().


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