Coder Social home page Coder Social logo

lanl-ansi / powermodels.jl Goto Github PK

View Code? Open in Web Editor NEW
373.0 27.0 140.0 5.01 MB

A Julia/JuMP Package for Power Network Optimization

Home Page: https://lanl-ansi.github.io/PowerModels.jl/stable/

License: Other

Julia 93.36% MATLAB 6.64%
optimization network power-network optimal-power-flow

powermodels.jl's Introduction

PowerModels.jl

PowerModels logo

Status: CI codecov Documentation

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 and rectangular coordinates)
  • DC Approximation (polar coordinates)
  • LPAC Approximation (polar coordinates)
  • SDP Relaxation (W-space)
  • SOC Relaxation (W-space)
  • QC Relaxation (W+L-space)
  • IV (rectangular coordinates)

Network Data Formats

  • Matpower ".m" files
  • PTI ".raw" files (PSS(R)E v33 specification)

Documentation

The package documentation includes a variety of useful information including a quick-start guide, network model specification, and baseline results.

Additionally, these presentations provide a brief introduction to various aspects of PowerModels,

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. See CONTRIBUTING.md for code contribution guidelines.

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 (@ccoffrin) with support from the following contributors,

  • Per Aaslid (@peraaslid) SINTEF ER, Branch flow storage model and linear branch flow formulation
  • Juan Luis Barbería (@jbarberia) UTN-BA, PSS(R)E v33 data export, Jacobian support for basic network data
  • Russell Bent (@rb004f) LANL, Matpower export, TNEP problem specification
  • Jose Daniel Lara (@jd-lara) Berkeley, Julia v1.0 compatibility
  • Jay Dave (@jay-dave) KU Leuven, LPAC for TNEP and OTS problems
  • Hakan Ergun (@hakanergun) KU Leuven, HVDC lines
  • David Fobes (@pseudocubic) LANL, PSS(R)E v33 data support
  • Rory Finnegan (@rofinn) Invenia, Memento Logging
  • Frederik Geth (@frederikgeth) CSIRO, storage modeling advise, Branch Flow and current-voltage formulation
  • Jonas Kersulis (@kersulis) University of Michigan, Sparse SDP formulation
  • Miles Lubin (@mlubin) MIT, Julia/JuMP advise
  • Yeesian Ng (@yeesian) MIT, Documenter.jl setup
  • Kaarthik Sundar (@kaarthiksundar) LANL, OBBT utility
  • Mathieu Tanneau (@mtanneau) Georgia Tech, PTDF matrix computation
  • Byron Tasseff (@tasseff) LANL, multi-infrastructure updates

Citing PowerModels

If you find PowerModels useful in your work, we kindly request that you cite the following publication:

@inproceedings{8442948,
  author = {Carleton Coffrin and Russell Bent and Kaarthik Sundar and Yeesian Ng and Miles Lubin},
  title = {PowerModels.jl: An Open-Source Framework for Exploring Power Flow Formulations},
  booktitle = {2018 Power Systems Computation Conference (PSCC)},
  year = {2018},
  month = {June},
  pages = {1-8},
  doi = {10.23919/PSCC.2018.8442948}
}

Citation of the original works for problem definitions (e.g. OPF) and power flow formulations (e.g. SOC) is also encouraged when publishing works that use PowerModels.

License

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

powermodels.jl's People

Contributors

byronbest avatar ccoffrin avatar florianshepherd avatar frederikgeth avatar hakanergun avatar jay-dave avatar jbarberia avatar jd-lara avatar juliatagbot avatar kaarthiksundar avatar kersulis avatar ksepetanc avatar lsindoni avatar lthurner avatar mtanneau avatar noahrhodes avatar odow avatar peraaslid avatar pseudocubic avatar raphaelsaavedra avatar rb004f avatar rofinn avatar sanderclaeys avatar sergio-dorado avatar tso-martin avatar yeesian avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

powermodels.jl's Issues

Fixing Bus Types when Parsing Matpower

When parsing .m files, if a generator bus type is incorrect (e.g. type 2 with no generators) fix it.

Key use case, is running an AC-PF solve on a non-NESTA Polish case (e.g. case2737sop.m).

Type Parsing in build_sets

The various Int(x) calls may not be necessary.

When parsing .m files these fields are already parsed to Int. When parsing .json these values may come in as Int, Float, or Number. Needs to be investigated.

Cleaning up TNEP line on/off constraints

In light of recent changes can constraint_complex_voltage_ne{T <: AbstractWRForm} be made cleaner? Like constraint_complex_voltage_on_off{T <: AbstractWRForm}?

Variable constructor return values

The variable_* functions should return some data structure including all of the variables they have added to the model.

The key challenge here is the type of data structure, as JuMP's @varaible macro can return a single variable, an array of variables, or a dict index-variable mapping.

angle bound limits

Add checks to the appropriate constraints to check angle limits are within +/- pi/2.

JSON Object Types

By default JSON.parse returns Dict{UTF8String, Any} and we typically use Dict{AbstractString, Any}.

  1. Figure out why a function of Dict{AbstractString, Any} cannot accpt an argument of Dict{UTF8String, Any}.

  2. Migrate code to a robust solution, no types?

  3. remove special type cases from JSON.parse() calls

Tests for Variable and Constraint return values

Once #9 is resolved, the number of elements returned from all variable_* calls should be exactly equal to the variables in the JuMP model. And a similar property should be true for the constraint_* calls.

A simple and generic way to test the return value implementation correctness is to test that the total number of returned constraints and variables are consistent with the internal JuMP model.

Variable lookup helper

Consider adding a helper function to do getvariable(pm.model, :loading)[i]. Along the lines of getvariable(pm, :loading, i)

Abstracting on/off constraints

There is significant repeated code in expansion planning line constraints (i.e. _ne) and OTS on/off constraints (i.e. _on_off).

See if there is a clean way of avoiding this replication without excessive engineering.

Multiphase support

Feature idea.

Optimal power models have traditionally only been done at the bulk power level. But with distributed generation and more advanced volt-var control, there's more opportunity to benefit from optimal models at the distribution level. To do that best, models need to include three phases and include single and two-phase lines and loads..

SLP Example

Develop an example of using SLP in PowerModels.

Speed up Tests

See if caching parsed versions of the model data can improve the speed of running package tests.

Variable Name Conventions

I propose the following a standard naming convention for the polar and rectangular variable spaces, let "v" be a complex number, then:

  • vm - magnitude of v
  • va - angle of v
  • vr - real component of v
  • vi - imaginary component of v

Strengthen DCLL OTS

in, function constraint_active_ohms_yt_on_off{T <: AbstractDCPLLForm}(pm::GenericPowerModel{T}, branch) add c4 = @constraint(pm.model, p_fr + p_to >= 0).

Possible typos in constraints.jl

In constraint_active_loss_lb, p_fr and p_to are defined identically:

    p_fr = getvariable(pm.model, :p)[f_idx]
    p_to = getvariable(pm.model, :p)[f_idx]

This is also the case for v_fr and v_to, and q_fr and q_to in constraint_reactive_loss_lb:

    v_fr = getvariable(pm.model, :v)[f_bus]
    v_to = getvariable(pm.model, :v)[f_bus]

    q_fr = getvariable(pm.model, :q)[f_idx]
    q_to = getvariable(pm.model, :q)[f_idx]

Update README

Add TNEP to list of supported models, also use checkout instead of clone for to get the current development version.

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.