|
| | FirstOrderDynamics (RoadNetwork &graph, bool useCache=false, std::optional< unsigned int > seed=std::nullopt, double alpha=0., PathWeight const weightFunction=PathWeight::TRAVELTIME, std::optional< double > weightTreshold=std::nullopt) |
| | Construct a new First Order Dynamics object.
|
| |
| void | setAgentSpeed (std::unique_ptr< Agent > const &pAgent) override |
| | Set the speed of an agent.
|
| |
| void | setSpeedFluctuationSTD (double speedFluctuationSTD) |
| | Set the standard deviation of the speed fluctuation.
|
| |
| double | streetMeanSpeed (Id streetId) const override |
| | Get the mean speed of a street in \(m/s\).
|
| |
| Measurement< double > | streetMeanSpeed () const override |
| | Get the mean speed of the streets in \(m/s\).
|
| |
| Measurement< double > | streetMeanSpeed (double threshold, bool above) const override |
| | Get the mean speed of the streets with density above or below a threshold in \(m/s\).
|
| |
| | RoadDynamics (RoadNetwork &graph, bool useCache=false, std::optional< unsigned int > seed=std::nullopt, PathWeight const weightFunction=PathWeight::TRAVELTIME, std::optional< double > weightTreshold=std::nullopt) |
| | Construct a new RoadDynamics object.
|
| |
| void | setErrorProbability (double errorProbability) |
| | Set the error probability.
|
| |
| void | setPassageProbability (double passageProbability) |
| | Set the passage probability.
|
| |
|
void | setWeightFunction (PathWeight const pathWeight, std::optional< double > weigthThreshold=std::nullopt) |
| |
| void | setForcePriorities (bool forcePriorities) noexcept |
| | Set the force priorities flag.
|
| |
| void | setDataUpdatePeriod (Delay dataUpdatePeriod) noexcept |
| | Set the data update period.
|
| |
| void | setMaxDistance (double const maxDistance) |
| | Set the maximum distance which a random agent can travel.
|
| |
| void | setMaxTravelTime (std::time_t const maxTravelTime) noexcept |
| | Set the maximum travel time which a random agent can travel.
|
| |
|
void | setOriginNodes (std::unordered_map< Id, double > const &originNodes) |
| |
|
void | setDestinationNodes (std::unordered_map< Id, double > const &destinationNodes) |
| |
| void | setDestinationNodes (std::initializer_list< Id > destinationNodes) |
| | Set the destination nodes.
|
| |
| void | setDestinationNodes (TContainer const &destinationNodes) |
| | Set the destination nodes.
|
| |
| void | initTurnCounts () |
| | Initialize the turn counts map.
|
| |
| void | resetTurnCounts () |
| | Reset the turn counts map values to zero.
|
| |
|
void | updatePaths () |
| | Update the paths of the itineraries based on the given weight function.
|
| |
| void | addAgentsUniformly (Size nAgents, std::optional< Id > itineraryId=std::nullopt) |
| | Add agents uniformly on the road network.
|
| |
| void | addAgentsRandomly (Size nAgents, const TContainer &src_weights, const TContainer &dst_weights) |
| | Add a set of agents to the simulation.
|
| |
|
void | addAgentsRandomly (Size nAgents) |
| |
| void | addAgent (std::unique_ptr< Agent > agent) |
| | Add an agent to the simulation.
|
| |
|
void | addAgent (TArgs &&... args) |
| |
|
void | addAgents (Size nAgents, TArgs &&... args) |
| |
| void | addItinerary (TArgs &&... args) |
| | Add an itinerary.
|
| |
| void | addItinerary (std::unique_ptr< Itinerary > itinerary) |
| | Add an itinerary.
|
| |
| void | evolve (bool reinsert_agents=false) |
| | Evolve the simulation.
|
| |
| void | optimizeTrafficLights (TrafficLightOptimization optimizationType=TrafficLightOptimization::DOUBLE_TAIL, const std::string &logFile=std::string(), double const percentage=0.3, double const threshold=1.3) |
| | Optimize the traffic lights by changing the green and red times.
|
| |
| const std::unordered_map< Id, std::unique_ptr< Itinerary > > & | itineraries () const noexcept |
| | Get the itineraries.
|
| |
| std::unordered_map< Id, double > const & | originNodes () const noexcept |
| | Get the origin nodes of the graph.
|
| |
| std::unordered_map< Id, double > & | originNodes () noexcept |
| | Get the origin nodes of the graph.
|
| |
| std::unordered_map< Id, double > const & | destinationNodes () const noexcept |
| | Get the destination nodes of the graph.
|
| |
| std::unordered_map< Id, double > & | destinationNodes () noexcept |
| | Get the destination nodes of the graph.
|
| |
| const std::vector< std::unique_ptr< Agent > > & | agents () const noexcept |
| | Get the agents.
|
| |
| Size | nAgents () const |
| | Get the number of agents currently in the simulation.
|
| |
| Measurement< double > | meanTravelTime (bool clearData=false) |
| | Get the mean travel time of the agents in \(s\).
|
| |
| Measurement< double > | meanTravelDistance (bool clearData=false) |
| | Get the mean travel distance of the agents in \(m\).
|
| |
| Measurement< double > | meanTravelSpeed (bool clearData=false) |
| | Get the mean travel speed of the agents in \(m/s\).
|
| |
| std::unordered_map< Id, std::unordered_map< Id, size_t > > const & | turnCounts () const noexcept |
| | Get the turn counts of the agents.
|
| |
| std::unordered_map< Id, std::unordered_map< Id, double > > const | normalizedTurnCounts () const noexcept |
| | Get the normalized turn counts of the agents.
|
| |
|
std::unordered_map< Id, std::array< long, 4 > > | turnMapping () const |
| |
| Measurement< double > | streetMeanDensity (bool normalized=false) const |
| | Get the mean density of the streets in \(m^{-1}\).
|
| |
| Measurement< double > | streetMeanFlow () const |
| | Get the mean flow of the streets in \(s^{-1}\).
|
| |
| Measurement< double > | streetMeanFlow (double threshold, bool above) const |
| | Get the mean flow of the streets in \(s^{-1}\).
|
| |
| void | saveStreetDensities (std::string filename=std::string(), bool normalized=true, char const separator=';') const |
| | Save the street densities in csv format.
|
| |
| void | saveCoilCounts (const std::string &filename, bool reset=false, char const separator=';') |
| | Save the street input counts in csv format.
|
| |
| void | saveTravelData (std::string filename=std::string(), bool reset=false) |
| | Save the travel data of the agents in csv format.
|
| |
| void | saveMacroscopicObservables (std::string filename=std::string(), char const separator=';') |
| | Save the main macroscopic observables in csv format.
|
| |
| | Dynamics (RoadNetwork &graph, std::optional< unsigned int > seed=std::nullopt) |
| | Construct a new Dynamics object.
|
| |
| void | setName (const std::string &name) |
| | Set the name of the simulation.
|
| |
| void | setInitTime (std::time_t timeEpoch) |
| | Set the initial time as epoch time.
|
| |
| const auto & | graph () const |
| | Get the graph.
|
| |
| const auto & | name () const |
| | Get the name of the simulation.
|
| |
| auto | time () const |
| | Get the current simulation time as epoch time.
|
| |
| auto | time_step () const |
| | Get the current simulation time-step.
|
| |
| auto | strDateTime () const |
| | Get the current simulation time as formatted string (YYYY-MM-DD HH:MM:SS)
|
| |