emodpy.generic.serialization module#
- emodpy.generic.serialization.enable_serialization(task: EMODTask, use_absolute_times: bool = False)[source]#
Enable serialization etierh by TIME or TIMESTEP based on use_absolute_times :param task: Task to enable :param use_absolute_times: When true, Serialization_Type will be set to TIME, otherwise it will be set to :param *TIMESTEP*:
Returns:
- emodpy.generic.serialization.add_serialization_timesteps(task: EMODTask, timesteps: List[int], end_at_final: bool = False, use_absolute_times: bool = False)[source]#
Serialize the population of this simulation at specified time steps.
If the simulation is run on multiple cores, multiple files will be created.
- Parameters:
task (EMODTask) – An EMODSimulation
timesteps (List[int]) – Array of integers representing the time steps to use
end_at_final (bool) – False means set the simulation duration such that the last serialized_population file ends the simulation. NOTE- may not work if time step size is not 1
use_absolute_times (bool) – False means the method will define simulation times instead of time steps see documentation on Serialization_Type for details
- Returns:
None