Internal

PowerFlows.AuxiliaryVariablesType
AuxiliaryVariables

A mutable struct to hold auxiliary variables that are produced by power flow calculations, particularly Jacobian matrix.

Fields

  • J::Union{SparseMatrixCSC{Float64, Int}, Nothing}: A sparse matrix representing the Jacobian matrix after a successfully converged power flow calculation. This is the J matrix from the last step of the Newton-Raphson method. If the power flow calculation does not converge, it is set to nothing. Defaults to nothing.
  • dSbus_dV_ref::Union{Vector{Float64}, Nothing}: A vector representing the partial derivatives of the reference bus apparent power injections with respect to the non-reference bus voltages. Defaults to nothing.
source
PowerFlows._first_choice_gen_idMethod

Try to make an informative one or two character name for the load/generator/etc.

  • "generator-1234-AB" -> "AB"
  • "123CT7" -> "7"
  • "load1234" -> "34"
source
PowerFlows._psse_bus_namesMethod

Given a vector of Sienna bus names, create a dictionary from Sienna bus name to PSS/E-compatible bus name. Guarantees determinism and minimal changes.

WRITTEN TO SPEC: PSS/E 33.3 POM 5.2.1 Bus Data

source
PowerFlows._psse_bus_numbersMethod

Given a vector of Sienna bus numbers, create a dictionary from Sienna bus number to PSS/E-compatible bus number. Assumes that the Sienna bus numbers are positive and unique. Guarantees determinism: if the input contains the same bus numbers in the same order, the output will. Guarantees minimal changes: that if an existing bus number is compliant, it will not be changed.

WRITTEN TO SPEC: PSS/E 33.3 POM 5.2.1 Bus Data

source
PowerFlows._psse_transformer_namesMethod

Given a vector of Sienna transformer names, create a dictionary from Sienna transformer name to PSS/E-compatible transformer name. Guarantees determinism and minimal changes.

WRITTEN TO SPEC: PSS/E 33.3 POM 5.2.1 Transformer Data

source
PowerFlows.convert_emptyMethod

If val is empty, returns T(); if not, asserts that val isa T and returns val. Has nice type checker semantics.

Examples

convert_empty(Vector{String}, [])  # -> String[]
convert_empty(Vector{String}, ["a"])  # -> ["a"]
convert_empty(Vector{String}, [2])  # -> TypeError: in typeassert, expected Vector{String}, got a value of type Vector{Int64}
Base.return_types(Base.Fix1(convert_empty, Vector{String}))  # -> [Vector{String}]
source
PowerFlows.create_component_idsMethod

Given a vector of component names and a corresponding vector of container IDs (e.g., bus numbers), create unique-per-container PSS/E-compatible IDs, output a dictionary from (container ID, component name) to PSS/E-compatible component ID. The "singlesto1" flag detects components that are the only one on their bus and gives them the name "1".

source
PowerFlows.flow_funcMethod

Calculates the From - To complex power flow using external data of voltages of branch of type Line

source
PowerFlows.flow_funcMethod

Calculates the From - To complex power flow using external data of voltages of branch of type TapTransformer

source
PowerFlows.flow_funcMethod

Calculates the From - To complex power flow using external data of voltages of branch of type Transformer2W

source
PowerFlows.flow_valMethod

Calculates the From - To complex power flow (Flow injected at the bus) of branch of type Line

source
PowerFlows.flow_valMethod

Calculates the From - To complex power flow (Flow injected at the bus) of branch of type Line

source
PowerFlows.flow_valMethod

Calculates the From - To complex power flow (Flow injected at the bus) of branch of type TapTransformer

source
PowerFlows.flow_valMethod

Calculates the From - To complex power flow (Flow injected at the bus) of branch of type Transformer2W

source
PowerFlows.make_power_flow_containerFunction

Create an appropriate PowerFlowContainer for the given PowerFlowEvaluationModel and initialize it from the given PSY.System.

Arguments:

  • pfem::PowerFlowEvaluationModel: power flow model to construct a container for (e.g., DCPowerFlow())
  • sys::PSY.System: the system from which to initialize the power flow container
  • time_steps::Int: number of time periods to consider (default is 1)
  • timestep_names::Vector{String}: names of the time periods defines by the argument "time_steps". Default value is String[].
  • check_connectivity::Bool: Perform connectivity check on the network matrix. Default value is true.
source
PowerFlows.update_system!Method

Modify the values in the given System to correspond to the given PowerFlowData such that if a new PowerFlowData is constructed from the resulting system it is the same as data. See also write_powerflow_solution!. NOTE that this assumes that data was initialized from sys and then solved with no further modifications.

source
PowerFlows.write_to_buffers!Method

WRITTEN TO SPEC: PSS/E 33.3 POM 5.2.1 Bus Data. Sienna voltage limits treated as PSS/E normal voltage limits; PSSE emergency voltage limits left as default.

source
PowerFlows.write_to_buffers!Method

If the exportsettings flag `sourcesasgeneratorsis set, exportPSY.Sourceinstances as PSS/E generators in addition toPSY.Generators. Same forstoragesas_generatorsandPSY.Storage`.

WRITTEN TO SPEC: PSS/E 33.3 POM 5.2.1 Generator Data

source