Simulation< M > Class Template Reference
|
CPP API
|
Public Types |
Public Member Functions |
Private Member Functions |
Private Attributes |
List of all members
mio::abm::Simulation< M > Class Template Reference
Run the Simulation in discrete steps, evolve the Model and report results. More...
#include <simulation.h>
Collaboration diagram for mio::abm::Simulation< M >:
Public Types | |
| using | Model = M |
Public Member Functions | |
| template<typename... History> | |
| void | advance (TimePoint tmax, History &... history) |
| Run the Simulation from the current time to tmax. More... | |
| Model & | get_model () |
| Get the Model that this Simulation evolves. More... | |
| const Model & | get_model () const |
| TimePoint | get_time () const |
| Get the current time of the Simulation. More... | |
| Simulation (TimePoint t0, Model &&model) | |
| Create a simulation. More... | |
| Simulation (TimePoint t0, size_t num_agegroups) | |
| Create a Simulation with an empty Model. More... | |
Private Member Functions | |
| void | evolve_model (TimePoint tmax) |
| void | store_result_at (TimePoint t) |
Private Attributes | |
| TimeSpan | m_dt |
| The length of the time steps. More... | |
| Model | m_model |
| The Model to simulate. More... | |
| TimePoint | m_t |
| The current TimePoint of the Simulation. More... | |
Detailed Description
template<class M = Model>
class mio::abm::Simulation< M >
Run the Simulation in discrete steps, evolve the Model and report results.
Member Typedef Documentation
◆ Model
template<class M = Model>
| using mio::abm::Simulation< M >::Model = M |
Constructor & Destructor Documentation
◆ Simulation() [1/2]
template<class M = Model>
|
inline |
Create a simulation.
- Parameters
-
[in] t0 The starting time of the Simulation. [in] model The Model to simulate.
◆ Simulation() [2/2]
template<class M = Model>
|
inline |
Create a Simulation with an empty Model.
Model needs to be filled later.
- See also
- Simulation::get_model
- Parameters
-
[in] t0 The starting time of the Simulation.
Member Function Documentation
◆ advance()
template<class M = Model>
template<typename... History>
|
inline |
Run the Simulation from the current time to tmax.
- Parameters
-
[in] tmax Time to stop. [in] history History object to log data of the Simulation.
◆ evolve_model()
template<class M = Model>
|
inlineprivate |
◆ get_model() [1/2]
template<class M = Model>
|
inline |
Get the Model that this Simulation evolves.
◆ get_model() [2/2]
template<class M = Model>
|
inline |
◆ get_time()
template<class M = Model>
|
inline |
Get the current time of the Simulation.
◆ store_result_at()
template<class M = Model>
|
private |
Member Data Documentation
◆ m_dt
template<class M = Model>
|
private |
The length of the time steps.
◆ m_model
template<class M = Model>
|
private |
The Model to simulate.
◆ m_t
template<class M = Model>
|
private |
The current TimePoint of the Simulation.
Generated by