Giter Club home page Giter Club logo

powermodels.jl's Introduction

PowerModels.jl

Release: PowerModels, PowerModels, PowerModels

Dev: Build Status codecov

PowerModels.jl is a Julia/JuMP package for Steady-State Power Network Optimization. It is designed to enable computational evaluation of emerging power network formulations and algorithms in a common platform. The code is engineered to decouple problem specifications (e.g. Power Flow, Optimal Power Flow, ...) from the power network formulations (e.g. AC, DC-approximation, SOC-relaxation, ...). This enables the definition of a wide variety of power network formulations and their comparison on common problem specifications.

Core Problem Specifications

  • Power Flow (pf)
  • Optimal Power Flow (opf)
  • Optimal Transmission Switching (ots)
  • Transmission Network Expansion Planning (tnep)

Core Network Formulations

  • AC (polar coordinates)
  • DC Approximation (polar coordinates)
  • SOC Relaxation (W-space)
  • QC Relaxation (W+L-space)

Network Data Formats

  • Matpower ".m" files (see DATA.md for details)

Installation

The latest stable release of PowerModels can be installed using the Julia package manager with,

Pkg.add("PowerModels")

For the current development version, "checkout" this package with,

Pkg.checkout("PowerModels")

At least one solver is required for running PowerModels. The open-source solver Ipopt is recommended, as it is extremely fast, and can be used to solve a wide variety of the problems and network formulations provided in PowerModels. The Ipopt solver can be installed via the package manager with,

Pkg.add("Ipopt")

Basic Usage

Once PowerModels is installed, Ipopt is installed, and a network data file (e.g. "nesta_case3_lmbd.m") has been acquired, an AC Optimal Power Flow can be executed with,

using PowerModels
using Ipopt

run_ac_opf("nesta_case3_lmbd.m", IpoptSolver())

Similarly, a DC Optimal Power Flow can be executed with,

run_dc_opf("nesta_case3_lmbd.m", IpoptSolver())

In fact, "run_ac_opf" and "run_dc_opf" are shorthands for a more general formulation-independent OPF execution, "run_opf". For example, "run_ac_opf" is,

run_opf("nesta_case3_lmbd.m", ACPPowerModel, IpoptSolver())

Where "ACPPowerModel" indicates an AC formulation in polar coordinates. This more generic "run_opf" allows one to solve an OPF problem with any power network formulation implemented in PowerModels. For example, an SOC Optimal Power Flow can be run with,

run_opf("nesta_case3_lmbd.m", SOCWRPowerModel, IpoptSolver())

Extending PowerModels with new problems and formulations will be covered in a another tutorial, that is not yet available.

Frequently Asked Questions

Modifying Network Data

The following example demonstrates one way to perform multiple PowerModels solves while modify the network data in Julia,

network_data = PowerModels.parse_file("nesta_case3_lmbd.m")

run_opf(network_data, ACPPowerModel, IpoptSolver())

network_data["bus"]["3"]["pd"] = 0.0
network_data["bus"]["3"]["qd"] = 0.0

run_opf(network_data, ACPPowerModel, IpoptSolver())

For additional details about the PowerModels network data structure see the DATA.md file.

JuMP Model Inspection

The following example demonstrates how to break a run_opf call into seperate model building and solving steps. This allows inspection of the JuMP model created by PowerModels for the AC-OPF problem,

pm = build_generic_model("nesta_case3_lmbd.m", ACPPowerModel, PowerModels.post_opf)

print(pm.model)

solve_generic_model(pm, IpoptSolver())

Development

Community-driven development and enhancement of PowerModels are welcome and encouraged. Please fork this repository and share your contributions to the master with pull requests.

Acknowledgments

This code has been developed as part of the Advanced Network Science Initiative at Los Alamos National Laboratory. The primary developer is Carleton Coffrin, with significant contributions from Russell Bent.

Special thanks to Miles Lubin for his assistance in integrating with Julia/JuMP.

License

This code is provided under a BSD license as part of the Multi-Infrastructure Control and Optimization Toolkit (MICOT) project, LA-CC-13-108.

powermodels.jl's People

Contributors

ccoffrin avatar rb004f avatar kersulis avatar

Watchers

James Cloos avatar Kibaek Kim avatar  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.