Internal Functions
PowerModelsDistribution._1to1_maps
— Constantitems that are mapped one-to-one from engineering to math models
PowerModelsDistribution._CPF_COMPONENT_INTERFACES
— ConstantA mapping of supported component types to their functional interfaces.
PowerModelsDistribution._array_delimiters
— Constantdifferent acceptable delimiters for arrays
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._convert_to_meters
— Constantconversion factors for units to meters
PowerModelsDistribution._double_operators
— Constanttwo number operators for reverse polish notation
PowerModelsDistribution._dss2pmd_capcontrol_type
— Constantdss to pmd capcontrol type
PowerModelsDistribution._dss2pmd_load_model
— Constantdss to pmd load model
PowerModelsDistribution._dss_array_regex
— Constantregex for dss arrays
PowerModelsDistribution._dss_cmd_buscoords_regex
— Constantregex for dss 'buscoords' command
PowerModelsDistribution._dss_cmd_more_regex
— Constantregex for dss 'more' command
PowerModelsDistribution._dss_cmd_new_regex
— Constantregex for dss 'new' command
PowerModelsDistribution._dss_cmd_set_regex
— Constantregex for dss 'set' command
PowerModelsDistribution._dss_control_objects
— Constantall objects that define controls
PowerModelsDistribution._dss_data_objects
— Constantall data holding objects
PowerModelsDistribution._dss_edge_objects
— Constantall edge types that can help define buses
PowerModelsDistribution._dss_matrix_regex
— Constantregex for dss matrices
PowerModelsDistribution._dss_monitor_objects
— Constantall objects that provide montoring
PowerModelsDistribution._dss_node_objects
— Constantall node types that can help define buses
PowerModelsDistribution._dss_property_renames
— Constantcollection of dss properties that have been renamed (i.e., deprecated)
PowerModelsDistribution._dss_rpn_array_sep_regex
— Constantregex for dss rpn arrays
PowerModelsDistribution._dss_short_prop_names_map
— Constantconst built at import of short property names
PowerModelsDistribution._dss_supported_commands
— Constantsupported dss commands
PowerModelsDistribution._dss_supported_components
— Constantcomponents currently supported for automatic data type parsing
PowerModelsDistribution._dss_unsupported_commands
— Constantunsupported dss commands
PowerModelsDistribution._eng_edge_elements
— Constantlist of edge type elements in the engineering model
PowerModelsDistribution._eng_model_checks
— Constantdata check functions for the engineering data model
PowerModelsDistribution._eng_model_dtypes
— ConstantData types of accepted fields in the engineering data model
PowerModelsDistribution._eng_model_req_fields
— Constantrequired fields in the engineering data model
PowerModelsDistribution._eng_node_elements
— Constantlist of nodal type elements in the engineering model
PowerModelsDistribution._like_exclusions
— Constantproperties that should be excluded from being overwritten during the application of like
PowerModelsDistribution._loss_model_objects
— Constantcollect of components and their properties that define loss models when transforming to the MATHEMATICAL model
PowerModelsDistribution._math_dispatchable_elements
— Constantlist of math asset types that are dispatchable
PowerModelsDistribution._math_edge_elements
— Constantlist of edge type elements in the engineering model
PowerModelsDistribution._math_node_elements
— Constantlist of nodal type elements in the engineering model
PowerModelsDistribution._pmd_math_global_keys
— Constantlist of multinetwork keys that belong at the root level
PowerModelsDistribution._single_operators
— Constantsingle number operators in reverse polish notation
Base.delete!
— MethodBase.delete! for InfrastructureModel,InfrastructureObject to give them Dict-like behavior
Base.delete!
— MethodBase.delete! for InfrastructureModel,InfrastructureObject to give them Dict-like behavior
Base.eltype
— MethodBase.eltype for InfrastructureModel,InfrastructureObject to give them Dict-like behavior
Base.get
— MethodBase.get for InfrastructureModel,InfrastructureObject to give them Dict-like behavior
Base.getindex
— MethodBase.getindex for InfrastructureModel,InfrastructureObject to give them Dict-like behavior
Base.getproperty
— MethodBase.getproperty for InfrastructureModel,InfrastructureObject to give them Dict-like behavior
Base.haskey
— MethodBase.haskey for InfrastructureModel,InfrastructureObject to give them Dict-like behavior
Base.isempty
— MethodBase.isempty for InfrastructureModel,InfrastructureObject to give them Dict-like behavior
Base.iterate
— MethodBase.iterate for InfrastructureModel,InfrastructureObject to give them Dict-like behavior
Base.keys
— MethodBase.keys for InfrastructureModel,InfrastructureObject to give them Dict-like behavior
Base.keytype
— MethodBase.keytype for InfrastructureModel,InfrastructureObject to give them Dict-like behavior
Base.length
— MethodBase.length for InfrastructureModel,InfrastructureObject to give them Dict-like behavior
Base.merge!
— MethodBase.merge! for InfrastructureModel,InfrastructureObject to give them Dict-like behavior
Base.parse
— MethodParses dss capacitor control type into CapControlType enum
Base.parse
— MethodParses dss conn properties into ConnConfig enum
Base.parse
— MethodParses dss load model into LoadModel enum
Base.parse
— MethodParses dss enabled property into Status enum
Base.parse
— Methodparser to pass through String
Base.parse
— Methodparses a dss type matrix into Matrix{T}
Base.parse
— Methodparses a dss type vector into Vector{T}
Base.setindex!
— MethodBase.setindex! for InfrastructureModel,InfrastructureObject to give them Dict-like behavior
Base.setproperty!
— MethodBase.setproperty! for InfrastructureModel,InfrastructureObject to give them Dict-like behavior
Base.setproperty!
— MethodBase.show
— MethodBase.show variant for InfrastructureModel,InfrastructureObject to make them Dict-like
Base.show
— MethodBase.show variant for InfrastructureModel,InfrastructureObject to make them Dict-like
Base.summary
— MethodBase.summary for InfrastructureModel,InfrastructureObject to give them Dict-like behavior
Base.valtype
— MethodBase.valtype for InfrastructureModel,InfrastructureObject to give them Dict-like behavior
Base.zero
— MethodBase.zero for Char
Base.zero
— MethodBase.zero for ConnConfig enum
Base.zero
— MethodBase.zero for Dispatchable enum
Base.zero
— MethodBase.zero for LoadModel enum
Base.zero
— MethodBase.zero for ShuntModel enum
Base.zero
— MethodBase.zero for Status enum
Base.zero
— MethodBase.zero for String
Base.zero
— MethodBase.zero for SwitchState enum
InfrastructureModels.build_solution_values
— Methodcustom build_solution_values
for multiconductor (vector) JuMP expressions
InfrastructureModels.build_solution_values
— Methodcustom build_solution_values
for generic dense axis arrays
InfrastructureModels.build_solution_values
— Methodcustom build_solution_values
for multiconductor (vector) constants
InfrastructureModels.build_solution_values
— Methodcustom build_solution_values
for multiconductor (vector) constants
InfrastructureModels.solution_preprocessor
— MethodDefinition of the default solution preprocessor for PowerModelsDistribution
PowerModelsDistribution._add_eng_obj!
— Methodadd engineering data object to engineering data model
PowerModelsDistribution._add_gen_cost_model!
— Methodconvert cost model names
PowerModelsDistribution._add_implicit_absolute_bounds!
— MethodWhen a terminal is grounded, any pairwise bounds it occurs in imply an absolute bound for the other terminal in the pair. This method converts such pairwise bounds to absolute ones.
PowerModelsDistribution._add_unused_kwargs!
— Methodadds kwargs that were specified but unused by the required defaults to the component
PowerModelsDistribution._adjust_line_limits!
— Method_adjust_line_limits!(data_eng::Dict{String,<:Any}, mult::Real)
Multiplies limits (sm_ub
and/or cm_ub
) on line objects (line
, linecode
, switch
) by a multiplier mult
PowerModelsDistribution._adjust_small_line_admittances!
— Method_adjust_small_line_admittances!(data_eng::Dict{String,<:Any}; min_admittance_val::Real=1e-2, replace_admittance_val::Real=0.0)
Replaces admittances (gfr, gto, bfr, bto) on lines, linecodes, and switches lower than min_admittance_val
with replace_admittance_val
.
PowerModelsDistribution._adjust_small_line_impedances!
— Method_adjust_small_line_impedances!(data_eng::Dict{String,<:Any}; min_impedance_val::Real=1e-2, replace_impedance_val::Real=0.0)
Replaces impedances (rs, xs) on lines, linecodes, and switches lower than min_impedance_val
with replace_impedance_val
.
PowerModelsDistribution._adjust_small_line_lengths!
— Method_adjust_small_line_lengths!(data_eng::Dict{String,<:Any}; min_length_val::Real=25.0, replace_length_val::Real=0.0)
Replaces length on lines, switches lower than min_length_val
with replace_length_val
.
PowerModelsDistribution._adjust_transformer_limits!
— Method_adjust_transformer_limits!(data_eng::Dict{String,<:Any}, mult::Real)
Multiplies limits (sm_ub
and/or cm_ub
) on transformer objects by a multiplier mult
PowerModelsDistribution._admittance_conversion
— Methodconverts admittance by multiplying by 2πωl
PowerModelsDistribution._apply_filter!
— MethodFilters out values of a vector or matrix for certain properties (transformer winding variant)
PowerModelsDistribution._apply_filter!
— MethodFilters out values of a vector or matrix for certain properties
PowerModelsDistribution._apply_func_vals
— Methodhelper to apply function values
PowerModelsDistribution._apply_kron_reduction!
— Method_apply_kron_reduction!(data_eng::Dict{String,<:Any}; kr_phases::Union{Vector{Int},Vector{String}}=[1,2,3], kr_neutral::Union{Int,String}=4)
Applies a Kron Reduction to the network, reducing out the kr_neutral
, leaving only the kr_phases
PowerModelsDistribution._apply_linecode!
— Methodapplies a linecode to a line in preparation for converting to mathematical model
PowerModelsDistribution._apply_phase_projection!
— Method_apply_phase_projection!(data_eng::Dict{String,<:Any})
pad matrices and vectors to max number of conductors
PowerModelsDistribution._apply_phase_projection_delta!
— Method_apply_phase_projection_delta!(data_eng::Dict{String,<:Any})
phase projection for components where unprojected states are not yet supported (delta configurations).
PowerModelsDistribution._apply_property_pairs
— MethodPowerModelsDistribution._apply_property_pairs
— MethodPowerModelsDistribution._apply_property_pairs
— MethodPowerModelsDistribution._apply_property_pairs
— MethodPowerModelsDistribution._apply_property_pairs
— MethodPowerModelsDistribution._apply_property_pairs
— MethodPowerModelsDistribution._apply_property_pairs
— MethodPowerModelsDistribution._apply_voltage_angle_difference_bounds!
— Function_apply_voltage_angle_difference_bounds!(eng::Dict{String,<:Any}, vad::Real=5.0)
Applies voltage angle difference bound given by vad::Real
in degrees (i.e., the allowed drift of angle from one end of a line to another) to all lines. By default, vad=5.0
.
PowerModelsDistribution._apply_voltage_bounds!
— Method_apply_voltage_bounds!(data_eng::Dict{String,<:Any}; vm_lb::Union{Real,Missing}=0.9, vm_ub::Union{Real,Missing}=1.1)
add voltage bounds to all buses based on per-unit upper (vm_ub
) and lower (vm_lb
), scaled by the bus's voltage based
PowerModelsDistribution._apply_xfmrcode!
— Methodapplies a xfmrcode to a transformer in preparation for converting to mathematical model
PowerModelsDistribution._bank_transformers!
— MethodCombines transformers with 'bank' keyword into a single transformer
PowerModelsDistribution._barrel_roll
— Methodshifts a vector by shift
spots to the left
PowerModelsDistribution._biggest_der
— Methodfinds the largest active generation asset (gen, storage) in an island
PowerModelsDistribution._biggest_generator
— Methodfind the largest active generator in a collection of generators
PowerModelsDistribution._bts_to_start_voltage
— Method_bts_to_start_voltage(
dm::Dict
)
Assigns the initialisation voltages to appropriate bus terminals.
PowerModelsDistribution._build_bus_shunt_matrices
— Methodhelper function to build bus shunt matrices for power balance constraints
PowerModelsDistribution._build_loss_model!
— Methodloss model builder for transformer decomposition
PowerModelsDistribution._build_mc_mn_opb
— Method_build_mc_mn_opb(pm::AbstractUnbalancedPowerModel)
Constructor for Optimal Power Balance
PowerModelsDistribution._build_mc_osw
— Methodconstructor for branch flow osw
PowerModelsDistribution._build_mc_osw
— Methodconstructor for OSW in current-voltage variable space
PowerModelsDistribution._build_mc_osw
— MethodConstructor for Optimal Switching
PowerModelsDistribution._build_mc_osw_mi
— Method_build_mc_osw_mi(pm::AbstractUBFModels)
constructor for mixed-integer branch flow osw
PowerModelsDistribution._build_mc_osw_mi
— MethodConstructor for Optimal Switching
PowerModelsDistribution._build_time_series_reference!
— Methodhelper function to properly reference time series variables from opendss
PowerModelsDistribution._calc_branch_current_max
— 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_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_max
— 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_power_max_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_max
— 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_comp_lines
— Method_calc_comp_lines(component::Dict{String,<:Any})
compute lines in m and b from from pwl cost models
PowerModelsDistribution._calc_connected_components_eng
— Methodcomputes the connected components of the network graph returns a set of sets of bus ids, each set is a connected component
PowerModelsDistribution._calc_connected_components_math
— Methodcomputes the connected components of the network graph returns a set of sets of bus ids, each set is a connected component
PowerModelsDistribution._calc_gen_current_max
— MethodReturns a current magnitude bound for the generators.
PowerModelsDistribution._calc_ground_shunt_admittance_matrix
— MethodGiven a set of terminals 'cnds' with associated shunt admittance 'Y', this method will calculate the reduced admittance matrix if terminal 'ground' is grounded.
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_max_cost_index
— Method_calc_max_cost_index(data::Dict{String,<:Any})
Computes maximum cost index of subnetworks
PowerModelsDistribution._calc_shunt
— MethodGiven a set of addmittances 'y' connected from the conductors 'fcnds' to the conductors 'tcnds', this method will return a list of conductors 'cnd' and a matrix 'Y', which will satisfy I[cnds] = Y*V[cnds].
PowerModelsDistribution._calc_transformer_current_max_frto
— MethodReturns a current magnitude bound for the from and to side of a transformer. The total power rating also implies a current bound through the lower bound on the voltage magnitude of the connected buses.
PowerModelsDistribution._calc_transformer_power_ub_frto
— MethodReturns a power magnitude bound for the from and to side of a transformer. The total current rating also implies a current bound through the upper bound on the voltage magnitude of the connected buses.
PowerModelsDistribution._calc_voltage_bases
— Method_calc_voltage_bases(data_model::Dict{String,<:Any}, vbase_sources::Dict{String,<:Real}, edge_elements::Vector{String})::Tuple{Dict,Dict}
Calculates voltage bases for each voltage zone for buses and branches given a list of edge_elements
PowerModelsDistribution._cc_dfs
— MethodDFS on a graph
PowerModelsDistribution._check_branch_loops
— Methodchecks that all branches connect two distinct buses
PowerModelsDistribution._check_bus
— Methodbus data checks
PowerModelsDistribution._check_bus_and_terminals
— Functionchecks bus_name
exists and has terminals
PowerModelsDistribution._check_configuration_infer_dim
— Methodchecks the connection configuration and infers the dimensions of the connection (number of connected terminals)
PowerModelsDistribution._check_connectivity
— Methodchecks connectivity of object
PowerModelsDistribution._check_connectivity
— Methodchecks that all buses are unique and other components link to valid buses
PowerModelsDistribution._check_eng_component_dtypes
— Methodchecks that an engineering model component has the correct data types
PowerModelsDistribution._check_equal
— Methodchecks if data structures are equivalent, and if not, will enumerate the differences
PowerModelsDistribution._check_generator
— Methodgenerator data checks
PowerModelsDistribution._check_has_keys
— Methodchecks that a component has fields
PowerModelsDistribution._check_has_size
— Methodcheck that fields
has size data_size
PowerModelsDistribution._check_line
— Methodline data checks
PowerModelsDistribution._check_linecode
— Methodlinecode data checks
PowerModelsDistribution._check_load
— Methodload data checks
PowerModelsDistribution._check_load_needs_cone
— MethodReturns a Bool, indicating whether the convex hull of the voltage-dependent relationship needs a cone inclusion constraint.
PowerModelsDistribution._check_same_size
— Methodcheck that all data in fields
have the same size
PowerModelsDistribution._check_shunt
— Methodshunt data checks
PowerModelsDistribution._check_shunt_capacitor
— Methodshunt capacitor data checks
PowerModelsDistribution._check_transformer
— MethodTransformer, n-windings three-phase lossy data checks
PowerModelsDistribution._check_var_keys
— Methodchecks if a sufficient number of variables exist for the given keys collection
PowerModelsDistribution._check_voltage_source
— Methodvoltage source data checks
PowerModelsDistribution._collect_nw_bus_lookups!
— MethodPowerModelsDistribution._collect_nw_maps!
— MethodPowerModelsDistribution._compose_yprim_banked_ideal_transformers_Dyg
— MethodcomposeyprimbankedidealtransformersDyg( ts::Vector, npairsfr::Tuple, npairsto::Tuple, ppm::Float )
Modifies ideal delta-wye_grounded transformers to avoid singularity error, through the ppm value, inspired by OpenDSS.
PowerModelsDistribution._compose_yprim_banked_ideal_transformers_Ygyg
— MethodcomposeyprimbankedidealtransformersYgyg( ts::Vector, npairsfr::Tuple, npairsto::Tuple, ppm::Float )
Modifies ideal wyegrounded-wyegrounded transformers to avoid singularity error, through the ppm value, inspired by OpenDSS.
PowerModelsDistribution._compose_yprim_banked_ideal_transformers_Yy
— Method_compose_yprim_banked_ideal_transformers_Yy(
ts::Vector,
npairs_fr::Tuple,
npairs_to::Tuple,
ppm::Float
)
Modifies ideal wye-wye transformers to avoid singularity error, through the ppm value, inspired by OpenDSS.
PowerModelsDistribution._compute_Uv
— Method_compute_Uv(
pfd::PowerFlowData,
max_iter::Int,
stat_tol::Float,
verbose::Bool
)
Computes a nonlinear AC power flow in rectangular coordinates based on the admittance matrix of the network data using the fixed-point current injection method (See https://arxiv.org/abs/2305.04405). Returns a solution data structure in PowerModelsDistribution Dict format.
PowerModelsDistribution._compute_bus_type
— Methodcomputes the bus type based on existing bustype, the status of the generation object, and the controlmode
PowerModelsDistribution._compute_mc_pf
— Method_compute_mc_pf(
data_math::Dict{String,<:Any};
v_start::Union{Dict{<:Any,<:Any},Missing}=missing,
explicit_neutral::Bool=false,
max_iter::Int=100,
stat_tol::Real=1E-8,
verbose::Bool=false
)::Dict{String,Any}
Computes native power flow and outputs the result dict (See https://arxiv.org/abs/2305.04405).
Abbreviations:
- ntype: node type (variable, fixed, grounded, virtual)
- bts: bus-terminals for the component
- ns: nodes
- vns: virtual nodes
- nr_vns: number of virtual nodes
- y_prim: primitive admittance matrix for the component
- cnlfunc: nonlinear compensation current function handle for the component
- ctotsfunc: total current function handle for the component
PowerModelsDistribution._convert_grounding
— Methodlossy grounding to perfect grounding and shunts
PowerModelsDistribution._convert_model_to_dict
— MethodHelper function to convert InfrastructureModel,InfrastructureObject into Dict{String,Any}
PowerModelsDistribution._correct_branch_directions!
— Methodchecks that all parallel branches have the same orientation
PowerModelsDistribution._correct_bus_types!
— Methodchecks bus types are suitable for a power flow study, if not, fixes them. the primary checks are that all type 2 buses (i.e., PV) have a connected and active generator and there is a single type 3 bus (i.e., slack bus) with an active connected generator. Assumes that the network is a single connected component
PowerModelsDistribution._correct_cost_function!
— Methodthrows warnings if cost functions are malformed
PowerModelsDistribution._correct_cost_functions!
— Methodthrows warnings if cost functions are malformed
PowerModelsDistribution._correct_mc_thermal_limits!
— Method_correct_mc_thermal_limits!(data::Dict{String,<:Any})
checks that each branch has non-negative thermal ratings and removes zero thermal ratings
PowerModelsDistribution._correct_mc_voltage_angle_differences!
— Function_correct_mc_voltage_angle_differences!(data::Dict{String,<:Any}, default_pad::Real=deg2rad(10.0))
checks that voltage angle differences are within 90 deg., if not tightens to a default of 10deg (adjustable)
PowerModelsDistribution._cpf_branch_interface
— Method_cpf_branch_interface(
branch::Dict,
v_start::Dict,
explicit_neutral::Bool,
line_vbase::Dict,
sbase::Float
)
Branch component interface outputs branch primitive Y matrix (See https://arxiv.org/abs/2305.04405 Section 4.1).
PowerModelsDistribution._cpf_generator_interface
— Method_cpf_generator_interface(
gen::Dict,
v_start::Dict,
explicit_neutral::Bool,
line_vbase::Dict,
sbase::Float
)
Generator component interface outputs generator primitive Y matrix (See https://arxiv.org/abs/2305.04405 Section 4.4 and 4.5).
PowerModelsDistribution._cpf_load_interface
— Method_cpf_load_interface(
load::Dict,
v_start::Dict,
explicit_neutral::Bool,
line_vbase::Dict,
sbase::Float
)
Load component interface outputs load primitive Y matrix (See https://arxiv.org/abs/2305.04405 Sections 4.4 and 4.5).
PowerModelsDistribution._cpf_shunt_interface
— Method_cpf_shunt_interface(
shunt::Dict,
v_start::Dict,
explicit_neutral::Bool,
line_vbase::Dict,
sbase::Float
)
Shunt component interface outputs shunt primitive Y matrix (See https://arxiv.org/abs/2305.04405 Section 4.2).
PowerModelsDistribution._cpf_storage_interface
— Method_cpf_storage_interface(
storage::Dict,
v_start::Dict,
explicit_neutral::Bool,
line_vbase::Dict,
sbase::Float
)
Storage component interface outputs storage primitive Y matrix (See https://arxiv.org/abs/2305.04405 Section 4.4 and 4.5).
PowerModelsDistribution._cpf_switch_interface
— Method_cpf_switch_interface(
switch::Dict,
v_start::Dict,
explicit_neutral::Bool,
line_vbase::Dict,
sbase::Float
)
Branch component interface outputs branch primitive Y matrix (See https://arxiv.org/abs/2305.04405 Section 4.2).
PowerModelsDistribution._cpf_transformer_interface
— Method_cpf_transformer_interface(
tr::Dict,
v_start::Dict,
explicit_neutral::Bool,
line_vbase::Dict,
sbase::Float
)
Transformer component interface outputs transformer primitive Y matrix (See https://arxiv.org/abs/2305.04405 Section 4.3).
PowerModelsDistribution._discover_buses
— MethodDiscovers all of the buses (not separately defined in OpenDSS), from 'lines'
PowerModelsDistribution._discover_terminals!
— Methoddiscovers all terminals in the network
PowerModelsDistribution._discover_voltage_zones
— Methoddiscover_voltage_zones(data_model::Dict{String,<:Any}, edge_elements::Vector{String})::Dict{Int,Set{Any}}
finds voltage zones by walking through the network and analyzing the transformers
PowerModelsDistribution._dss2eng_bus!
— FunctionAdds nodes as buses to data_eng
from data_dss
PowerModelsDistribution._dss2eng_buscoords!
— MethodParses buscoords lon,lat (if present) into their respective buses
PowerModelsDistribution._dss2eng_capacitor!
— MethodAdds capacitors to data_eng
from data_dss
PowerModelsDistribution._dss2eng_capcontrol!
— MethodAdds capcontrol to data_eng
from data_dss
PowerModelsDistribution._dss2eng_generator!
— FunctionAdds generators to data_eng
from data_dss
PowerModelsDistribution._dss2eng_line!
— MethodAdds lines to data_eng
from data_dss
PowerModelsDistribution._dss2eng_linecode!
— MethodAdds lines to data_eng
from data_dss
PowerModelsDistribution._dss2eng_load!
— FunctionAdds loads to data_eng
from data_dss
Constant can still be scaled by other settings, fixed cannot Note that in the current feature set, fixed therefore equals constant
1: Constant P and Q, default 2: Constant Z 3: Constant P and quadratic Q 4: Exponential 5: Constant I 6: Constant P and fixed Q
7: Constant P and quadratic Q (i.e., fixed reactance)
8: ZIP
PowerModelsDistribution._dss2eng_loadshape!
— FunctionAdds loadshapes to data_eng
from data_dss
PowerModelsDistribution._dss2eng_pvsystem!
— FunctionAdds pvsystems to data_eng
from data_dss
PowerModelsDistribution._dss2eng_reactor!
— MethodAdds shunt reactors to data_eng
from data_dss
PowerModelsDistribution._dss2eng_regcontrol!
— MethodAdds regcontrol to data_eng
from data_dss
PowerModelsDistribution._dss2eng_storage!
— FunctionAdds storage to data_eng
from data_dss
PowerModelsDistribution._dss2eng_transformer!
— MethodAdds transformers to data_eng
from data_dss
PowerModelsDistribution._dss2eng_vsource!
— FunctionAdds vsources to data_eng
from data_dss
PowerModelsDistribution._dss2eng_xfmrcode!
— FunctionAdds transformers to data_eng
from data_dss
PowerModelsDistribution._equivalance_center_tap!
— Method_equivalance_center_tap!(transformer::Dict{String,<:Any}, data_eng::Dict{String,<:Any})
Removes center tap transformers based on Eq. (1) from Kersting's paper 'Center-Tapped Transformers and 120/240-V Secondary Models' Z0 = 0.5r_t + j0.8x_t
PowerModelsDistribution._fill_matrix!
— MethodHelper function for Base.parse for dss matrices
PowerModelsDistribution._fill_vector!
— MethodHelper function for Base.parse for dss vectors
PowerModelsDistribution._fix_arrays!
— Methodhelper function to fix matrices (from vector of vectors) and vector dtypes
PowerModelsDistribution._fix_dtypes!
— Methodrecursive function to fix data types from data imported from json
PowerModelsDistribution._fix_enums!
— Methodhelper function to convert stringified enums
PowerModelsDistribution._fix_nulls!
— Methodhelper function to fix null values from json (usually Inf or NaN)
PowerModelsDistribution._generate_short_property_names
— MethodHelper function to generate 'short' property names
PowerModelsDistribution._generate_vm_pairs
— MethodGenerates pairwise bounds for oneport components.
PowerModelsDistribution._get_cncable_data
— Methodgets concentric neutral cable data for line geometry
PowerModelsDistribution._get_complete_conductor_set
— Methodfinds maximal set of ungrounded phases
PowerModelsDistribution._get_conductor_indicator
— Methodreturns the conductor indicator for a ENGINEERING component
PowerModelsDistribution._get_conductors_ordered
— MethodReturns an ordered list of defined conductors. If ground=false, will omit any 0
PowerModelsDistribution._get_delta_transformation_matrix
— Methodcreates a delta transformation matrix
PowerModelsDistribution._get_geometry_data
— Methodgets line geometry data for line, including applying line spacing if specified
PowerModelsDistribution._get_idxs
— MethodGiven a vector and a list of elements to find, this method will return a list of the positions of the elements in that vector.
PowerModelsDistribution._get_ilocs
— Methodget locations of terminal in connections list
PowerModelsDistribution._get_implied_nphases!
— MethodPowerModelsDistribution._get_implied_nphases!
— MethodPowerModelsDistribution._get_implied_nphases!
— MethodPowerModelsDistribution._get_implied_nphases!
— MethodPowerModelsDistribution._get_implied_nphases!
— MethodPowerModelsDistribution._get_implied_nphases!
— MethodPowerModelsDistribution._get_implied_nphases!
— MethodPowerModelsDistribution._get_implied_nphases
— Methodreturns number of phases implied by a two-bus (edge) object
PowerModelsDistribution._get_implied_nphases
— Methodreturns number of phases implied by a single-bus (node) object
PowerModelsDistribution._get_implied_nphases
— Methodreturns number of phases implied by a transformer object
PowerModelsDistribution._get_line_impedance_parameters
— MethodObtain impedance parameters, directly or from linecode.
PowerModelsDistribution._get_math_obj
— Methodreturns component from the mathematical data model
PowerModelsDistribution._get_raw_fields
— MethodHelper function to pull the specified properties from dss property pairs
PowerModelsDistribution._get_spacing_data
— Methodget line spacing data for line or line geometry
PowerModelsDistribution._get_tight_absolute_voltage_magnitude_bounds
— MethodReturns the tightest set of absolute voltage magnitude bounds, removing looser bounds which are implied by the tighter ones.
PowerModelsDistribution._get_tight_pairwise_voltage_magnitude_bounds
— MethodReturns the tightest set of pairwise voltage magnitude bounds, removing looser bounds which are implied by the tighter ones.
PowerModelsDistribution._get_tscable_data
— Methodgets tape shielded cable data for line geometry
PowerModelsDistribution._get_v
— Method_get_v(
pfd::struct,
Vp::Vector,
n::Union{Tuple, Int}
)
Calculates the voltage from PowerFlowData struct.
PowerModelsDistribution._get_wire_data
— Methodgets overhead wire data for line geometry
PowerModelsDistribution._impedance_conversion
— Methodconverts impendance in Ohm/m by multiplying by length
PowerModelsDistribution._import_all!
— Methodcreates a dss
dict inside object
that imports all items in prop_order
from dss_obj
PowerModelsDistribution._infer_int_dim
— Methodinfer the internal dimension of a winding, load or generator based on the connections and the configuration
PowerModelsDistribution._infer_int_dim_transformer
— Methodinfer the internal dimension for a transformer (only in the MATHEMATICAL data model format)
PowerModelsDistribution._infer_int_dim_unit
— Methodinfer the internal dimension for a unit, i.e. any one-port component with connections
and configuration
properties
PowerModelsDistribution._infer_neutral_terminals
— MethodReturn a list of all implicit neutrals as a list of bus-terminal pairs. This is done by starting from a list of all terminals which are either a.connected to the neutral of wye-connected components; b. or are grounded. This initial list is then expanded to all terminals which are galvanically connected to terminals in the initial list.
PowerModelsDistribution._infer_partial_property_name
— MethodHelper function to infer a full property name from a partial one
PowerModelsDistribution._init_base_components!
— Methodinitializes the base components that are expected by powermodelsdistribution in the mathematical model
PowerModelsDistribution._init_dss_data
— MethodPowerModelsDistribution._init_math_obj
— Methodinitializes the base math object of any type, and copies any one-to-one mappings
PowerModelsDistribution._init_unmap_eng_obj!
— Methodinitialization actions for unmapping
PowerModelsDistribution._is_after
— Methodhelper function to determine if property1
appears after property2
in the property pair list for objects that have windings
PowerModelsDistribution._is_after
— Methodhelper function to determine if property1
appears after property2
in the property pair list
PowerModelsDistribution._is_loadshape_split
— Methodchecks if loadshape has both pmult and qmult
PowerModelsDistribution._is_loadshape_split
— Methodchecks if loadshape has both pmult and qmult
PowerModelsDistribution._is_multiport_component
— MethodIndicates whether the passed component has a multiport structure (e.g. transformers).
PowerModelsDistribution._is_oneport_component
— MethodIndicates whether the passed component has a oneport structure (e.g. loads and generators).
PowerModelsDistribution._is_twoport_component
— MethodIndicates whether the passed component has a twoport structure (e.g. lines and switches).
PowerModelsDistribution._isa_dss_array
— MethodPowerModelsDistribution._isa_rpn
— Methoddetects if expr
is Reverse Polish Notation expression
PowerModelsDistribution._kron
— Method_kron(Z::Matrix{T}, nconds::Int)::Matrix{T} where T <: Complex
Kron reduces impedance matrix down to size (nconds, nconds)
PowerModelsDistribution._kron
— Method_kron(Z::Matrix{T}, Y::Matrix{T}, nconds::Int)::Tuple{Matrix{T}, Matrix{T}} where T <: Complex
Kron reduces impedance and shunt admittance matrices down to size (nconds, nconds)
PowerModelsDistribution._kron_reduce_branch!
— Methodperforms kron reduction on branch
PowerModelsDistribution._kron_reduce_branch
— Methodperforms kron reduction on branch - helper function
PowerModelsDistribution._kron_reduce_implicit_neutrals!
— Method_kron_reduce_implicit_neutrals!(data_eng::Dict{String,Any})::Dict{String,Any}
Kron-reduce all (implied) neutral conductors of lines, switches and shunts, and remove any terminals which become unconnected. A line or switch conductor is considered as a neutral conductor if it is connected between two neutral terminals. A terminal is a neutral terminals if it is galvanically connected (i.e. through a line or switch) to a grounded terminal, or the neutral conductor of a wye-connected component.
PowerModelsDistribution._kron_reduce_linecode!
— MethodKron-reduce specified neutral conductors of a linecode.
PowerModelsDistribution._kron_reduce_series_impedance
— MethodReturn the Kron-reduction of the specified neutral conductors of a series impedance matrix.
PowerModelsDistribution._kron_reduce_shunt_addmittance
— MethodReturn the Kron-reduction of the specified neutral conductors of a shunt addmittance matrix.
PowerModelsDistribution._line_reverse!
— MethodReverse the direction of a line.
PowerModelsDistribution._load_expmodel_params
— Method_load_expmodel_params(load::Dict{String,<:Any}, bus::Dict{String,<:Any})
Returns 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._loop_line_to_shunt
— MethodCreate an equivalent shunt for a line which connects to a single bus.
PowerModelsDistribution._make_filtered_logger
— Method_make_filtered_logger(level::Logging.LogLevel)
Helper function to create the filtered logger for PMD
PowerModelsDistribution._make_full_matrix_variable
— Methodmakes a full matrix variable from a diagonal, and lower and upper triangular vectors
PowerModelsDistribution._make_hermitian_matrix_variable
— Methodmakes a hermitian matrix variable from diagonal, and lower and upper triangular vectors
PowerModelsDistribution._make_lossless!
— Method_make_lossless!(data_eng::Dict{String,<:Any})
Remove parameters from objects with loss models to make them lossless. This includes linecodes, lines, switches, xfmrcodes, transformers, voltage sources, generators, solar, and storage, which all have (or will have in the future), loss model parameters that can be omitted.
PowerModelsDistribution._make_math_per_unit!
— Methodconverts the MATHEMATICAL model to per unit from SI
PowerModelsDistribution._make_matrix_variable_element
— Method_make_matrix_variable_element(
model::JuMP.Model,
indices::Array{T,1},
n::Int,
m::Int;
upper_bound::Union{Missing, Dict{T,<:Matrix{<:Real}}}=missing,
lower_bound::Union{Missing, Dict{T,<:Matrix{<:Real}}}=missing,
varname::String=""
) where T
Sometimes 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!
— MethodHacky helper function to transform single-conductor network data, from, e.g., matpower/psse, into multi-conductor data
PowerModelsDistribution._make_multinetwork_eng
— MethodExpands an ENGINEERING data structure into a multinetwork, see make_multinetwork
PowerModelsDistribution._make_multinetwork_math
— MethodExpands an MATHEMATICAL data structure into a multinetwork, see make_multinetwork
PowerModelsDistribution._map_conductor_ids!
— Methodhelper function to map non integer conductor ids into integers
PowerModelsDistribution._map_eng2math
— Methodbase function for converting engineering model to mathematical model
PowerModelsDistribution._map_eng2math_bus!
— Methodconverts engineering bus components into mathematical bus components
PowerModelsDistribution._map_eng2math_generator!
— Methodconverts engineering generators into mathematical generators
PowerModelsDistribution._map_eng2math_line!
— Methodconverts engineering lines into mathematical branches
PowerModelsDistribution._map_eng2math_load!
— Methodconverts engineering load components into mathematical load components
PowerModelsDistribution._map_eng2math_nw!
— MethodPowerModelsDistribution._map_eng2math_shunt!
— Methodconverts engineering generic shunt components into mathematical shunt components
PowerModelsDistribution._map_eng2math_solar!
— Methodconverts engineering solar components into mathematical generators
PowerModelsDistribution._map_eng2math_storage!
— Methodconverts engineering storage into mathematical storage
PowerModelsDistribution._map_eng2math_switch!
— Methodconverts engineering switches into mathematical switches and (if neeed) impedance branches to represent loss model
PowerModelsDistribution._map_eng2math_transformer!
— Methodconverts engineering n-winding transformers into mathematical ideal 2-winding lossless transformer branches and impedance branches to represent the loss model
PowerModelsDistribution._map_eng2math_voltage_source!
— Methodconverts engineering voltage sources into mathematical generators and (if needed) impedance branches to represent the loss model
PowerModelsDistribution._map_math2eng_bus!
— MethodPowerModelsDistribution._map_math2eng_generator!
— MethodPowerModelsDistribution._map_math2eng_line!
— MethodPowerModelsDistribution._map_math2eng_load!
— MethodPowerModelsDistribution._map_math2eng_root!
— MethodPowerModelsDistribution._map_math2eng_shunt!
— MethodPowerModelsDistribution._map_math2eng_solar!
— MethodPowerModelsDistribution._map_math2eng_storage!
— MethodPowerModelsDistribution._map_math2eng_switch!
— MethodPowerModelsDistribution._map_math2eng_transformer!
— MethodPowerModelsDistribution._map_math2eng_voltage_source!
— MethodPowerModelsDistribution._mat2ltrivec!
— Methodmatrix to lower triangular vector
PowerModelsDistribution._mat2utrivec!
— Methodmatrix to upper triangular vector
PowerModelsDistribution._mat_mult_rm_nan
— Methodmatrix multiplication removing NaN values
PowerModelsDistribution._merge_bus_flows
— MethodMerges flow variables that enter the same terminals, i.e. multiple neutrals of an underground cable connected to same neutral terminal
PowerModelsDistribution._merge_terminals!
— MethodMerge a terminal into another for a specified bus, i.e. as if they are short-ciruited.
PowerModelsDistribution._missing2false
— MethodHelper to convert
PowerModelsDistribution._nan2zero
— MethodReplaces NaN values with zeros
PowerModelsDistribution._objective_mc_min_fuel_cost_polynomial_linquad
— Methodgen connections adaptation of min fuel cost polynomial linquad objective
PowerModelsDistribution._objective_mc_min_fuel_cost_polynomial_linquad_switch
— MethodMulticonductor adaptation of min fuel cost polynomial linquad objective
PowerModelsDistribution._objective_mc_min_fuel_cost_polynomial_linquad_switch
— Methodgen connections adaptation of min fuel cost polynomial linquad objective
PowerModelsDistribution._objective_mc_min_fuel_cost_polynomial_nl
— MethodPowerModelsDistribution._objective_mc_min_fuel_cost_polynomial_nl_switch
— MethodPowerModelsDistribution._pad_connections!
— Methodadds conductors to connections during padding process, transformer winding variant
PowerModelsDistribution._pad_connections!
— Methodadds conductors to connections during padding process
PowerModelsDistribution._pad_properties!
— Methodpads properties to have the total number of conductors for the whole system (transformer winding variant)
PowerModelsDistribution._pad_properties!
— Methodpads properties to have the total number of conductors for the whole system
PowerModelsDistribution._pad_properties_delta!
— Methodpads properties to have the total number of conductors for the whole system - delta connection variant
PowerModelsDistribution._pad_properties_delta!
— Methodpads properties to have the total number of conductors for the whole system - delta connection variant
PowerModelsDistribution._parse_array
— Methodhelper function to parse reverse polish notation arrays
PowerModelsDistribution._parse_bus_id
— MethodParses busnames as defined in OpenDSS, e.g. 'primary.1.2.3.0'
PowerModelsDistribution._parse_command_from_line
— Method_parse_command_from_line(line::String)::Tuple{String,String}
Parses the dss command from the line (if present), optionnally making the command set
if implicitly used.
PowerModelsDistribution._parse_csvfile
— MethodPowerModelsDistribution._parse_dblfile
— MethodPowerModelsDistribution._parse_dss_cmd_buscoords!
— MethodPowerModelsDistribution._parse_dss_cmd_buscoords
— MethodPowerModelsDistribution._parse_dss_cmd_clear!
— MethodPowerModelsDistribution._parse_dss_cmd_compile!
— MethodPowerModelsDistribution._parse_dss_cmd_disable!
— MethodPowerModelsDistribution._parse_dss_cmd_edit!
— MethodPowerModelsDistribution._parse_dss_cmd_enable!
— MethodPowerModelsDistribution._parse_dss_cmd_latloncoords!
— MethodPowerModelsDistribution._parse_dss_cmd_more!
— MethodPowerModelsDistribution._parse_dss_cmd_new!
— MethodPowerModelsDistribution._parse_dss_cmd_redirect!
— MethodPowerModelsDistribution._parse_dss_cmd_set!
— MethodPowerModelsDistribution._parse_dss_cmd_setbusxy!
— MethodPowerModelsDistribution._parse_dss_matrix
— MethodHelper function for Base.parse for dss matrices
PowerModelsDistribution._parse_dss_obj_type_name
— MethodPowerModelsDistribution._parse_dss_vector
— MethodHelper function for Base.parse for dss vectors
PowerModelsDistribution._parse_file_inside_mult!
— MethodPowerModelsDistribution._parse_file_inside_shape_ref!
— MethodPowerModelsDistribution._parse_match_element
— MethodPowerModelsDistribution._parse_pqcsvfile
— MethodPowerModelsDistribution._parse_rpn
— Methodhelper function to parse reverse polish notation
PowerModelsDistribution._parse_rpn
— Methodparses Reverse Polish Notation expr
PowerModelsDistribution._parse_rpn
— Methodhelper function to parse reverse polish notation vectors
PowerModelsDistribution._parse_sngfile
— MethodPowerModelsDistribution._pmd_metafmt
— Method_pmd_metafmt(level::Logging.LogLevel, _module, group, id, file, line)
MetaFormatter for ConsoleLogger for PMD to adjust log message format
PowerModelsDistribution._propagate_network_topology!
— Method_propagate_network_topology!(data::Dict{String,Any})
helper function to propagate bus status to any connected components
PowerModelsDistribution._rebase_pu_branch!
— Methodper-unit conversion for branches
PowerModelsDistribution._rebase_pu_bus!
— Methodper-unit conversion for buses
PowerModelsDistribution._rebase_pu_generator!
— Methodper-unit conversion for generators
PowerModelsDistribution._rebase_pu_load!
— Methodper-unit conversion for loads
PowerModelsDistribution._rebase_pu_shunt!
— Methodper-unit conversion for shunts
PowerModelsDistribution._rebase_pu_storage!
— Methodper-unit conversion for storage
PowerModelsDistribution._rebase_pu_switch!
— Methodper-unit conversion for switches
PowerModelsDistribution._rebase_pu_transformer_2w_ideal!
— Methodper-unit conversion for ideal 2-winding transformers
PowerModelsDistribution._ref_add_connected_components!
— Methodadds connected components for opb problem type
PowerModelsDistribution._register_awaiting_ground!
— MethodPowerModelsDistribution._remove_all_bounds!
— Method_remove_all_bounds!(data_eng; exclude::Vector{<:String}=String["energy_ub"], exclude_asset_type::Vector{String}=String[])
Removes all fields ending in 'ub' or 'lb' that aren't required by the math model. Properties can be excluded from this removal with exclude::Vector{String}
Whole asset types (e.g., "line") can be excluded using the keyword argument exclude_asset_type::Vector{String}
By default, "energy_ub"
is excluded from this removal, since it is a required properly on storage.
PowerModelsDistribution._remove_line_limits!
— Method_remove_line_limits!(data_eng::Dict{String,<:Any})
Removes fields cm_ub
and sm_ub
from lines, switches, and linecodes
PowerModelsDistribution._remove_pwl_cost_duplicates!
— Methodchecks that each point in the a pwl function is unqiue, simplifies the function if duplicates appear
PowerModelsDistribution._remove_transformer_limits!
— Method_remove_transformer_limits!(data_eng::Dict{String,<:Any})
Removes field sm_ub
from transformers, xfmrcodes
PowerModelsDistribution._remove_unconnected_terminals!
— Method_remove_unconnected_terminals!(data_eng::Dict{String,Any})::Dict{String,Any}
Remove all terminals which are unconnected (not considering a grounding as a connection).
PowerModelsDistribution._rescale_cost_model!
— Methodrescales the cost model terms
PowerModelsDistribution._sanatize_line
— Method_sanatize_line(line::String)::String
Sanitizes lines by stripping them clean of extra space and the beginnging and end, making everything lowercase, changing ~
or m
to more
, and stripping comments
PowerModelsDistribution._sanitize_property_name
— 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._scale
— Methodfunction for applying a scale to a paramter
PowerModelsDistribution._scale_props!
— Methodhelper function to apply a scale factor to given properties
PowerModelsDistribution._show
— MethodHelper functions for Base.show for InfrastructureModel,InfrastructureObject
PowerModelsDistribution._simplify_cost_terms!
— MethodPowerModelsDistribution._simplify_pwl_cost!
— Methodchecks the slope of each segment in a pwl function, simplifies the function if the slope changes is below a tolerance
PowerModelsDistribution._slice_branches!
— Methodslices branches based on connected terminals
PowerModelsDistribution._sol_data_model_acr!
— Method_sol_data_model_acr!(solution::Dict{String,<:Any})
solutionprocessor, see [`solvemcmodel`](@ref solvemc_model), to convert ACR variables back into polar representation (default data model voltage form)
PowerModelsDistribution._sol_data_model_w!
— Methodconverts w models voltages to standard voltage magnitude (sqrt)
PowerModelsDistribution._solve_mc_model
— Method_solve_mc_model(
data::Dict{String,<:Any},
model_type::Type,
optimizer,
build_method::Function;
multinetwork::Bool=false,
ref_extensions::Vector{<:Function}=Function[],
solution_processors::Vector{<:Function}=Function[],
relax_integrality::Bool=false,
kwargs...
)::Dict{String,Any}
Internal solver interface that uses instantiate_mc_model
directly and runs optimize_model!
, returning a result
See solve_mc_model
PowerModelsDistribution._solve_mc_osw
— MethodSolve optimal switching problem
PowerModelsDistribution._solve_mc_osw_mi
— MethodSolve mixed-integer optimal switching problem
PowerModelsDistribution._solve_mn_mc_opb
— Method_solve_mn_mc_opb(data::Union{Dict{String,<:Any},String}, model_type::Type, solver; kwargs...)
solve test mn mc problem
PowerModelsDistribution._standardize_cost_terms!
— Methodensures all polynomial costs functions have at exactly comp_order terms
PowerModelsDistribution._strip_lines!
— Methodstrips lines that are either commented (block or single) or empty
PowerModelsDistribution._sum_rm_nan
— MethodBOUND manipulation methods (0*Inf->0 is often desired)
PowerModelsDistribution._transform_loops!
— Method_transform_loops!(
data_eng::Dict{String,Any};
zero_series_impedance_threshold::Real=1E-8,
shunt_id_prefix::AbstractString="line_loop"
)::Dict{String,Any}
Transform line loops (connected to a single bus), which are not allowed in the mathematical model. Lossy line loops are converted to equivalent shunts, and lossless ones (i.e. short-circuits) are represented by merging the short-circuited terminals. The argument 'zeroseriesimpedance_threshold' controls the threshold below which the series impedance is considered to be a short-ciruit. This is useful because OpenDSS modelers have to insert tiny impedances to represent short-circuit reactors. The addmittance to ground should be zero to trigger the short-circuit handling.
PowerModelsDistribution._update_bus_terminal_projections!
— Methodhelper function to update the terminals on projected buses
PowerModelsDistribution._vec2ltri!
— Methodvector to lower triangular
PowerModelsDistribution._vec2utri!
— Methodhttps://stackoverflow.com/questions/39039553/lower-triangular-matrix-in-julia
PowerModelsDistribution._wrap_to_180
— Methodwraps angles in degrees to 180
PowerModelsDistribution._wrap_to_pi
— Methodwraps angles in radians to pi