PowerSystem
Description
ExaPF.PowerSystem.AbstractPowerSystem — TypeAbstractPowerSystemFirst layer of the package. Store the topology of a given transmission network, including:
- the power injection at each bus ;
- the admittance matrix ;
- the default voltage at each bus.
Data are imported either from a matpower file, or a PSSE file.
ExaPF.PowerSystem.PowerNetwork — TypePowerNetwork <: AbstractPowerSystemThis structure contains constant parameters that define the topology and physics of the power network.
The object PowerNetwork uses its own contiguous indexing for the buses. The indexing is independent from those specified in the Matpower or the PSSE input file. However, a correspondence between the two indexing (Input indexing to PowerNetwork indexing) is stored inside the attribute bus_to_indexes.
Note
The object PowerNetwork is created in the host memory. Use a AbstractFormulation object to move data to the target device.
ExaPF.PowerSystem.load_case — Functionload_case(case_name, lib::PowerNetworkLibrary=EXADATA)Convenient function to load a PowerNetwork instance from one of the benchmark library (dir=EXADATA for MATPOWER, dir=PGLIB for PGLIB-OPF). Default library is lib=EXADATA.
Examples
julia> net = PS.load_case("case118") # default is MATPOWER
PowerNetwork object with:
Buses: 118 (Slack: 1. PV: 53. PQ: 64)
Generators: 54.
julia> net = PS.load_case("case1354_pegase", PS.PGLIB)
PowerNetwork object with:
Buses: 1354 (Slack: 1. PV: 259. PQ: 1094)
Generators: 260.API Reference
Network elements
ExaPF.PowerSystem.AbstractNetworkElement — TypeAbstractNetworkElementAbstraction for all physical elements being parts of a AbstractPowerSystem. Elements are divided in
- transmission lines (
Lines) - buses (
Buses) - generators (
Generators)
List of elements:
ExaPF.PowerSystem.Buses — TypeBuses <: AbstractNetworkElementBuses of a transmission network.
ExaPF.PowerSystem.Lines — TypeLines <: AbstractNetworkElementLines of a transmission network.
ExaPF.PowerSystem.Generators — TypeGenerators <: AbstractElementGenerators in a transmission network
Network attributes
ExaPF.PowerSystem.AbstractNetworkAttribute — TypeAbstractNetworkAttributeAttribute of a AbstractPowerSystem.
List of attributes:
ExaPF.PowerSystem.NumberOfBuses — TypeNumberOfBuses <: AbstractNetworkAttributeNumber of buses in a AbstractPowerSystem.
ExaPF.PowerSystem.NumberOfLines — TypeNumberOfLines <: AbstractNetworkAttributeNumber of lines in a AbstractPowerSystem.
ExaPF.PowerSystem.NumberOfGenerators — TypeNumberOfGenerators <: AbstractNetworkAttributeNumber of generators in a AbstractPowerSystem.
ExaPF.PowerSystem.NumberOfPVBuses — TypeNumberOfPVBuses <: AbstractNetworkAttributeNumber of PV buses in a AbstractPowerSystem.
ExaPF.PowerSystem.NumberOfPQBuses — TypeNumberOfPQBuses <: AbstractNetworkAttributeNumber of PQ buses in a AbstractPowerSystem.
ExaPF.PowerSystem.NumberOfSlackBuses — TypeNumberOfSlackBuses <: AbstractNetworkAttributeNumber of slack buses in a AbstractPowerSystem.
ExaPF.PowerSystem.BaseMVA — TypeBaseMVA <: AbstractNetworkAttributeBase MVA of the network.
ExaPF.PowerSystem.BusAdmittanceMatrix — TypeBusAdmittanceMatrix <: AbstractNetworkAttributeBus admittance matrix associated with the topology of the network.
Query the indexing of the different elements in a given network:
ExaPF.PowerSystem.PVIndexes — TypePVIndexes <: AbstractIndexingIndexes of the PV buses in a AbstractPowerSystem.
ExaPF.PowerSystem.PQIndexes — TypePQIndexes <: AbstractIndexingIndexes of the PQ buses in a AbstractPowerSystem.
ExaPF.PowerSystem.SlackIndexes — TypeSlackIndexes <: AbstractIndexingIndexes of the slack buses in a AbstractPowerSystem.
ExaPF.PowerSystem.GeneratorIndexes — TypeGeneratorIndexes <: AbstractIndexingIndexes of the generators in a AbstractPowerSystem.
Network values
ExaPF.PowerSystem.AbstractNetworkValues — TypeAbstractNetworkValuesNumerical values attached to the different attributes of the network.
List of values:
ExaPF.PowerSystem.VoltageMagnitude — TypeVoltageMagnitude <: AbstractNetworkValuesMagnitude |v| of the voltage v = |v| exp(i θ).
ExaPF.PowerSystem.VoltageAngle — TypeVoltageAngle <: AbstractNetworkValuesAngle θ of the voltage v = |v| exp(i θ).
ExaPF.PowerSystem.ActivePower — TypeActivePower <: AbstractNetworkValuesActive power P of the complex power S = P + iQ.
ExaPF.PowerSystem.ReactivePower — TypeReactivePower <: AbstractNetworkValuesReactive power Q of the complex power S = P + iQ.
ExaPF.PowerSystem.ActiveLoad — TypeActiveLoad <: AbstractNetworkValuesActive load Pd at buses.
ExaPF.PowerSystem.ReactiveLoad — TypeReactiveLoad <: AbstractNetworkValuesReactive load Qd at buses.
Function to get the range of a given value:
ExaPF.PowerSystem.bounds — Functionbounds(pf::AbstractPowerSystem, attr::AbstractNetworkAttribute, val::AbstractNetworkValues)Return lower and upper bounds corresponding to the admissible values of the AbstractNetworkAttribute attr.
Examples
p_min, p_max = bounds(pf, Generator(), ActivePower())
v_min, v_max = bounds(pf, Buses(), VoltageMagnitude())