|
Dynamical system model
|
The Roundabout class represents a roundabout node in the network. More...
#include <Roundabout.hpp>
Public Member Functions | |
| Roundabout (Id id) | |
| Construct a new Roundabout object. | |
| Roundabout (Id id, geometry::Point point) | |
| Construct a new Roundabout object. | |
| Roundabout (const RoadJunction &node) | |
| Construct a new Roundabout object. | |
| void | enqueue (std::unique_ptr< Agent > agentId) |
| Put an agent in the node. | |
| std::unique_ptr< Agent > | dequeue () |
| Removes the first agent from the node. | |
| dsf::queue< std::unique_ptr< Agent > > const & | agents () const |
| Get the node's queue. | |
| double | density () const override |
| Returns the node's density. | |
| bool | isFull () const override |
| Returns true if the node is full. | |
| constexpr bool | isRoundabout () const noexcept final |
| Returns true if the node is a roundabout. | |
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 (Size capacity) |
| Set the junction's capacity. | |
| void | setTransportCapacity (double capacity) |
| Set the junction's transport capacity. | |
| Size | 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 |
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) | |
| Node & | operator= (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. | |
| Id | id () const |
| Get the node's id. | |
| std::optional< geometry::Point > const & | geometry () const noexcept |
| Get the node's geometry. | |
| std::string const & | name () const noexcept |
| Get the node's name. | |
| std::vector< Id > const & | ingoingEdges () const noexcept |
| std::vector< Id > const & | outgoingEdges () const noexcept |
| virtual bool | isStation () const noexcept |
Protected Attributes | |
| dsf::queue< std::unique_ptr< Agent > > | m_agents |
Protected Attributes inherited from dsf::Node | |
| Id | m_id |
| std::optional< geometry::Point > | m_geometry |
| std::string | m_name |
| std::vector< Id > | m_ingoingEdges |
| std::vector< Id > | m_outgoingEdges |
The Roundabout class represents a roundabout node in the network.
| Id | The type of the node's id |
| Size | The type of the node's capacity |
|
inlineexplicit |
Construct a new Roundabout object.
| id | The node's id |
|
inline |
Construct a new Roundabout object.
| id | The node's id |
| point | A geometry::Point containing the node's coordinates |
| dsf::mobility::Roundabout::Roundabout | ( | const RoadJunction & | node | ) |
Construct a new Roundabout object.
| node | An Intersection object |
|
inline |
Get the node's queue.
|
inlineoverridevirtual |
Returns the node's density.
Reimplemented from dsf::mobility::RoadJunction.
| std::unique_ptr< Agent > dsf::mobility::Roundabout::dequeue | ( | ) |
Removes the first agent from the node.
| void dsf::mobility::Roundabout::enqueue | ( | std::unique_ptr< Agent > | agentId | ) |
Put an agent in the node.
| agentId | The agent's id |
| std::runtime_error | if the node is full |
|
inlineoverridevirtual |
Returns true if the node is full.
Reimplemented from dsf::mobility::RoadJunction.
|
inlineconstexprfinalvirtualnoexcept |
Returns true if the node is a roundabout.
Reimplemented from dsf::mobility::RoadJunction.