hari_plotter.simulation module
- class hari_plotter.simulation.Simulation(model: Model, parameters: dict[str, Any], dynamics: Dynamics | None = None)[source]
Bases:
object
A class representing a simulation. Provides methods for initializing from TOML configurations and directories.
- property dt
- classmethod from_dir(datadir: str | Path) Simulation [source]
Load simulation parameters from a directory containing configuration and data.
- Parameters:
datadir – Path to the directory containing simulation data and configuration.
- Returns:
Instance of Simulation based on the data in the directory.
- classmethod from_toml(filename: str) Simulation [source]
Load simulation parameters from a TOML file and instantiate a Simulation instance.
- Parameters:
filename – Path to the TOML file containing simulation configuration.
- Returns:
Instance of Simulation based on the TOML file.
- parameters_with_model(updates: dict | None = None)[source]
Return a dictionary containing the model parameters and simulation parameters.
- run(path_to_seldon, directory, n_output_network: int | None = None, n_output_agents: int | None = None, start_numbering_from: int | None = None, start_from: int | None = None, print_progress: bool | None = None) bool [source]
Run the simulation.
if start_from is integer, it takes the start_from image from the dynamics as the initial_guess for the simulation.