Internal Functions

PowerModelsONM._apply_switch_resultsMethod
_apply_switch_results(data_in::Dict{String,<:Any}, switching_solution::Dict{String,<:Any})

Helper functing to help apply switch states and generation statuses.

source
PowerModelsONM._check_switch_state_feasibilityMethod
_check_switch_state_feasibility(eng::Dict{String,Any})

Helper function to aid users in determining whether network model has a feasible starting switch configuration, assuming radiality constraints are applied.

source
PowerModelsONM._correct_switch_directions!Method
_correct_branch_directions!(switches::Dict{String,<:Any}, ref::Dict{Symbol,<:Any})::Dict{String,Any}

Helper function that will attempt to make a directed graph that is strong-connected by adjusting the switch directions starting from the voltage_sources

source
PowerModelsONM._find_nw_id_from_timestepMethod
_find_nw_id_from_timestep(
    network::Dict{String,<:Any},
    timestep::Union{Real,String}
)::String

Helper function to find the multinetwork id of the subnetwork of network corresponding most closely to a timestep.

source
PowerModelsONM._get_formulationMethod
_get_formulation(form_string::String)

helper function to convert from opt-disp-formulation, opt-switch-formulation string to PowerModelsDistribution Type

source
PowerModelsONM._map_eng2math_scenarios!Method
_map_eng2math_scenarios!(data_math::Dict{String,<:Any}, data_eng::Dict{String,<:Any}; pass_props::Vector{String}=String[])

Converts engineering scenarios into mathematical scenarios.

source
PowerModelsONM._prepare_dispatch_dataFunction
_prepare_dispatch_data(
    network::Dict{String,<:Any},
    switching_solutions::Union{Missing,Dict{String,<:Any}}=missing
)::Dict{String,Any}

Helper function to prepare data for running a optimal dispatch problem, copying in solutions from the switching results, if present.

source
PowerModelsONM._prepare_stability_multinetwork_dataFunction
_prepare_stability_multinetwork_data(
    network::Dict{String,<:Any},
    inverters::Dict{String,<:Any},
    switching_solutions::Union{Missing,Dict{String,<:Any}}=missing,
    dispatch_solution::Union{Missing,Dict{String,<:Any}}=missing
)::Dict{String,Any}

Helper function to prepare the multinetwork data for stability analysis (adds inverters, data_model).

source
PowerModelsONM._set_property!Method
_set_property!(data::Dict{String,<:Any}, path::Tuple{Vararg{String}}, value::Any)

Helper function to set a property to value at an arbitrary nested path in a dictionary

source
PowerModelsONM._solution_blocks!Method
_solution_statuses!(sol::Dict{String,<:Any}, ref::Dict{Symbol,<:Any})

Adds block ids (as generated in the ref), and microgrid_ids to the solution

source
PowerModelsONM._update_inverter_settings!Method
_update_inverter_settings!(data::Dict{String,<:Any}, sol::Dict{String,<:Any})

Helper function to update inverter settings from a solution, for the mld robust problem to check for feasibility.

source
PowerModelsONM._update_storage_capacity!Method
_update_storage_capacity!(data::Dict{String,<:Any}, solution::Dict{String,<:Any})

Helper function to update storage capacity for the next subnetwork based on a solution, for the rolling horizon algorithm.

source
PowerModelsONM._update_switch_settings!Method
_update_switch_settings!(data::Dict{String,<:Any}, solution::Dict{String,<:Any})

Helper function to update switch settings from a solution, for the rolling horizon algorithm.

source
PowerModelsONM._validate_against_schemaMethod
_validate_against_schema(
    data::Union{Dict{String,<:Any}, Vector},
    schema::JSONSchema.Schema
)::Bool

Validates dict or vector structure data against json schema using JSONSchema.jl.

source
PowerModelsONM._validate_against_schemaMethod
_validate_against_schema(
    data::Union{Dict{String,<:Any}, Vector},
    schema_name::String
)::Bool

Validates dict or vector structure data against json schema given by schema_name.

source

Constants