StochasticSimulation< FP, M > Class Template Reference
|
CPP API
|
mio::StochasticSimulation< FP, M > Class Template Reference
A class for simulating a StochasticModel. More...
#include <stochastic_simulation.h>
Inheritance diagram for mio::StochasticSimulation< FP, M >:
Collaboration diagram for mio::StochasticSimulation< FP, M >:
Public Types | |
| using | Base = details::SimulationBase< FP, M, SdeIntegrator< FP > > |
| using | Model = M |
Public Types inherited from mio::details::SimulationBase< FP, M, SdeIntegrator< FP > > | |
| using | Core = IntegratorCore< FP, Integrands... > |
| using | Model = M |
Public Member Functions | |
| Eigen::Ref< Eigen::VectorX< FP > > | advance (FP tmax) |
| Run the simulation up to a given time. More... | |
| StochasticSimulation (Model const &model, FP t0=0., FP dt=0.1) | |
| Setup the simulation with an SDE solver. More... | |
Public Member Functions inherited from mio::details::SimulationBase< FP, M, SdeIntegrator< FP > > | |
| SimulationBase & | operator= (const SimulationBase &other) |
| void | set_integrator_core (std::unique_ptr< Core > &&integrator_core) |
| Set the IntegratorCore used in the simulation. More... | |
| SimulationBase (const SimulationBase &other) | |
| SimulationBase (Model const &model, std::unique_ptr< Core > &&integrator_core, FP t0, FP dt) | |
| Create a SimulationBase. More... | |
| Core & | get_integrator_core () |
| Access the IntegratorCore used in the simulation. More... | |
| const Core & | get_integrator_core () const |
| Access the IntegratorCore used in the simulation. More... | |
| TimeSeries< FP > & | get_result () |
| Returns the simulation result describing the model population in each time step. More... | |
| const TimeSeries< FP > & | get_result () const |
| Returns the simulation result describing the model population in each time step. More... | |
| const Model & | get_model () const |
| Get a reference to the model owned and used by the simulation. More... | |
| Model & | get_model () |
| Get a reference to the model owned and used by the simulation. More... | |
| FP & | get_dt () |
| Returns the step size used by the integrator. More... | |
| const FP & | get_dt () const |
| Returns the step size used by the integrator. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from mio::details::SimulationBase< FP, M, SdeIntegrator< FP > > | |
| Eigen::Ref< Eigen::VectorX< FP > > | advance (const Integrands &... fs, FP tmax, TimeSeries< FP > &results) |
| Run the simulation up to a given time. More... | |
Detailed Description
template<typename FP, IsStochasticModel< FP > M>
class mio::StochasticSimulation< FP, M >
A class for simulating a StochasticModel.
- Template Parameters
-
FP A floating point type, e.g. double. M An implementation of a StochasticModel.
Member Typedef Documentation
◆ Base
template<typename FP , IsStochasticModel< FP > M>
| using mio::StochasticSimulation< FP, M >::Base = details::SimulationBase<FP, M, SdeIntegrator<FP> > |
◆ Model
template<typename FP , IsStochasticModel< FP > M>
| using mio::StochasticSimulation< FP, M >::Model = M |
Constructor & Destructor Documentation
◆ StochasticSimulation()
template<typename FP , IsStochasticModel< FP > M>
|
inline |
Setup the simulation with an SDE solver.
- Parameters
-
[in] model An instance of a stochastic model. [in] t0 Start time. [in] dt Initial step size of integration.
Member Function Documentation
◆ advance()
template<typename FP , IsStochasticModel< FP > M>
|
inline |
Run the simulation up to a given time.
The time tmax must be greater than get_result().get_last_time_point(), which is used as the starting point. The initial value is get_result().get_last_value().
- Parameters
-
[in] tmax Next stopping point of the simulation.
- Returns
- The simulation result at tmax.
Generated by
Public Types inherited from