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

The edge type representing backward edges with flipped nodes. More...

#include <FlippedEdge.h>

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

Public Types

typedef std::vector< std::pair< const ReversedEdge< E, V > *, const ReversedEdge< E, V > * > > ConstEdgePairVector
 
typedef std::vector< std::pair< const FlippedEdge< E, N, V > *, const FlippedEdge< E, N, V > * > > ConstFlippedEdgePairVector
 

Public Member Functions

 FlippedEdge (const E *originalEdge)
 Constructor.
 
const FlippedEdge< E, N, V > * getBidiEdge () const
 Returns the bidirectional edge.
 
double getDistanceTo (const FlippedEdge< E, N, V > *other, const bool doBoundaryEstimate=false) const
 Returns the distance to another flipped edge param[in] other The other flipped edge param[in] doBoundaryEstimate The boolean flag indicating whether the distance is estimated using both boundaries or not.
 
const FlippedNode< E, N, V > * getFromJunction () const
 Returns the from-junction.
 
const std::string & getID () const
 Returns the id of the edge.
 
double getLength () const
 Returns the length of the edge.
 
double getLengthGeometryFactor () const
 Returns a lower bound on shape.length() / myLength.
 
double getMinimumTravelTime (const V *const veh) const
 Returns the minimum travel time.
 
int getNumericalID () const
 Returns the index (numeric id) of the edge.
 
const E * getOriginalEdge () const
 Returns the original edge.
 
int getPriority () const
 Returns the edge priority (road class)
 
double getSpeedLimit () const
 Returns the speed allowed on this edge.
 
double getTimePenalty () const
 Returns the time penalty.
 
const FlippedNode< E, N, V > * getToJunction () const
 Returns the to-junction.
 
const ConstFlippedEdgePairVectorgetViaSuccessors (SUMOVehicleClass vClass=SVC_IGNORING, bool ignoreTransientPermissions=false) const
 Returns the via successors.
 
bool hasLoadedTravelTimes () const
 Returns a boolean flag indicating whether this edge has loaded travel times or not.
 
void init ()
 Initialize the flipped edge.
 
bool isInternal () const
 
bool prohibits (const V *const vehicle) const
 
bool restricts (const V *const vehicle) const
 
 ~FlippedEdge ()
 Destructor.
 

Static Public Member Functions

static double getTravelTimeStatic (const FlippedEdge< E, N, V > *const edge, const V *const veh, double time)
 Returns the time for travelling on the given edge with the given vehicle at the given time.
 
static double getTravelTimeStatic (const ReversedEdge< E, V > *const edge, const V *const veh, double time)
 
static double getTravelTimeStaticRandomized (const FlippedEdge< E, N, V > *const edge, const V *const veh, double time)
 Returns the randomized time for travelling on the given edge with the given vehicle at the given time.
 

Protected Attributes

FlippedNode< E, N, V > * myFromJunction
 The junctions for this edge.
 
FlippedNode< E, N, V > * myToJunction
 

Private Attributes

std::map< SUMOVehicleClass, ConstFlippedEdgePairVectormyClassesViaSuccessorMap
 The successors available for a given vClass.
 
const E *const myOriginal
 
ConstFlippedEdgePairVector myViaSuccessors
 

Detailed Description

template<class E, class N, class V>
class FlippedEdge< E, N, V >

The edge type representing backward edges with flipped nodes.

Definition at line 43 of file FlippedEdge.h.

Member Typedef Documentation

◆ ConstEdgePairVector

template<class E , class V >
typedef std::vector<std::pair<const ReversedEdge<E, V>*, const ReversedEdge<E, V>*> > ReversedEdge< E, V >::ConstEdgePairVector
inherited

Definition at line 33 of file ReversedEdge.h.

◆ ConstFlippedEdgePairVector

template<class E , class N , class V >
typedef std::vector<std::pair<const FlippedEdge<E, N, V>*, const FlippedEdge<E, N, V>*> > FlippedEdge< E, N, V >::ConstFlippedEdgePairVector

Definition at line 46 of file FlippedEdge.h.

Constructor & Destructor Documentation

◆ FlippedEdge()

template<class E , class N , class V >
FlippedEdge< E, N, V >::FlippedEdge ( const E *  originalEdge)
inline

Constructor.

Parameters
[in]originalEdgeThe original (forward) edge

Definition at line 51 of file FlippedEdge.h.

◆ ~FlippedEdge()

template<class E , class N , class V >
FlippedEdge< E, N, V >::~FlippedEdge ( )
inline

Destructor.

Definition at line 58 of file FlippedEdge.h.

Member Function Documentation

◆ getBidiEdge()

template<class E , class N , class V >
const FlippedEdge< E, N, V > * FlippedEdge< E, N, V >::getBidiEdge ( ) const
inline

Returns the bidirectional edge.

Returns
The bidirectional edge

Definition at line 122 of file FlippedEdge.h.

References ReversedEdge< E, V >::getOriginalEdge().

◆ getDistanceTo()

template<class E , class N , class V >
double FlippedEdge< E, N, V >::getDistanceTo ( const FlippedEdge< E, N, V > *  other,
const bool  doBoundaryEstimate = false 
) const
inline

Returns the distance to another flipped edge param[in] other The other flipped edge param[in] doBoundaryEstimate The boolean flag indicating whether the distance is estimated using both boundaries or not.

Returns
The distance to another flipped edge

Definition at line 130 of file FlippedEdge.h.

References ReversedEdge< E, V >::getOriginalEdge().

◆ getFromJunction()

template<class E , class N , class V >
const FlippedNode< E, N, V > * FlippedEdge< E, N, V >::getFromJunction ( ) const
inline

Returns the from-junction.

Definition at line 63 of file FlippedEdge.h.

References FlippedEdge< E, N, V >::myFromJunction.

◆ getID()

template<class E , class V >
const std::string & ReversedEdge< E, V >::getID ( ) const
inlineinherited

Returns the id of the edge.

Returns
The original edge's id

Definition at line 69 of file ReversedEdge.h.

References ReversedEdge< E, V >::myOriginal.

◆ getLength()

template<class E , class V >
double ReversedEdge< E, V >::getLength ( ) const
inlineinherited

Returns the length of the edge.

Returns
The original edge's length

Definition at line 76 of file ReversedEdge.h.

References ReversedEdge< E, V >::myOriginal.

◆ getLengthGeometryFactor()

template<class E , class N , class V >
double FlippedEdge< E, N, V >::getLengthGeometryFactor ( ) const
inline

Returns a lower bound on shape.length() / myLength.

Note
The bound is sufficient for the astar air-distance heuristic
Returns
A lower bound on shape.length() / myLength

Definition at line 162 of file FlippedEdge.h.

References ReversedEdge< E, V >::getOriginalEdge().

◆ getMinimumTravelTime()

template<class E , class N , class V >
double FlippedEdge< E, N, V >::getMinimumTravelTime ( const V *const  veh) const
inline

Returns the minimum travel time.

Parameters
[in]vehThe vehicle
Returns
The minimum travel time

Definition at line 137 of file FlippedEdge.h.

References ReversedEdge< E, V >::getOriginalEdge().

◆ getNumericalID()

template<class E , class V >
int ReversedEdge< E, V >::getNumericalID ( ) const
inlineinherited

Returns the index (numeric id) of the edge.

Returns
The original edge's numerical id

Definition at line 62 of file ReversedEdge.h.

References ReversedEdge< E, V >::myOriginal.

◆ getOriginalEdge()

◆ getPriority()

template<class E , class N , class V >
int FlippedEdge< E, N, V >::getPriority ( ) const
inline

Returns the edge priority (road class)

Returns
The edge priority (road class)

Definition at line 168 of file FlippedEdge.h.

References ReversedEdge< E, V >::getOriginalEdge().

◆ getSpeedLimit()

template<class E , class N , class V >
double FlippedEdge< E, N, V >::getSpeedLimit ( ) const
inline

Returns the speed allowed on this edge.

Returns
The speed allowed on this edge

Definition at line 155 of file FlippedEdge.h.

References ReversedEdge< E, V >::getOriginalEdge().

◆ getTimePenalty()

template<class E , class N , class V >
double FlippedEdge< E, N, V >::getTimePenalty ( ) const
inline

Returns the time penalty.

Returns
The time penalty

Definition at line 143 of file FlippedEdge.h.

References ReversedEdge< E, V >::getOriginalEdge().

◆ getToJunction()

template<class E , class N , class V >
const FlippedNode< E, N, V > * FlippedEdge< E, N, V >::getToJunction ( ) const
inline

Returns the to-junction.

Definition at line 67 of file FlippedEdge.h.

References FlippedEdge< E, N, V >::myToJunction.

◆ getTravelTimeStatic() [1/2]

template<class E , class N , class V >
static double FlippedEdge< E, N, V >::getTravelTimeStatic ( const FlippedEdge< E, N, V > *const  edge,
const V *const  veh,
double  time 
)
inlinestatic

Returns the time for travelling on the given edge with the given vehicle at the given time.

Parameters
[in]edgeThe edge
[in]vehThe vehicle
[in]timeThe time
Returns
The time for travelling on the given edge with the given vehicle at the given time

Definition at line 76 of file FlippedEdge.h.

References ReversedEdge< E, V >::getOriginalEdge().

◆ getTravelTimeStatic() [2/2]

template<class E , class V >
static double ReversedEdge< E, V >::getTravelTimeStatic ( const ReversedEdge< E, V > *const  edge,
const V *const  veh,
double  time 
)
inlinestaticinherited

Definition at line 96 of file ReversedEdge.h.

References ReversedEdge< E, V >::myOriginal.

◆ getTravelTimeStaticRandomized()

template<class E , class N , class V >
static double FlippedEdge< E, N, V >::getTravelTimeStaticRandomized ( const FlippedEdge< E, N, V > *const  edge,
const V *const  veh,
double  time 
)
inlinestatic

Returns the randomized time for travelling on the given edge with the given vehicle at the given time.

Parameters
[in]edgeThe edge
[in]vehThe vehicle
[in]timeThe time
Returns
The randomized time for travelling on the given edge with the given vehicle at the given time

Definition at line 85 of file FlippedEdge.h.

References ReversedEdge< E, V >::getOriginalEdge().

◆ getViaSuccessors()

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

Returns the via successors.

Parameters
[in]vClassThe vehicle class
[in]ignoreTransientPermissionsUnused parameter
Returns
The via successors

Definition at line 94 of file FlippedEdge.h.

References ReversedEdge< E, V >::getOriginalEdge(), FlippedEdge< E, N, V >::myClassesViaSuccessorMap, FlippedEdge< E, N, V >::myViaSuccessors, SVC_IGNORING, and UNUSED_PARAMETER.

Referenced by FlippedEdge< E, N, V >::init().

Here is the caller graph for this function:

◆ hasLoadedTravelTimes()

template<class E , class N , class V >
bool FlippedEdge< E, N, V >::hasLoadedTravelTimes ( ) const
inline

Returns a boolean flag indicating whether this edge has loaded travel times or not.

Returns
true iff this edge has loaded travel times

Definition at line 149 of file FlippedEdge.h.

References ReversedEdge< E, V >::getOriginalEdge().

◆ init()

template<class E , class N , class V >
void FlippedEdge< E, N, V >::init ( )

Initialize the flipped edge.

Definition at line 193 of file FlippedEdge.h.

References FlippedEdge< E, N, V >::getViaSuccessors(), and FlippedEdge< E, N, V >::myViaSuccessors.

◆ isInternal()

template<class E , class V >
bool ReversedEdge< E, V >::isInternal ( ) const
inlineinherited

Definition at line 84 of file ReversedEdge.h.

References ReversedEdge< E, V >::myOriginal.

◆ prohibits()

template<class E , class V >
bool ReversedEdge< E, V >::prohibits ( const V *const  vehicle) const
inlineinherited

Definition at line 88 of file ReversedEdge.h.

References ReversedEdge< E, V >::myOriginal.

◆ restricts()

template<class E , class V >
bool ReversedEdge< E, V >::restricts ( const V *const  vehicle) const
inlineinherited

Definition at line 92 of file ReversedEdge.h.

References ReversedEdge< E, V >::myOriginal.

Field Documentation

◆ myClassesViaSuccessorMap

template<class E , class N , class V >
std::map<SUMOVehicleClass, ConstFlippedEdgePairVector> FlippedEdge< E, N, V >::myClassesViaSuccessorMap
mutableprivate

The successors available for a given vClass.

Definition at line 179 of file FlippedEdge.h.

Referenced by FlippedEdge< E, N, V >::getViaSuccessors().

◆ myFromJunction

template<class E , class N , class V >
FlippedNode<E, N, V>* FlippedEdge< E, N, V >::myFromJunction
protected

The junctions for this edge.

Definition at line 174 of file FlippedEdge.h.

Referenced by FlippedEdge< E, N, V >::getFromJunction().

◆ myOriginal

◆ myToJunction

template<class E , class N , class V >
FlippedNode<E, N, V>* FlippedEdge< E, N, V >::myToJunction
protected

Definition at line 175 of file FlippedEdge.h.

Referenced by FlippedEdge< E, N, V >::getToJunction().

◆ myViaSuccessors

template<class E , class N , class V >
ConstFlippedEdgePairVector FlippedEdge< E, N, V >::myViaSuccessors
mutableprivate

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