sofirpy.simulation.simulation_entity module

Module containing abstract class SimulationEntity

class sofirpy.simulation.simulation_entity.SimulationEntity[source]

Bases: ABC

Abstract object representing a simulation entity.

conclude_simulation() None[source]

Conclude the simulation.

abstract do_step(time: float) None[source]

Perform a simulation step.

Parameters:

time (float) – current simulation time

get_dtype_of_parameter(parameter_name: str) type[source]

Return the data type of a parameter.

Parameters:

parameter_name (str) – Name of the parameter.

Returns:

Data type of the parameter.

Return type:

type

abstract get_parameter_value(parameter_name: str) bool | float | int | str | object[source]

Return the value of a parameter.

Parameters:

parameter_name (str) – name of parameter whose value is to be obtained

Returns:

value of the parameter

Return type:

ParameterValue

get_unit(parameter_name: str) str | None[source]

Return the unit of a parameter.

Parameters:

parameter_name (str) – Name of the parameter.

Returns:

Unit of the parameter.

Return type:

str | None

initialize(start_values: dict[str, bool | float | int | str | object | tuple[bool | float | int | str | object, str]]) None[source]

Initialize the model

abstract set_parameter(parameter_name: str, parameter_value: bool | float | int | str | object) None[source]

Set the value of a parameter.

Parameters:
  • parameter_name (str) – name of the parameter that should be set

  • parameter_value (ParameterValue) – value to which the parameter is to be set