el1xr_opt
Electricity for Low-carbon Integration and eXchange of Resources (EL1XR)
el1xr_opt is the core optimisation engine of the EL1XR-dev ecosystem. It provides a powerful and flexible modelling framework for designing and analysing integrated, zero-carbon energy systems, with support for electricity, heat, hydrogen, and energy storage technologies.
🚀 Features
Documentation via ReadTheDocs.
Modular formulation for multi-vector energy systems
Compatible with deterministic, stochastic, and equilibrium approaches
Flexible temporal structure: hours, days, representative periods
Built on Pyomo
Interfaces with EL1XR-data (datasets) and EL1XR-examples (notebooks)
📂 Structure
src/: Core source code for the optimisation model.
data/: Sample case studies.
docs/: Documentation and formulation notes.
tests/: Validation and regression tests.
📦 Prerequisites
Python 3.11 or higher.
A supported solver: HiGHS, Gurobi, CBC, or CPLEX. The recommended solvers can be installed automatically using the command below.
🚀 Installation
There are two ways to install el1xr_opt:
Option 1: Install from PyPI (Recommended)
Install the package from PyPI:
pip install el1xr_opt
Install the required solvers:
el1xr-install-solvers
Option 2: Install from Source (for Developers)
If you want to work with the latest development version or contribute to the project, you can install it from the source:
Clone the repository:
git clone https://github.com/EL1XR-dev/el1xr_opt.git
cd el1xr_opt
Create and activate a virtual environment (recommended):
python -m venv venv
source venv/bin/activate # On Windows use `venv\Scripts\activate`
Install the package in editable mode, which also installs the necessary dependencies:
pip install -e .
Install the required solvers:
el1xr-install-solvers
⚡ Quick Example
Run the included Home1 example case with the following command from the root directory:
el1xr-run --case Home1 --solver highs
This will run the optimisation and save the results in the src/el1xr_opt/Home1/Results directory.
Usage
To run the optimisation model, use the el1xr-run command. If you run the script without arguments, it will prompt you for them interactively. Moreover, the model can be executed with explicit information as follows:
python -m el1xr_opt --dir <folder_parent_case> --case <case_folder_name> --solver <solver_name> --date <date_string> --rawresults <'Yes'-or-'No'> --plots <'Yes'-or-'No'>
For example:
python -m el1xr_opt --dir data --case Home1 --solver highs --date "2025-09-30 20:26:00" --rawresults No --plots No
Command-line Arguments
--dir: Directory containing the case data. For the sample cases, this would be src/el1xr_opt.
--case: Name of the case to run (e.g., Home1). Defaults to Home1.
--solver: Solver to use (e.g., highs, gurobi, cbc, cplex). Defaults to highs.
--date: Model run date in “YYYY-MM-DD HH:MM:SS” format. Defaults to the current time.
--rawresults: Save raw results (True/False). Defaults to False.
--plots: Generate plots (True/False). Defaults to False.
🤝 Contributing
Contributions are welcome! If you want to contribute to el1xr_opt, please follow these steps:
Fork the repository.
Create a new branch for your feature or bug fix.
Make your changes and commit them with a clear message.
Push your changes to your fork.
Create a pull request to the main branch of this repository.
📄 License
This project is licensed under the terms of the GNU General Public License v3.0.
Metadata
Release files for el1xr_opt 1.0.15
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| el1xr_opt-1.0.15.tar.gz | 35.0 MB | Without provenance | Details for el1xr_opt-1.0.15.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| el1xr_opt-1.0.15-py3-none-any.whl | Python 3 | none | any | Details for el1xr_opt-1.0.15-py3-none-any.whl |
Total release size: 49.6 MB
Release files / el1xr_opt-1.0.15.tar.gz
| Download URL | el1xr_opt-1.0.15.tar.gz |
|---|---|
| Size | 35.0 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
edab50aa13f58bac78486c1106aafc294089d80bd25f8a69c21da4e98218e9d0
|
|
BLAKE2b-256 checksum How to use checksums |
f1a9f891a0daab4ccfdf088fe7087d24a2c048bdd52b305cd9e8b40385dd938d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.32.5
|
Release files / el1xr_opt-1.0.15-py3-none-any.whl
| Download URL | el1xr_opt-1.0.15-py3-none-any.whl |
|---|---|
| Size | 14.6 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
69a5613dd8513a53cf034a200c45be8b096f85c89905a23afa690545d73a2824
|
|
BLAKE2b-256 checksum How to use checksums |
9f6307f2082274fd0aab2a222b79c2a81536137efca849c75da18742a78e0725
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.32.5
|
Security for el1xr_opt 1.0.15
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.