Methods
Some various methods used in LinDistFlow.jl:
CommonOPF.j_to_k
— Functionfunction j_to_k(j::AbstractString, p::Inputs)
find all busses downstream of bus j
CommonOPF.i_to_j
— Functionfunction i_to_j(j::AbstractString, p::Inputs)
find all busses upstream of bus j
In a radial network this function should return an Array with length of 1.
CommonOPF.singlephase38linesInputs
— Functionsinglephase38linesInputs(;
Pload=Dict{String, AbstractArray{Real, 1}}(),
Qload=Dict{String, AbstractArray{Real, 1}}(),
T=24,
loadnodes = ["3", "5", "36", "9", "10", "11", "12", "13", "15", "17", "18", "19", "22", "25",
"27", "28", "30", "31", "32", "33", "34", "35"],
Sbase = 1e6,
Vbase = 12.5e3,
v0=1.0,
v_uplim = 1.05,
v_lolim = 0.95,
)
Convenience function for creating a single phase network with 38 lines and nodes. Taken from: Andrianesis et al. 2019 "Locational Marginal Value of Distributed Energy Resources as Non-Wires Alternatives"
NOTE that Inputs is a mutable struct (s.t. loads can be added later).
LinDistFlow.constrain_line_amps
— Functionconstrain_line_amps(m::JuMP.AbstractModel, p::Inputs{MultiPhase})
Constrain the estimated line amps using the p.Isquared_up_bounds
in both the postive and negative directions.
See define_line_amps_pu
for more.
LinDistFlow.define_line_amps_pu
— Functiondefine_line_amps_pu(m::JuMP.AbstractModel, p::Inputs{MultiPhase})
Estimating the line amps as $|(V_i - V_j) / Z|$ where we use the approximation:
$|V_i - V_j| \approx r_{ij} P_{ij} + x_{ij} Q_{ij}$
The expressions are stored in the model.obj_dict
with key :amps_pu
.