Eclipse SUMO - Simulation of Urban MObility
NBCapacity2Lanes Class Reference

A helper class which computes the lane number from given capacity. More...

#include <NBCapacity2Lanes.h>

Public Member Functions

int get (double capacity) const
 Returns the number of lanes computed from the given capacity. More...
 
 NBCapacity2Lanes (double divider)
 Donstructor. More...
 
 ~NBCapacity2Lanes ()
 Destructor. More...
 

Private Attributes

double myDivider
 The norming divider. More...
 

Detailed Description

A helper class which computes the lane number from given capacity.

A helper class for the computation of the number of lanes an edge has in dependence to this edge's capacity. The computation is done by the (trivial) assumption, the number of lanes increases linear with the number of lanes.

Definition at line 37 of file NBCapacity2Lanes.h.

Constructor & Destructor Documentation

◆ NBCapacity2Lanes()

NBCapacity2Lanes::NBCapacity2Lanes ( double  divider)
inline

Donstructor.

Parameters
[in]dividerValue for the norming divider

Definition at line 43 of file NBCapacity2Lanes.h.

◆ ~NBCapacity2Lanes()

NBCapacity2Lanes::~NBCapacity2Lanes ( )
inline

Destructor.

Definition at line 47 of file NBCapacity2Lanes.h.

Member Function Documentation

◆ get()

int NBCapacity2Lanes::get ( double  capacity) const
inline

Returns the number of lanes computed from the given capacity.

Returns the estimated number of lanes by returning the given capacity divided by the norming divider given in the constructor.

Parameters
[in]capacityThe capacity to convert
Returns
The capacity converted to the number of lanes

Definition at line 58 of file NBCapacity2Lanes.h.

References myDivider.

Referenced by NIImporter_VISUM::parse_Edges(), and NIImporter_VISUM::parse_Types().

Here is the caller graph for this function:

Field Documentation

◆ myDivider

double NBCapacity2Lanes::myDivider
private

The norming divider.

Definition at line 72 of file NBCapacity2Lanes.h.

Referenced by get().


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