|
| Node (Id id) |
| Construct a new Node object.
|
|
| Node (Id id, std::pair< double, double > coords) |
| Construct a new Node object.
|
|
void | setCapacity (Size capacity) override |
| Set the node's capacity.
|
|
void | addAgent (double angle, Id agentId) |
| Put an agent in the node.
|
|
void | addAgent (Id agentId) |
| Put an agent in the node.
|
|
void | removeAgent (Id agentId) |
| Removes an agent from the node.
|
|
void | setStreetPriorities (std::set< Id > streetPriorities) |
| Set the node streets with priority.
|
|
void | addStreetPriority (Id streetId) |
| Add a street to the node street priorities.
|
|
bool | isFull () const override |
| Returns true if the node is full.
|
|
virtual const std::set< Id > & | streetPriorities () const |
| Get the node's street priorities.
|
|
std::multimap< int16_t, Id > | agents () const |
| Get the node's agent ids.
|
|
Size | agentCounter () |
| Returns the number of agents that have passed through the node.
|
|
virtual bool | isIntersection () const noexcept override final |
|
| NodeConcept (Id id) |
| Construct a new Node object with capacity 1.
|
|
| NodeConcept (Id id, std::pair< double, double > coords) |
| Construct a new Node object with capacity 1.
|
|
void | setId (Id id) |
| Set the node's id.
|
|
void | setCoords (std::pair< double, double > coords) |
| Set the node's coordinates.
|
|
Id | id () const |
| Get the node's id.
|
|
const std::optional< std::pair< double, double > > & | coords () const |
| Get the node's coordinates.
|
|
Size | capacity () const |
| Get the node's capacity.
|
|
virtual bool | isTrafficLight () const noexcept |
|
virtual bool | isRoundabout () const noexcept |
|
template<typename Id, typename Size>
requires (std::unsigned_integral<Id> && std::unsigned_integral<Size>)
class dsm::Node< Id, Size >
The Node class represents a node in the network.
- Template Parameters
-
Id | The type of the node's id. It must be an unsigned integral type. |
template<typename Id , typename Size >
virtual const std::set< Id > & dsm::Node< Id, Size >::streetPriorities |
( |
| ) |
const |
|
inlinevirtual |
Get the node's street priorities.
This function returns a std::set containing the node's street priorities. If a street has priority, it means that the agents that are on that street have priority over the agents that are on the other streets.
- Returns
- std::set<Id> A std::set containing the node's street priorities