|
| SpireStreet (Id id, const Street &street) |
| Construct a new SpireStreet object starting from an existing street.
|
|
| SpireStreet (Id id, Size capacity, double len, std::pair< Id, Id > nodePair) |
| Construct a new SpireStreet object.
|
|
| SpireStreet (Id id, Size capacity, double len, double maxSpeed, std::pair< Id, Id > nodePair) |
| Construct a new SpireStreet object.
|
|
void | addAgent (Id agentId) override |
| Add an agent to the street's queue.
|
|
Size | inputCounts (bool resetValue=false) |
| Get the input counts of the street.
|
|
Size | outputCounts (bool resetValue=false) |
| Get the output counts of the street.
|
|
int | meanFlow () |
| Get the mean flow of the street.
|
|
std::optional< Id > | dequeue (size_t index) override |
| Remove an agent from the street's queue.
|
|
bool | isSpire () const final |
| Check if the street is a spire.
|
|
| Street (Id id, const Street &) |
| Construct a new Street object starting from an existing street.
|
|
| Street (Id id, std::pair< Id, Id > nodePair) |
| Construct a new Street object.
|
|
| Street (Id id, Size capacity, double len, std::pair< Id, Id > nodePair) |
| Construct a new Street object.
|
|
| Street (Id id, Size capacity, double len, double maxSpeed, std::pair< Id, Id > nodePair) |
| Construct a new Street object.
|
|
| Street (Id id, Size capacity, double len, double maxSpeed, std::pair< Id, Id > nodePair, int16_t nLanes, std::string const &name=std::string()) |
| Construct a new Street object.
|
|
void | setId (Id id) |
| Set the street's id.
|
|
void | setCapacity (Size capacity) |
| Set the street's capacity.
|
|
void | setTransportCapacity (int16_t capacity) |
| Set the street's transport capacity.
|
|
void | setLength (double len) |
| Set the street's length.
|
|
void | setQueue (dsm::queue< Size > queue, size_t index) |
| Set the street's queue.
|
|
void | setNodePair (Id node1, Id node2) |
| Set the street's node pair.
|
|
void | setNodePair (const Node &node1, const Node &node2) |
| Set the street's node pair.
|
|
void | setNodePair (std::pair< Id, Id > pair) |
| Set the street's node pair.
|
|
void | setMaxSpeed (double speed) |
| Set the street's speed limit.
|
|
void | setAngle (std::pair< double, double > srcNode, std::pair< double, double > dstNode) |
| Set the street's angle.
|
|
void | setAngle (double angle) |
| Set the street's angle.
|
|
void | setNLanes (const int16_t nLanes) |
| Set the street's number of lanes.
|
|
Id | id () const |
| Get the street's id.
|
|
Size | capacity () const |
| Get the street's capacity.
|
|
int16_t | transportCapacity () const |
| Get the street's transport capacity.
|
|
double | length () const |
| Get the street's length.
|
|
const std::set< Id > & | waitingAgents () const |
| Get the street's waiting agents.
|
|
const dsm::queue< Size > & | queue (size_t index) const |
| Get the street's queue.
|
|
const std::vector< dsm::queue< Size > > & | exitQueues () const |
| Get the street's queues.
|
|
const std::pair< Id, Id > & | nodePair () const |
| Get the street's node pair.
|
|
Size | nAgents () const |
| Get the number of agents on the street.
|
|
double | density (bool normalized=false) const |
| Get the street's density in or in , if normalized.
|
|
bool | isFull () const |
| Check if the street is full.
|
|
double | maxSpeed () const |
| Get the street's speed limit.
|
|
double | angle () const |
| Get the street's angle.
|
|
int16_t | nLanes () const |
| Get the street's number of lanes.
|
|
std::string_view | name () const |
| Get the street's name.
|
|
Size | nExitingAgents () const |
| Get the number of agents on all queues.
|
|
double | deltaAngle (double const previousStreetAngle) const |
| Get the delta angle between the street and the previous street, normalized between -pi and pi.
|
|
void | enqueue (Id agentId, size_t index) |
| Add an agent to the street's queue.
|
|
The SpireStreet class represents a street which is able to count agent flows in both input and output.
- Template Parameters
-
Id | The type of the street's id |
Size | The type of the street's capacity |