Base
PowerModelsDistribution.ref — Functionhelper function to access the AbstractUnbalancedPowerModel structs' ref, returns (id,data) pairs
PowerModelsDistribution.var — Functionhelper function to access the AbstractUnbalancedPowerModel structs' var, returns JuMP VariableRef
PowerModelsDistribution.ids — Functionhelper function to access the ids of AbstractUnbalancedPowerModel structs' ref, returns ints
PowerModelsDistribution.con — Functionhelper function to access the AbstractUnbalancedPowerModel structs' con, returns JuMP Constraint
PowerModelsDistribution.sol — Functionhelper function to access the AbstractUnbalancedPowerModel structs' sol, returns Dict
PowerModelsDistribution.nws — Functionhelper function to access multinetwork data from AbstractUnbalancedPowerModel structs, returns (id,data) pairs
PowerModelsDistribution.nw_ids — Functionhelper function to access the ids of multinetworks from AbstractUnbalancedPowerModel structs, returns ints
Helper functions
PowerModelsDistribution.@smart_constraint — Macro@smart_constraint model::JuMP.Model vars::Vector expr::JuMP.ExpressionDetection of whether a constraint should be NL or not"
PowerModelsDistribution.set_lower_bound — Functionset_lower_bound(x::JuMP.VariableRef, bound)Local wrapper method for JuMP.setlowerbound, which skips NaN and infinite (-Inf only)
PowerModelsDistribution.set_upper_bound — Functionset_upper_bound(x::JuMP.VariableRef, bound)Local wrapper method for JuMP.setupperbound, which skips NaN and infinite (+Inf only)
PowerModelsDistribution.comp_start_value — Functioncomp_start_value(comp::Dict, keys::Vector{String}, conductor::Int, default::Any)Searches for start value for a variable key in order from a list of keys of a component comp for conductor conductor, and if one does not exist, uses default
comp_start_value(comp::Dict, key::String, conductor::Int, default::Any)Searches for start value for a variable key of a component comp for conductor conductor, and if one does not exist, uses default
comp_start_value(comp::Dict, keys::Vector{String}, default::Any)Searches for start value for a variable key in order from a list of keys of a component comp, and if one does not exist, uses default. This is the conductor-agnostic version of comp_start_value.
comp_start_value(comp::Dict, key::String, default::Any)Searches for start value for a variable key of a component comp, and if one does not exist, uses default. This is the conductor-agnostic version of comp_start_value.
Ref Creation Functions
PowerModelsDistribution.ref_add_connected_components! — Methodref_add_connected_components!(ref::Dict{Symbol,<:Any}, data::Dict{String,<:Any})Ref-extension for opb problem type to add connected components ref
PowerModelsDistribution.ref_add_core! — Methodref_add_core!(ref::Dict{Symbol,Any})Returns a dict that stores commonly used pre-computed data from of the data dictionary, primarily for converting data-types, filtering out deactivated components, and storing system-wide values that need to be computed globally. Some of the common keys include:
:off_angminand:off_angmax(seecalc_theta_delta_bounds(data)),:bus– the set{(i, bus) in ref[:bus] : bus["bus_type"] != 4},:gen– the set{(i, gen) in ref[:gen] : gen["gen_status"] == 1 && gen["gen_bus"] in keys(ref[:bus])},:branch– the set of branches that are active in the network (based on the component status values),:arcs_branch_from– the set[(i,b["f_bus"],b["t_bus"]) for (i,b) in ref[:branch]],:arcs_branch_to– the set[(i,b["t_bus"],b["f_bus"]) for (i,b) in ref[:branch]],:arcs_branch– the set of arcs from botharcs_fromandarcs_to,:arcs_switch_from– the set[(i,b["f_bus"],b["t_bus"]) for (i,b) in ref[:switch]],:arcs_switch_to– the set[(i,b["t_bus"],b["f_bus"]) for (i,b) in ref[:switch]],:arcs_switch– the set of arcs from botharcs_switch_fromandarcs_switch_to,:arcs_transformer_from– the set[(i,b["f_bus"],b["t_bus"]) for (i,b) in ref[:transformer]],:arcs_transformer_to– the set[(i,b["t_bus"],b["f_bus"]) for (i,b) in ref[:transformer]],:arcs_transformer– the set of arcs from botharcs_transformer_fromandarcs_transformer_to,:bus_arcs_branch– the mappingDict(i => [(l,i,j) for (l,i,j) in ref[:arcs_branch]]),:bus_arcs_transformer– the mappingDict(i => [(l,i,j) for (l,i,j) in ref[:arcs_transformer]]),:bus_arcs_switch– the mappingDict(i => [(l,i,j) for (l,i,j) in ref[:arcs_switch]]),:buspairs– (seebuspair_parameters(ref[:arcs_branch_from], ref[:branch], ref[:bus])),:bus_gens– the mappingDict(i => [gen["gen_bus"] for (i,gen) in ref[:gen]]).:bus_loads– the mappingDict(i => [load["load_bus"] for (i,load) in ref[:load]]).:bus_shunts– the mappingDict(i => [shunt["shunt_bus"] for (i,shunt) in ref[:shunt]]).
PowerModelsDistribution.ref_calc_storage_injection_bounds — Methodref_calc_storage_injection_bounds(storage, buses)Computes storage bounds
InfrastructureModels Extensions
InfrastructureModels.solution_preprocessor — FunctionDefinition of the default solution preprocessor for PowerModelsDistribution
InfrastructureModels.build_solution_values — Functioncustom build_solution_values for multiconductor (vector) variables
custom build_solution_values for multiconductor (vector) nonlinear expressions
custom build_solution_values for multiconductor (vector) generic affine expressions
custom build_solution_values for multiconductor (vector) constants
custom build_solution_values for multiconductor (vector) constants