powersddp

A didactic library on dynamic programming techniques applied to the economical dispatch of energy in power systems.

https://github.com/ettoreaquino/powersddp

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.0%) to scientific vocabulary

Keywords

optimization-algorithms power-systems python
Last synced: 6 months ago · JSON representation ·

Repository

A didactic library on dynamic programming techniques applied to the economical dispatch of energy in power systems.

Basic Info
  • Host: GitHub
  • Owner: ettoreaquino
  • License: mit
  • Language: Python
  • Default Branch: main
  • Homepage:
  • Size: 11.2 MB
Statistics
  • Stars: 5
  • Watchers: 1
  • Forks: 0
  • Open Issues: 3
  • Releases: 3
Topics
optimization-algorithms power-systems python
Created over 4 years ago · Last pushed over 4 years ago
Metadata Files
Readme License Citation

README.md

PyPI version

Python versions

Downloads

Power System Stochastic Dual Dynamic Programming

The main goal of this library is to provide support for studies regarding the optimal dispatch of power systems, majorly comprised of Thermoelectric and Hydroelectric Generators.

Note 1 This is an under development library.

A special thank should be given to professor André Marcato. This project does not intend to substitute the similar library PySDDP.

Note 1 This project is being developed alongside the masters course: Planejamento de Sistemas Elétricos, as part of the masters program in Energy Systems at the Electrical Engineering Graduate Program from the Universidade Federal de Juiz de Fora - Brazil

Note 2 The code will evolve alongside the video lectures provided by professor Marcato at: Curso de Planejamento de Sistemas Elétricos

Installation

pip install powersddp

Example

There are two ways of initializing a Power System. Either by providing a .yml file, or by passing a dictionary as an initialization data. Both are depicted bellow:

Note: When using the file input method (.yml format) check the example of how to declare the parameters.

Initializing a PowerSystem

```Python import powersddp as psddp

system = psddp.PowerSystem(path='system.yml')

print("System Load: {}\n" "Number of HGUs: {}\n" "Number of TGUs: {}".format(system.data['load'], len(system.data['hydrounits']), len(system.data['thermalunits']))) ```

```Python import powersddp as psddp

data = {'load': [50, 50, 50], 'discretizations': 3, 'stages': 3, 'scenarios': 2, 'outagecost': 500, 'hydrounits': [{'name': 'HU1', 'vmax': 100, 'vmin': 20, 'vini': 100, 'prod': 0.95, 'flowmax': 60, 'inflowscenarios': [[23, 16], [19, 14], [15, 11]]}], 'thermalunits': [{'name': 'GT1', 'capacity': 15, 'cost': 10}, {'name': 'GT2', 'capacity': 10, 'cost': 25}]}

PowerSystem = psddp.PowerSystem(data=data)

print("System Load: {}\n" "Number of HGUs: {}\n" "Number of TGUs: {}".format(PowerSystem.data['load'], len(PowerSystem.data['hydrounits']), len(PowerSystem.data['thermalunits']))) ```

Dispatching a PowerSystem

dispatch() accepts the following arguments:

  • solver : str, optional defaults to 'sdp'

    • Selects the solver option for the minimization objective function.
  • scenario : int, optional defaults to 0

    • Chooses either a specific scenario to investigate (scenario>1) or all scenarios to evaluate (scenario= 0). Starting from 0 to the number of declared scenarios in the hydro_units['inflow_scenarios'] parameter.
  • verbose : bool, optional defaults to False

    • Displays the PDDE solution for every stage of the execution. Use with care, solutions of complex systems with too many stages and scenarios might overflow the console.
  • plot : bool, optional, defaults to False

    • Displays a sequence of plots showing the future cost function for every stage of the execution.

The following example executes the Power System dispatch using the Unique Linear Programming method for the first scenario (id = 1) and outputs the optimization steps.

```Python import powersddp as psddp

data = {'load': [50, 50, 50], 'discretizations': 3, 'stages': 3, 'scenarios': 2, 'outagecost': 500, 'hydrounits': [{'name': 'HU1', 'vmax': 100, 'vmin': 20, 'vini': 100, 'prod': 0.95, 'flowmax': 60, 'inflowscenarios': [[23, 16], [19, 14], [15, 11]]}], 'thermalunits': [{'name': 'GT1', 'capacity': 15, 'cost': 10}, {'name': 'GT2', 'capacity': 10, 'cost': 25}]}

PowerSystem = psddp.PowerSystem(data=data) operation = PowerSystem.dispatch(solver='ulp', scenario=1, verbose=True)

print(operation) ``` <!-- -->

Owner

  • Name: Ettore Aquino
  • Login: ettoreaquino
  • Kind: user
  • Location: São Paulo, Brazil
  • Company: Omega Energia

Data Engineering Manager @ Omega Energia • Data • Software • Cloud • Energy • Renewables

Citation (CITATION.cff)

cff-version: 0.0.3

message: "If you use this software, please cite it as below."

authors: 
  - 
    family-names: Pureza Leonel Bigi de Aquino
    given-names: Ettore
  -
    family-names: Peters Barbosa
    given-names: João Pedro
  - 
    family-names: Peters Barbosa
    given-names: Pedro Henrique

title: "PPEE_210092: Power System Stochastic Dual Dynamic Programming Library"

version: 0.0.3

date-released: 2021-08-25

url: "https://github.com/ettoreaquino/powersddp"

GitHub Events

Total
Last Year

Committers

Last synced: about 2 years ago

All Time
  • Total Commits: 37
  • Total Committers: 2
  • Avg Commits per committer: 18.5
  • Development Distribution Score (DDS): 0.432
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Ettore Aquino e****e@e****m 21
Jppbrbs j****s@g****m 16
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: over 1 year ago

All Time
  • Total issues: 10
  • Total pull requests: 15
  • Average time to close issues: 3 days
  • Average time to close pull requests: 1 minute
  • Total issue authors: 1
  • Total pull request authors: 2
  • Average comments per issue: 0.1
  • Average comments per pull request: 0.0
  • Merged pull requests: 15
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • ettoreaquino (10)
Pull Request Authors
  • ettoreaquino (10)
  • joaoppeters (5)
Top Labels
Issue Labels
enhancement (6) bug (2) good first issue (1)
Pull Request Labels
enhancement (12) documentation (10) good first issue (2)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 16 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 1
  • Total versions: 3
  • Total maintainers: 2
pypi.org: powersddp

A Stochastic Dual Dynamic Programmimg library to solve economical dispach of power systems.

  • Versions: 3
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 16 Last month
Rankings
Dependent packages count: 10.1%
Dependent repos count: 21.5%
Stargazers count: 25.1%
Average: 25.5%
Forks count: 29.8%
Downloads: 40.8%
Maintainers (2)
Last synced: 6 months ago

Dependencies

poetry.lock pypi
  • 101 dependencies
pyproject.toml pypi
  • black ^21.7b0 develop
  • jupyterlab ^3.1.6 develop
  • mypy ^0.910 develop
  • pylint ^2.9.6 develop
  • pytest ^5.2 develop
  • typed-ast ^1.4.3 develop
  • types-PyYAML ^5.4.6 develop
  • PyYAML ^5.4.1
  • cvxopt ^1.2.6
  • numpy ^1.21.1
  • pandas ^1.3.2
  • plotly ^5.2.1
  • python ^3.7