PowerModelsDistribution.jl Library
PowerModelsDistribution.AbstractConicUBFModel
— TypePowerModelsDistribution.AbstractLPUBFModel
— TypeAbstract form for linear unbalanced power flow models
PowerModelsDistribution.AbstractNLPUBFModel
— TypePowerModelsDistribution.DSSSourceId
— TypeStructure representing OpenDSS dss_source_id
giving the type of the component dss_type
, its name dss_name
, and the active phases active_phases
PowerModelsDistribution.LPUBFDiagModel
— TypeLinDist3Flow per Sankur et al 2016, using vector variables for power, voltage and current
PowerModelsDistribution.LPUBFDiagPowerModel
— Typedefault LP unbalanced DistFlow constructor
PowerModelsDistribution.SDPUBFKCLMXModel
— TypeSDP BFM with KCL as matrix equation, Geth 2020 (under review)
PowerModelsDistribution.SDPUBFKCLMXPowerModel
— Typedefault SDP unbalanced DistFlow with matrix KCL constructor
PowerModelsDistribution.SDPUBFModel
— TypeSDP BFM per Gan and Low 2014, PSCC
PowerModelsDistribution.SDPUBFPowerModel
— Typedefault SDP unbalanced DistFlow constructor
PowerModelsDistribution.SOCConicUBFModel
— TypeSOC relaxation of SDPUBFModel per Kim, Kojima, & Yamashita 2003, cast as a SOC
PowerModelsDistribution.SOCConicUBFPowerModel
— Typedefault SOC unbalanced DistFlow constructor
PowerModelsDistribution.SOCNLPUBFModel
— TypeSOC relaxation of SDPUBFModel per Kim, Kojima, & Yamashita 2003, cast as an QCP
PowerModelsDistribution.SOCNLPUBFPowerModel
— Typedefault SOC unbalanced DistFlow constructor
PowerModelsDistribution.build_mc_mld
— MethodLoad shedding problem including storage (snap-shot)
PowerModelsDistribution.build_mc_mld_bf
— MethodLoad shedding problem for Branch Flow model
PowerModelsDistribution.build_mc_mld_uc
— MethodStandard unit commitment (!relaxed) load shedding problem
PowerModelsDistribution.build_mc_opf
— MethodPowerModelsDistribution.build_mc_opf_bf
— MethodPowerModelsDistribution.build_mc_opf_bf_lm
— MethodPowerModelsDistribution.build_mc_opf_lm
— MethodThis problem specification includes advanced load models, including constant power, constant current and constabt impedance delta-connected and wye-connected
PowerModelsDistribution.build_mc_opf_oltc
— MethodPowerModelsDistribution.build_mc_opf_pbs
— MethodOPF problem with slack power at every bus
PowerModelsDistribution.build_mc_pf
— MethodPowerModelsDistribution.build_mc_pf_bf
— MethodPowerModelsDistribution.build_mc_pf_lm
— MethodPowerModelsDistribution.build_mc_pf_pbs
— MethodPF problem with slack power at every bus
PowerModelsDistribution.calculate_tm_scale
— MethodCalculates the tap scale factor for the non-dimensionalized equations.
PowerModelsDistribution.constraint_M_psd
— MethodFor rectangular coordinates of a complex matrix M=Mre+im*Mim, this function applies constraints equivalent to requiring that M itself is PSD.
PowerModelsDistribution.constraint_SWL_psd
— MethodTake a multi-conductor voltage variable V and a current variable I. The associated power is then defined as S = VI^H Define the lifted variables as W and L as W = VV^H, L = I*I^H Then, it is equally valid that [W S; S^H L] ∈ PSDCone, rank([W S; S^H L])=1 This function adds this PSD constraint for the rectangular coordinates of S, W and L.
PowerModelsDistribution.constraint_mc_active_gen_setpoint
— Methodgenerator active power setpoint constraint
PowerModelsDistribution.constraint_mc_bus_voltage_on_off
— Methodbus voltage on/off constraint for load shed problem
PowerModelsDistribution.constraint_mc_bus_voltage_on_off
— Methodon/off bus voltage constraint for DCP formulation, nothing to do
PowerModelsDistribution.constraint_mc_bus_voltage_on_off
— Methodon/off constraint for bus voltages
PowerModelsDistribution.constraint_mc_bus_voltage_on_off
— Methodon/off bus voltage constraint for relaxed forms
PowerModelsDistribution.constraint_mc_current_limit
— MethodPowerModelsDistribution.constraint_mc_flow_losses
— MethodDefines branch flow model power flow equations
PowerModelsDistribution.constraint_mc_flow_losses
— MethodPowerModelsDistribution.constraint_mc_flow_losses
— MethodDefines branch flow model power flow equations
PowerModelsDistribution.constraint_mc_generation
— MethodLink the current and power withdrawn by a generator at the bus through a PSD constraint. The rank-1 constraint is dropped in this formulation.
PowerModelsDistribution.constraint_mc_generation
— MethodOnly KCLModels need to further constrain the generator variables.
PowerModelsDistribution.constraint_mc_generation_on_off
— Methodon/off constraint for generators
PowerModelsDistribution.constraint_mc_generation_on_off
— Methodon/off constraint for generators
PowerModelsDistribution.constraint_mc_load
— MethodCONSTANT POWER Fixes the load power sd. sd = [sd1, sd2, sd3] What is actually fixed, depends on whether the load is connected in delta or wye. When connected in wye, the load power equals the per-phase power sn drawn at the bus to which the load is connected. sd1 = va.conj(ia) = sn_a
CONSTANT CURRENT Sets the active and reactive load power sd to be proportional to the the voltage magnitude. pd = cp.|vm| qd = cq.|vm| sd = cp.|vm| + j.cq.|vm|
CONSTANT IMPEDANCE Sets the active and reactive power drawn by the load to be proportional to the square of the voltage magnitude. pd = cp.|vm|^2 qd = cq.|vm|^2 sd = cp.|vm|^2 + j.cq.|vm|^2
DELTA When connected in delta, the load power gives the reference in the delta reference frame. This means sd1 = vab.conj(iab) = (va-vb).conj(iab) We can relate this to the per-phase power by sna = va.conj(ia) = va.conj(iab-ica) = va.conj(conj(sab/vab) - conj(sca/vca)) = va.(sab/(va-vb) - sca/(vc-va)) So for delta, sn is constrained indirectly.
PowerModelsDistribution.constraint_mc_load
— MethodCreates the constraints modelling the (relaxed) voltage-dependent loads for the matrix KCL formulation.
PowerModelsDistribution.constraint_mc_load
— MethodCreates the constraints modelling the (relaxed) voltage-dependent loads.
PowerModelsDistribution.constraint_mc_load_current_delta
— MethodWe want to express sab = cp.|vab|+im.cq.|vab| iab = conj(sab/vab) = |vab|.(cq-im.cq)/conj(vab) = (1/|vab|).(cp-im.cq)*vab idem for ibc and ica And then sa = va.conj(ia) = va.conj(iab-ica) idem for sb and sc
PowerModelsDistribution.constraint_mc_load_current_delta
— MethodWe want to express sab = cp.|vab|+im.cq.|vab| iab = conj(sab/vab) = |vab|.(cq-im.cq)/conj(vab) = (1/|vab|).(cp-im.cq)*vab idem for ibc and ica And then sa = va.conj(ia) = va.conj(iab-ica) idem for sb and sc
PowerModelsDistribution.constraint_mc_load_current_wye
— MethodPowerModelsDistribution.constraint_mc_load_current_wye
— MethodPowerModelsDistribution.constraint_mc_load_exponential_delta
— Methodexponential model in acp voltage coordinates
PowerModelsDistribution.constraint_mc_load_exponential_wye
— MethodPowerModelsDistribution.constraint_mc_load_impedance_delta
— MethodWe want to express sab = cp.|vab|^2+im.cq.|vab|^2 iab = conj(sab/vab) = |vab|^2.(cq-im.cq)/conj(vab) = (cp-im.cq)*vab idem for ibc and ica And then sa = va.conj(ia) = va.conj(iab-ica) idem for sb and s_c
PowerModelsDistribution.constraint_mc_load_impedance_delta
— MethodWe want to express sab = cp.|vab|^2+im.cq.|vab|^2 iab = conj(sab/vab) = |vab|^2.(cq-im.cq)/conj(vab) = (cp-im.cq)*vab idem for ibc and ica And then sa = va.conj(ia) = va.conj(iab-ica) idem for sb and s_c
PowerModelsDistribution.constraint_mc_load_impedance_wye
— MethodPowerModelsDistribution.constraint_mc_load_impedance_wye
— MethodPowerModelsDistribution.constraint_mc_load_power_delta
— MethodFor a delta load, sd = (sab, sbc, sca), but we want to fix s = (sa, sb, sc) s is a non-linear transform of v and sd, s=f(v,sd) sa = vaconj(sab/(va-vb) - sca/(vc-va)) sb = vbconj(sab/(va-vb) - sca/(vc-va)) sc = vc*conj(sab/(va-vb) - sca/(vc-va))
PowerModelsDistribution.constraint_mc_load_power_delta
— MethodFor a delta load, sd = (sab, sbc, sca), but we want to fix s = (sa, sb, sc) s is a non-linear transform of v and sd, s=f(v,sd) sa = vaconj(sab/(va-vb) - sca/(vc-va)) sb = vbconj(sab/(va-vb) - sca/(vc-va)) sc = vc*conj(sab/(va-vb) - sca/(vc-va))
PowerModelsDistribution.constraint_mc_load_power_wye
— MethodPowerModelsDistribution.constraint_mc_load_power_wye
— MethodPowerModelsDistribution.constraint_mc_model_current
— MethodDefines relationship between branch (series) power flow, branch (series) current and node voltage magnitude
PowerModelsDistribution.constraint_mc_model_current
— MethodDefines relationship between branch (series) power flow, branch (series) current and node voltage magnitude
PowerModelsDistribution.constraint_mc_model_current
— MethodDefines relationship between branch (series) power flow, branch (series) current and node voltage magnitude
PowerModelsDistribution.constraint_mc_model_current
— MethodPowerModelsDistribution.constraint_mc_model_current
— MethodDefines relationship between branch (series) power flow, branch (series) current and node voltage magnitude
PowerModelsDistribution.constraint_mc_model_voltage
— Methodnothing to do, these models do not have complex voltage constraints
PowerModelsDistribution.constraint_mc_model_voltage
— Methoddo nothing by default
PowerModelsDistribution.constraint_mc_model_voltage
— MethodPowerModelsDistribution.constraint_mc_model_voltage_magnitude_difference
— MethodDefines voltage drop over a branch, linking from and to side voltage
PowerModelsDistribution.constraint_mc_model_voltage_magnitude_difference
— MethodPowerModelsDistribution.constraint_mc_model_voltage_magnitude_difference
— MethodDefines voltage drop over a branch, linking from and to side voltage
PowerModelsDistribution.constraint_mc_ohms_yt_from
— MethodCreates Ohms constraints (yt post fix indicates that Y and T values are in rectangular form)
p_fr == g[c,c] * vm_fr[c]^2 +
sum( g[c,d]*vm_fr[c]*vm_fr[d]*cos(va_fr[c]-va_fr[d]) +
b[c,d]*vm_fr[c]*vm_fr[d]*sin(va_fr[c]-va_fr[d]) for d in _PMs.conductor_ids(pm) if d != c) +
sum(-g[c,d]*vm_fr[c]*vm_to[d]*cos(va_fr[c]-va_to[d]) +
-b[c,d]*vm_fr[c]*vm_to[d]*sin(va_fr[c]-va_to[d]) for d in _PMs.conductor_ids(pm))
+ g_fr[c,c] * vm_fr[c]^2 +
sum( g_fr[c,d]*vm_fr[c]*vm_fr[d]*cos(va_fr[c]-va_fr[d]) +
b_fr[c,d]*vm_fr[c]*vm_fr[d]*sin(va_fr[c]-va_fr[d]) for d in _PMs.conductor_ids(pm) if d != c)
)
q_fr == -b[c,c] *vm_fr[c]^2 -
sum( b[c,d]*vm_fr[c]*vm_fr[d]*cos(va_fr[c]-va_fr[d]) -
g[c,d]*vm_fr[c]*vm_fr[d]*sin(va_fr[c]-va_fr[d]) for d in _PMs.conductor_ids(pm) if d != c) -
sum(-b[c,d]*vm_fr[c]*vm_to[d]*cos(va_fr[c]-va_to[d]) +
g[c,d]*vm_fr[c]*vm_to[d]*sin(va_fr[c]-va_to[d]) for d in _PMs.conductor_ids(pm))
-b_fr[c,c] *vm_fr[c]^2 -
sum( b_fr[c,d]*vm_fr[c]*vm_fr[d]*cos(va_fr[c]-va_fr[d]) -
g_fr[c,d]*vm_fr[c]*vm_fr[d]*sin(va_fr[c]-va_fr[d]) for d in _PMs.conductor_ids(pm) if d != c)
)
PowerModelsDistribution.constraint_mc_ohms_yt_from
— MethodCreates Ohms constraints (yt post fix indicates that Y and T values are in rectangular form)
p_fr == sum(
vr_fr[c]*(g[c,d]*(vr_fr[d]-vr_to[d])-b[c,d]*(vi_fr[d]-vi_to[d]))
-vi_fr[c]*(-b[c,d]*(vr_fr[d]-vr_to[d])-g[c,d]*(vi_fr[d]-vi_to[d]))
for d in _PMs.conductor_ids(pm))
+ sum(
vr_fr[c]*(g_fr[c,d]*vr_fr[d]-b_fr[c,d]*vi_fr[d])
-vi_fr[c]*(-b_fr[c,d]*vr_fr[d]-g_fr[c,d]*vi_fr[d])
for d in _PMs.conductor_ids(pm))
q_fr == sum(
-vr_fr[c]*(b[c,d]*(vr_fr[d]-vr_to[d])+g[c,d]*(vi_fr[d]-vi_to[d]))
+vi_fr[c]*(g[c,d]*(vr_fr[d]-vr_to[d])-b[c,d]*(vi_fr[d]-vi_to[d]))
for d in _PMs.conductor_ids(pm))
+ sum(
-vr_fr[c]*(b_fr[c,d]*vr_fr[d]+g_fr[c,d]*vi_fr[d])
+vi_fr[c]*(g_fr[c,d]*vr_fr[d]-b_fr[c,d]*vi_fr[d])
for d in _PMs.conductor_ids(pm))
PowerModelsDistribution.constraint_mc_ohms_yt_from
— MethodCreates Ohms constraints (yt post fix indicates that Y and T values are in rectangular form)
p[f_idx] == -b*(t[f_bus] - t[t_bus])
PowerModelsDistribution.constraint_mc_ohms_yt_from
— Methodnothing to do, no voltage angle variables
PowerModelsDistribution.constraint_mc_ohms_yt_from
— Methodohms constraint for branches on the from-side
PowerModelsDistribution.constraint_mc_ohms_yt_from
— Methoddelegate back to PowerModels
PowerModelsDistribution.constraint_mc_ohms_yt_to
— MethodCreates Ohms constraints (yt post fix indicates that Y and T values are in rectangular form)
p[t_idx] == (g+g_to)*v[t_bus]^2 + (-g*tr-b*ti)/tm*(v[t_bus]*v[f_bus]*cos(t[t_bus]-t[f_bus])) + (-b*tr+g*ti)/tm*(v[t_bus]*v[f_bus]*sin(t[t_bus]-t[f_bus]))
q[t_idx] == -(b+b_to)*v[t_bus]^2 - (-b*tr+g*ti)/tm*(v[t_bus]*v[f_bus]*cos(t[f_bus]-t[t_bus])) + (-g*tr-b*ti)/tm*(v[t_bus]*v[f_bus]*sin(t[t_bus]-t[f_bus]))
PowerModelsDistribution.constraint_mc_ohms_yt_to
— MethodCreates Ohms constraints (yt post fix indicates that Y and T values are in rectangular form)
p[t_idx] == (g+g_to)*v[t_bus]^2 + (-g*tr-b*ti)/tm*(v[t_bus]*v[f_bus]*cos(t[t_bus]-t[f_bus])) + (-b*tr+g*ti)/tm*(v[t_bus]*v[f_bus]*sin(t[t_bus]-t[f_bus]))
q[t_idx] == -(b+b_to)*v[t_bus]^2 - (-b*tr+g*ti)/tm*(v[t_bus]*v[f_bus]*cos(t[f_bus]-t[t_bus])) + (-g*tr-b*ti)/tm*(v[t_bus]*v[f_bus]*sin(t[t_bus]-t[f_bus]))
PowerModelsDistribution.constraint_mc_ohms_yt_to
— Methodnothing to do, this model is symmetric
PowerModelsDistribution.constraint_mc_ohms_yt_to
— Methodohms constraint for branches on the to-side
PowerModelsDistribution.constraint_mc_ohms_yt_to
— Methoddelegate back to PowerModels
PowerModelsDistribution.constraint_mc_ohms_yt_to
— MethodDo nothing, this model is symmetric
PowerModelsDistribution.constraint_mc_oltc_tap_fix
— MethodFor a variable tap transformer, fix the tap variables which are fixed. For example, an OLTC where the third phase is fixed, will have tap variables for all phases, but the third tap variable should be fixed.
PowerModelsDistribution.constraint_mc_power_balance
— MethodPowerModelsDistribution.constraint_mc_power_balance
— MethodPowerModelsDistribution.constraint_mc_power_balance
— MethodPowerModelsDistribution.constraint_mc_power_balance
— Methodpower balanace constraint with line shunts and transformers, active power only
PowerModelsDistribution.constraint_mc_power_balance
— MethodKCL including transformer arcs
PowerModelsDistribution.constraint_mc_power_balance
— MethodShunt handling in matrix form: I = Y.U S = U.I' = U.(Y.U)' = U.U'.Y' = W.Y' = (Wr+j.Wi)(G+jB)' = (Wr+j.Wi)(G'-j.B') = (Wr.G'+Wi.B')+j(-Wr.B'+Wi.G') P = Wr.G'+Wi.B' Q = -Wr.B'+Wi.G'
PowerModelsDistribution.constraint_mc_power_balance
— MethodFor KCLMXModels, a new power balance constraint is required.
PowerModelsDistribution.constraint_mc_power_balance
— MethodPowerModelsDistribution.constraint_mc_power_balance_load
— MethodPowerModelsDistribution.constraint_mc_power_balance_load
— MethodPowerModelsDistribution.constraint_mc_power_balance_load
— MethodKCL including transformer arcs and load variables.
PowerModelsDistribution.constraint_mc_power_balance_shed
— MethodPowerModelsDistribution.constraint_mc_power_balance_shed
— Methodpower balance constraint with line shunts and transformers for load shed problem, DCP formulation
PowerModelsDistribution.constraint_mc_power_balance_shed
— MethodKCL for load shed problem with transformers
PowerModelsDistribution.constraint_mc_power_balance_shed
— MethodKCL for load shed problem with transformers (AbstractWForms)
PowerModelsDistribution.constraint_mc_power_balance_slack
— MethodPowerModelsDistribution.constraint_mc_power_balance_slack
— MethodPowerModelsDistribution.constraint_mc_power_balance_slack
— MethodPowerModelsDistribution.constraint_mc_power_balance_slack
— MethodPowerModelsDistribution.constraint_mc_storage_current_limit
— MethodPowerModelsDistribution.constraint_mc_storage_current_limit
— MethodPowerModelsDistribution.constraint_mc_storage_current_limit
— MethodPowerModelsDistribution.constraint_mc_storage_loss
— MethodPowerModelsDistribution.constraint_mc_storage_loss
— Methodstorage loss constraints, delegate to PowerModels
PowerModelsDistribution.constraint_mc_storage_on_off
— MethodPowerModelsDistribution.constraint_mc_storage_thermal_limit
— MethodPowerModelsDistribution.constraint_mc_storage_thermal_limit
— MethodPowerModelsDistribution.constraint_mc_storage_thermal_limit
— MethodPowerModelsDistribution.constraint_mc_switch_thermal_limit
— MethodPowerModelsDistribution.constraint_mc_thermal_limit_from
— Method-rate_a <= p[f_idx] <= rate_a
PowerModelsDistribution.constraint_mc_thermal_limit_from
— MethodPowerModelsDistribution.constraint_mc_thermal_limit_from
— Methodbranch thermal constraints from
PowerModelsDistribution.constraint_mc_thermal_limit_from_ne
— MethodPowerModelsDistribution.constraint_mc_thermal_limit_from_on_off
— MethodPowerModelsDistribution.constraint_mc_thermal_limit_to
— MethodPowerModelsDistribution.constraint_mc_thermal_limit_to
— MethodPowerModelsDistribution.constraint_mc_thermal_limit_to
— Methodbranch thermal constraints to
PowerModelsDistribution.constraint_mc_thermal_limit_to_ne
— MethodPowerModelsDistribution.constraint_mc_thermal_limit_to_on_off
— MethodPowerModelsDistribution.constraint_mc_theta_ref
— Methodbalanced three-phase phasor
PowerModelsDistribution.constraint_mc_theta_ref
— MethodCreates phase angle constraints at reference buses
PowerModelsDistribution.constraint_mc_theta_ref
— Methodnothing to do, no voltage angle variables
PowerModelsDistribution.constraint_mc_theta_ref
— Methodreference angle constraints
PowerModelsDistribution.constraint_mc_theta_ref
— MethodPowerModelsDistribution.constraint_mc_theta_ref
— MethodCreates phase angle constraints at reference buses
PowerModelsDistribution.constraint_mc_theta_ref
— Methoddo nothing, no way to represent this in these variables
PowerModelsDistribution.constraint_mc_trans
— Methodnothing to do, this model is symmetric
PowerModelsDistribution.constraint_mc_trans
— MethodTransformer constraints, considering winding type, conductor order, polarity and tap settings.
PowerModelsDistribution.constraint_mc_trans_yy
— Methodnothing to do, this model is symmetric
PowerModelsDistribution.constraint_mc_vm_ll
— MethodPowerModelsDistribution.constraint_mc_vm_neg_seq
— Methoda = exp(im2π/3) U+ = (1Ua + aUb a^2Uc)/3 U- = (1Ua + a^2Ub aUc)/3 vuf = |U-|/|U+| |U-| <= vufmax|U+| |U-|^2 <= vufmax^2*|U+|^2
PowerModelsDistribution.constraint_mc_vm_pos_seq
— Methoda = exp(im2π/3) U+ = (1Ua + aUb a^2Uc)/3 U- = (1Ua + a^2Ub aUc)/3 vuf = |U-|/|U+| |U-| <= vufmax|U+| |U-|^2 <= vufmax^2*|U+|^2
PowerModelsDistribution.constraint_mc_vm_vuf
— Methoda = exp(im2π/3) U+ = (1Ua + aUb a^2Uc)/3 U- = (1Ua + a^2Ub aUc)/3 vuf = |U-|/|U+| |U-| <= vufmax|U+| |U-|^2 <= vufmax^2*|U+|^2
PowerModelsDistribution.constraint_mc_vm_zero_seq
— Methoda = exp(im2π/3) U+ = (1Ua + aUb a^2Uc)/3 U- = (1Ua + a^2Ub aUc)/3 vuf = |U-|/|U+| |U-| <= vufmax|U+| |U-|^2 <= vufmax^2*|U+|^2
PowerModelsDistribution.constraint_mc_voltage_angle_difference
— MethodThis is duplicated at PMD level to correctly handle the indexing of the shunts.
PowerModelsDistribution.constraint_mc_voltage_angle_difference
— Methodnothing to do, these models do not have angle difference constraints
PowerModelsDistribution.constraint_mc_voltage_angle_difference
— MethodThis is duplicated at PMD level to correctly handle the indexing of the shunts.
PowerModelsDistribution.constraint_mc_voltage_angle_difference
— MethodPowerModelsDistribution.constraint_mc_voltage_balance
— MethodImpose all balance related constraints for which key present in data model of bus. For a discussion of sequence components and voltage unbalance factor (VUF), see @INPROCEEDINGS{girigoudarmolzahnroald-2019, author={K. Girigoudar and D. K. Molzahn and L. A. Roald}, booktitle={submitted}, title={{Analytical and Empirical Comparisons of Voltage Unbalance Definitions}}, year={2019}, month={}, url={https://molzahn.github.io/pubs/girigoudarmolzahnroald-2019.pdf} }
PowerModelsDistribution.constraint_mc_voltage_magnitude_bounds
— Methodvmin <= vm[i] <= vmax
PowerModelsDistribution.constraint_mc_voltage_magnitude_bounds
— MethodThis constraint captures problem agnostic constraints that define limits for voltage magnitudes (where variable bounds cannot be used) Notable examples include IVRPowerModel and ACRPowerModel
PowerModelsDistribution.constraint_mc_voltage_magnitude_on_off
— Methodon/off bus voltage magnitude constraint
PowerModelsDistribution.constraint_mc_voltage_magnitude_on_off
— Methodon/off voltage magnitude constraint
PowerModelsDistribution.constraint_mc_voltage_magnitude_setpoint
— Methodvm[i] == vmref
PowerModelsDistribution.constraint_mc_voltage_magnitude_setpoint
— Methodvm[i] == vmref
PowerModelsDistribution.constraint_mc_voltage_magnitude_setpoint
— Methodvoltage magnitude setpoint constraint
PowerModelsDistribution.constraint_mc_voltage_magnitude_setpoint
— Methodvm[i] == vmref
PowerModelsDistribution.constraint_mc_voltage_magnitude_sqr_on_off
— Methodon/off bus voltage magnitude squared constraint for relaxed formulations
PowerModelsDistribution.constraint_mc_voltage_magnitude_sqr_on_off
— Methodon/off voltage magnitude squared constraint for relaxed formulations
PowerModelsDistribution.constraint_pqw
— MethodCreates the constraints modelling the (relaxed) voltage-dependency of the power consumed in each phase, s=p+jq. This is completely symmetrical for p and q, with appropriate substitutions of the variables and parameters: p->q, a->b, alpha->beta, pmin->qmin, pmax->qmax
PowerModelsDistribution.correct_network_data!
— MethodPowerModelsDistribution.count_nodes
— MethodCounts number of nodes in network
PowerModelsDistribution.count_nodes
— MethodCounts number of nodes in network
PowerModelsDistribution.find_bus
— Methodfind_bus(busname, pmd_data)
Finds the index number of the bus in existing data from the given busname
.
PowerModelsDistribution.find_component
— Methodfind_component(pmd_data, name, compType)
Returns the component of compType
with name
from data
of type Dict{String,Array}.
PowerModelsDistribution.make_multiconductor!
— MethodTransforms single-conductor network data into multi-conductor data
PowerModelsDistribution.objective_mc_max_loadability
— Methodmaximum loadability objective (continuous load shed) with storage
PowerModelsDistribution.objective_mc_min_load_delta
— Methodminimum load delta objective (continuous load shed) with storage
PowerModelsDistribution.objective_min_bus_power_slack
— Methoda quadratic penalty for bus power slack variables
PowerModelsDistribution.parse_dss
— MethodPowerModelsDistribution.parse_dss
— Methodparse_dss(filename)
Parses a OpenDSS file given by filename
into a Dict{Array{Dict}}. Only supports components and options, but not commands, e.g. "plot" or "solve". Will also parse files defined inside of the originating DSS file via the "compile", "redirect" or "buscoords" commands.
PowerModelsDistribution.parse_dss_with_dtypes!
— Functionparse_dss_with_dtypes!(dss_data, toParse)
Parses the data in keys defined by toParse
in dss_data
using types given by the default properties from the get_prop_default
function.
PowerModelsDistribution.parse_file
— Methodparse_file(io)
Parses the IOStream of a file into a Three-Phase PowerModels data structure.
PowerModelsDistribution.parse_file
— MethodPowerModelsDistribution.parse_json
— MethodParses json from iostream or string
PowerModelsDistribution.parse_json
— MethodPowerModelsDistribution.parse_opendss
— MethodParses a Dict resulting from the parsing of a DSS file into a PowerModels usable format
PowerModelsDistribution.parse_opendss
— MethodParses a DSS file into a PowerModels usable format
PowerModelsDistribution.parse_options
— Methodparse_options(options)
Parses options defined with the set
command in OpenDSS.
PowerModelsDistribution.ref_add_arcs_trans!
— MethodAdds arcs for PMD transformers; for dclines and branches this is done in PMs
PowerModelsDistribution.relaxation_psd_to_psd_real
— MethodFor debugging / exploration: real-valued SDP to SDP relaxation based on PSDness of principal minors, default is 3x3 SDP relaxation
PowerModelsDistribution.relaxation_psd_to_soc
— MethodSee section 4.3 for complex to real PSD constraint transformation: @article{Fazel2001, author = {Fazel, M. and Hindi, H. and Boyd, S.P.}, title = {{A rank minimization heuristic with application to minimum order system approximation}}, doi = {10.1109/ACC.2001.945730}, journal = {Proc. American Control Conf.}, number = {2}, pages = {4734–4739}, url = {http://ieeexplore.ieee.org/lpdocs/epic03/wrapper.htm?arnumber=945730}, volume = {6}, year = {2001} }
PowerModelsDistribution.relaxation_psd_to_soc_complex
— MethodSDP to SOC relaxation of type 2, applied to complex-value matrix, as described in:
@article{Kim2003,
author = {Kim, S and Kojima, M and Yamashita, M},
title = {{Second order cone programming relaxation of a positive semidefinite constraint}},
doi = {10.1080/1055678031000148696},
journal = {Optimization Methods and Software},
number = {5},
pages = {535--541},
volume = {18},
year = {2003}
}
PowerModelsDistribution.relaxation_psd_to_soc_complex_conic
— MethodSDP to SOC relaxation of type 2, applied to complex-value matrix, as described in:
@article{Kim2003,
author = {Kim, S and Kojima, M and Yamashita, M},
title = {{Second order cone programming relaxation of a positive semidefinite constraint}},
doi = {10.1080/1055678031000148696},
journal = {Optimization Methods and Software},
number = {5},
pages = {535--541},
volume = {18},
year = {2003}
}
PowerModelsDistribution.relaxation_psd_to_soc_conic
— MethodSee section 4.3 for complex to real PSD constraint transformation: @article{Fazel2001, author = {Fazel, M. and Hindi, H. and Boyd, S.P.}, title = {{A rank minimization heuristic with application to minimum order system approximation}}, doi = {10.1109/ACC.2001.945730}, journal = {Proc. American Control Conf.}, number = {2}, pages = {4734–4739}, url = {http://ieeexplore.ieee.org/lpdocs/epic03/wrapper.htm?arnumber=945730}, volume = {6}, year = {2001} }
PowerModelsDistribution.relaxation_psd_to_soc_real
— MethodSDP to SOC relaxation of type 2, applied to real-value matrix, as described in:
@article{Kim2003,
author = {Kim, S and Kojima, M and Yamashita, M},
title = {{Second order cone programming relaxation of a positive semidefinite constraint}},
doi = {10.1080/1055678031000148696},
journal = {Optimization Methods and Software},
number = {5},
pages = {535--541},
volume = {18},
year = {2003}
}
PowerModelsDistribution.relaxation_psd_to_soc_real_conic
— MethodSDP to SOC relaxation of type 2, applied to real-value matrix, as described in:
@article{Kim2003,
author = {Kim, S and Kojima, M and Yamashita, M},
title = {{Second order cone programming relaxation of a positive semidefinite constraint}},
doi = {10.1080/1055678031000148696},
journal = {Optimization Methods and Software},
number = {5},
pages = {535--541},
volume = {18},
year = {2003}
}
PowerModelsDistribution.run_ac_mc_opf
— MethodPowerModelsDistribution.run_ac_mc_opf_lm
— MethodPowerModelsDistribution.run_ac_mc_opf_oltc
— MethodPowerModelsDistribution.run_ac_mc_pf
— MethodPowerModelsDistribution.run_ac_mc_pf_lm
— MethodPowerModelsDistribution.run_dc_mc_opf_lm
— MethodPowerModelsDistribution.run_dc_mc_pf
— MethodPowerModelsDistribution.run_mc_mld
— MethodRun load shedding problem with storage
PowerModelsDistribution.run_mc_mld
— MethodPowerModelsDistribution.run_mc_mld_bf
— MethodRun Branch Flow Model Load Shedding Problem
PowerModelsDistribution.run_mc_mld_bf
— MethodPowerModelsDistribution.run_mc_mld_uc
— MethodRun unit commitment load shedding problem (!relaxed)
PowerModelsDistribution.run_mc_mld_uc
— MethodPowerModelsDistribution.run_mc_opf
— MethodPowerModelsDistribution.run_mc_opf
— MethodPowerModelsDistribution.run_mc_opf_bf
— MethodPowerModelsDistribution.run_mc_opf_bf
— MethodPowerModelsDistribution.run_mc_opf_bf_lm
— MethodPowerModelsDistribution.run_mc_opf_bf_lm
— MethodPowerModelsDistribution.run_mc_opf_lm
— MethodPowerModelsDistribution.run_mc_opf_lm
— MethodPowerModelsDistribution.run_mc_opf_oltc
— MethodPowerModelsDistribution.run_mc_opf_oltc
— MethodPowerModelsDistribution.run_mc_opf_pbs
— MethodOPF problem with slack power at every bus
PowerModelsDistribution.run_mc_opf_pbs
— MethodOPF problem with slack power at every bus
PowerModelsDistribution.run_mc_pf
— MethodPowerModelsDistribution.run_mc_pf
— MethodPowerModelsDistribution.run_mc_pf_bf
— MethodPowerModelsDistribution.run_mc_pf_bf
— MethodPowerModelsDistribution.run_mc_pf_lm
— MethodPowerModelsDistribution.run_mc_pf_lm
— MethodPowerModelsDistribution.run_mc_pf_pbs
— MethodPF problem with slack power at every bus
PowerModelsDistribution.run_mc_pf_pbs
— MethodPF problem with slack power at every bus
PowerModelsDistribution.variable_mc_active_bus_power_slack
— MethodPowerModelsDistribution.variable_mc_branch_current
— MethodPowerModelsDistribution.variable_mc_branch_current
— MethodPowerModelsDistribution.variable_mc_branch_flow
— MethodPowerModelsDistribution.variable_mc_branch_flow
— Methodbranch flow variables, delegated back to PowerModels
PowerModelsDistribution.variable_mc_branch_flow
— MethodPowerModelsDistribution.variable_mc_branch_flow_active
— Methodvariable: p[l,i,j]
for (l,i,j)
in arcs
PowerModelsDistribution.variable_mc_branch_flow_active
— MethodPowerModelsDistribution.variable_mc_branch_flow_ne_reactive
— Methodapo models ignore reactive power flows
PowerModelsDistribution.variable_mc_branch_flow_reactive
— Methodapo models ignore reactive power flows
PowerModelsDistribution.variable_mc_branch_flow_reactive
— Methodvariable: q[l,i,j]
for (l,i,j)
in arcs
PowerModelsDistribution.variable_mc_branch_series_current_prod_hermitian
— MethodPowerModelsDistribution.variable_mc_bus_power_slack
— Methodgenerates variables for both active
and reactive
slack at each bus
PowerModelsDistribution.variable_mc_bus_voltage_on_off
— MethodCreate voltage variables for branch flow model
PowerModelsDistribution.variable_mc_bus_voltage_on_off
— MethodPowerModelsDistribution.variable_mc_bus_voltage_on_off
— MethodPowerModelsDistribution.variable_mc_generation
— Methodcreate variables for generators, delegate to PowerModels
PowerModelsDistribution.variable_mc_generation
— MethodFor the matrix KCL formulation, the generator needs an explicit current and power variable.
PowerModelsDistribution.variable_mc_generation_current
— MethodFor the matrix KCL formulation, the generator needs an explicit current variable.
PowerModelsDistribution.variable_mc_generation_power
— MethodFor the matrix KCL formulation, the generator needs an explicit power variable.
PowerModelsDistribution.variable_mc_generation_reactive
— Methodapo models ignore reactive power flows
PowerModelsDistribution.variable_mc_indicator_bus_voltage
— MethodCreate variables for bus status
PowerModelsDistribution.variable_mc_indicator_demand
— MethodCreate variables for demand status
PowerModelsDistribution.variable_mc_indicator_generation
— MethodCreate variables for generator status
PowerModelsDistribution.variable_mc_indicator_shunt
— MethodCreate variables for shunt status
PowerModelsDistribution.variable_mc_indicator_storage
— MethodCreate variables for storage status
PowerModelsDistribution.variable_mc_load
— MethodCreate a dictionary with values of type Any for the load. Depending on the load model, this can be a parameter or a NLexpression. These will be inserted into KCL.
PowerModelsDistribution.variable_mc_load
— MethodThe variable creation for the loads is rather complicated because Expressions are used wherever possible instead of explicit variables. All loads need a current variable; for wye loads, this variable will be in the wye reference frame whilst for delta currents it will be in the delta reference frame. All loads need variables for the off-diagonals of the nodal power variables. In some cases, the diagonals elements can be created as Expressions. Delta loads only need a current variable and auxilary power variable (X), and all other load model variables are then linear transformations of these (linear Expressions).
PowerModelsDistribution.variable_mc_load
— MethodThe variable creation for the loads is rather complicated because Expressions are used wherever possible instead of explicit variables. Delta loads always need a current variable and auxilary power variable (X), and all other load model variables are then linear transformations of these (linear Expressions). Wye loads however, don't need any variables when the load is modelled as constant power or constant impedance. In all other cases (e.g. when a cone is used to constrain the power), variables need to be created.
PowerModelsDistribution.variable_mc_load_current
— MethodAll loads need a current variable; for wye loads, this variable will be in the wye reference frame whilst for delta currents it will be in the delta reference frame.
PowerModelsDistribution.variable_mc_load_delta_aux
— MethodCreates power matrix variable X for delta windings; this defines both the wye-side power Sy and the delta-side power Sd through the lin. transformations Sy = X.Td, Sd = Td.X with Td=[1 -1 0; 0 1 -1; -1 0 1]
See the paper by Zhao et al. for the first convex relaxation of delta transformations. @INPROCEEDINGS{zhaooptimal2017, author={C. Zhao, E. Dall'Anese and S. Low}, booktitle={IREP 2017 Bulk Power Systems Dynamics and Control Symposium}, title={{Optimal Power Flow in Multiphase Radial Networks with Delta Connections}}, year={2017}, month={}, url={https://www.nrel.gov/docs/fy18osti/67852.pdf} }
See upcoming paper for discussion of bounds. [reference added when accepted]
PowerModelsDistribution.variable_mc_load_power
— MethodThese variables reflect the power consumed by the load, NOT the power injected into the bus nodes; these variables only coincide for wye-connected loads with a grounded neutral.
PowerModelsDistribution.variable_mc_load_power_bus
— MethodThe bus qualifier denotes that this is the power withdrawn at the bus; Only for grounded wye-connected loads, this is the same as the power consumed by the multi-phase load. The off-diagonals only need to be created for the matrix KCL formulation.
PowerModelsDistribution.variable_mc_oltc_tap
— MethodCreate tap variables.
PowerModelsDistribution.variable_mc_on_off_storage
— MethodCreate variables for active
and reactive
storage injection
PowerModelsDistribution.variable_mc_on_off_storage_active
— MethodCreate variables for active
storage injection
PowerModelsDistribution.variable_mc_on_off_storage_reactive
— Methodapo models ignore reactive power flows
PowerModelsDistribution.variable_mc_on_off_storage_reactive
— MethodCreate variables for reactive
storage injection
PowerModelsDistribution.variable_mc_reactive_bus_power_slack
— MethodPowerModelsDistribution.variable_mc_reactive_generation_on_off
— Methodapo models ignore reactive power flows
PowerModelsDistribution.variable_mc_storage
— Methodvariables for modeling storage units, includes grid injection and internal variables
PowerModelsDistribution.variable_mc_storage_reactive
— Methodapo models ignore reactive power flows
PowerModelsDistribution.variable_mc_transformer_flow
— MethodCreates variables for both active
and reactive
power flow at each transformer.
PowerModelsDistribution.variable_mc_transformer_flow_active
— MethodCreate variables for the active power flowing into all transformer windings.
PowerModelsDistribution.variable_mc_transformer_flow_active
— MethodCreate variables for the active power flowing into all transformer windings
PowerModelsDistribution.variable_mc_transformer_flow_reactive
— Methodapo models ignore reactive power flows
PowerModelsDistribution.variable_mc_transformer_flow_reactive
— MethodCreate variables for the reactive power flowing into all transformer windings.
PowerModelsDistribution.variable_mc_voltage
— MethodPowerModelsDistribution.variable_mc_voltage
— MethodPowerModelsDistribution.variable_mc_voltage
— MethodPowerModelsDistribution.variable_mc_voltage
— Methodnothing to do, these models do not have complex voltage variables
PowerModelsDistribution.variable_mc_voltage
— MethodPowerModelsDistribution.variable_mc_voltage_angle
— MethodPowerModelsDistribution.variable_mc_voltage_imaginary
— MethodPowerModelsDistribution.variable_mc_voltage_magnitude
— MethodPowerModelsDistribution.variable_mc_voltage_magnitude_on_off
— Methodon/off voltage magnitude variable
PowerModelsDistribution.variable_mc_voltage_magnitude_sqr
— Methodvariable: w[i] >= 0
for i
in `buses
PowerModelsDistribution.variable_mc_voltage_magnitude_sqr_on_off
— Methodvoltage variable magnitude squared (relaxed form)
PowerModelsDistribution.variable_mc_voltage_prod_hermitian
— MethodPowerModelsDistribution.variable_mc_voltage_prod_hermitian
— MethodPowerModelsDistribution.variable_mc_voltage_real
— MethodPowerModelsDistribution.variable_mx_complex
— MethodShorthand to create two real matrix variables, where the first is the real part and the second the imaginary part. If the name argument is a String, it will be suffixed with 're' and 'im'. It is possible to specify the names of the real and imaginary part directly as a Tuple as well (to achieve P and Q instead of Sre and Sim for example).
PowerModelsDistribution.variable_mx_complex_with_diag
— MethodSame as variablemxcomplex, but square and the diagonal of the matrix variables consists of the constants passed as the diagre and diagim argument. The diag argument is a dictionary of (index, 1d-array) pairs. Useful for power matrices with specified diagonals (constant power wye loads).
PowerModelsDistribution.variable_mx_hermitian
— MethodReturns a pair of symmetric and skew-symmetric matrix variables.
PowerModelsDistribution.variable_mx_real
— MethodThis function creates a set of real matrix variables of size NxM, indexed over the elements of the indices argument. The upper and lower bounds have to be specified, and are dictionaries with the indices as keys and the matrix bounds as values. The name and prefix arguments will be combined into the base_name argument for JuMP; the prefix will typically be the network number nw. Instead of sequentially creating the matrix variables, the elements of the matrices are created sequentially for all matrices at once. I.e., we loop over the elements, and not over the indices. This is needed so that the variable names printed by JuMP are in line with the current design.
Returns a dictionary of (index, matrix variable) pairs
PowerModelsDistribution.variable_mx_real_skewsymmetric
— MethodSame as variablemxreal, but adds skew-symmetry structure.
PowerModelsDistribution.variable_mx_real_symmetric
— MethodSame as variablemxreal, but adds symmetry structure
PowerModelsDistribution.variable_mx_real_with_diag
— MethodSame as variablemxreal, but has to be square and the diagonal of the matrix variables consists of the elements passed as the diag argument. The diag argument is a dictionary of (index, 1d-array) pairs. Useful for power matrices with specified diagonals (constant power wye loads). If not specified, the diagonal elements are set to zero.
PowerModelsDistribution._conductor_matrix
— Constantfield names that should become multi-conductor matrix not arrays
PowerModelsDistribution._conductorless
— Constantfield names that should not be multi-conductor values
PowerModelsDistribution._constructors
— Constantlist of constructor functions for easy access
PowerModelsDistribution._like_exclusions
— Constantproperties that should be excluded from being overwritten during the application of like
PowerModelsDistribution._add_component!
— Method_add_component!(dss_data, ctype_name, compDict)
Adds a component of type ctype_name
with properties given by compDict
to the existing dss_data
structure. If a component of the same type has already been added to dss_data
, the new component is appeneded to the existing array of components of that type, otherwise a new array is created.
PowerModelsDistribution._add_property
— Method_add_property(compDict, key, value)
Adds a property to an existing component properties dictionary compDict
given the key
and value
of the property. If a property of the same name already exists inside compDict
, the original value is converted to an array, and the new value is appended to the end.
PowerModelsDistribution._add_shunt!
— MethodHelper function to add a new shunt. The shunt element is always inserted at the internal bus of the second winding in OpenDSS. If one of the branches of the loss model connected to this bus, has zero impedance (for example, if XHL==0 or XLT==0 or R[3]==0), then this bus might be removed by rmredundantpdelements!, in which case a new shunt should be inserted at the remaining bus of the removed branch.
PowerModelsDistribution._adjust_base!
— Methodfunction _adjust_base!(pmd_data)
Updates the voltage base at each bus, so that the ratios of the voltage bases across a transformer are consistent with the ratios of voltage ratings of the windings. Default behaviour is to start at the primary winding of the first transformer, and to propagate from there. Branches are updated; the impedances and addmittances are rescaled to be consistent with the new voltage bases.
PowerModelsDistribution._adjust_base_branch!
— MethodRescales the parameters of a branch to reflect a change in voltage base
PowerModelsDistribution._adjust_base_rec!
— MethodThis is the recursive code that goes with adjustbase!; adjustbase! initializes arrays and other data that is passed along in the calls to this recursive function. For very large networks, this might have to be rewritten to not rely on recursion.
PowerModelsDistribution._adjust_base_shunt!
— MethodRescales the parameters of a shunt to reflect a change in voltage base
PowerModelsDistribution._adjust_sourcegen_bounds!
— Method_adjust_sourcegen_bounds!(pmd_data)
Changes the bounds for the sourcebus generator by checking the emergamps of all of the branches attached to the sourcebus and taking the sum of non-infinite values. Defaults to Inf if all emergamps connected to sourcebus are also Inf. This method was updated to include connected transformers as well. It know has to occur after the call to InfrastructureModels.arraystodicts, so the code was adjusted to accomodate that.
PowerModelsDistribution._apply_like!
— Methodapplies like
to component
PowerModelsDistribution._apply_ordered_properties
— MethodPowerModelsDistribution._assign_property!
— Method_assign_property!(dss_data, cType, cName, propName, propValue)
Assigns a property with name propName
and value propValue
to the component of type cType
named cName
in dss_data
.
PowerModelsDistribution._bank_transformers!
— MethodCombines transformers with 'bank' keyword into a single transformer
PowerModelsDistribution._build_mc_ucopf
— MethodPowerModelsDistribution._build_mn_mc_opf
— MethodPowerModelsDistribution._build_mn_mc_opf_strg
— Methodwarning: this model is not realistic or physically reasonable, it is only for test coverage
PowerModelsDistribution._calc_branch_current_max_frto
— MethodReturns a total (shunt+series) current magnitude bound for the from and to side of a branch. The total power rating also implies a current bound through the lower bound on the voltage magnitude of the connected buses.
PowerModelsDistribution._calc_branch_power_ub_frto
— MethodReturns a total (shunt+series) power magnitude bound for the from and to side of a branch. The total current rating also implies a current bound through the upper bound on the voltage magnitude of the connected buses.
PowerModelsDistribution._calc_branch_series_current_ub
— MethodReturns a valid series current magnitude bound for a branch.
PowerModelsDistribution._calc_bus_vm_ll_bounds
— MethodReturns bounds in line-to-line bounds on the voltage magnitude. If these are not part of the problem specification, then a valid upper bound is implied by the line-to-neutral bounds, but a lower bound (greater than zero) is not. Therefore, a default lower bound is then used, specified by the keyword argument vdmin_eps. The returned bounds are for the pairs 1->2, 2->3, 3->1
PowerModelsDistribution._calc_gen_current_max
— MethodReturns a current magnitude bound for the generators.
PowerModelsDistribution._calc_load_current_magnitude_bounds
— MethodReturns magnitude bounds for the current going through the load.
PowerModelsDistribution._calc_load_current_max
— MethodReturns a magnitude bound for the current going through the load.
PowerModelsDistribution._calc_load_pq_bounds
— MethodCalculates lower and upper bounds for the loads themselves (not the power withdrawn at the bus).
PowerModelsDistribution._calc_load_vbounds
— MethodReturns the voltage magnitude bounds for the individual load elements in a multiphase load. These are inferred from vmin/vmax for wye loads and from calcbusvmll_bounds for delta loads.
PowerModelsDistribution._calc_mc_transformer_Tvi
— MethodPowerModelsDistribution._calc_mc_voltage_product_bounds
— MethodPowerModelsDistribution._check_load_needs_cone
— MethodReturns a Bool, indicating whether the convex hull of the voltage-dependent relationship needs a cone inclusion constraint.
PowerModelsDistribution._correct_duplicate_components!
— Method_correct_duplicate_components!(dss_data)
Finds duplicate components in dss_data
and merges up, meaning that older data (lower indices) is always overwritten by newer data (higher indices).
PowerModelsDistribution._create_capacitor
— Function_create_capacitor(bus1, name, bus2=0; kwargs)
Creates a Dict{String,Any} containing all of the expected properties for a Capacitor. If bus2
is not specified, the capacitor will be treated as a shunt. See OpenDSS documentation for valid fields and ways to specify the different properties.
PowerModelsDistribution._create_generator
— Function_create_generator(bus1, name; kwargs...)
Creates a Dict{String,Any} containing all of the expected properties for a Generator. See OpenDSS documentation for valid fields and ways to specify the different properties.
PowerModelsDistribution._create_line
— Function_create_line(bus1, bus2, name; kwargs...)
Creates a Dict{String,Any} containing all of the properties for a Line. See OpenDSS documentation for valid fields and ways to specify the different properties.
PowerModelsDistribution._create_linecode
— Function_create_linecode(name; kwargs...)
Creates a Dict{String,Any} containing all of the properties of a Linecode. See OpenDSS documentation for valid fields and ways to specify the different properties. DEPRECIATED: Calculation all done inside of createline() due to Rg, Xg. Merge linecode values into line kwargs values BEFORE calling createline(). This is now mainly used for parsing linecode dicts into correct data types.
PowerModelsDistribution._create_load
— Function_create_load(bus1, name; kwargs...)
Creates a Dict{String,Any} containing all of the expected properties for a Load. See OpenDSS documentation for valid fields and ways to specify the different properties.
PowerModelsDistribution._create_pvsystem
— Function_create_pvsystem(bus1, name; kwargs...)
Creates a Dict{String,Any} containing all of the expected properties for a PVSystem. See OpenDSS document https://github.com/tshort/OpenDSS/blob/master/Doc/OpenDSS%20PVSystem%20Model.doc for valid fields and ways to specify the different properties.
PowerModelsDistribution._create_reactor
— Function_create_reactor(bus1, name, bus2=0; kwargs...)
Creates a Dict{String,Any} containing all of the expected properties for a Reactor. If bus2
is not specified Reactor is treated like a shunt. See OpenDSS documentation for valid fields and ways to specify the different properties.
PowerModelsDistribution._create_sourcebus_vbranch!
— MethodCreates a virtual branch between the virtual_sourcebus
and sourcebus
with the impedance given by circuit
PowerModelsDistribution._create_storage
— Function_create_storage(bus1, name; kwargs...)
Creates a Dict{String,Any} containing all expected properties for a storage element. See OpenDSS documentation for valid fields and ways to specify the different properties.
PowerModelsDistribution._create_transformer
— Function_create_transformer(name; kwargs...)
Creates a Dict{String,Any} containing all of the expected properties for a Transformer. See OpenDSS documentation for valid fields and ways to specify the different properties.
PowerModelsDistribution._create_vbranch!
— MethodThis function adds a new branch to the data model and returns its dictionary. It is virtual in the sense that it does not correspond to a branch in the network, but is part of the decomposition of the transformer.
PowerModelsDistribution._create_vbus!
— MethodThis function adds a new bus to the data model and returns its dictionary. It is virtual in the sense that it does not correspond to a bus in the network, but is part of the decomposition of the transformer.
PowerModelsDistribution._create_vsource
— Function_create_vsource(bus1, name, bus2=0; kwargs...)
Creates a Dict{String,Any} containing all of the expected properties for a Voltage Source. If bus2
is not specified, VSource will be treated like a generator. Mostly used as sourcebus
which represents the circuit. See OpenDSS documentation for valid fields and ways to specify the different properties.
PowerModelsDistribution._decompose_transformers!
— Methodfunction _decompose_transformers!(pmd_data)
Replaces complex transformers with a composition of ideal transformers and branches which model losses. New buses (virtual, no physical meaning) are added.
PowerModelsDistribution._discover_buses
— Method_discover_buses(dss_data)
Discovers all of the buses (not separately defined in OpenDSS), from "lines".
PowerModelsDistribution._dss2pmd_branch!
— Method_dss2pmd_branch!(pmd_data, dss_data, import_all)
Adds PowerModels-style branches to pmd_data
from dss_data
.
PowerModelsDistribution._dss2pmd_bus!
— Function_dss2pmd_bus!(pmd_data, dss_data)
Adds PowerModels-style buses to pmd_data
from dss_data
.
PowerModelsDistribution._dss2pmd_gen!
— Method_dss2pmd_gen!(pmd_data, dss_data, import_all)
Adds PowerModels-style generators to pmd_data
from dss_data
.
PowerModelsDistribution._dss2pmd_load!
— Method_dss2pmd_load!(pmd_data, dss_data, import_all)
Adds PowerModels-style loads to pmd_data
from dss_data
.
PowerModelsDistribution._dss2pmd_pvsystem!
— Method_dss2pmd_pvsystem!(pmd_data, dss_data)
Adds PowerModels-style pvsystems to pmd_data
from dss_data
.
PowerModelsDistribution._dss2pmd_reactor!
— Method_dss2pmd_reactor!(pmd_data, dss_data, import_all)
Adds PowerModels-style branch components based on DSS reactors to pmd_data
from dss_data
PowerModelsDistribution._dss2pmd_shunt!
— Method_dss2pmd_shunt!(pmd_data, dss_data, import_all)
Adds PowerModels-style shunts to pmd_data
from dss_data
.
PowerModelsDistribution._dss2pmd_storage!
— Method_dss2pmd_storage!(pmd_data, dss_data, import_all)
Adds PowerModels-style storage to pmd_data
from dss_data
PowerModelsDistribution._dss2pmd_transformer!
— Method_dss2pmd_transformer!(pmd_data, dss_data, import_all)
Adds ThreePhasePowerModels-style transformers to pmd_data
from dss_data
.
PowerModelsDistribution._find_ref_buses
— MethodPowerModelsDistribution._get_conductors_ordered
— Method_get_conductors_ordered(busname; neutral=true)
Returns an ordered list of defined conductors. If ground=false, will omit any 0
PowerModelsDistribution._get_dtypes
— MethodReturns a Dict{String,Type} for the desired component comp
, giving all of the expected data types
PowerModelsDistribution._get_linecode
— Methodreturns the linecode with name id
PowerModelsDistribution._get_prop_name
— Method_get_prop_name(ctype)
Returns the property names in order for a given component type ctype
.
PowerModelsDistribution._isa_array
— Methodchecks if data
is an opendss-style array string
PowerModelsDistribution._isa_conn
— Methodchecks is a string is a connection by checking the values
PowerModelsDistribution._isa_matrix
— Methodchecks if data
is an opendss-style matrix string
PowerModelsDistribution._isa_rpn
— Methoddetects if expr
is Reverse Polish Notation expression
PowerModelsDistribution._load_expmodel_params
— MethodReturns the exponential load model parameters for a load. For an exponential load it simply returns certain data model properties, whilst for constantpower, constantcurrent and constant_impedance it returns the equivalent exponential model parameters.
PowerModelsDistribution._make_full_matrix_variable
— MethodPowerModelsDistribution._make_hermitian_matrix_variable
— MethodPowerModelsDistribution._make_matrix_variable_element
— MethodSometimes we want to bound only a subset of the elements of a matrix variable. For example, an unbounded Hermitian variable usually still has a lower bound of zero on the real diagonal elements. When there is a mix of bounded and unbounded elements, the unboundedness is encoded as 'Inf' and '-Inf' in the bound parameters. This cannot be passed directlty to JuMP, because it would lead to an error in Mosek for example. Instead, this method checks whether all bounds for an element (n,m) are Inf, and if so, does not pass a bound to JuMP.
PowerModelsDistribution._make_multiconductor!
— MethodPowerModelsDistribution._mat2ltrivec!
— MethodPowerModelsDistribution._mat2utrivec!
— MethodPowerModelsDistribution._merge_dss!
— Method_merge_dss!(dss_prime, dss_to_add)
Merges two (partially) parsed OpenDSS files to the same dictionary dss_prime
. Used in cases where files are referenced via the "compile" or "redirect" OpenDSS commands inside the originating file.
PowerModelsDistribution._parse_array
— Functionparse matrices according to active nodes
PowerModelsDistribution._parse_array
— Method_parse_array(dtype, data)
Parses a OpenDSS style array string data
into a one dimensional array of type dtype
. Array strings are capped by either brackets, single quotes, or double quotes, and elements are separated by spaces.
PowerModelsDistribution._parse_buscoords
— Method_parse_buscoords(file)
Parses a Bus Coordinate file
, in either "dat" or "csv" formats, where in "dat", columns are separated by spaces, and in "csv" by commas. File expected to contain "bus,x,y" on each line.
PowerModelsDistribution._parse_busname
— Method_parse_busname(busname)
Parses busnames as defined in OpenDSS, e.g. "primary.1.2.3.0".
PowerModelsDistribution._parse_component
— Function_parse_component(component, properies, compDict=Dict{String,Any}())
Parses a component
with properties
into a compDict
. If compDict
is not defined, an empty dictionary will be used. Assumes that unnamed properties are given in order, but named properties can be given anywhere.
PowerModelsDistribution._parse_conn
— Methodparses connection "conn" specification reducing to wye or delta
PowerModelsDistribution._parse_dss_source_id
— MethodParses a component's OpenDSS source information into the dss_source_id
struct
PowerModelsDistribution._parse_element_with_dtype
— Methodparses the raw dss values into their expected data types
PowerModelsDistribution._parse_line
— Function_parse_line(elements, curCompDict=Dict{String,Any}())
Parses an already separated line given by elements
(an array) of an OpenDSS file into curCompDict
. If not defined, curCompDict
is an empty dictionary.
PowerModelsDistribution._parse_matrix
— Method_parse_matrix(dtype, data)
Parses a OpenDSS style triangular matrix string data
into a two dimensional array of type dtype
. Matrix strings are capped by either parenthesis or brackets, rows are separated by "|", and columns are separated by spaces.
PowerModelsDistribution._parse_matrix
— Methodparse matrices according to active nodes
PowerModelsDistribution._parse_properties
— Method_parse_properties(properties)
Parses a string of properties
of a component type, character by character into an array with each element containing (if present) the property name, "=", and the property value.
PowerModelsDistribution._parse_rpn
— Functionparses Reverse Polish Notation expr
PowerModelsDistribution._push_dict_ret_key!
— MethodThis function appends a component to a component dictionary of a pmd data model
PowerModelsDistribution._reorder_matrix
— MethodReorders a matrix
based on the order that phases are listed in on the from- (pof
) and to-sides (pot
)
PowerModelsDistribution._replace_nan
— MethodReplaces NaN values with zeros
PowerModelsDistribution._rm_redundant_pd_elements!
— MethodThis function removes zero impedance branches. Only for transformer loss model! Branches with zero impedances are deleted, and one of the buses it connects. For now, the implementation should only be used on the loss model of transformers. When deleting buses, references at shunts, loads... should be updated accordingly. In the current implementation, that is only done for shunts. The other elements, such as loads, do not appear in the transformer loss model.
PowerModelsDistribution._roll
— Methodrolls a 1d array left or right by idx
PowerModelsDistribution._run_mc_ucopf
— MethodPowerModelsDistribution._run_mn_mc_opf
— MethodPowerModelsDistribution._run_mn_mc_opf_strg
— MethodPowerModelsDistribution._sc2br_impedance
— MethodConverts a set of short-circuit tests to an equivalent reactance network. Reference: R. C. Dugan, “A perspective on transformer modeling for distribution system analysis,” in 2003 IEEE Power Engineering Society General Meeting (IEEE Cat. No.03CH37491), 2003, vol. 1, pp. 114-119 Vol. 1.
PowerModelsDistribution._sqr
— MethodSquares x
, for parsing Reverse Polish Notation
PowerModelsDistribution._strip_comments
— MethodStrips comments, defined by "!" from the ends of lines
PowerModelsDistribution._strip_lines
— Methodstrips lines that are either commented (block or single) or empty
PowerModelsDistribution._to_sym_keys
— Methodconverts Dict{String,Any} to Dict{Symbol,Any} for passing as kwargs
PowerModelsDistribution._vec2ltri!
— MethodPowerModelsDistribution._vec2utri!
— Methodhttps://stackoverflow.com/questions/39039553/lower-triangular-matrix-in-julia
PowerModelsDistribution._where_is_comp
— Method_where_is_comp(data, comp_id)
Finds existing component of id comp_id
in array of data
and returns index. Assumes all components in data
are unique.
PowerModelsDistribution._wrap_to_180
— Methodwraps angles in degrees to 180
PowerModelsDistribution._wrap_to_pi
— Methodwraps angles in radians to pi