flixopt.tutorials ¶
Datasets and example systems for the flixopt tutorials and notebooks.
Two tiers, so every notebook is standalone after pip install flixopt - no need to clone the repository or copy files out of GitHub:
-
Synthetic data (notebooks 01-07) - generated on the fly from numpy/pandas, no files and no network. Access by name with :func:
get_data; see :func:list_data. -
Pre-built example systems (notebooks 08-09) - downloaded (and cached) from the project's GitHub releases with :func:
load_example; see :func:list_examples. Needspooch(pip install flixopt[tutorials]).
Functions:¶
list_examples ¶
Return the names of the example systems available via :func:load_example.
load_example ¶
Download (and cache) a pre-built example FlowSystem and return it.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name | ExampleName | One of :func: | required |
Returns:
| Type | Description |
|---|---|
FlowSystem | The deserialised :class: |
Raises:
| Type | Description |
|---|---|
ValueError | If |
ModuleNotFoundError | If |
Note
The first call for a given example downloads the artefact from the project's GitHub releases; subsequent calls read it from the local cache.
get_data ¶
Return the synthetic tutorial dataset name as a dict of arrays.
Generated from numpy/pandas, so this works offline with no extra dependencies.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name | DataName | One of :func: | required |
Raises:
| Type | Description |
|---|---|
ValueError | If |