epymorph.parameter_fitting.utils.epymorph_simulation
This module defines the EpymorphSimulation class for initializing and running simulations using the Epymorph library.
The EpymorphSimulation class is responsible for setting up the simulation environment and propagating simulations based on provided observations and parameters.
EpymorphSimulation
A class to initialize and run simulations using the Epymorph library.
Attributes:
-
rume
(Rume
) –Contains the model and simulation parameters,
-
start_date
(str
) –The start date for the simulation in 'YYYY-MM-DD' format.
Parameters:
-
rume
(Rume
) –Parameters required for the simulation, including model settings.
-
start_date
(str
) –The start date for the simulation in 'YYYY-MM-DD' format.
propagate
propagate(
state: ndarray,
parameters: dict,
rume: RUME,
date: str,
duration: int,
model_link: ModelLink,
rng: Generator,
) -> Tuple[ndarray, ndarray]
Propagates the simulation for a specified duration and returns the final state.
Parameters:
-
state
(ndarray
) –Initial state of the system (e.g., SIRH compartments) to be used in the simulation.
-
observations
(dict)
) –A dictionary containing the parameter values (such as beta, gamma, etc.) to update in the simulation.
-
rume
(Rume
) –The model configuration to run the simulation.
-
date
(str
) –The starting date for the simulation in 'YYYY-MM-DD' format.
-
duration
(int
) –The number of days the simulation should be propagated.
-
model_link
(ModelLink
) –Specifies which model output to return, either from compartments or events.
Returns: