Python

iesopt.IESopt = Julia: IESopt

IESopt.jl module from Julia.

iesopt.examples() list[str][source]

Return a list of all available examples.

Returns:

List of available examples. This contains the names of the examples, not the full filenames (so, e.g., “some_example” instead of “some_example.iesopt.yaml”).

iesopt.make_example(example: str, dst_dir: str | Path = './', dst_name: str | None = None) Path[source]

Generate a local copy of a specific example.

A list of examples, and their exact names, can be obtained using iesopt.examples().

Parameters:
  • example – str Name of the example to generate.

  • dst_dir – Optional[str] Directory to generate the example in, defaults to “./”.

  • dst_name – Optional[str] Name of the generated example file (without the “.iesopt.yaml” extension), e.g., “config”, will create dst_dir/config.iesopt.yaml. Will default to the original name of the example.

Returns:

Path to the generated example file.

iesopt.run(filename: str | Path, verbosity: bool | str = True, **kwargs) Model[source]

Generate and optimize an IESopt model.

Results can be accessed (after a successful optimization) using model.results.

Parameters:
  • filename – str Path to the IESopt model file to load.

  • verbosity – Optional[bool | str] Verbosity level for the IESopt model, defaults to True. If True, the core model will be run in verbose mode, “warning” will show warnings (and errors), setting it to False will only show errors. If verbosity_solve is not set in the top-level YAML config, verbosity = True will enable solver verbose mode, otherwise the solver will be run in silent mode.

Keyword Arguments:

**kwargs – Additional keyword arguments to pass to the Model constructor.

Returns:

The generated and optimized IESopt model.

Example

Run an IESopt model
import iesopt
iesopt.run("opt/config.iesopt.yaml")