Data Models
Parsers
PowerModelsProtection.parse_file
— Functionparse_file(
file::String;
method::Union{String,Missing}=missing,
add_gensub::Bool=false,
flat_start::Bool=false,
neglect_line_charging::Bool=false,
neglect_transformer::Bool=false,
zero_gen_setpoints::Bool=false,
import_all::Bool=true,
kwargs...
)
Function to parse data from dss
(distribution) or matpower
(transmission) files.
method
is for matpower files, and should be one of "PMs", "solar-pf", "dg-pf", "pf", or "opf", and "PMD" or missing for dss files.
If add_gensub
, parse_matpower
will attempt to find rs and xs from a gensub dict.
Explanations of flat_start
, neglect_line_charging
, neglect_transformer
, and zero_gen_setpoints
can be found in prepare_transmission_data!
Constructors
PowerModelsProtection.add_fault!
— Methodadd_fault!(data::Dict{String,Any}, name::String, type::String, bus::String, connections::Vector{Int}, resistance::Real, phase_resistance::Real)
Creates a fault dictionary given the type
of fault, i.e., one of "3p", "ll", "lg", the bus
on which the fault is active, the connections
on which the fault applies, the resistance
between the phase and ground, in the case of "lg", or phase and phase, and adds it to data["fault"]
under "name"
PowerModelsProtection.add_fault!
— Methodadd_fault!(data::Dict{String,Any}, name::String, type::String, bus::String, connections::Vector{Int}, resistance::Real)
Creates a fault dictionary given the type
of fault, i.e., one of "3pq", "llg", the bus
on which the fault is active, the connections
on which the fault applies, the resistance
between the phase and ground, and the phase_resistance
between phases, and adds it to data["fault"]
under "name"
PowerModelsProtection.create_fault
— Methodcreate_fault(type::String, bus::String, connections::Vector{Int}, resistance::Real, phase_resistance::Real)::Dict{String,Any}
Creates a fault dictionary given the type
of fault, i.e., one of "3pq", "llg", the bus
on which the fault is active, the connections
on which the fault applies, the resistance
between the phase and ground, and the phase_resistance
between phases
PowerModelsProtection.create_fault
— Methodcreate_fault(type::String, bus::String, connections::Vector{Int}, resistance::Real, phase_resistance::Real)::Dict{String,Any}
Creates a fault dictionary given the type
of fault, i.e., one of "3p", "ll", "lg", the bus
on which the fault is active, the connections
on which the fault applies, the resistance
between the phase and ground, in the case of "lg", or phase and phase.
Model Transformations
PowerModelsProtection.transform_data_model
— Functioncustom version of transform_data_model
from PowerModelsDistribution for easy model transformation
PowerModelsProtection.transform_solution
— Functioncustom version of transform_solution
from PowerModelsDistribution to aid in easy solution transformation
Unit conversions
PowerModelsProtection.make_fault_si!
— Methodhelper function to convert fault object units back into si units