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

#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 IntermodalTrip< E, N, V > *const, double)
 Type of the function that is used to retrieve the edge effort.
 
typedef std::map< const E *, double > Prohibitions
 Prohibitions and their estimated end time.
 

Public Member Functions

void buildPathFrom (const typename SUMOAbstractRouter< E, IntermodalTrip< E, N, 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, 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.
 
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.
 
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.
 
void endQuery (int visits)
 
const SUMOAbstractRouter< E, IntermodalTrip< E, N, V > >::EdgeInfo & getEdgeInfo (int index) const
 
double getEffort (const E *const e, const IntermodalTrip< E, N, V > *const v, double t) 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
 
void init (const int edgeID, const SUMOTime msTime)
 
bool isProhibited (const E *const edge, const IntermodalTrip< E, N, V > *const vehicle) const
 
bool isValid (const std::vector< const E * > &edges, const IntermodalTrip< E, N, V > *const v) const
 
 PedestrianRouter ()
 Constructor.
 
 PedestrianRouter (_IntermodalNetwork *net)
 
virtual void prohibit (const Prohibitions &toProhibit)
 
void prohibit (const std::map< const E *, double > &toProhibit)
 
virtual double recomputeCosts (const std::vector< const E * > &edges, const IntermodalTrip< E, N, V > *const v, SUMOTime msTime, double *lengthp=nullptr) const
 
double recomputeCostsPos (const std::vector< const E * > &edges, const IntermodalTrip< E, N, 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, double &length) const
 
virtual void reset (const IntermodalTrip< E, N, 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 IntermodalTrip< E, N, V > *const v, SUMOTime msTime)
 
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
 
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, IntermodalTrip< E, N, V > >::EdgeInfo > myEdgeInfos
 The container of edge information.
 
MsgHandler *const myErrorMsgHandler
 the handler for routing errors
 
std::vector< typename SUMOAbstractRouter< E, IntermodalTrip< E, N, V > >::EdgeInfo * > myFound
 list of visited Edges (for resetting)
 
std::vector< typename SUMOAbstractRouter< E, IntermodalTrip< E, N, 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, 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 95 of file SUMOAbstractRouter.h.

◆ Prohibitions

typedef std::map<const E*, double> SUMOAbstractRouter< E, IntermodalTrip< E, N, V > >::Prohibitions
inherited

Prohibitions and their estimated end time.

Definition at line 98 of file SUMOAbstractRouter.h.

Constructor & Destructor Documentation

◆ PedestrianRouter() [1/2]

◆ PedestrianRouter() [2/2]

◆ ~PedestrianRouter()

Member Function Documentation

◆ buildPathFrom()

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

Builds the path from marked edges.

Definition at line 380 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   
)
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 124 of file PedestrianRouter.h.

References TL.

◆ 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,
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.

References DijkstraRouter< E, V >::compute(), IntermodalNetwork< E, L, N, V >::getArrivalConnector(), IntermodalNetwork< E, L, N, V >::getDepartConnector(), SUMOAbstractRouter< E, V >::getEffort(), PedestrianRouter< E, L, N, V >::myInternalRouter, PedestrianRouter< E, L, N, V >::myPedNet, TIME2STEPS, TL, toString(), and WRITE_WARNINGF.

Referenced by MSPModel_JuPedSim::add(), MSPModel_Striping::getNextLane(), MSPModel_Striping::PState::PState(), PedestrianRouter< E, L, N, V >::recomputeWalkCosts(), and LIBSUMO_NAMESPACE::Person::rerouteTraveltime().

Here is the caller graph for this function:

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

◆ endQuery()

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

Definition at line 350 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< E, L, N, V >::recomputeWalkCosts().

Here is the caller graph for this function:

◆ getEdgeInfo()

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

Definition at line 175 of file SUMOAbstractRouter.h.

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

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

◆ getType()

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

Definition at line 171 of file SUMOAbstractRouter.h.

◆ init()

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

Definition at line 142 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 233 of file SUMOAbstractRouter.h.

◆ isValid()

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

Definition at line 266 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() [1/2]

virtual void SUMOAbstractRouter< E, IntermodalTrip< E, N, V > >::prohibit ( const Prohibitions toProhibit)
inlinevirtualinherited

Definition at line 363 of file SUMOAbstractRouter.h.

◆ prohibit() [2/2]

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

◆ recomputeCosts()

virtual 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
inlinevirtualinherited

Definition at line 275 of file SUMOAbstractRouter.h.

◆ recomputeCostsPos()

double SUMOAbstractRouter< E, IntermodalTrip< E, N, V > >::recomputeCostsPos ( 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 293 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,
double &  length 
) const
inline

Definition at line 138 of file PedestrianRouter.h.

References PedestrianRouter< E, L, N, V >::compute(), and PedestrianRouter< E, L, N, V >::getCommonNode().

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

Here is the caller graph for this function:

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

◆ setAutoBulkMode()

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

Definition at line 359 of file SUMOAbstractRouter.h.

◆ setBulkMode()

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

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

Definition at line 355 of file SUMOAbstractRouter.h.

◆ setHint()

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

Definition at line 305 of file SUMOAbstractRouter.h.

◆ startQuery()

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

Definition at line 345 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 251 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 241 of file SUMOAbstractRouter.h.

Field Documentation

◆ myAmClean

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

whether we are already initialized

Definition at line 406 of file SUMOAbstractRouter.h.

◆ myAmClone

template<class E , class L , class N , class V >
const bool PedestrianRouter< 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 403 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 400 of file SUMOAbstractRouter.h.

◆ myEdgeInfos

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

The container of edge information.

Definition at line 418 of file SUMOAbstractRouter.h.

◆ myErrorMsgHandler

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

the handler for routing errors

Definition at line 391 of file SUMOAbstractRouter.h.

◆ myFound

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

list of visited Edges (for resetting)

Definition at line 423 of file SUMOAbstractRouter.h.

◆ myFrontierList

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

A container for reusage of the min edge heap.

Definition at line 421 of file SUMOAbstractRouter.h.

◆ myHavePermissions

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

whether edge permissions need to be considered

Definition at line 409 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 412 of file SUMOAbstractRouter.h.

◆ myInternalRouter

◆ myNumQueries

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

Definition at line 431 of file SUMOAbstractRouter.h.

◆ myOperation

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

The object's operation to perform.

Definition at line 394 of file SUMOAbstractRouter.h.

◆ myPedNet

◆ myProhibited

Prohibitions SUMOAbstractRouter< E, IntermodalTrip< E, N, V > >::myProhibited
protectedinherited

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

Definition at line 415 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 433 of file SUMOAbstractRouter.h.

◆ myQueryTimeSum

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

Definition at line 434 of file SUMOAbstractRouter.h.

◆ myQueryVisits

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

counters for performance logging

Definition at line 430 of file SUMOAbstractRouter.h.

◆ myTTOperation

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

The object's operation to perform for travel times.

Definition at line 397 of file SUMOAbstractRouter.h.

◆ myType

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

the type of this router

Definition at line 427 of file SUMOAbstractRouter.h.


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