A curated list of open technology projects to sustain a stable climate, energy supply, biodiversity and natural resources.

PowNet

A least-cost optimization model for simulating the Unit Commitment and Economic Dispatch of large-scale (regional to country) power systems.
https://github.com/Critical-Infrastructure-Systems-Lab/PowNet

Category: Energy Systems
Sub Category: Energy System Modeling Frameworks

Keywords

dc-flow dispatchable-units economic-dispatch electricity-supply n-1-criterion power-system-analysis python renewable-resources substations transmission unit-commitment water-energy-nexus

Keywords from Contributors

power-systems-analysis thailand

Last synced: about 6 hours ago
JSON representation

Repository metadata

PowNet: Network-constrained Unit Commitment / Economic Dispatch model in Python

README.md

license MIT
CI Tests
GitHub Release
Read the Docs
status

PowNet: Unit Commitment / Economic Dispatch model in Python

PowNet is a least-cost optimization model for simulating the Unit Commitment and Economic Dispatch (UC/ED) of large-scale (regional to country) power systems. In PowNet, a power system is represented by a set of nodes that include power plants, high-voltage substations, and import/export stations (for cross-border systems). The model schedules and dispatches the electricity supply from power plant units to meet hourly electricity demand in substations at a minimum cost. It considers the techno-economic constraints of both generating units and high-voltage transmission network. The power flow calculation is based on a Direct Current (DC) network (with N-1 criterion), which provides a reasonable balance between modelling accuracy and data and computational requirements. PowNet can easily integrate information about variable renewable resources (e.g., hydro, wind, solar) into the UC/ED process. For example, it can be linked with models that estimate the electricity supply available from renewable resources as a function of the climatic conditions. In addition, PowNet has provision to account for the effect of droughts on the generation of dispatchable thermal units (e.g., coal, oil, gas-fired units) that depend on freshwater availability. These features facilitate the application of PowNet to problems in the water-energy nexus domain that investigate the impact of water availability on electricity supply and demand.

Read the PowNet Documentation here: https://pownet.readthedocs.io/en/latest

Installing and using PowNet

To use PowNet, a user needs to supply it with CSV files. For guidance on creating these CSV files, please see examples provided here. Please ensure that column names matches with those from the examples. Details on preparing some input files can be found here.

As for installing PowNet, there are multiple options depending on whether we want to modify the source code. However, the following step is highly recommended for any user: creating a virtual environment to manage dependencies. If using Conda, we can create an envrionment with the following command

conda create --name your_env_name_here
conda activate your_env_name_here

If deciding on a name for the environment takes too long, please feel free to name the environment as "pownet".

Option 1: Regular user

A regular user is someone who has created their input files and wish to just run PowNet. In this case, it is best to simply install PowNet as a package from PyPI. We can achieve this with the following command:

pip install pownet

Once the package has been installed, we can now go to our working directory. In this example, we assume the following folder structure:

working_directory/
├── scripts/
│   └── run_quickstart.py
├── model_library/
│   └── dummy/
│       ├── demand_export.csv
│       ├── thermal_unit.csv
│       ├── nondispatch_unit.csv
│       ├── hydropower.csv
│       ├── import.csv
│       ├── contract_cost.csv
│       └── transmission.csv
└── outputs/

A Python script called "run_quickstart.py" provides an example on running a simulation, saving the simulation outputs, and visualizing the outputs.

Option 2: Power user (no pun intended)

In case we wish to modify the source code, PowNet should be installed as an editable package. First, download or clone the PowNet repository to your local machine. For example: if we want to clone to "C://user/pownet",

git clone https://github.com/your-username/pownet.git C://user/pownet

Next, open a terminal and navigate to the directory where we cloned the repository:

cd C://user/pownet

Now, we can install this PowNet package using pip, which is a manager for Python packages:

pip install -e .

This command installs the package in "editable" mode (-e) using pyproject.toml that is located in the root directory of PowNet. The editable mode allows us to edit PowNet codebase when we need to modify or implement new features. The pyproject.toml file specifies the dependencies required to run PowNet.

A quick start tutorial to run a simple case study is provided here: https://pownet.readthedocs.io/en/latest/pages/quickstarter.html

Overview of PowNet

overview_pownet


Owner metadata


GitHub Events

Total
Last Year

Committers metadata

Last synced: 6 days ago

Total Commits: 572
Total Committers: 7
Avg Commits per committer: 81.714
Development Distribution Score (DDS): 0.222

Commits in past year: 246
Committers in past year: 4
Avg Commits per committer in past year: 61.5
Development Distribution Score (DDS) in past year: 0.13

Name Email Commits
Dae 6****p 445
AFM Kamal Chowdhury a****y@u****u 65
ngjiayi93 n****3@h****m 28
Hisham Eldardiry 3****y 23
Stefano Galelli g****i@c****u 8
stefano-galelli s****i@s****g 2
Greg Thomsen g****n@g****m 1

Committer domains:


Issue and Pull Request metadata

Last synced: 1 day ago

Total issues: 8
Total pull requests: 2
Average time to close issues: about 1 month
Average time to close pull requests: about 13 hours
Total issue authors: 4
Total pull request authors: 2
Average comments per issue: 1.25
Average comments per pull request: 1.0
Merged pull request: 2
Bot issues: 0
Bot pull requests: 0

Past year issues: 4
Past year pull requests: 2
Past year average time to close issues: 3 months
Past year average time to close pull requests: about 13 hours
Past year issue authors: 2
Past year pull request authors: 2
Past year average comments per issue: 1.0
Past year average comments per pull request: 1.0
Past year merged pull request: 2
Past year bot issues: 0
Past year bot pull requests: 0

More stats: https://issues.ecosyste.ms/repositories/lookup?url=https://github.com/Critical-Infrastructure-Systems-Lab/PowNet

Top Issue Authors

  • phumthep (3)
  • ngjiayi93 (3)
  • Mostafa494 (1)
  • AdamRJensen (1)

Top Pull Request Authors

  • gthomsen (1)
  • HishamEldardiry (1)

Top Issue Labels

  • enhancement (4)
  • bug (2)
  • question (2)
  • help wanted (2)
  • good first issue (2)
  • documentation (2)
  • refactoring (1)

Top Pull Request Labels


Package metadata

pypi.org: pownet

A simple production cost model of framework for power systems

  • Homepage: https://github.com/Critical-Infrastructure-Systems-Lab/PowNet
  • Documentation: https://pownet.readthedocs.io/en/latest/index.html
  • Licenses: MIT License Copyright (c) 2024 Phumthep Bunnak Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  • Latest release: 2.2.0 (published 3 months ago)
  • Last Synced: 2025-04-26T14:03:00.701Z (1 day ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 66 Last month
  • Rankings:
    • Dependent packages count: 9.699%
    • Average: 32.154%
    • Dependent repos count: 54.609%
  • Maintainers (1)

Dependencies

pyproject.toml pypi
  • gurobipy >= 10.0.3
  • highs >= 1.6.0
  • matplotlib >= 3.7.1
  • mplcursors >= 0.5.1
  • networkx >= 3.1.0
  • numpy >= 1.24.3
  • pandas >= 1.5.3
  • pyomo >= 6.5.0
docs/requirements.txt pypi
  • sphinx >=4.3.0
  • sphinx-rtd-theme >=0.5.1
  • sphinx-toolbox >=v0.8.0

Score: 10.581419567289592