Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
PedestrianRouter< E, L, N, V > Class Template Referenceabstract

#include <PedestrianRouter.h>

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

Public Types

typedef double(* Operation) (const E *const, const V *const, double)
 Type of the function that is used to retrieve the edge effort.
typedef std::map< const E *, RouterProhibitionProhibitions

Public Member Functions

void buildPathFrom (const typename SUMOAbstractRouter< E, V >::EdgeInfo *rbegin, std::vector< const E * > &edges)
 Builds the path from marked edges.
virtual 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.
double compute (const E *from, const E *to, double departPos, double arrivalPos, double speed, SUMOTime msTime, const N *onlyNode, const SUMOVTypeParameter &pars, std::vector< const E * > &into, bool allEdges=false) const
 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.
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.
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.
void endQuery (int visits)
const SUMOAbstractRouter< E, V >::EdgeInfo & getEdgeInfo (int index) const
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 hasProhibitions () const
void init (const int edgeID, const SUMOTime msTime)
bool isProhibited (const E *const edge, const V *const vehicle, double t) const
bool isValid (const std::vector< const E * > &edges, const V *const v, double t) const
 PedestrianRouter ()
 Constructor.
 PedestrianRouter (_IntermodalNetwork *net)
void prohibit (const std::map< const E *, RouterProhibition > &toProhibit)
virtual double recomputeCosts (const std::vector< const E * > &edges, const V *const v, SUMOTime msTime, double *lengthp=nullptr) const
double recomputeCostsPos (const std::vector< const E * > &edges, const V *const v, double fromPos, double toPos, SUMOTime msTime, double *lengthp=nullptr) const
double recomputeWalkCosts (const std::vector< const E * > &edges, double speed, double fromPos, double toPos, SUMOTime msTime, const SUMOVTypeParameter &pars, double &length) const
virtual void reset (const V *const vehicle)
 reset internal caches, used by CHRouter
void setAutoBulkMode (const bool mode)
virtual void setBulkMode (const bool mode)
double setHint (const typename std::vector< const E * >::const_iterator routeBegin, const typename std::vector< const E * >::const_iterator routeEnd, const V *const v, SUMOTime msTime)
virtual void setMsgHandler (MsgHandler *const errorMsgHandler)
void startQuery ()
virtual bool supportsProhibitions () const
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 ~PedestrianRouter ()
 Destructor.

Protected Attributes

bool myAmClean
 whether we are already initialized
bool myAutoBulkMode
 whether we are currently trying to detect bulk mode automatically
bool myBulkMode
 whether we are currently operating several route queries in a bulk
std::vector< typename SUMOAbstractRouter< E, V >::EdgeInfo > myEdgeInfos
 The container of edge information.
MsgHandlermyErrorMsgHandler
 the handler for routing errors
std::vector< typename SUMOAbstractRouter< E, V >::EdgeInfo * > myFound
 list of visited Edges (for resetting)
std::vector< typename SUMOAbstractRouter< E, V >::EdgeInfo * > myFrontierList
 A container for reusage of the min edge heap.
const bool myHavePermissions
 whether edge permissions need to be considered
const bool myHaveRestrictions
 whether edge restrictions need to be considered
Operation myOperation
 The object's operation to perform.
Prohibitions myProhibited
 The list of explicitly prohibited edges and estimated end time of prohibition.
Operation myTTOperation
 The object's operation to perform for travel times.

Private Types

typedef IntermodalEdge< E, L, N, V > _IntermodalEdge
typedef IntermodalNetwork< E, L, N, V > _IntermodalNetwork
typedef IntermodalTrip< E, N, V > _IntermodalTrip
typedef DijkstraRouter< _IntermodalEdge, _IntermodalTrip_InternalRouter

Private Member Functions

const N * getCommonNode (const E *from, const E *to) const
PedestrianRouteroperator= (const PedestrianRouter &s)
 Invalidated assignment operator.

Private Attributes

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

Detailed Description

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

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

Definition at line 45 of file PedestrianRouter.h.

Member Typedef Documentation

◆ _IntermodalEdge

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

Definition at line 47 of file PedestrianRouter.h.

◆ _IntermodalNetwork

template<class E, class L, class N, class V>
typedef IntermodalNetwork<E, L, N, V> PedestrianRouter< E, L, N, V >::_IntermodalNetwork
private

Definition at line 48 of file PedestrianRouter.h.

◆ _IntermodalTrip

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

Definition at line 49 of file PedestrianRouter.h.

◆ _InternalRouter

template<class E, class L, class N, class V>
typedef DijkstraRouter<_IntermodalEdge, _IntermodalTrip> PedestrianRouter< E, L, N, V >::_InternalRouter
private

Definition at line 50 of file PedestrianRouter.h.

◆ Operation

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

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

Definition at line 107 of file SUMOAbstractRouter.h.

◆ Prohibitions

typedef std::map<const E*, RouterProhibition> SUMOAbstractRouter< E, V >::Prohibitions
inherited

Definition at line 109 of file SUMOAbstractRouter.h.

Constructor & Destructor Documentation

◆ PedestrianRouter() [1/2]

template<class E, class L, class N, class V>
PedestrianRouter< E, L, N, V >::PedestrianRouter ( )
inline

Constructor.

Definition at line 54 of file PedestrianRouter.h.

Referenced by PedestrianRouter< MSEdge, MSLane, MSJunction, SUMOVehicle >::clone().

Here is the caller graph for this function:

◆ PedestrianRouter() [2/2]

template<class E, class L, class N, class V>
PedestrianRouter< E, L, N, V >::PedestrianRouter ( _IntermodalNetwork * net)
inline

Definition at line 62 of file PedestrianRouter.h.

◆ ~PedestrianRouter()

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

Destructor.

Definition at line 71 of file PedestrianRouter.h.

Member Function Documentation

◆ buildPathFrom()

void SUMOAbstractRouter< E, V >::buildPathFrom ( const typename SUMOAbstractRouter< E, V >::EdgeInfo * rbegin,
std::vector< const E * > & edges )
inlineinherited

Builds the path from marked edges.

Definition at line 432 of file SUMOAbstractRouter.h.

◆ clone()

template<class E, class L, class N, class V>
virtual SUMOAbstractRouter< E, _IntermodalTrip > * PedestrianRouter< E, L, N, V >::clone ( )
inlinevirtual

◆ compute() [1/3]

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

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.

Definition at line 124 of file PedestrianRouter.h.

◆ compute() [2/3]

template<class E, class L, class N, class V>
double PedestrianRouter< E, L, N, V >::compute ( const E * from,
const E * to,
double departPos,
double arrivalPos,
double speed,
SUMOTime msTime,
const N * onlyNode,
const SUMOVTypeParameter & pars,
std::vector< const E * > & into,
bool allEdges = false ) const
inline

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.

Definition at line 84 of file PedestrianRouter.h.

Referenced by MSPModel_JuPedSim::add(), MSPModel_Striping::getNextLane(), MSPModel_Striping::PState::PState(), PedestrianRouter< MSEdge, MSLane, MSJunction, SUMOVehicle >::recomputeWalkCosts(), and LIBSUMO_NAMESPACE::Person::rerouteTraveltime().

Here is the caller graph for this function:

◆ compute() [3/3]

virtual bool SUMOAbstractRouter< E, V >::compute ( const E * from,
const E * to,
const V *const vehicle,
SUMOTime msTime,
std::vector< const E * > & into,
bool silent = false )
pure virtualinherited

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.

◆ computeLooped()

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

◆ endQuery()

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

Definition at line 395 of file SUMOAbstractRouter.h.

◆ getCommonNode()

template<class E, class L, class N, class V>
const N * PedestrianRouter< E, L, N, V >::getCommonNode ( const E * from,
const E * to ) const
inlineprivate

Definition at line 197 of file PedestrianRouter.h.

Referenced by PedestrianRouter< MSEdge, MSLane, MSJunction, SUMOVehicle >::recomputeWalkCosts().

Here is the caller graph for this function:

◆ getEdgeInfo()

const SUMOAbstractRouter< E, V >::EdgeInfo & SUMOAbstractRouter< E, V >::getEdgeInfo ( int index) const
inlineinherited

Definition at line 192 of file SUMOAbstractRouter.h.

◆ getEffort()

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

Definition at line 378 of file SUMOAbstractRouter.h.

◆ getTravelTime()

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

Definition at line 258 of file SUMOAbstractRouter.h.

◆ getType()

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

Definition at line 188 of file SUMOAbstractRouter.h.

◆ hasProhibitions()

bool SUMOAbstractRouter< E, V >::hasProhibitions ( ) const
inlineinherited

Definition at line 423 of file SUMOAbstractRouter.h.

◆ init()

void SUMOAbstractRouter< E, V >::init ( const int edgeID,
const SUMOTime msTime )
inlineinherited

Definition at line 155 of file SUMOAbstractRouter.h.

◆ isProhibited()

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

Definition at line 250 of file SUMOAbstractRouter.h.

◆ isValid()

bool SUMOAbstractRouter< E, V >::isValid ( const std::vector< const E * > & edges,
const V *const v,
double t ) const
inlineinherited

Definition at line 287 of file SUMOAbstractRouter.h.

◆ operator=()

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

Invalidated assignment operator.

◆ prohibit()

template<class E, class L, class N, class V>
void PedestrianRouter< E, L, N, V >::prohibit ( const std::map< const E *, RouterProhibition > & toProhibit)
inlinevirtual

Reimplemented from SUMOAbstractRouter< E, IntermodalTrip< E, N, V > >.

Definition at line 129 of file PedestrianRouter.h.

◆ recomputeCosts()

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

Definition at line 296 of file SUMOAbstractRouter.h.

◆ recomputeCostsPos()

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

Definition at line 314 of file SUMOAbstractRouter.h.

◆ recomputeWalkCosts()

template<class E, class L, class N, class V>
double PedestrianRouter< E, L, N, V >::recomputeWalkCosts ( const std::vector< const E * > & edges,
double speed,
double fromPos,
double toPos,
SUMOTime msTime,
const SUMOVTypeParameter & pars,
double & length ) const
inline

Definition at line 138 of file PedestrianRouter.h.

Referenced by LIBSUMO_NAMESPACE::Person::getWalkingDistance().

Here is the caller graph for this function:

◆ reset()

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

reset internal caches, used by CHRouter

Definition at line 180 of file SUMOAbstractRouter.h.

◆ setAutoBulkMode()

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

Definition at line 404 of file SUMOAbstractRouter.h.

◆ setBulkMode()

virtual void SUMOAbstractRouter< E, V >::setBulkMode ( const bool mode)
inlinevirtualinherited

Reimplemented in IntermodalRouter< E, L, N, V >.

Definition at line 400 of file SUMOAbstractRouter.h.

◆ setHint()

double SUMOAbstractRouter< E, V >::setHint ( const typename std::vector< const E * >::const_iterator routeBegin,
const typename std::vector< const E * >::const_iterator routeEnd,
const V *const v,
SUMOTime msTime )
inlineinherited

Definition at line 347 of file SUMOAbstractRouter.h.

◆ setMsgHandler()

virtual void SUMOAbstractRouter< E, V >::setMsgHandler ( MsgHandler *const errorMsgHandler)
inlinevirtualinherited

Definition at line 184 of file SUMOAbstractRouter.h.

◆ startQuery()

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

Definition at line 390 of file SUMOAbstractRouter.h.

◆ supportsProhibitions()

virtual bool SUMOAbstractRouter< E, V >::supportsProhibitions ( ) const
inlinevirtualinherited

Definition at line 427 of file SUMOAbstractRouter.h.

◆ updateViaCost()

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

Definition at line 272 of file SUMOAbstractRouter.h.

◆ updateViaEdgeCost()

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

Definition at line 262 of file SUMOAbstractRouter.h.

Field Documentation

◆ myAmClean

bool SUMOAbstractRouter< E, V >::myAmClean
protectedinherited

whether we are already initialized

Definition at line 458 of file SUMOAbstractRouter.h.

◆ myAmClone

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

Definition at line 193 of file PedestrianRouter.h.

◆ myAutoBulkMode

bool SUMOAbstractRouter< E, V >::myAutoBulkMode
protectedinherited

whether we are currently trying to detect bulk mode automatically

Definition at line 455 of file SUMOAbstractRouter.h.

◆ myBulkMode

bool SUMOAbstractRouter< E, V >::myBulkMode
protectedinherited

whether we are currently operating several route queries in a bulk

Definition at line 452 of file SUMOAbstractRouter.h.

◆ myEdgeInfos

std::vector<typename SUMOAbstractRouter<E, V>::EdgeInfo> SUMOAbstractRouter< E, V >::myEdgeInfos
protectedinherited

The container of edge information.

Definition at line 470 of file SUMOAbstractRouter.h.

◆ myErrorMsgHandler

MsgHandler* SUMOAbstractRouter< E, V >::myErrorMsgHandler
protectedinherited

the handler for routing errors

Definition at line 443 of file SUMOAbstractRouter.h.

◆ myFound

std::vector<typename SUMOAbstractRouter<E, V>::EdgeInfo*> SUMOAbstractRouter< E, V >::myFound
protectedinherited

list of visited Edges (for resetting)

Definition at line 475 of file SUMOAbstractRouter.h.

◆ myFrontierList

std::vector<typename SUMOAbstractRouter<E, V>::EdgeInfo*> SUMOAbstractRouter< E, V >::myFrontierList
protectedinherited

A container for reusage of the min edge heap.

Definition at line 473 of file SUMOAbstractRouter.h.

◆ myHavePermissions

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

whether edge permissions need to be considered

Definition at line 461 of file SUMOAbstractRouter.h.

◆ myHaveRestrictions

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

whether edge restrictions need to be considered

Definition at line 464 of file SUMOAbstractRouter.h.

◆ myInternalRouter

template<class E, class L, class N, class V>
_InternalRouter* PedestrianRouter< E, L, N, V >::myInternalRouter
private

Definition at line 194 of file PedestrianRouter.h.

◆ myNumQueries

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

Definition at line 483 of file SUMOAbstractRouter.h.

◆ myOperation

Operation SUMOAbstractRouter< E, V >::myOperation
protectedinherited

The object's operation to perform.

Definition at line 446 of file SUMOAbstractRouter.h.

◆ myPedNet

template<class E, class L, class N, class V>
_IntermodalNetwork* PedestrianRouter< E, L, N, V >::myPedNet
private

Definition at line 195 of file PedestrianRouter.h.

◆ myProhibited

Prohibitions SUMOAbstractRouter< E, V >::myProhibited
protectedinherited

The list of explicitly prohibited edges and estimated end time of prohibition.

Definition at line 467 of file SUMOAbstractRouter.h.

◆ myQueryStartTime

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

the time spent querying in milliseconds

Definition at line 485 of file SUMOAbstractRouter.h.

◆ myQueryTimeSum

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

Definition at line 486 of file SUMOAbstractRouter.h.

◆ myQueryVisits

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

counters for performance logging

Definition at line 482 of file SUMOAbstractRouter.h.

◆ myTTOperation

Operation SUMOAbstractRouter< E, V >::myTTOperation
protectedinherited

The object's operation to perform for travel times.

Definition at line 449 of file SUMOAbstractRouter.h.

◆ myType

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

the type of this router

Definition at line 479 of file SUMOAbstractRouter.h.


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