Giter Club home page Giter Club logo

power_system_operation's Introduction

Power System Operation in Python

We are still at the early stage of the implementation. There will be more functionalities and flexible I/Os coming in the future. Please watch us progress to have the latest update.

This repo contains some basic power system operations written in Python and formulated by cvxpy, such as:

  • Network Constrained Unit Commitment (with/out integer variables as QP/MIQP)
  • Economic Dispatch (as QP, ongoing)
  • Stochastic Unit Commitment (ongoing)

Package Dependencies

cvxpy: is an open source Python-embedded modeling language for convex optimization problems. It lets you express your problem in a natural way that follows the math, rather than in the restrictive standard form required by solvers.

PyPower: is a power flow and Optimal Power Flow (OPF) solver. It is a port of MATPOWER to the Python programming language.

However, you may also need to have Gurobi, Mosek or other optimization software to efficiently solve the optimization problems, especially if integers are included. Please refer here for details.

Source

The implementation of this repo follows the online cource here and the textbook Power System Operations here, both by Prof. Antonio Conejo.

Usage

Import system from PYPOWER

The package requires a .csv file to contain the configuration of power system operation. The basic format follows the MatPower and PyPower styles. An example file can be found here.

We recommend to construct the .csv file from the basic PyPower file to avoid errors. To do so, you also need to provide another .json file to specify configs that are not covered by the PyPower. Please have a look here. The detailed description on how to construct the extra config file can be found here.

Reformulate the problem as standardard form QP/MIQP

The functions in test/standard_form.py are developed to reformulate the UC/ED in cvxpy form into the correspinding standard form. This conversion is general in addition to the UC/ED. Therefore it can be used outside power system operation. In this sense, you can "standardize" your problem by leveraging the descriptive power of cvxpy.

For a genenal QP without integer variable, it transforms into: $$ \begin{array}{rl} \min & (1/2) x^TPx + q^Tx \ \text{s.t.} & Ax = b \ & Gx \leq d \end{array} $$

For a general MIQP, it transforms into:

power_system_operation's People

Contributors

xuwkk avatar

Watchers

 avatar

Forkers

lefang16

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.