Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
NBNode::ApproachingDivider Class Reference

Computes lane-2-lane connections. More...

#include <NBNode.h>

Inheritance diagram for NBNode::ApproachingDivider:
[legend]
Collaboration diagram for NBNode::ApproachingDivider:
[legend]

Public Member Functions

 ApproachingDivider (const EdgeVector &approaching, NBEdge *currentOutgoing)
 Constructor.
 
void execute (const int src, const int dest)
 the bresenham-callback
 
int numAvailableLanes () const
 @ get number of available lanes
 
std::deque< int > * spread (int numLanes, int dest) const
 the method that spreads the wished number of lanes from the lane given by the bresenham-call to both left and right
 
 ~ApproachingDivider ()
 Destructor.
 

Private Member Functions

ApproachingDivideroperator= (const ApproachingDivider &)=delete
 Invalidated assignment operator.
 

Private Attributes

const EdgeVectormyApproaching
 The list of edges that approach the current edge.
 
std::vector< int > myAvailableLanes
 The available lanes to which connections shall be built.
 
NBEdgemyCurrentOutgoing
 The approached current edge.
 
std::vector< LinkDirectionmyDirections
 directions from each incoming edge to the outgoing edge
 
bool myIsBikeEdge
 whether the outgoing edge is exclusively used by bikes
 
int myNumStraight
 number of straight connections to the outgoing edge
 

Detailed Description

Computes lane-2-lane connections.

Being a bresenham-callback, this class computes which lanes are approached by the current lane (first callback parameter). The second callback parameter is the destination lane that is the middle of the computed lanes. The lanes are spreaded from this middle position both to left and right but may also be transposed in full when there is not enough space.

Definition at line 85 of file NBNode.h.

Constructor & Destructor Documentation

◆ ApproachingDivider()

NBNode::ApproachingDivider::ApproachingDivider ( const EdgeVector approaching,
NBEdge currentOutgoing 
)

Constructor.

Parameters
[in]approachingThe list of the edges that approach the outgoing edge
[in]currentOutgoingThe outgoing edge

Definition at line 102 of file NBNode.cpp.

References NBEdge::getNumLanes(), NBEdge::getPermissions(), isForbidden(), myApproaching, myAvailableLanes, myCurrentOutgoing, myDirections, myIsBikeEdge, myNumStraight, STRAIGHT, SVC_BICYCLE, and SVC_PEDESTRIAN.

◆ ~ApproachingDivider()

NBNode::ApproachingDivider::~ApproachingDivider ( )

Destructor.

Definition at line 139 of file NBNode.cpp.

Member Function Documentation

◆ execute()

◆ numAvailableLanes()

int NBNode::ApproachingDivider::numAvailableLanes ( ) const
inline

@ get number of available lanes

Definition at line 97 of file NBNode.h.

References myAvailableLanes.

Referenced by NBNode::computeLanes2Lanes().

Here is the caller graph for this function:

◆ operator=()

ApproachingDivider & NBNode::ApproachingDivider::operator= ( const ApproachingDivider )
privatedelete

Invalidated assignment operator.

◆ spread()

std::deque< int > * NBNode::ApproachingDivider::spread ( int  numLanes,
int  dest 
) const

the method that spreads the wished number of lanes from the lane given by the bresenham-call to both left and right

Definition at line 197 of file NBNode.cpp.

Field Documentation

◆ myApproaching

const EdgeVector& NBNode::ApproachingDivider::myApproaching
private

The list of edges that approach the current edge.

Definition at line 109 of file NBNode.h.

Referenced by ApproachingDivider().

◆ myAvailableLanes

std::vector<int> NBNode::ApproachingDivider::myAvailableLanes
private

The available lanes to which connections shall be built.

Definition at line 115 of file NBNode.h.

Referenced by ApproachingDivider(), and numAvailableLanes().

◆ myCurrentOutgoing

NBEdge* NBNode::ApproachingDivider::myCurrentOutgoing
private

The approached current edge.

Definition at line 112 of file NBNode.h.

Referenced by ApproachingDivider().

◆ myDirections

std::vector<LinkDirection> NBNode::ApproachingDivider::myDirections
private

directions from each incoming edge to the outgoing edge

Definition at line 118 of file NBNode.h.

Referenced by ApproachingDivider().

◆ myIsBikeEdge

bool NBNode::ApproachingDivider::myIsBikeEdge
private

whether the outgoing edge is exclusively used by bikes

Definition at line 124 of file NBNode.h.

Referenced by ApproachingDivider().

◆ myNumStraight

int NBNode::ApproachingDivider::myNumStraight
private

number of straight connections to the outgoing edge

Definition at line 121 of file NBNode.h.

Referenced by ApproachingDivider().


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