|
void | addAgent (Id agentId) final |
| Add an agent to the street's queue.
|
|
int | meanFlow () |
| Get the mean flow of the street.
|
|
std::optional< Id > | dequeue (size_t index) final |
| 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, double length=Road::meanVehicleLength(), double maxSpeed=13.8888888889, int nLanes=1, std::string name=std::string(), std::optional< int > capacity=std::nullopt, int transportCapacity=1) |
| Construct a new Street object.
|
|
| Street (Id id, const Street &) |
| Construct a new Street object starting from an existing street.
|
|
| Street (Id id, std::pair< Id, Id > nodePair, double length=Road::meanVehicleLength(), double maxSpeed=13.8888888889, int nLanes=1, std::string name=std::string(), std::optional< int > capacity=std::nullopt, int transportCapacity=1) |
| Construct a new Street object.
|
|
void | setQueue (dsm::queue< Size > queue, size_t index) |
| Set the street's queue.
|
|
std::vector< Id > const & | movingAgents () 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.
|
|
int | nAgents () const final |
| Get the number of agents on the street.
|
|
double | density (bool normalized=false) const final |
| Get the street's density in or in , if normalized.
|
|
bool | isFull () const final |
| Check if the street is full.
|
|
int | nMovingAgents () const override |
|
int | nExitingAgents () const final |
| Get the number of agents on all queues.
|
|
std::vector< Direction > const & | laneMapping () const |
|
void | addAgent (Id agentId) override |
|
void | enqueue (Id agentId, size_t index) |
| Add an agent to the street's queue.
|
|
virtual bool | isStochastic () const |
|
| Road (Id id, const Road &) |
| Construct a new Road object starting from an existing road.
|
|
| Road (Id id, std::pair< Id, Id > nodePair, double length=m_meanVehicleLength, double maxSpeed=13.8888888889, int nLanes=1, std::string name=std::string(), std::optional< int > capacity=std::nullopt, int transportCapacity=1) |
| Construct a new Road object.
|
|
void | setMaxSpeed (double speed) |
| Set the maximum speed, in meters per second (default is 50 km/h)
|
|
double | length () const |
| Get the length, in meters.
|
|
double | maxSpeed () const |
| Get the maximum speed, in meters per second.
|
|
int | nLanes () const |
| Get the number of lanes.
|
|
std::string | name () const |
| Get the name.
|
|
| Edge (Id id, std::pair< Id, Id > nodePair, int capacity=1, int transportCapacity=1, double angle=0.0) |
| Construct a new Edge object.
|
|
void | setCapacity (int capacity) |
|
void | setTransportCapacity (int capacity) |
|
void | setAngle (std::pair< double, double > srcNodeCoordinates, std::pair< double, double > dstNodeCoordinates) |
|
Id | id () const |
| Get the edge's id.
|
|
Id | u () const |
| Get the edge's source node id.
|
|
Id | v () const |
| Get the edge's destination node id.
|
|
std::pair< Id, Id > const & | nodePair () const |
| Get the edge's node pair.
|
|
int | capacity () const |
| Get the edge's capacity, in number of agents.
|
|
int | transportCapacity () const |
| Get the edge's transport capacity, in number of agents.
|
|
double | angle () const |
| Get the edge's angle, in radians, between the source and destination nodes.
|
|
double | deltaAngle (double const previousEdgeAngle) const |
|
void | increaseInputCounter () |
| Increase the input counter by one.
|
|
void | increaseOutputCounter () |
| Increase the output counter by one.
|
|
int | inputCounts (bool reset=true) |
| Get the number of input counts registered.
|
|
int | outputCounts (bool reset=true) |
| Get the number of output counts registered.
|
|
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 |