Python
- 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, **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.
- Keyword Arguments:
**kwargs – Additional keyword arguments to pass to the Model constructor.
- Returns:
The generated and optimized IESopt model.
Example
import iesopt iesopt.run("opt/config.iesopt.yaml")