Power Model
All methods for constructing powermodels should be defined on the following type:
PowerModels.GenericPowerModel
โ 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 likeDict("output" => Dict("branch_flows" => true))
, andref
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. Seebuild_ref(data)
for further details.
Methods on GenericPowerModel
for defining variables and adding constraints should
- work with the
ref
dict, rather than the originaldata
dict, - add them to
model::JuMP.Model
, and - follow the conventions for variable and constraint names.
which utilizes the following (internal) functions:
PowerModels.build_ref
โ Function.used for building ref without the need to build a GenericPowerModel
Missing docstring.
Missing docstring for buspair_parameters
. Check Documenter's build log for details.