eris-echo 2.3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- eris_echo-2.3.0/LICENSE.txt +22 -0
- eris_echo-2.3.0/PKG-INFO +127 -0
- eris_echo-2.3.0/README.md +86 -0
- eris_echo-2.3.0/pyproject.toml +102 -0
- eris_echo-2.3.0/setup.cfg +4 -0
- eris_echo-2.3.0/src/echo/__init__.py +1 -0
- eris_echo-2.3.0/src/echo/configuration.py +178 -0
- eris_echo-2.3.0/src/echo/constants.py +8 -0
- eris_echo-2.3.0/src/echo/exceptions.py +16 -0
- eris_echo-2.3.0/src/echo/functional.py +83 -0
- eris_echo-2.3.0/src/echo/models/__init__.py +0 -0
- eris_echo-2.3.0/src/echo/models/agnostic/__init__.py +50 -0
- eris_echo-2.3.0/src/echo/models/agnostic/aggregation.py +64 -0
- eris_echo-2.3.0/src/echo/models/agnostic/base.py +84 -0
- eris_echo-2.3.0/src/echo/models/agnostic/bounded.py +43 -0
- eris_echo-2.3.0/src/echo/models/agnostic/controlled.py +97 -0
- eris_echo-2.3.0/src/echo/models/agnostic/flex.py +61 -0
- eris_echo-2.3.0/src/echo/models/agnostic/input_output.py +30 -0
- eris_echo-2.3.0/src/echo/models/agnostic/storage.py +307 -0
- eris_echo-2.3.0/src/echo/models/agnostic/tellegen/__init__.py +6 -0
- eris_echo-2.3.0/src/echo/models/agnostic/tellegen/base.py +62 -0
- eris_echo-2.3.0/src/echo/models/agnostic/tellegen/multi_commodity.py +50 -0
- eris_echo-2.3.0/src/echo/models/agnostic/tellegen/partitioned_multi_commodity.py +88 -0
- eris_echo-2.3.0/src/echo/models/agnostic/tellegen/three_way_valve.py +122 -0
- eris_echo-2.3.0/src/echo/models/agnostic/time_delay.py +34 -0
- eris_echo-2.3.0/src/echo/models/agnostic/time_varying.py +134 -0
- eris_echo-2.3.0/src/echo/models/base/__init__.py +21 -0
- eris_echo-2.3.0/src/echo/models/base/edge.py +128 -0
- eris_echo-2.3.0/src/echo/models/base/node.py +160 -0
- eris_echo-2.3.0/src/echo/models/base/optimisation_graph.py +546 -0
- eris_echo-2.3.0/src/echo/models/base/path.py +66 -0
- eris_echo-2.3.0/src/echo/models/base/port.py +564 -0
- eris_echo-2.3.0/src/echo/models/base/transform.py +186 -0
- eris_echo-2.3.0/src/echo/models/base/types.py +7 -0
- eris_echo-2.3.0/src/echo/models/carbon/__init__.py +4 -0
- eris_echo-2.3.0/src/echo/models/carbon/aggregation.py +33 -0
- eris_echo-2.3.0/src/echo/models/carbon/base.py +25 -0
- eris_echo-2.3.0/src/echo/models/electrical/__init__.py +35 -0
- eris_echo-2.3.0/src/echo/models/electrical/base.py +37 -0
- eris_echo-2.3.0/src/echo/models/electrical/ev/__init__.py +14 -0
- eris_echo-2.3.0/src/echo/models/electrical/ev/base.py +340 -0
- eris_echo-2.3.0/src/echo/models/electrical/ev/deprecated.py +273 -0
- eris_echo-2.3.0/src/echo/models/electrical/ev/ev_with_profile.py +137 -0
- eris_echo-2.3.0/src/echo/models/electrical/ev/v0g.py +264 -0
- eris_echo-2.3.0/src/echo/models/electrical/ev/v1g.py +85 -0
- eris_echo-2.3.0/src/echo/models/electrical/ev/v2g.py +84 -0
- eris_echo-2.3.0/src/echo/models/electrical/generation.py +49 -0
- eris_echo-2.3.0/src/echo/models/electrical/inverter.py +97 -0
- eris_echo-2.3.0/src/echo/models/gas/__init__.py +5 -0
- eris_echo-2.3.0/src/echo/models/gas/base.py +18 -0
- eris_echo-2.3.0/src/echo/models/gas/boiler_fixedcop.py +65 -0
- eris_echo-2.3.0/src/echo/models/gas/boiler_tempcontrolled.py +96 -0
- eris_echo-2.3.0/src/echo/models/prebuilt/__init__.py +17 -0
- eris_echo-2.3.0/src/echo/models/prebuilt/battery.py +36 -0
- eris_echo-2.3.0/src/echo/models/prebuilt/diesel_generator.py +57 -0
- eris_echo-2.3.0/src/echo/models/prebuilt/flex.py +36 -0
- eris_echo-2.3.0/src/echo/models/prebuilt/load.py +14 -0
- eris_echo-2.3.0/src/echo/models/prebuilt/scaled_solar.py +19 -0
- eris_echo-2.3.0/src/echo/models/prebuilt/solar.py +13 -0
- eris_echo-2.3.0/src/echo/models/scenario.py +63 -0
- eris_echo-2.3.0/src/echo/models/thermal/__init__.py +15 -0
- eris_echo-2.3.0/src/echo/models/thermal/base.py +117 -0
- eris_echo-2.3.0/src/echo/models/thermal/parameterised_chiller.py +228 -0
- eris_echo-2.3.0/src/echo/models/thermal/parameterised_heatpump.py +496 -0
- eris_echo-2.3.0/src/echo/models/thermal/simple_chiller.py +139 -0
- eris_echo-2.3.0/src/echo/models/thermal/simple_heatpump.py +291 -0
- eris_echo-2.3.0/src/echo/models/thermal/simple_heatpump_dualoutput.py +195 -0
- eris_echo-2.3.0/src/echo/models/thermal/storage.py +307 -0
- eris_echo-2.3.0/src/echo/objectives/__init__.py +0 -0
- eris_echo-2.3.0/src/echo/objectives/base.py +99 -0
- eris_echo-2.3.0/src/echo/objectives/contingency.py +158 -0
- eris_echo-2.3.0/src/echo/objectives/power.py +132 -0
- eris_echo-2.3.0/src/echo/objectives/tariff.py +694 -0
- eris_echo-2.3.0/src/echo/optimiser.py +460 -0
- eris_echo-2.3.0/src/echo/py.typed +0 -0
- eris_echo-2.3.0/src/echo/tracker.py +74 -0
- eris_echo-2.3.0/src/echo/utils.py +506 -0
- eris_echo-2.3.0/src/echo/validators.py +290 -0
- eris_echo-2.3.0/src/echo/visualization.py +229 -0
- eris_echo-2.3.0/src/eris_echo.egg-info/PKG-INFO +127 -0
- eris_echo-2.3.0/src/eris_echo.egg-info/SOURCES.txt +82 -0
- eris_echo-2.3.0/src/eris_echo.egg-info/dependency_links.txt +1 -0
- eris_echo-2.3.0/src/eris_echo.egg-info/requires.txt +14 -0
- eris_echo-2.3.0/src/eris_echo.egg-info/top_level.txt +1 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright © 2024
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
of this software and associated documentation files (the “Software”), to deal
|
|
8
|
+
in the Software without restriction, including without limitation the rights
|
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
furnished to do so, subject to the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be included in
|
|
14
|
+
all copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
22
|
+
THE SOFTWARE.
|
eris_echo-2.3.0/PKG-INFO
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: eris-echo
|
|
3
|
+
Version: 2.3.0
|
|
4
|
+
Summary: The Energy and Commodity Holistic Optimiser (ECHO).
|
|
5
|
+
Author: Ruth Kravis, Johannes Hendriks, Anna Skobleva, Dora He, Benjamin Weise, Josh Vote, Antoine Desmet
|
|
6
|
+
Author-email: Michael Thomas <michael.thomas@anu.edu.au>, Mike Turner <mike.turner@anu.edu.au>
|
|
7
|
+
Maintainer-email: Michael Thomas <michael.thomas@anu.edu.au>, Mike Turner <mike.turner@anu.edu.au>
|
|
8
|
+
Project-URL: Homepage, https://pypi.org/project/eris-echo
|
|
9
|
+
Project-URL: Documentation, https://bsgip.github.io/echo/
|
|
10
|
+
Project-URL: Repository, https://github.com/bsip/echo
|
|
11
|
+
Project-URL: Issues, https://github.com/bsgip/echo/issues
|
|
12
|
+
Project-URL: Changelog, https://github.com/bsgip/echo/blob/main/CHANGELOG.md
|
|
13
|
+
Keywords: energy,commodity,modelling,optimization
|
|
14
|
+
Classifier: Development Status :: 4 - Beta
|
|
15
|
+
Classifier: Intended Audience :: Science/Research
|
|
16
|
+
Classifier: Operating System :: OS Independent
|
|
17
|
+
Classifier: Topic :: Scientific/Engineering
|
|
18
|
+
Classifier: Programming Language :: Python :: 3
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
23
|
+
Requires-Python: >=3.12
|
|
24
|
+
Description-Content-Type: text/markdown
|
|
25
|
+
License-File: LICENSE.txt
|
|
26
|
+
Requires-Dist: deprecated<2,>=1.3.1
|
|
27
|
+
Requires-Dist: matplotlib<4,>=3.11.2
|
|
28
|
+
Requires-Dist: networkx<4,>=3.7
|
|
29
|
+
Requires-Dist: numpy<3,>=2.5.2
|
|
30
|
+
Requires-Dist: orjson<4,>=3.13
|
|
31
|
+
Requires-Dist: pandas<3,>=2.3
|
|
32
|
+
Requires-Dist: plotly<6,>=5.24
|
|
33
|
+
Requires-Dist: pyomo<7,>=6.10
|
|
34
|
+
Requires-Dist: scikit-learn<2,>=1.9
|
|
35
|
+
Requires-Dist: seaborn<1,>=0.13
|
|
36
|
+
Requires-Dist: shortuuid<2,>=1.0.13
|
|
37
|
+
Requires-Dist: typing-extensions<5,>=4.16
|
|
38
|
+
Requires-Dist: scipy<2,>=1.18.1
|
|
39
|
+
Requires-Dist: attrs>=26.1.0
|
|
40
|
+
Dynamic: license-file
|
|
41
|
+
|
|
42
|
+
# echo (energy and commodity holistic optimiser)
|
|
43
|
+
|
|
44
|
+
`echo` is a python-based multi-commodity energy system optimisation tool designed to answer grid integration questions.
|
|
45
|
+
|
|
46
|
+
This project is developed and maintained by the [Centre for Energy Systems](https://energysystems.anu.edu.au/) at the Australian National University.
|
|
47
|
+
|
|
48
|
+
## Installation
|
|
49
|
+
|
|
50
|
+
`echo` requires requires python 3.11-3.14.
|
|
51
|
+
|
|
52
|
+
To install this package you need to:
|
|
53
|
+
|
|
54
|
+
1. Clone this repo:
|
|
55
|
+
`git clone git@github.com:bsgip/echo.git`
|
|
56
|
+
|
|
57
|
+
2. Change to the echo directory:
|
|
58
|
+
`cd echo`
|
|
59
|
+
|
|
60
|
+
3. Install using `uv` (recommended):
|
|
61
|
+
|
|
62
|
+
`uv sync --python 3.13 --all-extras`
|
|
63
|
+
|
|
64
|
+
or `pip`:
|
|
65
|
+
|
|
66
|
+
`pip install --group all`
|
|
67
|
+
|
|
68
|
+
NOTE: This package is not on pypi - **`pip install echo` will NOT install this package**. It will install a different package with the same name.
|
|
69
|
+
|
|
70
|
+
## Solver
|
|
71
|
+
|
|
72
|
+
Different solvers can be used within echo. Solvers are installed separately; see below for links to install instructions.
|
|
73
|
+
|
|
74
|
+
There are three prerequisites to using a solver in `echo`:
|
|
75
|
+
|
|
76
|
+
1. The solver must be installed.
|
|
77
|
+
2. The solver's executable must be in the `PATH` or equivalent. For example:
|
|
78
|
+
`PATH="/opt/cplex:$PATH`
|
|
79
|
+
in `~/.bashrc` for linux systems using bash.
|
|
80
|
+
3. `echo` needs to know which solver to use. There are two ways of doing this:
|
|
81
|
+
|
|
82
|
+
- Exporting the `OPTIMISER_ENGINE` environment variable, eg. `export OPTIMISER_ENGINE=cplex` in a terminal. Defaults to `cplex`.
|
|
83
|
+
- Setting `echo.models.scenario.EngineSettings.engine`. Defaults to `"cplex"`
|
|
84
|
+
|
|
85
|
+
The following solvers can be used.
|
|
86
|
+
|
|
87
|
+
| Solver | Testing Status | License | Installation | Known as in `echo` |
|
|
88
|
+
| ------ | --------------- | ---------------------------------------------- | ------------------------------------------------------------------------------------------------------ | ------------------ |
|
|
89
|
+
| CPLEX | Most tested | Commercial, free for academic use with licence | [All OSs](https://www.ibm.com/products/ilog-cplex-optimization-studio) | cplex |
|
|
90
|
+
| GUROBI | Minimal testing | Commercial, free for academic use with licence | [Linux](https:/./www.gurobi.com/documentation/9.5/remoteservices/linux_installation.html) | gurobi |
|
|
91
|
+
| CBC | Minimal testing | Open source | [All OSs](https://github.com/coin-or/cbc#download) | cbc |
|
|
92
|
+
| GLPK | No testing | Open source | [Linux](https://www.gnu.org/software/glpk/#TOCdownloading) | glpk |
|
|
93
|
+
| Xpress | No testing | Commercial, free for academic use with licence | [All OSs](https://www.fico.com/fico-xpress-optimization/docs/latest/installguide/dhtml/chapinst1.html) | xpress |
|
|
94
|
+
|
|
95
|
+
## Documentation
|
|
96
|
+
|
|
97
|
+
### Building the documentation
|
|
98
|
+
|
|
99
|
+
Make sure you have the documentation dependencies installed
|
|
100
|
+
|
|
101
|
+
1. Generate the documentation for the echo package (from docstrings)
|
|
102
|
+
`sphinx-apidoc --force --implicit-namespaces --module-first --no-toc --separate -o docs/source/_reference src/echo`
|
|
103
|
+
The auto-generated documentation can be found in `docs/source/_reference`
|
|
104
|
+
|
|
105
|
+
2. Build the documentation (as html)
|
|
106
|
+
`sphinx-build -b html docs/source docs/_build`
|
|
107
|
+
The built documentation can be found in `docs/_build`. Warnings about duplicated labels can be safely ignored.
|
|
108
|
+
|
|
109
|
+
### Design (under creation)
|
|
110
|
+
|
|
111
|
+
Please see the design file [here](https://github.com/bsgip/echo/blob/V1/design.md).
|
|
112
|
+
|
|
113
|
+
## Issues
|
|
114
|
+
|
|
115
|
+
Please log any issues in the [issue tracker](https://github.com/bsgip/echo/issues).
|
|
116
|
+
|
|
117
|
+
## Roadmap
|
|
118
|
+
|
|
119
|
+
| Item | Status | Reference | Completion Date |
|
|
120
|
+
| ---------------------------------- | ----------- | ------------------------------------------ | --------------- |
|
|
121
|
+
| Add ruff and uv | Complete | | Jun 2026 |
|
|
122
|
+
| Add ty | Planning | | Aug 2026 |
|
|
123
|
+
| Documentation update | Underway | | Sep 2026 |
|
|
124
|
+
| Examples update | Underway | | Sep 2026 |
|
|
125
|
+
| Standardise data injection process | Planning | <https://github.com/bsgip/echo/issues/103> | Sep 2026 |
|
|
126
|
+
| Migrate from Pydantic to Attrs | Complete | <https://github.com/bsgip/echo/issues/101> | Oct 2026 |
|
|
127
|
+
| Add linopy as parser option | Planning | <https://github.com/bsgip/echo/issues/102> | Dec 2026 |
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# echo (energy and commodity holistic optimiser)
|
|
2
|
+
|
|
3
|
+
`echo` is a python-based multi-commodity energy system optimisation tool designed to answer grid integration questions.
|
|
4
|
+
|
|
5
|
+
This project is developed and maintained by the [Centre for Energy Systems](https://energysystems.anu.edu.au/) at the Australian National University.
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
`echo` requires requires python 3.11-3.14.
|
|
10
|
+
|
|
11
|
+
To install this package you need to:
|
|
12
|
+
|
|
13
|
+
1. Clone this repo:
|
|
14
|
+
`git clone git@github.com:bsgip/echo.git`
|
|
15
|
+
|
|
16
|
+
2. Change to the echo directory:
|
|
17
|
+
`cd echo`
|
|
18
|
+
|
|
19
|
+
3. Install using `uv` (recommended):
|
|
20
|
+
|
|
21
|
+
`uv sync --python 3.13 --all-extras`
|
|
22
|
+
|
|
23
|
+
or `pip`:
|
|
24
|
+
|
|
25
|
+
`pip install --group all`
|
|
26
|
+
|
|
27
|
+
NOTE: This package is not on pypi - **`pip install echo` will NOT install this package**. It will install a different package with the same name.
|
|
28
|
+
|
|
29
|
+
## Solver
|
|
30
|
+
|
|
31
|
+
Different solvers can be used within echo. Solvers are installed separately; see below for links to install instructions.
|
|
32
|
+
|
|
33
|
+
There are three prerequisites to using a solver in `echo`:
|
|
34
|
+
|
|
35
|
+
1. The solver must be installed.
|
|
36
|
+
2. The solver's executable must be in the `PATH` or equivalent. For example:
|
|
37
|
+
`PATH="/opt/cplex:$PATH`
|
|
38
|
+
in `~/.bashrc` for linux systems using bash.
|
|
39
|
+
3. `echo` needs to know which solver to use. There are two ways of doing this:
|
|
40
|
+
|
|
41
|
+
- Exporting the `OPTIMISER_ENGINE` environment variable, eg. `export OPTIMISER_ENGINE=cplex` in a terminal. Defaults to `cplex`.
|
|
42
|
+
- Setting `echo.models.scenario.EngineSettings.engine`. Defaults to `"cplex"`
|
|
43
|
+
|
|
44
|
+
The following solvers can be used.
|
|
45
|
+
|
|
46
|
+
| Solver | Testing Status | License | Installation | Known as in `echo` |
|
|
47
|
+
| ------ | --------------- | ---------------------------------------------- | ------------------------------------------------------------------------------------------------------ | ------------------ |
|
|
48
|
+
| CPLEX | Most tested | Commercial, free for academic use with licence | [All OSs](https://www.ibm.com/products/ilog-cplex-optimization-studio) | cplex |
|
|
49
|
+
| GUROBI | Minimal testing | Commercial, free for academic use with licence | [Linux](https:/./www.gurobi.com/documentation/9.5/remoteservices/linux_installation.html) | gurobi |
|
|
50
|
+
| CBC | Minimal testing | Open source | [All OSs](https://github.com/coin-or/cbc#download) | cbc |
|
|
51
|
+
| GLPK | No testing | Open source | [Linux](https://www.gnu.org/software/glpk/#TOCdownloading) | glpk |
|
|
52
|
+
| Xpress | No testing | Commercial, free for academic use with licence | [All OSs](https://www.fico.com/fico-xpress-optimization/docs/latest/installguide/dhtml/chapinst1.html) | xpress |
|
|
53
|
+
|
|
54
|
+
## Documentation
|
|
55
|
+
|
|
56
|
+
### Building the documentation
|
|
57
|
+
|
|
58
|
+
Make sure you have the documentation dependencies installed
|
|
59
|
+
|
|
60
|
+
1. Generate the documentation for the echo package (from docstrings)
|
|
61
|
+
`sphinx-apidoc --force --implicit-namespaces --module-first --no-toc --separate -o docs/source/_reference src/echo`
|
|
62
|
+
The auto-generated documentation can be found in `docs/source/_reference`
|
|
63
|
+
|
|
64
|
+
2. Build the documentation (as html)
|
|
65
|
+
`sphinx-build -b html docs/source docs/_build`
|
|
66
|
+
The built documentation can be found in `docs/_build`. Warnings about duplicated labels can be safely ignored.
|
|
67
|
+
|
|
68
|
+
### Design (under creation)
|
|
69
|
+
|
|
70
|
+
Please see the design file [here](https://github.com/bsgip/echo/blob/V1/design.md).
|
|
71
|
+
|
|
72
|
+
## Issues
|
|
73
|
+
|
|
74
|
+
Please log any issues in the [issue tracker](https://github.com/bsgip/echo/issues).
|
|
75
|
+
|
|
76
|
+
## Roadmap
|
|
77
|
+
|
|
78
|
+
| Item | Status | Reference | Completion Date |
|
|
79
|
+
| ---------------------------------- | ----------- | ------------------------------------------ | --------------- |
|
|
80
|
+
| Add ruff and uv | Complete | | Jun 2026 |
|
|
81
|
+
| Add ty | Planning | | Aug 2026 |
|
|
82
|
+
| Documentation update | Underway | | Sep 2026 |
|
|
83
|
+
| Examples update | Underway | | Sep 2026 |
|
|
84
|
+
| Standardise data injection process | Planning | <https://github.com/bsgip/echo/issues/103> | Sep 2026 |
|
|
85
|
+
| Migrate from Pydantic to Attrs | Complete | <https://github.com/bsgip/echo/issues/101> | Oct 2026 |
|
|
86
|
+
| Add linopy as parser option | Planning | <https://github.com/bsgip/echo/issues/102> | Dec 2026 |
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools >= 77.0.3"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
[project]
|
|
7
|
+
dynamic = ["version", "readme"]
|
|
8
|
+
name = "eris-echo"
|
|
9
|
+
description = "The Energy and Commodity Holistic Optimiser (ECHO)."
|
|
10
|
+
keywords = ["energy", "commodity", "modelling", "optimization"]
|
|
11
|
+
classifiers = [
|
|
12
|
+
"Development Status :: 4 - Beta",
|
|
13
|
+
"Intended Audience :: Science/Research",
|
|
14
|
+
"Operating System :: OS Independent",
|
|
15
|
+
"Topic :: Scientific/Engineering",
|
|
16
|
+
"Programming Language :: Python :: 3",
|
|
17
|
+
"Programming Language :: Python :: 3.12",
|
|
18
|
+
"Programming Language :: Python :: 3.13",
|
|
19
|
+
"Programming Language :: Python :: 3.14",
|
|
20
|
+
"Programming Language :: Python :: 3.15",
|
|
21
|
+
]
|
|
22
|
+
dependencies = [
|
|
23
|
+
"deprecated>=1.3.1,<2",
|
|
24
|
+
"matplotlib>=3.11.2,<4",
|
|
25
|
+
"networkx>=3.7,<4",
|
|
26
|
+
"numpy>=2.5.2,<3",
|
|
27
|
+
"orjson>=3.13,<4",
|
|
28
|
+
"pandas>=2.3,<3",
|
|
29
|
+
"plotly>=5.24,<6",
|
|
30
|
+
"pyomo>=6.10,<7",
|
|
31
|
+
"scikit-learn>=1.9,<2",
|
|
32
|
+
"seaborn>=0.13,<1",
|
|
33
|
+
"shortuuid>=1.0.13,<2",
|
|
34
|
+
"typing-extensions>=4.16,<5",
|
|
35
|
+
"scipy>=1.18.1,<2",
|
|
36
|
+
"attrs>=26.1.0",
|
|
37
|
+
]
|
|
38
|
+
requires-python = ">= 3.12"
|
|
39
|
+
authors = [
|
|
40
|
+
{ name = "Ruth Kravis" },
|
|
41
|
+
{ name = "Johannes Hendriks" },
|
|
42
|
+
{ name = "Anna Skobleva" },
|
|
43
|
+
{ name = "Dora He" },
|
|
44
|
+
{ name = "Benjamin Weise" },
|
|
45
|
+
{ name = "Josh Vote" },
|
|
46
|
+
{ name = "Antoine Desmet" },
|
|
47
|
+
{ name = "Michael Thomas", email = "michael.thomas@anu.edu.au" },
|
|
48
|
+
{ name = "Mike Turner", email = "mike.turner@anu.edu.au" },
|
|
49
|
+
]
|
|
50
|
+
maintainers = [
|
|
51
|
+
{ name = "Michael Thomas", email = "michael.thomas@anu.edu.au" },
|
|
52
|
+
{ name = "Mike Turner", email = "mike.turner@anu.edu.au" },
|
|
53
|
+
]
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
[project.urls]
|
|
57
|
+
Homepage = "https://pypi.org/project/eris-echo"
|
|
58
|
+
Documentation = "https://bsgip.github.io/echo/"
|
|
59
|
+
Repository = "https://github.com/bsip/echo"
|
|
60
|
+
Issues = "https://github.com/bsgip/echo/issues"
|
|
61
|
+
Changelog = "https://github.com/bsgip/echo/blob/main/CHANGELOG.md"
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
[dependency-groups]
|
|
65
|
+
linters = ["bandit[toml]", "codespell", "coverage", "pytest-cov", "ruff", "ty"]
|
|
66
|
+
test = ["hypothesis[numpy]", "pytest", "pytest-timeout", "pytest-xdist"]
|
|
67
|
+
docs = ["sphinx", "sphinx-rtd-theme"]
|
|
68
|
+
dev = [{ include-group = "linters" }, { include-group = "test" }]
|
|
69
|
+
all = [{ include-group = "dev" }, { include-group = "docs" }]
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
[tool.setuptools.package-data]
|
|
73
|
+
"echo" = ["py.typed"]
|
|
74
|
+
|
|
75
|
+
[tool.setuptools.dynamic]
|
|
76
|
+
version = { attr = "echo.__version__" }
|
|
77
|
+
readme = { file = ["README.md"], content-type = "text/markdown" }
|
|
78
|
+
|
|
79
|
+
[tool.bandit]
|
|
80
|
+
exclude_dirs = ["tests"]
|
|
81
|
+
|
|
82
|
+
[tool.ruff]
|
|
83
|
+
line-length = 120
|
|
84
|
+
|
|
85
|
+
[tool.ruff.lint]
|
|
86
|
+
select = ["E", "W", "F", "I", "S", "C90", "B", "UP", "ANN", "N"]
|
|
87
|
+
|
|
88
|
+
[tool.ruff.lint.mccabe]
|
|
89
|
+
max-complexity = 15
|
|
90
|
+
|
|
91
|
+
[tool.ruff.lint.per-file-ignores]
|
|
92
|
+
"src/**" = ["ANN003"]
|
|
93
|
+
"tests/**" = ["S", "ANN", "N", "B017"]
|
|
94
|
+
|
|
95
|
+
[tool.ty.src]
|
|
96
|
+
include = ["src", "tests"]
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
[tool.pytest.ini_options]
|
|
100
|
+
pythonpath = ["src/"]
|
|
101
|
+
testpaths = "tests"
|
|
102
|
+
filterwarnings = ["error::DeprecationWarning"]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "2.3.0"
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
"""Enumerations of possible configurations for echo model components."""
|
|
2
|
+
|
|
3
|
+
from enum import Enum
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class Units(Enum):
|
|
7
|
+
"""Enumeration object containing units in which the optimisation is undertaken."""
|
|
8
|
+
|
|
9
|
+
NA = 0
|
|
10
|
+
"""Used for initialisation but optimisation will fail if units not set prior to execution."""
|
|
11
|
+
KW = 1
|
|
12
|
+
"""Instantaneous electrical real power kW"""
|
|
13
|
+
CO2 = 2
|
|
14
|
+
"""Instantaneous CO2e emissions (in kg)"""
|
|
15
|
+
KWT = 3
|
|
16
|
+
"""Instantaneous thermal power"""
|
|
17
|
+
JPS = 4
|
|
18
|
+
"""Joules per second"""
|
|
19
|
+
KWh = 5
|
|
20
|
+
"""Electrical energy kWh"""
|
|
21
|
+
KVA = 6
|
|
22
|
+
"""Instantaneous electrical apparent power kVA """
|
|
23
|
+
KVAR = 7
|
|
24
|
+
"""Instantaneous electrical reactive power kVAR """
|
|
25
|
+
LPS = 8
|
|
26
|
+
"""Liquid commodity flow in litres per second """
|
|
27
|
+
CMS = 9
|
|
28
|
+
"""Gas or liquid commodity flow in Cubic meters per second """
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class Flows(Enum):
|
|
32
|
+
"""Enumeration object defining the direction of commodity flow supported by the Port."""
|
|
33
|
+
|
|
34
|
+
NA = 0
|
|
35
|
+
"""flow direction for the port is not defined"""
|
|
36
|
+
Import = 1
|
|
37
|
+
"""the port supports only import"""
|
|
38
|
+
Export = 2
|
|
39
|
+
"""the port supports only export"""
|
|
40
|
+
Both = 3
|
|
41
|
+
"""the port supports two-way flow (import and export)"""
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
class FlowConstraint(Enum):
|
|
45
|
+
"""Enumeration object defining the type (format) of constraint at the Port."""
|
|
46
|
+
|
|
47
|
+
NA = 0
|
|
48
|
+
"""Constraint type is not specified for this port"""
|
|
49
|
+
NoConstraint = 1
|
|
50
|
+
"""No constraint on flow at this port"""
|
|
51
|
+
Fixed = 2
|
|
52
|
+
"""A fixed constraint exists"""
|
|
53
|
+
Series = 3
|
|
54
|
+
"""A time series (time varying) constraint exists"""
|
|
55
|
+
InRange = 4
|
|
56
|
+
"""A lower bound constraint and upper bound constraint exist at this port"""
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
class OptimisationType(Enum):
|
|
60
|
+
"""Enumeration object defining the type Port value variable in optimisation context."""
|
|
61
|
+
|
|
62
|
+
NA = 0
|
|
63
|
+
"""Value type is not specified for this port"""
|
|
64
|
+
Parameter = 1
|
|
65
|
+
"""The port value variable is fixed"""
|
|
66
|
+
Variable = 2
|
|
67
|
+
"""The port variable is variable/optimisable"""
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
class TransformRule(Enum):
|
|
71
|
+
"""Enumeration object defining to which component of the Port value the Transformation Rule applies"""
|
|
72
|
+
|
|
73
|
+
NA = 0
|
|
74
|
+
"""Not specified for this Port"""
|
|
75
|
+
Both = 1
|
|
76
|
+
"""The transformation applies to both pos and neg components of the port variable"""
|
|
77
|
+
Pos = 2
|
|
78
|
+
"""The transformation applies to only the positive component of the port variable"""
|
|
79
|
+
Neg = 3
|
|
80
|
+
"""The transformation applies to only the negative component of the port variable"""
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
class ExpansionType(Enum):
|
|
84
|
+
"""Enumeration object defining the type of Expansion"""
|
|
85
|
+
|
|
86
|
+
NA = 0
|
|
87
|
+
"""Not specified"""
|
|
88
|
+
Storage = 1
|
|
89
|
+
"""Energy storage expansion"""
|
|
90
|
+
Generation = 2
|
|
91
|
+
"""Energy generation expansion"""
|
|
92
|
+
Edge = 3
|
|
93
|
+
"""Energy throughput (Edge capacity) expansion"""
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
class NodeType(Enum):
|
|
97
|
+
"""Enumeration of Node types"""
|
|
98
|
+
|
|
99
|
+
ElectricalFlex = "electrical_flex"
|
|
100
|
+
ElectricalTellegen = "elec_tellegen"
|
|
101
|
+
MultiCommodityTellegen = "multi_commodity_tellegen"
|
|
102
|
+
Battery = "battery"
|
|
103
|
+
ElectricalLoad = "load"
|
|
104
|
+
ElectricalGeneration = "elec_gen"
|
|
105
|
+
Solar = "solar"
|
|
106
|
+
"""Solar generator (PV) Node"""
|
|
107
|
+
EV = "ev"
|
|
108
|
+
V0GEV = "v0g_ev"
|
|
109
|
+
V1GEV = "v1g_ev"
|
|
110
|
+
V2GEV = "v2g_ev"
|
|
111
|
+
Inverter = "inverter"
|
|
112
|
+
"""DC/AC inverter Node"""
|
|
113
|
+
Chiller = "chiller"
|
|
114
|
+
GasBoiler = "gas_boiler"
|
|
115
|
+
ControlledElectricalLoad = "cload_elec"
|
|
116
|
+
ControlledElectricalGen = "cgen_elec"
|
|
117
|
+
FixedElectrical = "fixed_elec"
|
|
118
|
+
FixedGas = "fixed_gas"
|
|
119
|
+
CarbonAggregation = "carbon_agg"
|
|
120
|
+
"""CO2 aggregation Node"""
|
|
121
|
+
HeatPump = "heatpump"
|
|
122
|
+
"""Heat water pump Node"""
|
|
123
|
+
FlexWithEmissions = "flex_with_emissions"
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
class Resource(Enum):
|
|
127
|
+
"""Enumeration object defining the types of Energy Resources (Commodities)"""
|
|
128
|
+
|
|
129
|
+
Electricity = 0
|
|
130
|
+
"""Electricity"""
|
|
131
|
+
Gas = 1
|
|
132
|
+
"""Gas"""
|
|
133
|
+
Thermal = 2
|
|
134
|
+
"""Thermal"""
|
|
135
|
+
CO2 = 3
|
|
136
|
+
"""CO2 (emissions)"""
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
class TariffType(Enum):
|
|
140
|
+
"""Tariff types"""
|
|
141
|
+
|
|
142
|
+
ImportTariff = "import tariff"
|
|
143
|
+
ExportTariff = "export tariff"
|
|
144
|
+
ImportDemandTariff = "import demand tariff"
|
|
145
|
+
ExportDemandTariff = "export demand tariff"
|
|
146
|
+
ThroughputCost = "throughput cost"
|
|
147
|
+
PeakPosPower = "peak positive power"
|
|
148
|
+
PeakNegPower = "peak negative power"
|
|
149
|
+
QuadraticPower = "quadratic power"
|
|
150
|
+
ContingencyPositive = "contingency positive"
|
|
151
|
+
ContingencyNegative = "contingency negative"
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
class Resets(Enum):
|
|
155
|
+
"""How often something resets"""
|
|
156
|
+
|
|
157
|
+
minute = "minute"
|
|
158
|
+
hourly = "hourly"
|
|
159
|
+
daily = "daily"
|
|
160
|
+
weekly = "weekly"
|
|
161
|
+
yearly = "annually"
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
class EVChargeMode(Enum):
|
|
165
|
+
"""Enumeration of EV class charging modes"""
|
|
166
|
+
|
|
167
|
+
V0G = "V0G"
|
|
168
|
+
V1G = "V1G"
|
|
169
|
+
V2G = "V2G"
|
|
170
|
+
DemandProfile = "demand_profile"
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
class EVChargeStatus(Enum):
|
|
174
|
+
"""Feasibility of EV charging."""
|
|
175
|
+
|
|
176
|
+
Feasible = "feasible"
|
|
177
|
+
Infeasible = "Infeasible"
|
|
178
|
+
TimeOfDayInfeasibleConvenienceFeasible = "time of day infeasible, convenience feasible"
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
class ConfigurationError(Exception):
|
|
2
|
+
pass
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class OptimiserResultError(Exception):
|
|
6
|
+
"""Raised when a particular termination condition is not met when running an optimisation"""
|
|
7
|
+
|
|
8
|
+
pass
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def validate(statement: bool, message: str) -> None:
|
|
12
|
+
"""Similar to assert but will NOT be optimised out by bytecode conversions (see bandit warning B101)"""
|
|
13
|
+
if statement:
|
|
14
|
+
return
|
|
15
|
+
|
|
16
|
+
raise ConfigurationError(message)
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import typing
|
|
2
|
+
from collections.abc import Iterable, Mapping
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
def is_list(
|
|
6
|
+
obj: typing.Any, # noqa ANN401
|
|
7
|
+
scalars: tuple = (Mapping, str),
|
|
8
|
+
iters: tuple[type[typing.Iterable]] = (Iterable,),
|
|
9
|
+
) -> bool: # noqa ANN004
|
|
10
|
+
"""Return true if the object is iterable.
|
|
11
|
+
|
|
12
|
+
Note:
|
|
13
|
+
Returns false if object is a mapping or string.
|
|
14
|
+
|
|
15
|
+
Taken from
|
|
16
|
+
https://github.com/celery/kombu/blob/v5.0.2/kombu/utils/functional.py
|
|
17
|
+
|
|
18
|
+
Copyright (c) 2015-2016 Ask Solem & contributors. All rights reserved.
|
|
19
|
+
Copyright (c) 2012-2014 GoPivotal Inc & contributors. All rights reserved.
|
|
20
|
+
Copyright (c) 2009-2012, Ask Solem & contributors. All rights reserved.
|
|
21
|
+
|
|
22
|
+
Redistribution and use in source and binary forms, with or without
|
|
23
|
+
modification, are permitted provided that the following conditions are met:
|
|
24
|
+
|
|
25
|
+
* Redistributions of source code must retain the above copyright
|
|
26
|
+
notice, this list of conditions and the following disclaimer.
|
|
27
|
+
* Redistributions in binary form must reproduce the above copyright
|
|
28
|
+
notice, this list of conditions and the following disclaimer in the
|
|
29
|
+
documentation and/or other materials provided with the distribution.
|
|
30
|
+
* Neither the name of Ask Solem nor the
|
|
31
|
+
names of its contributors may be used to endorse or promote products
|
|
32
|
+
derived from this software without specific prior written permission.
|
|
33
|
+
|
|
34
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
35
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
|
36
|
+
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
37
|
+
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL Ask Solem OR CONTRIBUTORS
|
|
38
|
+
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
39
|
+
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
40
|
+
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
41
|
+
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
42
|
+
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
43
|
+
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
44
|
+
POSSIBILITY OF SUCH DAMAGE.
|
|
45
|
+
"""
|
|
46
|
+
return isinstance(obj, iters) and not isinstance(obj, scalars or ())
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def maybe_list(obj: typing.Any, scalars: tuple = (Mapping, str)) -> list: # noqa ANN004
|
|
50
|
+
"""Return list of one element if ``l`` is a scalar.
|
|
51
|
+
|
|
52
|
+
Taken from
|
|
53
|
+
https://github.com/celery/kombu/blob/v5.0.2/kombu/utils/functional.py
|
|
54
|
+
|
|
55
|
+
Copyright (c) 2015-2016 Ask Solem & contributors. All rights reserved.
|
|
56
|
+
Copyright (c) 2012-2014 GoPivotal Inc & contributors. All rights reserved.
|
|
57
|
+
Copyright (c) 2009-2012, Ask Solem & contributors. All rights reserved.
|
|
58
|
+
|
|
59
|
+
Redistribution and use in source and binary forms, with or without
|
|
60
|
+
modification, are permitted provided that the following conditions are met:
|
|
61
|
+
|
|
62
|
+
* Redistributions of source code must retain the above copyright
|
|
63
|
+
notice, this list of conditions and the following disclaimer.
|
|
64
|
+
* Redistributions in binary form must reproduce the above copyright
|
|
65
|
+
notice, this list of conditions and the following disclaimer in the
|
|
66
|
+
documentation and/or other materials provided with the distribution.
|
|
67
|
+
* Neither the name of Ask Solem nor the
|
|
68
|
+
names of its contributors may be used to endorse or promote products
|
|
69
|
+
derived from this software without specific prior written permission.
|
|
70
|
+
|
|
71
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
72
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
|
73
|
+
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
74
|
+
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL Ask Solem OR CONTRIBUTORS
|
|
75
|
+
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
76
|
+
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
77
|
+
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
78
|
+
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
79
|
+
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
80
|
+
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
81
|
+
POSSIBILITY OF SUCH DAMAGE.
|
|
82
|
+
"""
|
|
83
|
+
return obj if obj is None or is_list(obj, scalars) else [obj]
|
|
File without changes
|