|
| TrafficLight (Id id, Delay cycleTime) |
| Construct a new TrafficLight object.
|
|
| TrafficLight (Id id, Delay cycleTime, std::pair< double, double > coords) |
|
| TrafficLight (RoadJunction const &node, Delay const cycleTime, Delay const counter=0) |
|
TrafficLight & | operator++ () |
|
double | meanGreenTime (bool priorityStreets) const |
| Get the mean green time over every cycle.
|
|
Delay | cycleTime () const |
| Get the traffic light's total cycle time.
|
|
void | setCycle (Id const streetId, Direction direction, TrafficLightCycle const &cycle) |
| Set the cycle for a street and a direction.
|
|
void | setCycles (std::unordered_map< Id, std::unordered_map< Direction, TrafficLightCycle > > cycles) |
| Set the traffic light's cycles.
|
|
void | setComplementaryCycle (Id const streetId, Id const existingCycle) |
| Set the complementary cycle for a street.
|
|
void | moveCycle (Id const oldStreetId, Id const newStreetId) |
| Move a cycle from one street to another.
|
|
void | increasePhases (Delay const phase) |
| Increase the phase times of the traffic light cycles.
|
|
std::unordered_map< Id, std::unordered_map< Direction, TrafficLightCycle > > const & | cycles () const |
| Get the traffic light's cycles.
|
|
Delay | counter () const |
|
bool | isDefault () const |
| Returns true if all the cycles are set to their default values.
|
|
bool | isGreen (Id const streetId, Direction direction) const |
| Returns true if the traffic light is green for a street and a direction.
|
|
void | resetCycles () |
| Resets all traffic light cycles.
|
|
bool | isTrafficLight () const noexcept |
|
| Intersection (Id id) |
| Construct a new Intersection object.
|
|
| Intersection (Id id, std::pair< double, double > coords) |
| Construct a new Intersection object.
|
|
| Intersection (RoadJunction const &node) |
|
| Intersection (Intersection const &)=delete |
|
void | setCapacity (Size capacity) override |
| Set the node's capacity.
|
|
void | addAgent (double angle, std::unique_ptr< Agent > pAgent) |
| Put an agent in the node.
|
|
void | addAgent (std::unique_ptr< Agent > pAgent) |
| Put an agent in 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.
|
|
double | density () const override |
| Returns the node's density.
|
|
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, std::unique_ptr< Agent > > & | agents () |
| Get the node's agent ids.
|
|
Size | agentCounter () |
| Returns the number of agents that have passed through the node.
|
|
bool | isIntersection () const noexcept final |
|
| RoadJunction (Id id) |
|
| RoadJunction (Id id, std::pair< double, double > coords) |
|
| RoadJunction (RoadJunction const &other) |
|
RoadJunction & | operator= (RoadJunction const &other) |
|
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 bool | isRoundabout () const noexcept |
|
| Node (Id id) |
| Construct a new Node object with capacity 1.
|
|
| Node (Id id, std::pair< double, double > coords) |
| Construct a new Node object with capacity 1.
|
|
| Node (Node const &other) |
|
Node & | operator= (Node const &other) |
|
void | setId (Id id) |
| Set the node's id.
|
|
void | setCoords (std::pair< double, double > coords) |
| Set the node's coordinates.
|
|
void | setName (const std::string &name) |
| Set the node's name.
|
|
void | setStrId (const std::string &strId) |
|
Id | id () const |
| Get the node's id.
|
|
std::optional< std::pair< double, double > > const & | coords () const |
| Get the node's coordinates.
|
|
std::string const & | name () const noexcept |
| Get the node's name.
|
|
std::optional< std::string > const & | strId () const noexcept |
|
virtual bool | isStation () const noexcept |
|