serialization
add_serialization_timesteps(task, timesteps, end_at_final=False, use_absolute_times=False)
Serialize the population of this simulation at specified time steps.
If the simulation is run on multiple cores, multiple files will be created.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
task
|
EMODTask
|
An EMODSimulation |
required |
timesteps
|
List[int]
|
Array of integers representing the time steps to use |
required |
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 |
False
|
use_absolute_times
|
bool
|
False means the method will define simulation times instead of time steps see documentation on Serialization_Type for details |
False
|
Returns:
Source code in emodpy/generic/serialization.py
enable_serialization(task, use_absolute_times=False)
Enable serialization etierh by TIME or TIMESTEP based on use_absolute_times Args: task: Task to enable use_absolute_times: When true, Serialization_Type will be set to TIME, otherwise it will be set to TIMESTEP
Returns:
Source code in emodpy/generic/serialization.py
load_serialized_population(task, population_path, population_filenames)
Sets simulation to load a serialized population from the filesystem
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
task
|
EMODTask
|
An EMODSimulation |
required |
population_path
|
str
|
relative path from the working directory to the location of the serialized population files. |
required |
population_filenames
|
List[str]
|
names of files in question |
required |
Returns: