Code Monkey home page Code Monkey logo

jabr-power-flow's Introduction

A Python implementation of a conic programming formulation to the power flow problem on tree networks, as described in the paper

R. A. Jabr, "Radial distribution load flow using conic programming,"
IEEE Transactions on Power Systems, vol. 21, no. 3, pp. 1458-1459, 2006.

It relies on Gurobi, a commercial (but free academic license) optimization solver, which unfortunately requires python 2.

The work I'm doing on the power grid attack problem involves testing the power flow on grids that are far from their normal operating conditions. The usual Newton's method approach can't be trusted (as in MATPOWER) for all cases; I want a certificate of infeasibility, which this method provides.

Once you have gurobi installed, try running

python jabr.py

which should produce

  1   0.853 -27.815
  2   0.985  -5.829
  3   0.873 -20.100
  4   0.853 -27.815
  5   1.000   0.000

Try it on some other examples in the cases directory:

answer = solve('cases/case15_v2.m')
for bus in sorted(answer.keys()):
    v, t = answer[bus]
    print('%3d %7.3f %7.3f' % (bus, v, 180/pi*t))

  1   1.000   0.000
  2   0.971   0.032
  3   0.957   0.049
  4   0.951   0.056
  5   0.950   0.068
  6   0.958   0.189
  7   0.956   0.216
  8   0.957   0.205
  9   0.968   0.072
 10   0.967   0.085
 11   0.950   0.131
 12   0.946   0.182
 13   0.945   0.198
 14   0.949   0.085
 15   0.948   0.087

jabr-power-flow's People

Contributors

sharnett avatar

Watchers

James Cloos avatar

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.