Eclipse SUMO - Simulation of Urban MObility
IntermodalRouter< E, L, N, V > Class Template Reference

#include <IntermodalRouter.h>

Inheritance diagram for IntermodalRouter< E, L, N, V >:
[legend]
Collaboration diagram for IntermodalRouter< E, L, N, V >:
[legend]

Data Structures

struct  TripItem
 

Public Types

typedef IntermodalNetwork< E, L, N, V > Network
 
typedef double(* Operation) (const E *const, const IntermodalTrip< E, N, V > *const, double)
 Type of the function that is used to retrieve the edge effort. More...
 

Public Member Functions

SUMOAbstractRouter< E, _IntermodalTrip > * clone ()
 
bool compute (const E *, const E *, const _IntermodalTrip *const, SUMOTime, std::vector< const E * > &, bool)
 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, const E *to, const double departPos, const double arrivalPos, const std::string stopID, const double speed, const V *const vehicle, const SVCPermissions modeSet, const SUMOTime msTime, std::vector< TripItem > &into, const double externalFactor=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 IntermodalTrip< E, N, 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 IntermodalTrip< E, N, 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)
 
int getCarWalkTransfer () const
 
double getEffort (const E *const e, const IntermodalTrip< E, N, V > *const v, double t) const
 
EffortCalculatorgetExternalEffort () const
 
NetworkgetNetwork () const
 
double getTravelTime (const E *const e, const IntermodalTrip< E, N, V > *const v, const double t, const double effort) const
 
const std::string & getType () const
 
 IntermodalRouter (CreateNetCallback callback, const int carWalkTransfer, double taxiWait, const std::string &routingAlgorithm, const int routingMode=0, EffortCalculator *calc=nullptr)
 Constructor. More...
 
bool isProhibited (const E *const edge, const IntermodalTrip< E, N, V > *const vehicle) const
 
void prohibit (const std::vector< E * > &toProhibit)
 
double recomputeCosts (const std::vector< const E * > &edges, const IntermodalTrip< E, N, V > *const v, double fromPos, double toPos, SUMOTime msTime, double *lengthp=nullptr) const
 
double recomputeCosts (const std::vector< const E * > &edges, const IntermodalTrip< E, N, V > *const v, SUMOTime msTime, double *lengthp=nullptr) const
 
virtual void reset (const IntermodalTrip< E, N, V > *const vehicle)
 reset internal caches, used by CHRouter More...
 
void setAutoBulkMode (const bool mode)
 
void setBulkMode (const bool mode)
 
void startQuery ()
 
void updateViaCost (const E *const prev, const E *const e, const IntermodalTrip< E, N, V > *const v, double &time, double &effort, double &length) const
 
void updateViaEdgeCost (const E *viaEdge, const IntermodalTrip< E, N, V > *const v, double &time, double &effort, double &length) const
 
void writeNetwork (OutputDevice &dev)
 
void writeWeights (OutputDevice &dev)
 
virtual ~IntermodalRouter ()
 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 Types

typedef IntermodalEdge< E, L, N, V > _IntermodalEdge
 
typedef IntermodalTrip< E, N, V > _IntermodalTrip
 
typedef AStarRouter< _IntermodalEdge, _IntermodalTrip_InternalAStar
 
typedef DijkstraRouter< _IntermodalEdge, _IntermodalTrip_InternalDijkstra
 
typedef SUMOAbstractRouter< _IntermodalEdge, _IntermodalTrip_InternalRouter
 
typedef void(* CreateNetCallback) (IntermodalRouter< E, L, N, V > &)
 

Private Member Functions

void createNet ()
 
 IntermodalRouter (Network *net, const int carWalkTransfer, double taxiWait, const std::string &routingAlgorithm, const int routingMode, EffortCalculator *calc)
 
IntermodalRouteroperator= (const IntermodalRouter &s)
 Invalidated assignment operator. More...
 

Static Private Member Functions

static double getCombined (const _IntermodalEdge *const edge, const _IntermodalTrip *const trip, double time)
 

Private Attributes

const bool myAmClone
 
CreateNetCallback myCallback
 
const int myCarWalkTransfer
 
EffortCalculator *const myExternalEffort
 
NetworkmyIntermodalNet
 
_InternalRoutermyInternalRouter
 
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 myRoutingAlgorithm
 
const int myRoutingMode
 
const double myTaxiWait
 
const std::string myType
 the type of this router More...
 

Detailed Description

template<class E, class L, class N, class V>
class IntermodalRouter< E, L, N, V >

The router for pedestrians (on a bidirectional network of sidewalks and crossings)

Definition at line 52 of file IntermodalRouter.h.

Member Typedef Documentation

◆ _IntermodalEdge

template<class E , class L , class N , class V >
typedef IntermodalEdge<E, L, N, V> IntermodalRouter< E, L, N, V >::_IntermodalEdge
private

Definition at line 58 of file IntermodalRouter.h.

◆ _IntermodalTrip

template<class E , class L , class N , class V >
typedef IntermodalTrip<E, N, V> IntermodalRouter< E, L, N, V >::_IntermodalTrip
private

Definition at line 59 of file IntermodalRouter.h.

◆ _InternalAStar

template<class E , class L , class N , class V >
typedef AStarRouter<_IntermodalEdge, _IntermodalTrip> IntermodalRouter< E, L, N, V >::_InternalAStar
private

Definition at line 62 of file IntermodalRouter.h.

◆ _InternalDijkstra

template<class E , class L , class N , class V >
typedef DijkstraRouter<_IntermodalEdge, _IntermodalTrip> IntermodalRouter< E, L, N, V >::_InternalDijkstra
private

Definition at line 61 of file IntermodalRouter.h.

◆ _InternalRouter

template<class E , class L , class N , class V >
typedef SUMOAbstractRouter<_IntermodalEdge, _IntermodalTrip> IntermodalRouter< E, L, N, V >::_InternalRouter
private

Definition at line 60 of file IntermodalRouter.h.

◆ CreateNetCallback

template<class E , class L , class N , class V >
typedef void(* IntermodalRouter< E, L, N, V >::CreateNetCallback) (IntermodalRouter< E, L, N, V > &)
private

Definition at line 57 of file IntermodalRouter.h.

◆ Network

template<class E , class L , class N , class V >
typedef IntermodalNetwork<E, L, N, V> IntermodalRouter< E, L, N, V >::Network

Definition at line 54 of file IntermodalRouter.h.

◆ Operation

typedef double(* SUMOAbstractRouter< E, IntermodalTrip< E, N, V > >::Operation) (const E *const, const IntermodalTrip< E, N, V > *const, double)
inherited

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

Definition at line 94 of file SUMOAbstractRouter.h.

Constructor & Destructor Documentation

◆ IntermodalRouter() [1/2]

template<class E , class L , class N , class V >
IntermodalRouter< E, L, N, V >::IntermodalRouter ( CreateNetCallback  callback,
const int  carWalkTransfer,
double  taxiWait,
const std::string &  routingAlgorithm,
const int  routingMode = 0,
EffortCalculator calc = nullptr 
)
inline

Constructor.

Definition at line 83 of file IntermodalRouter.h.

◆ ~IntermodalRouter()

template<class E , class L , class N , class V >
virtual IntermodalRouter< E, L, N, V >::~IntermodalRouter ( )
inlinevirtual

◆ IntermodalRouter() [2/2]

template<class E , class L , class N , class V >
IntermodalRouter< E, L, N, V >::IntermodalRouter ( Network net,
const int  carWalkTransfer,
double  taxiWait,
const std::string &  routingAlgorithm,
const int  routingMode,
EffortCalculator calc 
)
inlineprivate

Definition at line 254 of file IntermodalRouter.h.

References IntermodalRouter< E, L, N, V >::createNet().

Member Function Documentation

◆ clone()

◆ compute() [1/3]

template<class E , class L , class N , class V >
bool IntermodalRouter< E, L, N, V >::compute ( const E *  ,
const E *  ,
const _IntermodalTrip * const  ,
SUMOTime  ,
std::vector< const E * > &  ,
bool   
)
inlinevirtual

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.

Implements SUMOAbstractRouter< E, IntermodalTrip< E, N, V > >.

Definition at line 205 of file IntermodalRouter.h.

◆ compute() [2/3]

template<class E , class L , class N , class V >
bool IntermodalRouter< E, L, N, V >::compute ( const E *  from,
const E *  to,
const double  departPos,
const double  arrivalPos,
const std::string  stopID,
const double  speed,
const V *const  vehicle,
const SVCPermissions  modeSet,
const SUMOTime  msTime,
std::vector< TripItem > &  into,
const double  externalFactor = 0. 
)
inline

◆ compute() [3/3]

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

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.

◆ computeLooped()

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

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.

◆ createNet()

◆ endQuery()

void SUMOAbstractRouter< E, IntermodalTrip< E, N, V > >::endQuery ( int  visits)
inlineinherited

Definition at line 279 of file SUMOAbstractRouter.h.

◆ getCarWalkTransfer()

template<class E , class L , class N , class V >
int IntermodalRouter< E, L, N, V >::getCarWalkTransfer ( ) const
inline

Definition at line 105 of file IntermodalRouter.h.

References IntermodalRouter< E, L, N, V >::myCarWalkTransfer.

Referenced by MSNet::adaptIntermodalRouter(), and RONet::adaptIntermodalRouter().

Here is the caller graph for this function:

◆ getCombined()

template<class E , class L , class N , class V >
static double IntermodalRouter< E, L, N, V >::getCombined ( const _IntermodalEdge *const  edge,
const _IntermodalTrip *const  trip,
double  time 
)
inlinestaticprivate

Definition at line 264 of file IntermodalRouter.h.

References IntermodalTrip< E, N, V >::calc, IntermodalTrip< E, N, V >::externalFactor, EffortCalculator::getEffort(), IntermodalEdge< E, L, N, V >::getNumericalID(), and IntermodalEdge< E, L, N, V >::getTravelTime().

Referenced by IntermodalRouter< E, L, N, V >::createNet().

Here is the caller graph for this function:

◆ getEffort()

double SUMOAbstractRouter< E, IntermodalTrip< E, N, V > >::getEffort ( const E *const  e,
const IntermodalTrip< E, N, V > *const  v,
double  t 
) const
inlineinherited

Definition at line 270 of file SUMOAbstractRouter.h.

◆ getExternalEffort()

template<class E , class L , class N , class V >
EffortCalculator* IntermodalRouter< E, L, N, V >::getExternalEffort ( ) const
inline

Definition at line 249 of file IntermodalRouter.h.

References IntermodalRouter< E, L, N, V >::myExternalEffort.

Referenced by MSNet::adaptIntermodalRouter().

Here is the caller graph for this function:

◆ getNetwork()

template<class E , class L , class N , class V >
Network* IntermodalRouter< E, L, N, V >::getNetwork ( ) const
inline

Definition at line 245 of file IntermodalRouter.h.

References IntermodalRouter< E, L, N, V >::myIntermodalNet.

Referenced by MSNet::adaptIntermodalRouter(), MSInsertionControl::adaptIntermodalRouter(), MSVehicleControl::adaptIntermodalRouter(), and RONet::adaptIntermodalRouter().

Here is the caller graph for this function:

◆ getTravelTime()

double SUMOAbstractRouter< E, IntermodalTrip< E, N, V > >::getTravelTime ( const E *const  e,
const IntermodalTrip< E, N, V > *const  v,
const double  t,
const double  effort 
) const
inlineinherited

Definition at line 207 of file SUMOAbstractRouter.h.

◆ getType()

const std::string& SUMOAbstractRouter< E, IntermodalTrip< E, N, V > >::getType ( ) const
inlineinherited

Definition at line 143 of file SUMOAbstractRouter.h.

◆ isProhibited()

bool SUMOAbstractRouter< E, IntermodalTrip< E, N, V > >::isProhibited ( const E *const  edge,
const IntermodalTrip< E, N, V > *const  vehicle 
) const
inlineinherited

Definition at line 201 of file SUMOAbstractRouter.h.

◆ operator=()

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

Invalidated assignment operator.

◆ prohibit()

◆ recomputeCosts() [1/2]

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

Definition at line 258 of file SUMOAbstractRouter.h.

◆ recomputeCosts() [2/2]

double SUMOAbstractRouter< E, IntermodalTrip< E, N, V > >::recomputeCosts ( const std::vector< const E * > &  edges,
const IntermodalTrip< E, N, V > *const  v,
SUMOTime  msTime,
double *  lengthp = nullptr 
) const
inlineinherited

Definition at line 237 of file SUMOAbstractRouter.h.

◆ reset()

virtual void SUMOAbstractRouter< E, IntermodalTrip< E, N, V > >::reset ( const IntermodalTrip< E, N, V > *const  vehicle)
inlinevirtualinherited

reset internal caches, used by CHRouter

Definition at line 139 of file SUMOAbstractRouter.h.

◆ setAutoBulkMode()

void SUMOAbstractRouter< E, IntermodalTrip< E, N, V > >::setAutoBulkMode ( const bool  mode)
inlineinherited

Definition at line 288 of file SUMOAbstractRouter.h.

◆ setBulkMode()

void SUMOAbstractRouter< E, IntermodalTrip< E, N, V > >::setBulkMode ( const bool  mode)
inlineinherited

Definition at line 284 of file SUMOAbstractRouter.h.

◆ startQuery()

void SUMOAbstractRouter< E, IntermodalTrip< E, N, V > >::startQuery ( )
inlineinherited

Definition at line 274 of file SUMOAbstractRouter.h.

◆ updateViaCost()

void SUMOAbstractRouter< E, IntermodalTrip< E, N, V > >::updateViaCost ( const E *const  prev,
const E *const  e,
const IntermodalTrip< E, N, V > *const  v,
double &  time,
double &  effort,
double &  length 
) const
inlineinherited

Definition at line 221 of file SUMOAbstractRouter.h.

◆ updateViaEdgeCost()

void SUMOAbstractRouter< E, IntermodalTrip< E, N, V > >::updateViaEdgeCost ( const E *  viaEdge,
const IntermodalTrip< E, N, V > *const  v,
double &  time,
double &  effort,
double &  length 
) const
inlineinherited

Definition at line 211 of file SUMOAbstractRouter.h.

◆ writeNetwork()

template<class E , class L , class N , class V >
void IntermodalRouter< E, L, N, V >::writeNetwork ( OutputDevice dev)
inline

Definition at line 221 of file IntermodalRouter.h.

References OutputDevice::closeTag(), IntermodalRouter< E, L, N, V >::createNet(), IntermodalNetwork< E, L, N, V >::getAllEdges(), IntermodalRouter< E, L, N, V >::myIntermodalNet, OutputDevice::openTag(), SUMO_ATTR_ID, SUMO_ATTR_LENGTH, SUMO_ATTR_LINE, SUMO_TAG_EDGE, SVC_IGNORING, toString(), and OutputDevice::writeAttr().

Referenced by RONet::writeIntermodal().

Here is the caller graph for this function:

◆ writeWeights()

template<class E , class L , class N , class V >
void IntermodalRouter< E, L, N, V >::writeWeights ( OutputDevice dev)
inline

Definition at line 233 of file IntermodalRouter.h.

References OutputDevice::closeTag(), IntermodalRouter< E, L, N, V >::createNet(), DEFAULT_PEDESTRIAN_SPEED, IntermodalNetwork< E, L, N, V >::getAllEdges(), IntermodalRouter< E, L, N, V >::myIntermodalNet, OutputDevice::openTag(), SUMO_ATTR_ID, SUMO_TAG_EDGE, SVC_BICYCLE, SVC_BUS, SVC_PASSENGER, and OutputDevice::writeAttr().

Referenced by RONet::writeIntermodal().

Here is the caller graph for this function:

Field Documentation

◆ myAmClone

template<class E , class L , class N , class V >
const bool IntermodalRouter< E, L, N, V >::myAmClone
private

◆ myAutoBulkMode

bool SUMOAbstractRouter< E, IntermodalTrip< E, N, V > >::myAutoBulkMode
protectedinherited

whether we are currently trying to detect bulk mode automatically

Definition at line 306 of file SUMOAbstractRouter.h.

◆ myBulkMode

bool SUMOAbstractRouter< E, IntermodalTrip< E, N, V > >::myBulkMode
protectedinherited

whether we are currently operating several route queries in a bulk

Definition at line 303 of file SUMOAbstractRouter.h.

◆ myCallback

template<class E , class L , class N , class V >
CreateNetCallback IntermodalRouter< E, L, N, V >::myCallback
private

Definition at line 309 of file IntermodalRouter.h.

Referenced by IntermodalRouter< E, L, N, V >::createNet().

◆ myCarWalkTransfer

template<class E , class L , class N , class V >
const int IntermodalRouter< E, L, N, V >::myCarWalkTransfer
private

◆ myErrorMsgHandler

MsgHandler* const SUMOAbstractRouter< E, IntermodalTrip< E, N, V > >::myErrorMsgHandler
protectedinherited

the handler for routing errors

Definition at line 294 of file SUMOAbstractRouter.h.

◆ myExternalEffort

template<class E , class L , class N , class V >
EffortCalculator* const IntermodalRouter< E, L, N, V >::myExternalEffort
private

◆ myHavePermissions

const bool SUMOAbstractRouter< E, IntermodalTrip< E, N, V > >::myHavePermissions
protectedinherited

whether edge permissions need to be considered

Definition at line 309 of file SUMOAbstractRouter.h.

◆ myHaveRestrictions

const bool SUMOAbstractRouter< E, IntermodalTrip< E, N, V > >::myHaveRestrictions
protectedinherited

whether edge restrictions need to be considered

Definition at line 312 of file SUMOAbstractRouter.h.

◆ myIntermodalNet

◆ myInternalRouter

◆ myNumQueries

long long int SUMOAbstractRouter< E, IntermodalTrip< E, N, V > >::myNumQueries
privateinherited

Definition at line 322 of file SUMOAbstractRouter.h.

◆ myOperation

Operation SUMOAbstractRouter< E, IntermodalTrip< E, N, V > >::myOperation
protectedinherited

The object's operation to perform.

Definition at line 297 of file SUMOAbstractRouter.h.

◆ myProhibited

std::vector<E*> SUMOAbstractRouter< E, IntermodalTrip< E, N, V > >::myProhibited
protectedinherited

Definition at line 314 of file SUMOAbstractRouter.h.

◆ myQueryStartTime

long long int SUMOAbstractRouter< E, IntermodalTrip< E, N, V > >::myQueryStartTime
privateinherited

the time spent querying in milliseconds

Definition at line 324 of file SUMOAbstractRouter.h.

◆ myQueryTimeSum

long long int SUMOAbstractRouter< E, IntermodalTrip< E, N, V > >::myQueryTimeSum
privateinherited

Definition at line 325 of file SUMOAbstractRouter.h.

◆ myQueryVisits

long long int SUMOAbstractRouter< E, IntermodalTrip< E, N, V > >::myQueryVisits
privateinherited

counters for performance logging

Definition at line 321 of file SUMOAbstractRouter.h.

◆ myRoutingAlgorithm

template<class E , class L , class N , class V >
const std::string IntermodalRouter< E, L, N, V >::myRoutingAlgorithm
private

◆ myRoutingMode

template<class E , class L , class N , class V >
const int IntermodalRouter< E, L, N, V >::myRoutingMode
private

◆ myTaxiWait

template<class E , class L , class N , class V >
const double IntermodalRouter< E, L, N, V >::myTaxiWait
private

◆ myTTOperation

Operation SUMOAbstractRouter< E, IntermodalTrip< E, N, V > >::myTTOperation
protectedinherited

The object's operation to perform for travel times.

Definition at line 300 of file SUMOAbstractRouter.h.

◆ myType

const std::string SUMOAbstractRouter< E, IntermodalTrip< E, N, V > >::myType
privateinherited

the type of this router

Definition at line 318 of file SUMOAbstractRouter.h.


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