eta_ctrl.common.sim_env_scaffolder module

class eta_ctrl.common.sim_env_scaffolder.SimEnvScaffolder[source]

Bases: object

static from_fmu(fmu_path: Path | str, output_dir: Path | str | None = None) None[source]

Create a complete SimEnv environment from an FMU file.

This method creates both a Python environment class file and a TOML state config file from an FMU, providing a complete setup for FMU-based simulations.

Parameters:
  • fmu_path – Full path to the FMU file (including filename and .fmu extension).

  • output_dir – Directory where files should be created. If None, uses the same directory as the FMU file.

static export_fmu_state_config(fmu_path: Path | str, output_path: Path | str | None = None) None[source]

Export FMU input and output variables to a TOML file.

This method extracts the input and output variables from the FMU model description and exports them to a TOML file for later use in other tasks.

Parameters:
  • fmu_path – Full path to the FMU file (including filename and .fmu extension).

  • output_path – Full path where the TOML file should be saved (including filename). If None, saves to the same directory as the FMU file with name ‘{fmu_name}_state_config.toml’.

static export_fmu_parameters(fmu_path: Path | str, output_path: Path | str | None = None) None[source]

Export FMU parameter variables to a TOML file.

This method extracts only the parameter variables from the FMU model description and exports them to a TOML file compatible with the environment_specific section of the global config file format.

Parameters:
  • fmu_path – Full path to the FMU file (including filename and .fmu extension).

  • output_path – Full path where the TOML file should be saved (including filename). If None, saves to the same directory as the FMU file with name ‘{fmu_name}_parameters.toml’.