PowerModel

Power Model

All methods for constructing powermodels should be defined on the following type:

type GenericPowerModel{T<:AbstractPowerFormulation}
    model::JuMP.Model
    data::Dict{String,<:Any}
    setting::Dict{String,<:Any}
    solution::Dict{String,<:Any}
    ref::Dict{Symbol,<:Any} # reference data
    var::Dict{Symbol,<:Any} # JuMP variables
    con::Dict{Symbol,<:Any} # JuMP constraint references
    cnw::Int              # current network index value
    ccnd::Int             # current conductor index value
    ext::Dict{Symbol,<:Any} # user extentions
end

where

  • data is the original data, usually from reading in a .json or .m (patpower) file,
  • setting usually looks something like Dict("output" => Dict("branch_flows" => true)), and
  • ref is a place to store commonly used pre-computed data from of the data dictionary, primarily for converting data-types, filtering out deactivated components, and storing system-wide values that need to be computed globally. See build_ref(data) for further details.

Methods on GenericPowerModel for defining variables and adding constraints should

  • work with the ref dict, rather than the original data dict,
  • add them to model::JuMP.Model, and
  • follow the conventions for variable and constraint names.
source

which utilizes the following (internal) functions:

PowerModels.build_ref โ€” Function.

used for building ref without the need to build a GenericPowerModel

source
Missing docstring.

Missing docstring for buspair_parameters. Check Documenter's build log for details.