An open-source optimization model for the design and operation of hybrid renewable energy systems with automatic solver setup
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file el1xr_opt-1.0.13.tar.gz.
File metadata
- Download URL: el1xr_opt-1.0.13.tar.gz
- Upload date:
- Size: 35.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.32.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f75d2a099a8b36ff2961773f5ad445b08af382a5e066d7dbb9fa2b7ac18b8a90
|
|
| MD5 |
882c794f3de7e649a9c959c4ede450b6
|
|
| BLAKE2b-256 |
b311372adf1663d744c25e42d07eefc1c74be1fb50e47146f172c5d8fabdfe49
|
File details
Details for the file el1xr_opt-1.0.13-py3-none-any.whl.
File metadata
- Download URL: el1xr_opt-1.0.13-py3-none-any.whl
- Upload date:
- Size: 14.9 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.32.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9539210c4b13e8e80e7f35c2a80265ab8316b1de1ec1f8b1586ade1ce8976ad2
|
|
| MD5 |
25faf2478dbb17164e385eee9d33e477
|
|
| BLAKE2b-256 |
4b2c7f6fe64980f52dcd8434a6e8db81030fc0dd7d28efbebb91a8ed53136592
|