Dynamical system model
Loading...
Searching...
No Matches
dsf::mobility::Station Class Reference
Inheritance diagram for dsf::mobility::Station:
dsf::mobility::RoadJunction dsf::Node

Public Member Functions

 Station (Id id, Delay managementTime)
 Construct a new Station object.
 Station (Id id, geometry::Point point, Delay managementTime)
 Construct a new Station object.
 Station (RoadJunction const &node, Delay managementTime)
 Construct a new Station object.
 Station (Station const &other)
 Construct a new Station object by copying another Station object.
void enqueue (Id trainId, train_t trainType)
 Enqueue a train in the station.
Id dequeue ()
 Dequeue a train from the station.
Delay managementTime () const
 Get the time it takes between two train departures/arrivals.
double density () const
 Get the train density of the station.
bool isFull () const
 Check if the station is full.
constexpr bool isStation () const noexcept
 Check if the node is a station.
Public Member Functions inherited from dsf::mobility::RoadJunction
 RoadJunction (Id id)
 RoadJunction (Id id, geometry::Point coords)
 RoadJunction (RoadJunction const &other)
RoadJunction & operator= (RoadJunction const &other)
virtual void setCapacity (std::size_t const capacity)
 Set the junction's capacity.
void setTransportCapacity (double capacity)
 Set the junction's transport capacity.
std::size_t capacity () const
 Get the junction's capacity.
double transportCapacity () const
 Get the junction's transport capacity.
virtual constexpr bool isIntersection () const noexcept
virtual constexpr bool isTrafficLight () const noexcept
virtual constexpr bool isRoundabout () const noexcept
Public Member Functions inherited from dsf::Node
 Node (Id id)
 Construct a new Node object with capacity 1.
 Node (Id id, geometry::Point point)
 Construct a new Node object with capacity 1.
 Node (Node const &other)
Nodeoperator= (Node const &other)
void setId (Id id) noexcept
 Set the node's id.
void setGeometry (geometry::Point point) noexcept
 Set the node's geometry.
void setName (const std::string &name) noexcept
 Set the node's name.
void addIngoingEdge (Id edgeId)
 Add an ingoing edge to the node.
void addOutgoingEdge (Id edgeId)
 Add an outgoing edge to the node.
void setBetweennessCentrality (double const betweennessCentrality) noexcept
 Set the node's betweenness centrality.
auto id () const
 Get the node's id.
auto const & geometry () const noexcept
 Get the node's geometry.
auto const & name () const noexcept
 Get the node's name.
auto const & ingoingEdges () const noexcept
 Get the node's ingoing edges.
auto const & outgoingEdges () const noexcept
 Get the node's outgoing edges.
auto const & betweennessCentrality () const noexcept
 Get the node's betweenness centrality.

Additional Inherited Members

Protected Attributes inherited from dsf::Node
Id m_id
std::optional< geometry::Pointm_geometry
std::string m_name
std::vector< Id > m_ingoingEdges
std::vector< Id > m_outgoingEdges
std::optional< double > m_betweennessCentrality {std::nullopt}

Constructor & Destructor Documentation

◆ Station() [1/4]

dsf::mobility::Station::Station ( Id id,
Delay managementTime )

Construct a new Station object.

Parameters
idThe station's id
managementTimeThe time it takes between two train departures/arrivals

◆ Station() [2/4]

dsf::mobility::Station::Station ( Id id,
geometry::Point point,
Delay managementTime )

Construct a new Station object.

Parameters
idThe station's id
pointA geometry::Point containing the station's coordinates
managementTimeThe time it takes between two train departures/arrivals

◆ Station() [3/4]

dsf::mobility::Station::Station ( RoadJunction const & node,
Delay managementTime )

Construct a new Station object.

Parameters
nodeA Node object representing the station
managementTimeThe time it takes between two train departures/arrivals

◆ Station() [4/4]

dsf::mobility::Station::Station ( Station const & other)

Construct a new Station object by copying another Station object.

Parameters
otherThe Station object to copy

Member Function Documentation

◆ density()

double dsf::mobility::Station::density ( ) const
virtual

Get the train density of the station.

Returns
The train density of the station

Reimplemented from dsf::mobility::RoadJunction.

◆ dequeue()

Id dsf::mobility::Station::dequeue ( )

Dequeue a train from the station.

Returns
The id of the dequeued train

◆ enqueue()

void dsf::mobility::Station::enqueue ( Id trainId,
train_t trainType )

Enqueue a train in the station.

Parameters
trainIdThe id of the train to enqueue
trainTypeThe type of the train to enqueue

◆ isFull()

bool dsf::mobility::Station::isFull ( ) const
virtual

Check if the station is full.

Returns
True if the station is full, false otherwise

Reimplemented from dsf::mobility::RoadJunction.

◆ isStation()

bool dsf::mobility::Station::isStation ( ) const
inlineconstexprnoexcept

Check if the node is a station.

Returns
True

◆ managementTime()

Delay dsf::mobility::Station::managementTime ( ) const

Get the time it takes between two train departures/arrivals.

Returns
The management time

The documentation for this class was generated from the following files:
  • src/dsf/mobility/Station.hpp
  • src/dsf/mobility/Station.cpp