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

the edge type representing backward edges More...

#include <RailEdge.h>

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

Public Types

typedef RailEdge< E, V > _RailEdge
typedef std::vector< std::pair< const _RailEdge *, const _RailEdge * > > ConstEdgePairVector

Public Member Functions

void addVirtualTurns (const E *forward, const E *backward, std::vector< _RailEdge * > &railEdges, int &numericalID, double dist, double maxTrainLength, const std::vector< const E * > &replacementEdges)
const std::string & getID () const
 Returns the id of the edge.
double getLength () const
 Returns the length of the edge.
int getNumericalID () const
 Returns the index (numeric id) of the edge.
const E * getOriginal () const
 Returns the original edge.
const ConstEdgePairVectorgetViaSuccessors (SUMOVehicleClass vClass=SVC_IGNORING, bool ignoreTransientPermissions=false) const
void init (std::vector< _RailEdge * > &railEdges, int &numericalID, double maxTrainLength, bool permitReversal)
void insertOriginalEdges (double length, std::vector< const E * > &into) const
bool isInternal () const
bool isVirtual () const
bool prohibits (const V *const vehicle) const
 RailEdge (const E *orig)
 RailEdge (const E *turnStart, const E *turnEnd, int numericalID)
bool restricts (const V *const vehicle) const
void update (double maxTrainLength, const std::vector< const E * > &replacementEdges)
virtual ~RailEdge ()
 Destructor.

Private Attributes

std::map< SUMOVehicleClass, ConstEdgePairVectormyClassesViaSuccessorMap
 The successors available for a given vClass.
const std::string myID
bool myIsVirtual
double myMaxLength = std::numeric_limits<double>::max()
 maximum train length for passing this (turnaround) edge
const int myNumericalID
const E * myOriginal
std::vector< const E * > myReplacementEdges
 actual edges to return when passing this (turnaround) edge - only forward
double myStartLength = 0
 length of the edge where this turn starts
_RailEdgemyTurnaround
ConstEdgePairVector myViaSuccessors

Detailed Description

template<class E, class V>
class RailEdge< E, V >

the edge type representing backward edges

Definition at line 38 of file RailEdge.h.

Member Typedef Documentation

◆ _RailEdge

template<class E, class V>
typedef RailEdge<E, V> RailEdge< E, V >::_RailEdge

Definition at line 40 of file RailEdge.h.

◆ ConstEdgePairVector

template<class E, class V>
typedef std::vector<std::pair<const _RailEdge*, const _RailEdge*> > RailEdge< E, V >::ConstEdgePairVector

Definition at line 41 of file RailEdge.h.

Constructor & Destructor Documentation

◆ RailEdge() [1/2]

template<class E, class V>
RailEdge< E, V >::RailEdge ( const E * orig)
inline

Definition at line 43 of file RailEdge.h.

References getNumericalID(), myIsVirtual, myNumericalID, myOriginal, and myTurnaround.

◆ RailEdge() [2/2]

template<class E, class V>
RailEdge< E, V >::RailEdge ( const E * turnStart,
const E * turnEnd,
int numericalID )
inline

◆ ~RailEdge()

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

Destructor.

Definition at line 62 of file RailEdge.h.

References myTurnaround.

Member Function Documentation

◆ addVirtualTurns()

template<class E, class V>
void RailEdge< E, V >::addVirtualTurns ( const E * forward,
const E * backward,
std::vector< _RailEdge< E, V > * > & railEdges,
int & numericalID,
double dist,
double maxTrainLength,
const std::vector< const E * > & replacementEdges )
inline

Definition at line 76 of file RailEdge.h.

References addVirtualTurns(), getID(), myTurnaround, myViaSuccessors, REVERSAL_SLACK, SVC_IGNORING, toString(), and update().

Referenced by addVirtualTurns(), and init().

Here is the caller graph for this function:

◆ getID()

template<class E, class V>
const std::string & RailEdge< E, V >::getID ( ) const
inline

Returns the id of the edge.

Returns
The original edge's id

Definition at line 180 of file RailEdge.h.

References myID, and myOriginal.

Referenced by addVirtualTurns(), init(), prohibits(), RailEdge(), and update().

Here is the caller graph for this function:

◆ getLength()

template<class E, class V>
double RailEdge< E, V >::getLength ( ) const
inline

Returns the length of the edge.

Returns
The original edge's length

Definition at line 214 of file RailEdge.h.

References myOriginal.

Referenced by init(), and RailEdge().

Here is the caller graph for this function:

◆ getNumericalID()

template<class E, class V>
int RailEdge< E, V >::getNumericalID ( ) const
inline

Returns the index (numeric id) of the edge.

Definition at line 168 of file RailEdge.h.

References myNumericalID.

Referenced by RailEdge().

Here is the caller graph for this function:

◆ getOriginal()

template<class E, class V>
const E * RailEdge< E, V >::getOriginal ( ) const
inline

Returns the original edge.

Definition at line 173 of file RailEdge.h.

References myOriginal.

Referenced by RailwayRouter< E, V >::getTravelTimeStatic().

Here is the caller graph for this function:

◆ getViaSuccessors()

template<class E, class V>
const ConstEdgePairVector & RailEdge< E, V >::getViaSuccessors ( SUMOVehicleClass vClass = SVC_IGNORING,
bool ignoreTransientPermissions = false ) const
inline

Definition at line 239 of file RailEdge.h.

References myClassesViaSuccessorMap, myOriginal, myViaSuccessors, and SVC_IGNORING.

◆ init()

template<class E, class V>
void RailEdge< E, V >::init ( std::vector< _RailEdge< E, V > * > & railEdges,
int & numericalID,
double maxTrainLength,
bool permitReversal )
inline

◆ insertOriginalEdges()

template<class E, class V>
void RailEdge< E, V >::insertOriginalEdges ( double length,
std::vector< const E * > & into ) const
inline

Definition at line 184 of file RailEdge.h.

References myIsVirtual, myOriginal, myReplacementEdges, myStartLength, REVERSAL_SLACK, and SVC_IGNORING.

Referenced by RailwayRouter< E, V >::getTravelTimeStatic().

Here is the caller graph for this function:

◆ isInternal()

template<class E, class V>
bool RailEdge< E, V >::isInternal ( ) const
inline

Definition at line 222 of file RailEdge.h.

References myOriginal.

◆ isVirtual()

template<class E, class V>
bool RailEdge< E, V >::isVirtual ( ) const
inline

Definition at line 264 of file RailEdge.h.

References myIsVirtual.

Referenced by RailwayRouter< E, V >::getTravelTimeStatic().

Here is the caller graph for this function:

◆ prohibits()

template<class E, class V>
bool RailEdge< E, V >::prohibits ( const V *const vehicle) const
inline

Definition at line 226 of file RailEdge.h.

References getID(), myMaxLength, myOriginal, and RailEdge_DEBUG_COND.

◆ restricts()

template<class E, class V>
bool RailEdge< E, V >::restricts ( const V *const vehicle) const
inline

Definition at line 235 of file RailEdge.h.

References myOriginal.

◆ update()

template<class E, class V>
void RailEdge< E, V >::update ( double maxTrainLength,
const std::vector< const E * > & replacementEdges )
inline

Definition at line 66 of file RailEdge.h.

References getID(), myMaxLength, myReplacementEdges, and toString().

Referenced by addVirtualTurns().

Here is the caller graph for this function:

Field Documentation

◆ myClassesViaSuccessorMap

template<class E, class V>
std::map<SUMOVehicleClass, ConstEdgePairVector> RailEdge< E, V >::myClassesViaSuccessorMap
mutableprivate

The successors available for a given vClass.

Definition at line 284 of file RailEdge.h.

Referenced by getViaSuccessors().

◆ myID

template<class E, class V>
const std::string RailEdge< E, V >::myID
private

Definition at line 270 of file RailEdge.h.

Referenced by getID(), and RailEdge().

◆ myIsVirtual

template<class E, class V>
bool RailEdge< E, V >::myIsVirtual
private

Definition at line 273 of file RailEdge.h.

Referenced by insertOriginalEdges(), isVirtual(), RailEdge(), and RailEdge().

◆ myMaxLength

template<class E, class V>
double RailEdge< E, V >::myMaxLength = std::numeric_limits<double>::max()
private

maximum train length for passing this (turnaround) edge

Definition at line 279 of file RailEdge.h.

Referenced by prohibits(), RailEdge(), and update().

◆ myNumericalID

template<class E, class V>
const int RailEdge< E, V >::myNumericalID
private

Definition at line 269 of file RailEdge.h.

Referenced by getNumericalID(), RailEdge(), and RailEdge().

◆ myOriginal

template<class E, class V>
const E* RailEdge< E, V >::myOriginal
private

◆ myReplacementEdges

template<class E, class V>
std::vector<const E*> RailEdge< E, V >::myReplacementEdges
private

actual edges to return when passing this (turnaround) edge - only forward

Definition at line 276 of file RailEdge.h.

Referenced by insertOriginalEdges(), and update().

◆ myStartLength

template<class E, class V>
double RailEdge< E, V >::myStartLength = 0
private

length of the edge where this turn starts

Definition at line 281 of file RailEdge.h.

Referenced by insertOriginalEdges(), and RailEdge().

◆ myTurnaround

template<class E, class V>
_RailEdge* RailEdge< E, V >::myTurnaround
private

Definition at line 272 of file RailEdge.h.

Referenced by addVirtualTurns(), init(), RailEdge(), RailEdge(), and ~RailEdge().

◆ myViaSuccessors

template<class E, class V>
ConstEdgePairVector RailEdge< E, V >::myViaSuccessors
mutableprivate

Definition at line 286 of file RailEdge.h.

Referenced by addVirtualTurns(), getViaSuccessors(), init(), and RailEdge().


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