Simulation Class Reference
|
CPP API
|
mio::isecir::Simulation Class Reference
run the simulation in discrete steps and report results. More...
#include <simulation.h>
Public Member Functions | |
| void | advance (ScalarType tmax) |
| Run the simulation from the current time to tmax. More... | |
| ScalarType | get_dt () |
| get the time step of the simulation. More... | |
| Model & | get_model () |
| returns the simulation model used in simulation. More... | |
| const Model & | get_model () const |
| returns the simulation model used in simulation. More... | |
| TimeSeries< ScalarType > | get_result () |
| Get the result of the simulation. More... | |
| const TimeSeries< ScalarType > & | get_result () const |
| Get the result of the simulation. More... | |
| TimeSeries< ScalarType > const & | get_transitions () |
| Get the transitions between the different InfectionStates. More... | |
| Simulation (Model const &model, ScalarType dt=0.1) | |
| setup the Simulation for an IDE model. More... | |
Private Attributes | |
| ScalarType | m_dt |
| Time step used for numerical computations in simulation. More... | |
| std::unique_ptr< Model > | m_model |
| Unique pointer to the Model simulated. More... | |
Detailed Description
run the simulation in discrete steps and report results.
Constructor & Destructor Documentation
◆ Simulation()
|
inline |
setup the Simulation for an IDE model.
- Parameters
-
[in] model An instance of the IDE model. [in] dt Step size of numerical solver. Throughout the simulation, the step size will be constant.
Member Function Documentation
◆ advance()
| void mio::isecir::Simulation::advance | ( | ScalarType | tmax | ) |
Run the simulation from the current time to tmax.
- Parameters
-
tmax Time to stop.
◆ get_dt()
|
inline |
get the time step of the simulation.
◆ get_model() [1/2]
|
inline |
returns the simulation model used in simulation.
◆ get_model() [2/2]
|
inline |
returns the simulation model used in simulation.
◆ get_result() [1/2]
|
inline |
Get the result of the simulation.
Return the number of persons in all InfectionStates.
- Returns
- The result of the simulation.
◆ get_result() [2/2]
|
inline |
Get the result of the simulation.
Return the number of persons in all InfectionStates.
- Returns
- The result of the simulation.
◆ get_transitions()
|
inline |
Get the transitions between the different InfectionStates.
- Returns
- TimeSeries with stored transitions calculated in the simulation.
Member Data Documentation
◆ m_dt
|
private |
Time step used for numerical computations in simulation.
◆ m_model
Generated by