API Reference¶
autofmu¶
Automatic FMU approximation tool.
autofmu.main¶
Main entry point for running the program from the command line.
autofmu.cli¶
Utilities for exposing a command line interface of the program.
autofmu.generator¶
Utilities for generating valid Functional Mockup Units.
-
autofmu.generator.
generate_fmu
(dataframe, model_name, inputs, outputs, outfile, strategy)[source]¶ Generate a valid FMU model.
- Parameters
- Return type
-
autofmu.generator.
generate_model_description
(model_name, model_identifier, guid, inputs, outputs)[source]¶ Generate a valid FMI 2.0 model description XML document.
- Parameters
- Return type
ElementTree
- Returns
Valid FMI 2.0 model description XML document
autofmu.utils¶
General utilities.
-
autofmu.utils.
compile_fmu
(model_identifier, fmu_path)[source]¶ Compile the C sources files of an FMU.
Extracts the FMU into a temporary directory, calling cmake to build the FMU, copying the generated library back into the FMU file. If MinGW is installed, it also cross compiles the FMU for Linux and Windows.
-
autofmu.utils.
run_cmake
(source_dir, build_dir, variables=None)[source]¶ Run cmake command and build the targets.
Roughly equivalent to running the following two commands:
cmake -S source_dir -B build_dir cmake --build build_dir
- Parameters
- Return type
-
autofmu.utils.
slugify
(value, allow_unicode=False)[source]¶ Convert a string to a URL slug.
Convert to ASCII if ‘allow_unicode’ is False. Convert spaces or repeated dashes to single dashes. Remove characters that aren’t alphanumerics, underscores, or hyphens. Convert to lowercase. Also strip leading and trailing whitespace, dashes, and underscores.
- Return type