Egret
A Python-based package for electrical grid optimization based on the Pyomo optimization modeling language.
https://github.com/grid-parity-exchange/Egret
Category: Energy Systems
Sub Category: Grid Analysis and Planning
Keywords
energy-system milp minlp nlp optimization power powerflow python snl-applications snl-science-libs
Keywords from Contributors
mathematical-programming modeling-language nonlinear-programming snl-other pyomo idaesplus chemical-engineering process-modeling process-systems-engineering snl-data-analysis
Last synced: about 16 hours ago
JSON representation
Repository metadata
Tools for building power systems optimization problems
- Host: GitHub
- URL: https://github.com/grid-parity-exchange/Egret
- Owner: grid-parity-exchange
- License: other
- Created: 2019-01-28T18:41:03.000Z (about 6 years ago)
- Default Branch: main
- Last Pushed: 2025-02-04T01:01:11.000Z (3 months ago)
- Last Synced: 2025-04-10T06:41:13.366Z (17 days ago)
- Topics: energy-system, milp, minlp, nlp, optimization, power, powerflow, python, snl-applications, snl-science-libs
- Language: Python
- Homepage:
- Size: 30.2 MB
- Stars: 137
- Watchers: 13
- Forks: 56
- Open Issues: 50
- Releases: 6
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.txt
README.md
EGRET Overview
EGRET is a Python-based package for electrical grid optimization based on the Pyomo optimization modeling language. EGRET is designed to be friendly for performing high-level analysis (e.g., as an engine for solving different optimization formulations), while also providing flexibility for researchers to rapidly explore new optimization formulations.
Major features:
- Solution of Unit-Commitment problems
- Solution of Economic Dispatch (optimal power flow) problems (e.g., DCOPF, ACOPF)
- Library of different problem formulations and approximations
- Generic handling of data across model formulations
- Declarative model representation to support formulation development
EGRET is available under the BSD License (see LICENSE.txt)
Primary Contributors
Ben Knueven
- Unit commitment
- ModelData
- DCOPF
- PTDF
Anya Castillo
- ModelData
- DCOPF
- ACOPF
- AC relaxations
- PTDF
Carl Laird
- ModelData
- DCOPF
- ACOPF
- AC relaxations
Michael Bynum
- DCOPF
- ACOPF
- AC relaxations
Darryl Melander
- Unit commitment
JP Watson
- Unit commitment
- AC relaxations
Getting Started
Installation
-
EGRET is a Python package and therefore requires a Python installation. We recommend using Anaconda with the latest Python (https://www.anaconda.com/distribution/).
-
These installation instructions assume that you have a recent version of Pyomo installed, in addition to a suite of relevant solvers (see www.pyomo.org for additional details).
-
Download (or clone) EGRET from this GitHub site.
-
From the main EGRET folder (i.e., the folder containing setup.py), use a terminal (or the Anaconda prompt for Windows users) to run setup.py to install EGRET into your Python installation - as follows:
pip install -e .
Requirements
- Python 3.7 or later
- Pyomo version 6.4.0 or later
- pytest
- Optimization solvers for Pyomo - specific requirements depends on the models being solved. EGRET is tested with Gurobi or CPLEX for MIP-based problems (e.g., unit commitment) and Ipopt (with HSL linear solvers) for NLP problems.
We additionally recommend that EGRET users install the open source CBC MIP solver. The specific mechanics of installing CBC are platform-specific. When using Anaconda on Linux and Mac platforms, this can be accomplished simply by:
conda install -c conda-forge coincbc
The COIN-OR organization - who developers CBC - also provides pre-built binaries for a full range of platforms on https://bintray.com/coin-or/download.
Testing the Installation
To test the functionality of the unit commitment aspects of EGRET, execute the following command from the EGRET models/tests sub-directory:
pytest test_unit_commitment.py
If EGRET can find a commerical MIP solver on your system via Pyomo, EGRET will execute a large test suite including solving several MIPs to optimality. If EGRET can only find an open-source solver, it will execute a more limited test suite which mostly relies on solving LP relaxations. Example output is below.
=================================== test session starts ==================================
platform darwin -- Python 3.7.7, pytest-5.4.2, py-1.8.1, pluggy-0.13.0
rootdir: /home/some-user/egret
collected 21 items
test_unit_commitment.py s.................... [100%]
========================= 20 passed, 1 skipped in 641.80 seconds =========================
How to Cite EGRET in Your Research
If you are using the unit commitment functionality of EGRET, please cite the following paper:
On Mixed-Integer Programming Formulations for the Unit Commitment Problem
Bernard Knueven, James Ostrowski, and Jean-Paul Watson.
INFORMS Journal on Computing (Ahead of Print)
https://pubsonline.informs.org/doi/10.1287/ijoc.2019.0944
Owner metadata
- Name: Grid Parity Exchange
- Login: grid-parity-exchange
- Email:
- Kind: organization
- Description:
- Website:
- Location:
- Twitter:
- Company:
- Icon url: https://avatars.githubusercontent.com/u/47119915?v=4
- Repositories: 2
- Last ynced at: 2023-03-03T15:00:53.131Z
- Profile URL: https://github.com/grid-parity-exchange
GitHub Events
Total
- Watch event: 6
- Push event: 1
- Pull request review event: 1
- Pull request event: 2
- Fork event: 5
Last Year
- Watch event: 6
- Push event: 1
- Pull request review event: 1
- Pull request event: 2
- Fork event: 5
Committers metadata
Last synced: 7 days ago
Total Commits: 763
Total Committers: 33
Avg Commits per committer: 23.121
Development Distribution Score (DDS): 0.696
Commits in past year: 3
Committers in past year: 1
Avg Commits per committer in past year: 3.0
Development Distribution Score (DDS) in past year: 0.0
Name | Commits | |
---|---|---|
Bernard Knueven | B****n@n****v | 232 |
bknueven | b****e@s****v | 230 |
Michael Bynum | m****m | 68 |
Castillo | a****i@s****v | 49 |
Knueven | b****e@s****v | 41 |
Laird | c****d | 30 |
Darryl Melander | d****n@s****v | 27 |
Ricky Concepcion | r****p@s****v | 16 |
rconcep | r****p@s****v | 12 |
jwatsonnm | j****n@s****v | 10 |
David L Woodruff | D****f | 7 |
Watson | w****1@m****v | 5 |
John Siirola | j****a | 4 |
Austin Short | a****t@s****v | 4 |
Knueven | b****e@r****v | 3 |
Knueven | b****e@r****v | 3 |
Knueven | b****e@r****v | 2 |
Knueven | b****e@r****v | 2 |
Knueven | b****e@s****l | 2 |
jeanpaulwatson | 6****n | 2 |
Edna Soraya Rawlings | e****i@s****v | 2 |
Anya Castillo | a****o@n****m | 1 |
Bernard Knueven | b****e@g****v | 1 |
Bernard Knueven | b****e@k****v | 1 |
Bernard Knueven | b****n@e****v | 1 |
Dillard Robertson | d****d@r****m | 1 |
Knueven | b****e@r****v | 1 |
Knueven | b****e@r****v | 1 |
Knueven | b****e@r****v | 1 |
Knueven | b****e@r****v | 1 |
and 3 more... |
Committer domains:
- sandia.gov: 6
- nrel.gov: 1
- s1032300.srn.sandia.gov: 1
- s1023820.srn.sandia.gov: 1
- srn.sandia.gov: 1
- ml-9675818.llnl.gov: 1
- remote-nm193-123.sandia.gov: 1
- remote-nm112-108.sandia.gov: 1
- remote-nm112-95.sandia.gov: 1
- remote-nm112-59.sandia.gov: 1
- nexteraanalytics.com: 1
- grani.srn.sandia.gov: 1
- kvasir.sandia.gov: 1
- el2.ib0.cm.hpc.nrel.gov: 1
- rrci.com: 1
- remote-nm193-147.sandia.gov: 1
- remote-nm193-23.sandia.gov: 1
- remote-nm193-91.sandia.gov: 1
- remote-nm208-21.sandia.gov: 1
- ml-9582789.llnl.gov: 1
- ml-9718812.llnl.gov: 1
- kdheepak.com: 1
Issue and Pull Request metadata
Last synced: 1 day ago
Total issues: 83
Total pull requests: 234
Average time to close issues: about 1 month
Average time to close pull requests: 7 days
Total issue authors: 22
Total pull request authors: 14
Average comments per issue: 1.02
Average comments per pull request: 0.6
Merged pull request: 212
Bot issues: 0
Bot pull requests: 0
Past year issues: 1
Past year pull requests: 1
Past year average time to close issues: N/A
Past year average time to close pull requests: about 8 hours
Past year issue authors: 1
Past year pull request authors: 1
Past year average comments per issue: 0.0
Past year average comments per pull request: 0.0
Past year merged pull request: 1
Past year bot issues: 0
Past year bot pull requests: 0
Top Issue Authors
- bknueven (26)
- michaelbynum (13)
- jeanpaulwatson (10)
- DLWoodruff (8)
- carldlaird (5)
- jwatsonnm (2)
- MajidSKhoshghalb (2)
- lbianchi-lbl (2)
- goghino (2)
- SimonRubenDrauz (1)
- zhenweilin (1)
- anyacastillo (1)
- Sofia-Taylor (1)
- rconcep (1)
- esrawli (1)
Top Pull Request Authors
- bknueven (148)
- michaelbynum (24)
- anyacastillo (15)
- darrylmelander (14)
- jeanpaulwatson (10)
- rconcep (7)
- carldlaird (5)
- jwatsonnm (4)
- DLWoodruff (2)
- HunterTracer (1)
- austinshort (1)
- kdheepak (1)
- barguel (1)
- jsiirola (1)
Top Issue Labels
- enhancement (1)
Top Pull Request Labels
- invalid (2)
- bug (1)
- enhancement (1)
Package metadata
- Total packages: 1
-
Total downloads:
- pypi: 15,578 last-month
- Total dependent packages: 1
- Total dependent repositories: 4
- Total versions: 6
- Total maintainers: 1
pypi.org: gridx-egret
EGRET: Electrical Grid Research and Engineering Tools.
- Homepage: https://github.com/grid-parity-exchange/Egret
- Documentation: https://gridx-egret.readthedocs.io/
- Licenses: Revised BSD
- Latest release: 0.5.5 (published about 2 years ago)
- Last Synced: 2025-04-25T14:05:06.191Z (1 day ago)
- Versions: 6
- Dependent Packages: 1
- Dependent Repositories: 4
- Downloads: 15,578 Last month
-
Rankings:
- Downloads: 3.072%
- Dependent packages count: 3.244%
- Average: 5.351%
- Forks count: 5.906%
- Stargazers count: 6.886%
- Dependent repos count: 7.649%
- Maintainers (1)
Dependencies
- actions/checkout v2 composite
- conda-incubator/setup-miniconda v2 composite
- actions/checkout v2 composite
- conda-incubator/setup-miniconda v2 composite
- actions/checkout main composite
- actions/setup-python v1 composite
- pypa/gh-action-pypi-publish release/v1 composite
Score: 18.381616204203382