sofirpy.simulation.fmu module#
Module containing the Fmu class.
- class sofirpy.simulation.fmu.Fmu(init_config: dict[str, Any])[source]#
Bases:
SimulationEntityClass representing a fmu.
- Parameters:
fmu_path (Path) – path to the fmu
- do_step(time: float, step_size: float) None[source]#
Perform a simulation step.
- Parameters:
time (float) – current time
step_size (float) – simulation step size
- property fmu_path: Path#
Path to the fmu.
- Returns:
Path to the fmu.
- Return type:
Path
- 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
- 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 variable.
- Parameters:
parameter_name (str) – Name of the variable.
- Returns:
The unit of the variable.
- Return type:
str | None
- class sofirpy.simulation.fmu.FmuInitConfig(*, fmu_path: ~pathlib.Path, name: str, start_values: dict[str, bool | float | int | str | object | tuple[bool | float | int | str | object, str]] = <factory>)[source]#
Bases:
BaseModel- model_config: ClassVar[ConfigDict] = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].