Internal
PowerFlows.SystemPowerFlowContainer
— TypeA PowerFlowContainer
that represents its data as a PSY.System
PowerFlows._first_choice_gen_id
— MethodTry to make an informative one or two character name for the load/generator/etc.
- "generator-1234-AB" -> "AB"
- "123CT7" -> "7"
- "load1234" -> "34"
PowerFlows._get_load_data
— MethodObtain total load on bus b
PowerFlows._map_psse_container_names
— MethodValidate that the Sienna area/zone names parse as PSS/E-compatible area/zone numbers, output a mapping
PowerFlows._psse_bus_names
— MethodGiven 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
PowerFlows._psse_bus_numbers
— MethodGiven 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
PowerFlows._psse_transformer_names
— MethodGiven 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
PowerFlows._update_branch_flow!
— MethodUpdates the flow on the branches
PowerFlows.better_float_to_buf
— MethodTemporary, very specialized proof of concept patch for https://github.com/JuliaLang/julia/issues/55835
PowerFlows.check_33
— MethodThrow a NotImplementedError
if the psse_version
is not :v33
PowerFlows.create_component_ids
— MethodGiven 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".
PowerFlows.deepcopy_system_no_time_series_no_supplementals
— MethodMake a deepcopy
of the System
except replace the time series manager and supplemental attribute manager with blank versions so these are not copied.
PowerFlows.deserialize_reverse_component_ids
— MethodConvert a sbusnsname => pname dictionary to a (pbusn, pname) => s_name dictionary
PowerFlows.fix_load_zone_names!
— MethodRename all the LoadZone
s in the system according to the Load_Zone_Name_Mapping
in the metadata
PowerFlows.fix_nans!
— MethodIterate over all the Generator
s in the system and, if any active_power
or reactive_power
fields are NaN
, make them 0.0
PowerFlows.flow_func
— MethodCalculates the From - To complex power flow using external data of voltages of branch of type Line
PowerFlows.flow_func
— MethodCalculates the From - To complex power flow using external data of voltages of branch of type TapTransformer
PowerFlows.flow_func
— MethodCalculates the From - To complex power flow using external data of voltages of branch of type Transformer2W
PowerFlows.flow_val
— MethodCalculates the From - To complex power flow (Flow injected at the bus) of branch of type Line
PowerFlows.flow_val
— MethodCalculates the From - To complex power flow (Flow injected at the bus) of branch of type Line
PowerFlows.flow_val
— MethodCalculates the From - To complex power flow (Flow injected at the bus) of branch of type TapTransformer
PowerFlows.flow_val
— MethodCalculates the From - To complex power flow (Flow injected at the bus) of branch of type Transformer2W
PowerFlows.make_power_flow_container
— FunctionCreate 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 containertime_steps::Int
: number of time periods to consider (default is1
)timestep_names::Vector{String}
: names of the time periods defines by the argument "time_steps". Default value isString[]
.check_connectivity::Bool
: Perform connectivity check on the network matrix. Default value istrue
.
PowerFlows.name_formatter_from_component_ids
— MethodUse PSS/E exporter metadata to build a function that maps component names back to their original Sienna values.
PowerFlows.reset_caches
— MethodForce all cached information (serialized metadata, component lists, etc.) to be regenerated
PowerFlows.serialize_component_ids
— MethodTake the output of create_component_ids
and make it more suitable for JSON serialization
PowerFlows.solve_powerflow!
— MethodEvaluates the power flows on each system's branch and updates the PowerFlowData structure.
Arguments:
data::PTDFPowerFlowData
: PTDFPowerFlowData structure containing all the information related to the system's power flow.
PowerFlows.solve_powerflow!
— MethodEvaluates the power flows on each system's branch and updates the PowerFlowData structure.
Arguments:
data::vPTDFPowerFlowData
: vPTDFPowerFlowData structure containing all the information related to the system's power flow.
PowerFlows.supports_multi_period
— MethodTrait signifying whether the PowerFlowContainer
can represent multi-period data. Must be implemented for all concrete subtypes.
PowerFlows.update_system!
— MethodModify 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.
PowerFlows.with_units
— MethodA context manager similar to Logging.with_logger
that sets the system's units to the given value, executes the function, then sets them back. Suppresses logging below Warn
from internal calls to set_units_base_system!
. Not thread safe.
PowerFlows.write_powerflow_solution!
— MethodUpdates system voltages and powers with power flow results
PowerFlows.write_to_buffers!
— MethodWRITTEN 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.
PowerFlows.write_to_buffers!
— MethodWRITTEN TO SPEC: PSS/E 33.3 POM 5.2.1 Case Identification Data
PowerFlows.write_to_buffers!
— MethodWRITTEN TO SPEC: PSS/E 33.3 POM 5.2.1 Fixed Bus Shunt Data
PowerFlows.write_to_buffers!
— MethodIf the exportsettings flag `sourcesas_generatorsis set, export
PSY.Sourceinstances as PSS/E generators in addition to
PSY.Generator`s
WRITTEN TO SPEC: PSS/E 33.3 POM 5.2.1 Generator Data
PowerFlows.write_to_buffers!
— MethodWRITTEN TO SPEC: PSS/E 33.3 POM 5.2.1 Load Data
PowerFlows.write_to_buffers!
— MethodWRITTEN TO SPEC: PSS/E 33.3 POM 5.2.1 Non-Transformer Branch Data
PowerFlows.write_to_buffers!
— MethodWRITTEN TO SPEC: PSS/E 33.3 POM 5.2.1 Q Record
PowerFlows.write_to_buffers!
— MethodCurrently only supports two-winding transformers
WRITTEN TO SPEC: PSS/E 33.3 POM 5.2.1 Transformer Data
PowerFlows.write_to_buffers!
— MethodAssumes that the Sienna zone names are already PSS/E compatible
WRITTEN TO SPEC: PSS/E 33.3 POM 5.2.1 Zone Data