Internal Functions
PowerModelsONM._apply_fault_models!
— Method_apply_fault_models!(data::Dict{String,<:Any})
Adds a default fault model to solar devices.
PowerModelsONM._apply_switch_results
— Method_apply_switch_results(data_in::Dict{String,<:Any}, switching_solution::Dict{String,<:Any})
Helper functing to help apply switch states and generation statuses.
PowerModelsONM._apply_vbases!
— Method_apply_vbases!(data::Dict{String,<:Any})
Adds vbases to base network
PowerModelsONM._check_switch_state_feasibility
— Method_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.
PowerModelsONM._convert_event_data_types!
— Method_convert_event_data_types!(
events::Vector{<:Dict{String,<:Any}}
)::Vector{Dict{String,Any}}
Helper function to convert JSON data types to native data types (Enums) in events.
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
PowerModelsONM._deepcopy_args!
— Method_deepcopy_args!(args::Dict{String,<:Any})::Dict{String,Any}
Copies arguments to "raw_args" in-place in args
, for use in entrypoint
PowerModelsONM._dss2eng_protection_locations!
— Method_dss2eng_protection!(
eng::Dict{String,<:Any},
dss::Dict{String,<:Any}
)
Extension function for converting opendss protection into protection objects for protection optimization.
PowerModelsONM._find_next_nw_id_from_fault_duration
— Method_find_next_nw_id_from_fault_duration(
network::Dict{String,<:Any},
nw_id::String,
duration::Real
)::Union{String,Missing}
Helper function to find the next timestep following a fault given its duration in ms
PowerModelsONM._find_nw_id_from_timestep
— Method_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
.
PowerModelsONM._find_switch_id_from_source_id
— Method_find_switch_id_from_source_id(
network::Dict{String,<:Any},
source_id::String
)::Union{String,Missing}
Helper function to find a switch id in the network model based on the dss source_id
PowerModelsONM._find_switch_ids_by_faulted_asset
— Methodhelper function to find which switches need to be opened to isolate a fault on asset given by source_id
PowerModelsONM._fix_enums!
— Methodhelper function to convert stringified enums
PowerModelsONM._fix_fault_data_types!
— Method_fix_fault_data_types!(faults::Dict{String,<:Any})
Helper function to help parse data types for multiconductor fault study data structures from JSON faults
.
PowerModelsONM._fix_nulls!
— Methodhelper function to fix null values from json (usually Inf or NaN)
PowerModelsONM._fix_symbols!
— Methodhelper function to convert stringified Symbols
PowerModelsONM._get_formulation
— Method_get_formulation(form_string::String)
helper function to convert from opt-disp-formulation, opt-switch-formulation string to PowerModelsDistribution Type
PowerModelsONM._get_formulation
— Method_get_formulation(form::Type)
helper function to convert from PowerModelsDistribution Type to PowerModelsDistribution Type
PowerModelsONM._make_filtered_logger
— Method_make_filtered_logger(mods::Vector, level::Logging.LogLevel)
Helper function to create the filtered logger for PMD
PowerModelsONM._make_filtered_logger
— Method_make_filtered_logger(mods::Vector{Tuple{<:Module,Logging.LogLevel}})
Helper function to create the filtered logger for PMD
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.
PowerModelsONM._prepare_dispatch_data
— Function_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.
PowerModelsONM._prepare_optimal_switching_data
— Method_prepare_optimal_switching_data(network::Dict{String,<:Any})::Dict{String,Any}
Helper function to prepare optimal switching data structure.
PowerModelsONM._prepare_stability_multinetwork_data
— Function_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).
PowerModelsONM._recursive_initialize_output_from_schema!
— Method_recursive_initialize_output_from_schema!(output::Dict{String,<:Any}, schema_properties::Dict{String,<:Any})
Helper function to initialize the output data structure from the output schema
PowerModelsONM._ref_add_load_blocks!
— Method_ref_add_load_blocks!(ref::Dict{Symbol,<:Any}, data::Dict{String,<:Any})
Ref extension to add load blocks to ref at a single time step
PowerModelsONM._ref_add_options!
— Method_ref_add_options!(ref::Dict{Symbol,<:Any}, data::Dict{String,<:Any})
Ref extension to add options to ref for all time steps
PowerModelsONM._ref_add_scenarios!
— Method_ref_add_scenarios!(ref::Dict{Symbol,<:Any}, data::Dict{String,<:Any})
Ref extension to add scenario information to ref at a single time step
PowerModelsONM._sanitize_results_metadata!
— Method_sanitize_results_metadata!(metadata::Dict{String,<:Any})::Dict{String,Any}
Helper function to turn any field that is not a Real
into a String
.
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
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
PowerModelsONM._solution_inverter!
— Method_solution_inverter!(data::Dict{String,<:Any}, sol::Dict{String,<:Any})
Converts inverter
to Inverter enum, from a single time step.
PowerModelsONM._solution_reference_buses!
— Method_solution_reference_buses!(data::Dict{String,<:Any}, sol::Dict{String,<:Any})
Raises bus_type
from math model up to solution for reporting, from a single time step.
PowerModelsONM._solution_statuses!
— Method_solution_statuses!(sol::Dict{String,<:Any})
Converts all status
fields in a solution sol
from Float64 to Status
enum, for a single time step.
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.
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.
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.
PowerModelsONM._validate_against_schema
— Method_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.
PowerModelsONM._validate_against_schema
— Method_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
.
Constants
PowerModelsONM._default_ref_extensions
— Constantdefault ref_extension functions
PowerModelsONM._default_solution_processors
— Constantdefault solution_processor functions
PowerModelsONM._formulation_lookup
— Constantstring to PowerModelsDistribution type conversion for opt-disp-formulation