PowerSystems

API documentation

Index

Exported

PowerSystems.AGCType
mutable struct AGC <: Service
    name::String
    available::Bool
    bias::Float64
    K_p::Float64
    K_i::Float64
    K_d::Float64
    delta_t::Float64
    area::Union{Nothing, Area}
    ext::Dict{String, Any}
    internal::InfrastructureSystemsInternal
end

Arguments

  • name::String
  • available::Bool
  • bias::Float64
  • K_p::Float64: PID Proportional Constant
  • K_i::Float64: PID Integral Constant
  • K_d::Float64: PID Derrivative Constant
  • delta_t::Float64: PID Discretization period [Seconds]
  • area::Union{Nothing, Area}: the area controlled by the AGC
  • ext::Dict{String, Any}
  • internal::InfrastructureSystemsInternal: power system internal reference, do not modify
source
PowerSystems.AVRFixedType
mutable struct AVRFixed <: AVR
    Emf::Float64
    ext::Dict{String, Any}
    states::Vector{Symbol}
    n_states::Int64
    internal::InfrastructureSystemsInternal
end

Parameters of a AVR that returns a fixed voltage to the rotor winding

Arguments

  • Emf::Float64: Fixed voltage to the rotor winding, validation range: (0, nothing)
  • ext::Dict{String, Any}
  • states::Vector{Symbol}: Fixed AVR has no states
  • n_states::Int64: Fixed AVR has no states
  • internal::InfrastructureSystemsInternal: power system internal reference, do not modify
source
PowerSystems.AVRSimpleType
mutable struct AVRSimple <: AVR
    Kv::Float64
    ext::Dict{String, Any}
    states::Vector{Symbol}
    n_states::Int64
    internal::InfrastructureSystemsInternal
end

Parameters of a simple proportional AVR in the derivative of EMF i.e. an integrator controller on EMF

Arguments

  • Kv::Float64: Proportional Gain, validation range: (0, nothing)
  • ext::Dict{String, Any}
  • states::Vector{Symbol}
  • n_states::Int64: Fixed AVR has 1 states
  • internal::InfrastructureSystemsInternal: power system internal reference, do not modify
source
PowerSystems.AVRTypeIType
mutable struct AVRTypeI <: AVR
    Ka::Float64
    Ke::Float64
    Kf::Float64
    Ta::Float64
    Te::Float64
    Tf::Float64
    Tr::Float64
    Vr_max::Float64
    Vr_min::Float64
    Ae::Float64
    Be::Float64
    ext::Dict{String, Any}
    states::Vector{Symbol}
    n_states::Int64
    internal::InfrastructureSystemsInternal
end

Parameters of an Automatic Voltage Regulator Type I - Resembles IEEE Type DC1

Arguments

  • Ka::Float64: Amplifier Gain, validation range: (0, nothing)
  • Ke::Float64: Field circuit integral deviation, validation range: (0, nothing)
  • Kf::Float64: Stabilizer Gain in s * pu/pu, validation range: (0, nothing)
  • Ta::Float64: Amplifier Time Constant in s, validation range: (0, nothing)
  • Te::Float64: Field Circuit Time Constant in s, validation range: (0, nothing)
  • Tf::Float64: Stabilizer Time Constant in s, validation range: (0, nothing)
  • Tr::Float64: Voltage Measurement Time Constant in s, validation range: (0, nothing)
  • Vr_max::Float64: Maximum regulator voltage in pu, validation range: (0, nothing)
  • Vr_min::Float64: Minimum regulator voltage in pu, validation range: (0, nothing)
  • Ae::Float64: 1st ceiling coefficient, validation range: (0, nothing)
  • Be::Float64: 2nd ceiling coefficient, validation range: (0, nothing)
  • ext::Dict{String, Any}
  • states::Vector{Symbol}
  • n_states::Int64
  • internal::InfrastructureSystemsInternal: power system internal reference, do not modify
source
PowerSystems.AVRTypeIIType
mutable struct AVRTypeII <: AVR
    K0::Float64
    T1::Float64
    T2::Float64
    T3::Float64
    T4::Float64
    Te::Float64
    Tr::Float64
    Vr_max::Float64
    Vr_min::Float64
    Ae::Float64
    Be::Float64
    ext::Dict{String, Any}
    states::Vector{Symbol}
    n_states::Int64
    internal::InfrastructureSystemsInternal
end

Parameters of an Automatic Voltage Regulator Type II - Typical static exciter model

Arguments

  • K0::Float64: Regulator Gain, validation range: (0, nothing)
  • T1::Float64: First Pole in s, validation range: (0, nothing)
  • T2::Float64: First zero in s, validation range: (0, nothing)
  • T3::Float64: First Pole in s, validation range: (0, nothing)
  • T4::Float64: First zero in s, validation range: (0, nothing)
  • Te::Float64: Field Circuit Time Constant in s, validation range: (0, nothing)
  • Tr::Float64: Voltage Measurement Time Constant in s, validation range: (0, nothing)
  • Vr_max::Float64: Maximum regulator voltage in pu, validation range: (0, nothing)
  • Vr_min::Float64: Minimum regulator voltage in pu, validation range: (0, nothing)
  • Ae::Float64: 1st ceiling coefficient, validation range: (0, nothing)
  • Be::Float64: 2nd ceiling coefficient, validation range: (0, nothing)
  • ext::Dict{String, Any}
  • states::Vector{Symbol}
  • n_states::Int64
  • internal::InfrastructureSystemsInternal: power system internal reference, do not modify
source
PowerSystems.AndersonFouadMachineType
mutable struct AndersonFouadMachine <: Machine
    R::Float64
    Xd::Float64
    Xq::Float64
    Xd_p::Float64
    Xq_p::Float64
    Xd_pp::Float64
    Xq_pp::Float64
    Td0_p::Float64
    Tq0_p::Float64
    Td0_pp::Float64
    Tq0_pp::Float64
    MVABase::Float64
    ext::Dict{String, Any}
    states::Vector{Symbol}
    n_states::Int64
    internal::InfrastructureSystemsInternal
end

Parameters of 6-states synchronous machine: Anderson-Fouad model

Arguments

  • R::Float64: Resistance after EMF in machine per unit, validation range: (0, nothing)
  • Xd::Float64: Reactance after EMF in d-axis per unit, validation range: (0, nothing)
  • Xq::Float64: Reactance after EMF in q-axis per unit, validation range: (0, nothing)
  • Xd_p::Float64: Transient reactance after EMF in d-axis per unit, validation range: (0, nothing)
  • Xq_p::Float64: Transient reactance after EMF in q-axis per unit, validation range: (0, nothing)
  • Xd_pp::Float64: Sub-Transient reactance after EMF in d-axis per unit, validation range: (0, nothing)
  • Xq_pp::Float64: Sub-Transient reactance after EMF in q-axis per unit, validation range: (0, nothing)
  • Td0_p::Float64: Time constant of transient d-axis voltage, validation range: (0, nothing)
  • Tq0_p::Float64: Time constant of transient q-axis voltage, validation range: (0, nothing)
  • Td0_pp::Float64: Time constant of sub-transient d-axis voltage, validation range: (0, nothing)
  • Tq0_pp::Float64: Time constant of sub-transient q-axis voltage, validation range: (0, nothing)
  • MVABase::Float64: Nominal Capacity in MVA, validation range: (0, nothing)
  • ext::Dict{String, Any}
  • states::Vector{Symbol}
  • n_states::Int64
  • internal::InfrastructureSystemsInternal: power system internal reference, do not modify
source
PowerSystems.ArcType
mutable struct Arc <: Topology
    from::Bus
    to::Bus
    internal::InfrastructureSystemsInternal
end

A topological Arc.

Arguments

  • from::Bus: The initial bus
  • to::Bus: The terminal bus
  • internal::InfrastructureSystemsInternal: power system internal reference, do not modify
source
PowerSystems.AreaType
mutable struct Area <: AggregationTopology
    name::String
    maxactivepower::Float64
    maxreactivepower::Float64
    forecasts::InfrastructureSystems.Forecasts
    internal::InfrastructureSystemsInternal
end

A collection of buses for control purposes.

Arguments

  • name::String
  • maxactivepower::Float64
  • maxreactivepower::Float64
  • forecasts::InfrastructureSystems.Forecasts: internal forecast storage
  • internal::InfrastructureSystemsInternal: power system internal reference, do not modify
source
PowerSystems.AverageConverterType
mutable struct AverageConverter <: Converter
    v_rated::Float64
    s_rated::Float64
    ext::Dict{String, Any}
    states::Vector{Symbol}
    n_states::Int64
end

Parameters of an average converter model

Arguments

  • v_rated::Float64: rated voltage, validation range: (0, nothing)
  • s_rated::Float64: rated VA, validation range: (0, nothing)
  • ext::Dict{String, Any}
  • states::Vector{Symbol}
  • n_states::Int64
source
PowerSystems.BaseMachineType
mutable struct BaseMachine <: Machine
    R::Float64
    Xd_p::Float64
    eq_p::Float64
    MVABase::Float64
    ext::Dict{String, Any}
    states::Vector{Symbol}
    n_states::Int64
    internal::InfrastructureSystemsInternal
end

Parameters of an Automatic Voltage Regulator Type II - Typical static exciter model

Arguments

  • R::Float64: Resistance after EMF in machine per unit, validation range: (0, nothing)
  • Xd_p::Float64: Reactance after EMF in machine per unit, validation range: (0, nothing)
  • eq_p::Float64: Fixed EMF behind the impedance, validation range: (0, nothing)
  • MVABase::Float64: Nominal Capacity in MVA, validation range: (0, nothing)
  • ext::Dict{String, Any}
  • states::Vector{Symbol}
  • n_states::Int64
  • internal::InfrastructureSystemsInternal: power system internal reference, do not modify
source
PowerSystems.BusType
mutable struct Bus <: Topology
    number::Int64
    name::String
    bustype::Union{Nothing, BusTypes.BusType}
    angle::Union{Nothing, Float64}
    voltage::Union{Nothing, Float64}
    voltagelimits::Union{Nothing, Min_Max}
    basevoltage::Union{Nothing, Float64}
    area::Union{Nothing, Area}
    load_zone::Union{Nothing, LoadZone}
    ext::Dict{String, Any}
    internal::InfrastructureSystemsInternal
end

A power-system bus.

Arguments

  • number::Int64: number associated with the bus
  • name::String: the name of the bus
  • bustype::Union{Nothing, BusTypes.BusType}: bus type
  • angle::Union{Nothing, Float64}: angle of the bus in radians, validation range: (-1.571, 1.571), action if invalid: error
  • voltage::Union{Nothing, Float64}: voltage as a multiple of basevoltage, validation range: voltagelimits, action if invalid: warn
  • voltagelimits::Union{Nothing, Min_Max}: limits on the voltage variation as multiples of basevoltage
  • basevoltage::Union{Nothing, Float64}: the base voltage in kV, validation range: (0, nothing), action if invalid: error
  • area::Union{Nothing, Area}: the area containing the bus
  • load_zone::Union{Nothing, LoadZone}: the load zone containing the bus
  • ext::Dict{String, Any}
  • internal::InfrastructureSystemsInternal: power system internal reference, do not modify
source
PowerSystems.BusMethod
Bus(number, name, bustype, angle, voltage, voltagelimits, basevoltage, area, load_zone; ext)

Allows construction with bus type specified as a string for legacy code.

source
PowerSystems.CurrentControlType
mutable struct CurrentControl <: InnerControl
    kpv::Float64
    kiv::Float64
    kffv::Float64
    rv::Float64
    lv::Float64
    kpc::Float64
    kic::Float64
    kffi::Float64
    ωad::Float64
    kad::Float64
    ext::Dict{String, Any}
    states::Vector{Symbol}
    n_states::Int64
end

Parameters of an inner loop current control PID using virtual impedance.

Arguments

  • kpv::Float64: voltage controller proportional gain, validation range: (0, nothing)
  • kiv::Float64: voltage controller integral gain, validation range: (0, nothing)
  • kffv::Float64: Binary variable to enable feed-forward gain of voltage., validation range: (0, nothing)
  • rv::Float64: virtual resistance, validation range: (0, nothing)
  • lv::Float64: virtual inductance, validation range: (0, nothing)
  • kpc::Float64: current controller proportional gain, validation range: (0, nothing)
  • kic::Float64: current controller integral gain, validation range: (0, nothing)
  • kffi::Float64: Binary variable to enable feed-forward gain of current, validation range: (0, nothing)
  • ωad::Float64: active damping filter cutoff frequency (rad/sec), validation range: (0, nothing)
  • kad::Float64: active damping gain, validation range: (0, nothing)
  • ext::Dict{String, Any}
  • states::Vector{Symbol}
  • n_states::Int64
source
PowerSystems.FiveMassShaftType
mutable struct FiveMassShaft <: Shaft
    H::Float64
    H_hp::Float64
    H_ip::Float64
    H_lp::Float64
    H_ex::Float64
    D::Float64
    D_hp::Float64
    D_ip::Float64
    D_lp::Float64
    D_ex::Float64
    D_12::Float64
    D_23::Float64
    D_34::Float64
    D_45::Float64
    K_hp::Float64
    K_ip::Float64
    K_lp::Float64
    K_ex::Float64
    ext::Dict{String, Any}
    states::Vector{Symbol}
    n_states::Int64
    internal::InfrastructureSystemsInternal
end

Parameters of 5 mass-spring shaft model. It contains a High-Pressure (HP) steam turbine, Intermediate-Pressure (IP) steam turbine, Low-Pressure (LP) steam turbine, the Rotor and an Exciter (EX) mover.

Arguments

  • H::Float64: Rotor inertia constant in MWs/MVA, validation range: (0, nothing)
  • H_hp::Float64: High pressure turbine inertia constant in MWs/MVA, validation range: (0, nothing)
  • H_ip::Float64: Intermediate pressure turbine inertia constant in MWs/MVA, validation range: (0, nothing)
  • H_lp::Float64: Low pressure turbine inertia constant in MWs/MVA, validation range: (0, nothing)
  • H_ex::Float64: Exciter inertia constant in MWs/MVA, validation range: (0, nothing)
  • D::Float64: Rotor natural damping in pu, validation range: (0, nothing)
  • D_hp::Float64: High pressure turbine natural damping in pu, validation range: (0, nothing)
  • D_ip::Float64: Intermediate pressure turbine natural damping in pu, validation range: (0, nothing)
  • D_lp::Float64: Low pressure turbine natural damping in pu, validation range: (0, nothing)
  • D_ex::Float64: Exciter natural damping in pu, validation range: (0, nothing)
  • D_12::Float64: High-Intermediate pressure turbine damping, validation range: (0, nothing)
  • D_23::Float64: Intermediate-Low pressure turbine damping, validation range: (0, nothing)
  • D_34::Float64: Low pressure turbine-Rotor damping, validation range: (0, nothing)
  • D_45::Float64: Rotor-Exciter damping, validation range: (0, nothing)
  • K_hp::Float64: High pressure turbine angle coefficient, validation range: (0, nothing)
  • K_ip::Float64: Intermediate pressure turbine angle coefficient, validation range: (0, nothing)
  • K_lp::Float64: Low pressure turbine angle coefficient, validation range: (0, nothing)
  • K_ex::Float64: Exciter angle coefficient, validation range: (0, nothing)
  • ext::Dict{String, Any}
  • states::Vector{Symbol}
  • n_states::Int64
  • internal::InfrastructureSystemsInternal: power system internal reference, do not modify
source
PowerSystems.FixedAdmittanceType
mutable struct FixedAdmittance <: ElectricLoad
    name::String
    available::Bool
    bus::Bus
    Y::Complex{Float64}
    services::Vector{Service}
    ext::Dict{String, Any}
    forecasts::InfrastructureSystems.Forecasts
    internal::InfrastructureSystemsInternal
end

Arguments

  • name::String
  • available::Bool
  • bus::Bus
  • Y::Complex{Float64}: System per-unit value
  • services::Vector{Service}: Services that this device contributes to
  • ext::Dict{String, Any}
  • forecasts::InfrastructureSystems.Forecasts: internal forecast storage
  • internal::InfrastructureSystemsInternal: power system internal reference, do not modify
source
PowerSystems.FixedDCSourceType
mutable struct FixedDCSource <: DCSource
    voltage::Float64
    ext::Dict{String, Any}
    states::Vector{Symbol}
    n_states::Int64
    internal::InfrastructureSystemsInternal
end

Parameters of a Fixed DC Source that returns a fixed DC voltage

Arguments

  • voltage::Float64: rated VA, validation range: (0, nothing)
  • ext::Dict{String, Any}
  • states::Vector{Symbol}
  • n_states::Int64
  • internal::InfrastructureSystemsInternal: power system internal reference, do not modify
source
PowerSystems.FullMachineType
mutable struct FullMachine <: Machine
    R::Float64
    R_f::Float64
    R_1d::Float64
    R_1q::Float64
    L_d::Float64
    L_q::Float64
    L_ad::Float64
    L_aq::Float64
    L_f1d::Float64
    L_ff::Float64
    L_1d::Float64
    L_1q::Float64
    MVABase::Float64
    ext::Dict{String, Any}
    inv_d_fluxlink::Array{Float64,2}
    inv_q_fluxlink::Array{Float64,2}
    states::Vector{Symbol}
    n_states::Int64
    internal::InfrastructureSystemsInternal
end

Parameter of a full order flux stator-rotor model without zero sequence flux in the stator. The derivative of stator fluxes (ψd and ψq) is NOT neglected. Only one q-axis damping circuit is considered. All parameters are in machine per unit. Refer to Chapter 3 of Power System Stability and Control by P. Kundur or Chapter 11 of Power System Dynamics: Stability and Control, by J. Machowski, J. Bialek and J. Bumby, for more details. Note that the models are somewhat different (but equivalent) due to the different Park Transformation used in both books.

Arguments

  • R::Float64: Resistance after EMF in machine per unit, validation range: (0, nothing)
  • R_f::Float64: Field rotor winding resistance in per unit, validation range: (0, nothing)
  • R_1d::Float64: Damping rotor winding resistance on d-axis in per unit. This value is denoted as RD in Machowski., validation range: (0, nothing)
  • R_1q::Float64: Damping rotor winding resistance on q-axis in per unit. This value is denoted as RQ in Machowski., validation range: (0, nothing)
  • L_d::Float64: Inductance of fictitious damping that represent the effect of the three-phase stator winding in the d-axis of the rotor, in per unit. This value is denoted as Lad + Ll in Kundur (and Ld in Machowski)., validation range: (0, nothing)
  • L_q::Float64: Inductance of fictitious damping that represent the effect of the three-phase stator winding in the q-axis of the rotor, in per unit. This value is denoted as Laq + Ll in Kundur., validation range: (0, nothing)
  • L_ad::Float64: Mutual inductance between stator winding and rotor field (and damping) winding inductance on d-axis, in per unit, validation range: (0, nothing)
  • L_aq::Float64: Mutual inductance between stator winding and rotor damping winding inductance on q-axis, in per unit, validation range: (0, nothing)
  • L_f1d::Float64: Mutual inductance between rotor field winding and rotor damping winding inductance on d-axis, in per unit, validation range: (0, nothing)
  • L_ff::Float64: Field rotor winding inductance, in per unit, validation range: (0, nothing)
  • L_1d::Float64: Inductance of the d-axis rotor damping circuit, in per unit, validation range: (0, nothing)
  • L_1q::Float64: Inductance of the q-axis rotor damping circuit, in per unit, validation range: (0, nothing)
  • MVABase::Float64: Nominal Capacity in MVA, validation range: (0, nothing)
  • ext::Dict{String, Any}
  • inv_d_fluxlink::Array{Float64,2}: Equations 3.127, 3.130, 3.131 From Kundur
  • inv_q_fluxlink::Array{Float64,2}: Equations 3.128, 3.132 From Kundur
  • states::Vector{Symbol}
  • n_states::Int64
  • internal::InfrastructureSystemsInternal: power system internal reference, do not modify
source
PowerSystems.GenericBatteryType
mutable struct GenericBattery <: Storage
    name::String
    available::Bool
    bus::Bus
    primemover::PrimeMovers.PrimeMover
    energy::Float64
    capacity::Min_Max
    rating::Float64
    activepower::Float64
    inputactivepowerlimits::Min_Max
    outputactivepowerlimits::Min_Max
    efficiency::NamedTuple{(:in, :out), Tuple{Float64, Float64}}
    reactivepower::Float64
    reactivepowerlimits::Union{Nothing, Min_Max}
    services::Vector{Service}
    dynamic_injector::Union{Nothing, DynamicInjection}
    ext::Dict{String, Any}
    forecasts::InfrastructureSystems.Forecasts
    internal::InfrastructureSystemsInternal
end

Data structure for a generic battery

Arguments

  • name::String
  • available::Bool
  • bus::Bus
  • primemover::PrimeMovers.PrimeMover: PrimeMover Technology according to EIA 923
  • energy::Float64: State of Charge of the Battery p.u.-hr, validation range: (0, nothing), action if invalid: error
  • capacity::Min_Max: Maximum and Minimum storage capacity in p.u.-hr, validation range: (0, nothing), action if invalid: error
  • rating::Float64
  • activepower::Float64
  • inputactivepowerlimits::Min_Max, validation range: (0, nothing), action if invalid: error
  • outputactivepowerlimits::Min_Max, validation range: (0, nothing), action if invalid: error
  • efficiency::NamedTuple{(:in, :out), Tuple{Float64, Float64}}, validation range: (0, 1), action if invalid: warn
  • reactivepower::Float64, validation range: reactivepowerlimits, action if invalid: warn
  • reactivepowerlimits::Union{Nothing, Min_Max}
  • services::Vector{Service}: Services that this device contributes to
  • dynamic_injector::Union{Nothing, DynamicInjection}: corresponding dynamic injection device
  • ext::Dict{String, Any}
  • forecasts::InfrastructureSystems.Forecasts: internal forecast storage
  • internal::InfrastructureSystemsInternal: power system internal reference, do not modify
source
PowerSystems.HVDCLineType
mutable struct HVDCLine <: DCBranch
    name::String
    available::Bool
    activepower_flow::Float64
    arc::Arc
    activepowerlimits_from::Min_Max
    activepowerlimits_to::Min_Max
    reactivepowerlimits_from::Min_Max
    reactivepowerlimits_to::Min_Max
    loss::NamedTuple{(:l0, :l1), Tuple{Float64, Float64}}
    services::Vector{Service}
    ext::Dict{String, Any}
    forecasts::InfrastructureSystems.Forecasts
    internal::InfrastructureSystemsInternal
end

a High voltage DC line.

Arguments

  • name::String
  • available::Bool
  • activepower_flow::Float64
  • arc::Arc
  • activepowerlimits_from::Min_Max
  • activepowerlimits_to::Min_Max
  • reactivepowerlimits_from::Min_Max
  • reactivepowerlimits_to::Min_Max
  • loss::NamedTuple{(:l0, :l1), Tuple{Float64, Float64}}
  • services::Vector{Service}: Services that this device contributes to
  • ext::Dict{String, Any}
  • forecasts::InfrastructureSystems.Forecasts: internal forecast storage
  • internal::InfrastructureSystemsInternal: power system internal reference, do not modify
source
PowerSystems.HydroDispatchType
mutable struct HydroDispatch <: HydroGen
    name::String
    available::Bool
    bus::Bus
    activepower::Float64
    reactivepower::Float64
    rating::Float64
    primemover::PrimeMovers.PrimeMover
    activepowerlimits::Min_Max
    reactivepowerlimits::Union{Nothing, Min_Max}
    ramplimits::Union{Nothing, NamedTuple{(:up, :down), Tuple{Float64, Float64}}}
    timelimits::Union{Nothing, NamedTuple{(:up, :down), Tuple{Float64, Float64}}}
    services::Vector{Service}
    dynamic_injector::Union{Nothing, DynamicInjection}
    ext::Dict{String, Any}
    forecasts::InfrastructureSystems.Forecasts
    internal::InfrastructureSystemsInternal
end

Arguments

  • name::String
  • available::Bool
  • bus::Bus
  • activepower::Float64
  • reactivepower::Float64, validation range: reactivepowerlimits, action if invalid: warn
  • rating::Float64: Thermal limited MVA Power Output of the unit. <= Capacity, validation range: (0, nothing), action if invalid: error
  • primemover::PrimeMovers.PrimeMover: PrimeMover Technology according to EIA 923
  • activepowerlimits::Min_Max
  • reactivepowerlimits::Union{Nothing, Min_Max}, action if invalid: warn
  • ramplimits::Union{Nothing, NamedTuple{(:up, :down), Tuple{Float64, Float64}}}: ramp up and ramp down limits, validation range: (0, nothing), action if invalid: error
  • timelimits::Union{Nothing, NamedTuple{(:up, :down), Tuple{Float64, Float64}}}: Minimum up and Minimum down time limits in hours, validation range: (0, nothing), action if invalid: error
  • services::Vector{Service}: Services that this device contributes to
  • dynamic_injector::Union{Nothing, DynamicInjection}: corresponding dynamic injection device
  • ext::Dict{String, Any}
  • forecasts::InfrastructureSystems.Forecasts: internal forecast storage
  • internal::InfrastructureSystemsInternal: power system internal reference, do not modify
source
PowerSystems.HydroEnergyReservoirType
mutable struct HydroEnergyReservoir <: HydroGen
    name::String
    available::Bool
    bus::Bus
    activepower::Float64
    reactivepower::Float64
    rating::Float64
    primemover::PrimeMovers.PrimeMover
    activepowerlimits::Min_Max
    reactivepowerlimits::Union{Nothing, Min_Max}
    ramplimits::Union{Nothing, NamedTuple{(:up, :down), Tuple{Float64, Float64}}}
    timelimits::Union{Nothing, NamedTuple{(:up, :down), Tuple{Float64, Float64}}}
    op_cost::TwoPartCost
    storage_capacity::Float64
    inflow::Float64
    initial_storage::Float64
    services::Vector{Service}
    dynamic_injector::Union{Nothing, DynamicInjection}
    ext::Dict{String, Any}
    forecasts::InfrastructureSystems.Forecasts
    internal::InfrastructureSystemsInternal
end

Arguments

  • name::String
  • available::Bool
  • bus::Bus
  • activepower::Float64
  • reactivepower::Float64, validation range: reactivepowerlimits, action if invalid: warn
  • rating::Float64: Thermal limited MVA Power Output of the unit. <= Capacity, validation range: (0, nothing), action if invalid: error
  • primemover::PrimeMovers.PrimeMover: PrimeMover Technology according to EIA 923
  • activepowerlimits::Min_Max
  • reactivepowerlimits::Union{Nothing, Min_Max}, action if invalid: warn
  • ramplimits::Union{Nothing, NamedTuple{(:up, :down), Tuple{Float64, Float64}}}: ramp up and ramp down limits, validation range: (0, nothing), action if invalid: error
  • timelimits::Union{Nothing, NamedTuple{(:up, :down), Tuple{Float64, Float64}}}: Minimum up and Minimum down time limits in hours, validation range: (0, nothing), action if invalid: error
  • op_cost::TwoPartCost: Operation Cost of Generation TwoPartCost
  • storage_capacity::Float64, validation range: (0, nothing), action if invalid: error
  • inflow::Float64, validation range: (0, nothing), action if invalid: error
  • initial_storage::Float64, validation range: (0, nothing), action if invalid: error
  • services::Vector{Service}: Services that this device contributes to
  • dynamic_injector::Union{Nothing, DynamicInjection}: corresponding dynamic injection device
  • ext::Dict{String, Any}
  • forecasts::InfrastructureSystems.Forecasts: internal forecast storage
  • internal::InfrastructureSystemsInternal: power system internal reference, do not modify
source
PowerSystems.InterruptibleLoadType
mutable struct InterruptibleLoad <: ControllableLoad
    name::String
    available::Bool
    bus::Bus
    model::LoadModels.LoadModel
    activepower::Float64
    reactivepower::Float64
    maxactivepower::Float64
    maxreactivepower::Float64
    op_cost::TwoPartCost
    services::Vector{Service}
    dynamic_injector::Union{Nothing, DynamicInjection}
    ext::Dict{String, Any}
    forecasts::InfrastructureSystems.Forecasts
    internal::InfrastructureSystemsInternal
end

Arguments

  • name::String
  • available::Bool
  • bus::Bus
  • model::LoadModels.LoadModel
  • activepower::Float64
  • reactivepower::Float64
  • maxactivepower::Float64
  • maxreactivepower::Float64
  • op_cost::TwoPartCost: Operation Cost of Generation TwoPartCost
  • services::Vector{Service}: Services that this device contributes to
  • dynamic_injector::Union{Nothing, DynamicInjection}: corresponding dynamic injection device
  • ext::Dict{String, Any}
  • forecasts::InfrastructureSystems.Forecasts: internal forecast storage
  • internal::InfrastructureSystemsInternal: power system internal reference, do not modify
source
PowerSystems.KauraPLLType
mutable struct KauraPLL <: FrequencyEstimator
    ω_lp::Float64
    kp_pll::Float64
    ki_pll::Float64
    ext::Dict{String, Any}
    states::Vector{Symbol}
    n_states::Int64
end

Parameters of a Phase-Locked Loop (PLL) based on Kaura, Vikram, and Vladimir Blasko. "Operation of a phase locked loop system under distorted utility conditions." IEEE Transactions on Industry applications 33.1 (1997): 58-63.

Arguments

  • ω_lp::Float64: PLL low-pass filter frequency (rad/sec), validation range: (0, nothing)
  • kp_pll::Float64: PLL proportional gain, validation range: (0, nothing)
  • ki_pll::Float64: PLL integral gain, validation range: (0, nothing)
  • ext::Dict{String, Any}
  • states::Vector{Symbol}
  • n_states::Int64
source
PowerSystems.LCLFilterType
mutable struct LCLFilter <: Filter
    lf::Float64
    rf::Float64
    cf::Float64
    lg::Float64
    rg::Float64
    ext::Dict{String, Any}
    states::Vector{Symbol}
    n_states::Int64
end

Parameters of a LCL filter outside the converter, the states are in the grid's reference frame

Arguments

  • lf::Float64: Series inductance in p.u. of converter filter, validation range: (0, nothing)
  • rf::Float64: Series resistance in p.u. of converter filter, validation range: (0, nothing)
  • cf::Float64: Shunt capacitance in p.u. of converter filter, validation range: (0, nothing)
  • lg::Float64: Series inductance in p.u. of converter filter to the grid, validation range: (0, nothing)
  • rg::Float64: Series resistance in p.u. of converter filter to the grid, validation range: (0, nothing)
  • ext::Dict{String, Any}
  • states::Vector{Symbol}
  • n_states::Int64
source
PowerSystems.LineType
mutable struct Line <: ACBranch
    name::String
    available::Bool
    activepower_flow::Float64
    reactivepower_flow::Float64
    arc::Arc
    r::Float64
    x::Float64
    b::NamedTuple{(:from, :to), Tuple{Float64, Float64}}
    rate::Float64
    anglelimits::NamedTuple{(:min, :max), Tuple{Float64, Float64}}
    services::Vector{Service}
    ext::Dict{String, Any}
    forecasts::InfrastructureSystems.Forecasts
    internal::InfrastructureSystemsInternal
end

Arguments

  • name::String
  • available::Bool
  • activepower_flow::Float64
  • reactivepower_flow::Float64
  • arc::Arc
  • r::Float64: System per-unit value, validation range: (0, 4), action if invalid: error
  • x::Float64: System per-unit value, validation range: (0, 4), action if invalid: error
  • b::NamedTuple{(:from, :to), Tuple{Float64, Float64}}: System per-unit value, validation range: (0, 100), action if invalid: error
  • rate::Float64
  • anglelimits::NamedTuple{(:min, :max), Tuple{Float64, Float64}}, validation range: (-1.571, 1.571), action if invalid: error
  • services::Vector{Service}: Services that this device contributes to
  • ext::Dict{String, Any}
  • forecasts::InfrastructureSystems.Forecasts: internal forecast storage
  • internal::InfrastructureSystemsInternal: power system internal reference, do not modify
source
PowerSystems.LineMethod
Line(name, available, activepower_flow, reactivepower_flow, arc, r, x, b, rate, anglelimits)

Accepts anglelimits as a Float64.

source
PowerSystems.LoadZoneType
mutable struct LoadZone <: AggregationTopology
    name::String
    maxactivepower::Float64
    maxreactivepower::Float64
    forecasts::InfrastructureSystems.Forecasts
    internal::InfrastructureSystemsInternal
end

A collection of buses for electricity price analysis.

Arguments

  • name::String
  • maxactivepower::Float64
  • maxreactivepower::Float64
  • forecasts::InfrastructureSystems.Forecasts: internal forecast storage
  • internal::InfrastructureSystemsInternal: power system internal reference, do not modify
source
PowerSystems.MarconatoMachineType
mutable struct MarconatoMachine <: Machine
    R::Float64
    Xd::Float64
    Xq::Float64
    Xd_p::Float64
    Xq_p::Float64
    Xd_pp::Float64
    Xq_pp::Float64
    Td0_p::Float64
    Tq0_p::Float64
    Td0_pp::Float64
    Tq0_pp::Float64
    T_AA::Float64
    MVABase::Float64
    ext::Dict{String, Any}
    γd::Float64
    γq::Float64
    states::Vector{Symbol}
    n_states::Int64
    internal::InfrastructureSystemsInternal
end

Parameters of 6-states synchronous machine: Marconato model

Arguments

  • R::Float64: Resistance after EMF in machine per unit, validation range: (0, nothing)
  • Xd::Float64: Reactance after EMF in d-axis per unit, validation range: (0, nothing)
  • Xq::Float64: Reactance after EMF in q-axis per unit, validation range: (0, nothing)
  • Xd_p::Float64: Transient reactance after EMF in d-axis per unit, validation range: (0, nothing)
  • Xq_p::Float64: Transient reactance after EMF in q-axis per unit, validation range: (0, nothing)
  • Xd_pp::Float64: Sub-Transient reactance after EMF in d-axis per unit, validation range: (0, nothing)
  • Xq_pp::Float64: Sub-Transient reactance after EMF in q-axis per unit, validation range: (0, nothing)
  • Td0_p::Float64: Time constant of transient d-axis voltage, validation range: (0, nothing)
  • Tq0_p::Float64: Time constant of transient q-axis voltage, validation range: (0, nothing)
  • Td0_pp::Float64: Time constant of sub-transient d-axis voltage, validation range: (0, nothing)
  • Tq0_pp::Float64: Time constant of sub-transient q-axis voltage, validation range: (0, nothing)
  • T_AA::Float64: Time constant of d-axis additional leakage, validation range: (0, nothing)
  • MVABase::Float64: Nominal Capacity in MVA, validation range: (0, nothing)
  • ext::Dict{String, Any}
  • γd::Float64
  • γq::Float64
  • states::Vector{Symbol}
  • n_states::Int64
  • internal::InfrastructureSystemsInternal: power system internal reference, do not modify
source
PowerSystems.MonitoredLineType
mutable struct MonitoredLine <: ACBranch
    name::String
    available::Bool
    activepower_flow::Float64
    reactivepower_flow::Float64
    arc::Arc
    r::Float64
    x::Float64
    b::NamedTuple{(:from, :to), Tuple{Float64, Float64}}
    flowlimits::NamedTuple{(:from_to, :to_from), Tuple{Float64, Float64}}
    rate::Float64
    anglelimits::Min_Max
    services::Vector{Service}
    ext::Dict{String, Any}
    forecasts::InfrastructureSystems.Forecasts
    internal::InfrastructureSystemsInternal
end

Arguments

  • name::String
  • available::Bool
  • activepower_flow::Float64
  • reactivepower_flow::Float64
  • arc::Arc
  • r::Float64: System per-unit value, validation range: (0, 4), action if invalid: error
  • x::Float64: System per-unit value, validation range: (0, 4), action if invalid: error
  • b::NamedTuple{(:from, :to), Tuple{Float64, Float64}}: System per-unit value, validation range: (0, 2), action if invalid: error
  • flowlimits::NamedTuple{(:from_to, :to_from), Tuple{Float64, Float64}}: TODO: throw warning above max SIL
  • rate::Float64: TODO: compare to SIL (warn) (theoretical limit)
  • anglelimits::Min_Max, validation range: (-1.571, 1.571), action if invalid: error
  • services::Vector{Service}: Services that this device contributes to
  • ext::Dict{String, Any}
  • forecasts::InfrastructureSystems.Forecasts: internal forecast storage
  • internal::InfrastructureSystemsInternal: power system internal reference, do not modify
source
PowerSystems.OneDOneQMachineType
mutable struct OneDOneQMachine <: Machine
    R::Float64
    Xd::Float64
    Xq::Float64
    Xd_p::Float64
    Xq_p::Float64
    Td0_p::Float64
    Tq0_p::Float64
    MVABase::Float64
    ext::Dict{String, Any}
    states::Vector{Symbol}
    n_states::Int64
    internal::InfrastructureSystemsInternal
end

Parameters of 4-states synchronous machine: Simplified Marconato model The derivative of stator fluxes (ψd and ψq) is neglected and ωψd = ψd and ωψq = ψq is assumed (i.e. ω=1.0). This is standard when transmission network dynamics is neglected.

Arguments

  • R::Float64: Resistance after EMF in machine per unit, validation range: (0, nothing)
  • Xd::Float64: Reactance after EMF in d-axis per unit, validation range: (0, nothing)
  • Xq::Float64: Reactance after EMF in q-axis per unit, validation range: (0, nothing)
  • Xd_p::Float64: Transient reactance after EMF in d-axis per unit, validation range: (0, nothing)
  • Xq_p::Float64: Transient reactance after EMF in q-axis per unit, validation range: (0, nothing)
  • Td0_p::Float64: Time constant of transient d-axis voltage, validation range: (0, nothing)
  • Tq0_p::Float64: Time constant of transient q-axis voltage, validation range: (0, nothing)
  • MVABase::Float64: Nominal Capacity in MVA, validation range: (0, nothing)
  • ext::Dict{String, Any}
  • states::Vector{Symbol}
  • n_states::Int64
  • internal::InfrastructureSystemsInternal: power system internal reference, do not modify
source
PowerSystems.OuterControlType

Parameters of a Outer-Loop controller using a virtual inertia with VSM for active power controller and a reactive power droop controller.

Conmutable structor

VirtualInertiaQDroop(A, R)

Arguments

  • A::Float64 : Active power controller using virtual inertia with VSM
  • R::Float64 : Reactive power controller using reactive power droop
source
PowerSystems.PSSFixedType
mutable struct PSSFixed <: PSS
    V_pss::Float64
    ext::Dict{String, Any}
    states::Vector{Symbol}
    n_states::Int64
    internal::InfrastructureSystemsInternal
end

Parameters of a PSS that returns a fixed voltage to add to the reference for the AVR

Arguments

  • V_pss::Float64: Fixed voltage stabilization signal, validation range: (0, nothing)
  • ext::Dict{String, Any}
  • states::Vector{Symbol}
  • n_states::Int64
  • internal::InfrastructureSystemsInternal: power system internal reference, do not modify
source
PowerSystems.PhaseShiftingTransformerType
mutable struct PhaseShiftingTransformer <: ACBranch
    name::String
    available::Bool
    activepower_flow::Float64
    reactivepower_flow::Float64
    arc::Arc
    r::Float64
    x::Float64
    primaryshunt::Float64
    tap::Float64
    α::Float64
    rate::Union{Nothing, Float64}
    services::Vector{Service}
    ext::Dict{String, Any}
    forecasts::InfrastructureSystems.Forecasts
    internal::InfrastructureSystemsInternal
end

Arguments

  • name::String
  • available::Bool
  • activepower_flow::Float64
  • reactivepower_flow::Float64
  • arc::Arc
  • r::Float64: System per-unit value, validation range: (0, 4), action if invalid: error
  • x::Float64: System per-unit value, validation range: (-2, 4), action if invalid: error
  • primaryshunt::Float64, validation range: (0, 2), action if invalid: error
  • tap::Float64, validation range: (0, 2), action if invalid: error
  • α::Float64, validation range: (-1.571, 1.571), action if invalid: warn
  • rate::Union{Nothing, Float64}, validation range: (0, nothing), action if invalid: error
  • services::Vector{Service}: Services that this device contributes to
  • ext::Dict{String, Any}
  • forecasts::InfrastructureSystems.Forecasts: internal forecast storage
  • internal::InfrastructureSystemsInternal: power system internal reference, do not modify
source
PowerSystems.PowerLoadType
mutable struct PowerLoad <: StaticLoad
    name::String
    available::Bool
    bus::Bus
    model::Union{Nothing, LoadModels.LoadModel}
    activepower::Float64
    reactivepower::Float64
    maxactivepower::Float64
    maxreactivepower::Float64
    services::Vector{Service}
    dynamic_injector::Union{Nothing, DynamicInjection}
    ext::Dict{String, Any}
    forecasts::InfrastructureSystems.Forecasts
    internal::InfrastructureSystemsInternal
end

Data structure for a static power load.

Arguments

  • name::String
  • available::Bool
  • bus::Bus
  • model::Union{Nothing, LoadModels.LoadModel}
  • activepower::Float64
  • reactivepower::Float64
  • maxactivepower::Float64
  • maxreactivepower::Float64
  • services::Vector{Service}: Services that this device contributes to
  • dynamic_injector::Union{Nothing, DynamicInjection}: corresponding dynamic injection device
  • ext::Dict{String, Any}
  • forecasts::InfrastructureSystems.Forecasts: internal forecast storage
  • internal::InfrastructureSystemsInternal: power system internal reference, do not modify
source
PowerSystems.PowerModelsDataMethod
PowerModelsData(file; kwargs...)

Constructs PowerModelsData from a raw file. Currently Supports MATPOWER and PSSE data files parsed by PowerModels.

source
PowerSystems.PowerSystemTypeType

Supertype for all PowerSystems types. All subtypes must include a InfrastructureSystemsInternal member. Subtypes should call InfrastructureSystemsInternal() by default, but also must provide a constructor that allows existing values to be deserialized.

source
PowerSystems.ReactivePowerDroopType
mutable struct ReactivePowerDroop <: ReactivePowerControl
    kq::Float64
    ωf::Float64
    ext::Dict{String, Any}
    states::Vector{Symbol}
    n_states::Int64
end

Parameters of a Reactive Power droop controller

Arguments

  • kq::Float64: frequency droop gain, validation range: (0, nothing)
  • ωf::Float64: filter frequency cutoff, validation range: (0, nothing)
  • ext::Dict{String, Any}
  • states::Vector{Symbol}
  • n_states::Int64
source
PowerSystems.RenewableDispatchType
mutable struct RenewableDispatch <: RenewableGen
    name::String
    available::Bool
    bus::Bus
    activepower::Float64
    reactivepower::Float64
    rating::Float64
    primemover::PrimeMovers.PrimeMover
    reactivepowerlimits::Union{Nothing, Min_Max}
    powerfactor::Float64
    op_cost::TwoPartCost
    services::Vector{Service}
    dynamic_injector::Union{Nothing, DynamicInjection}
    ext::Dict{String, Any}
    forecasts::InfrastructureSystems.Forecasts
    internal::InfrastructureSystemsInternal
end

Arguments

  • name::String
  • available::Bool
  • bus::Bus
  • activepower::Float64
  • reactivepower::Float64
  • rating::Float64: Thermal limited MVA Power Output of the unit. <= Capacity, validation range: (0, nothing), action if invalid: error
  • primemover::PrimeMovers.PrimeMover: PrimeMover Technology according to EIA 923
  • reactivepowerlimits::Union{Nothing, Min_Max}
  • powerfactor::Float64, validation range: (0, 1), action if invalid: error
  • op_cost::TwoPartCost: Operation Cost of Generation TwoPartCost
  • services::Vector{Service}: Services that this device contributes to
  • dynamic_injector::Union{Nothing, DynamicInjection}: corresponding dynamic injection device
  • ext::Dict{String, Any}
  • forecasts::InfrastructureSystems.Forecasts: internal forecast storage
  • internal::InfrastructureSystemsInternal: power system internal reference, do not modify
source
PowerSystems.RenewableFixType
mutable struct RenewableFix <: RenewableGen
    name::String
    available::Bool
    bus::Bus
    activepower::Float64
    reactivepower::Float64
    rating::Float64
    primemover::PrimeMovers.PrimeMover
    powerfactor::Float64
    services::Vector{Service}
    dynamic_injector::Union{Nothing, DynamicInjection}
    ext::Dict{String, Any}
    forecasts::InfrastructureSystems.Forecasts
    internal::InfrastructureSystemsInternal
end

Data Structure for fixed renewable generation technologies.

Arguments

  • name::String
  • available::Bool
  • bus::Bus
  • activepower::Float64
  • reactivepower::Float64
  • rating::Float64: Thermal limited MVA Power Output of the unit. <= Capacity, validation range: (0, nothing), action if invalid: error
  • primemover::PrimeMovers.PrimeMover: PrimeMover Technology according to EIA 923
  • powerfactor::Float64, validation range: (0, 1), action if invalid: error
  • services::Vector{Service}: Services that this device contributes to
  • dynamic_injector::Union{Nothing, DynamicInjection}: corresponding dynamic injection device
  • ext::Dict{String, Any}
  • forecasts::InfrastructureSystems.Forecasts: internal forecast storage
  • internal::InfrastructureSystemsInternal: power system internal reference, do not modify
source
PowerSystems.ReserveDemandCurveType
mutable struct ReserveDemandCurve{T <: ReserveDirection} <: Reserve{T}
    name::String
    available::Bool
    timeframe::Float64
    op_cost::TwoPartCost
    ext::Dict{String, Any}
    internal::InfrastructureSystemsInternal
end

Data Structure for a operating reserve with demand curve product for system simulations.

Arguments

  • name::String
  • available::Bool
  • timeframe::Float64: the relative saturation timeframe, validation range: (0, nothing), action if invalid: error
  • op_cost::TwoPartCost: Cost for providing reserves TwoPartCost
  • ext::Dict{String, Any}
  • internal::InfrastructureSystemsInternal: power system internal reference, do not modify
source
PowerSystems.SimpleAFMachineType
mutable struct SimpleAFMachine <: Machine
    R::Float64
    Xd::Float64
    Xq::Float64
    Xd_p::Float64
    Xq_p::Float64
    Xd_pp::Float64
    Xq_pp::Float64
    Td0_p::Float64
    Tq0_p::Float64
    Td0_pp::Float64
    Tq0_pp::Float64
    MVABase::Float64
    ext::Dict{String, Any}
    states::Vector{Symbol}
    n_states::Int64
    internal::InfrastructureSystemsInternal
end

Parameters of 4-states simplified Anderson-Fouad (SimpleAFMachine) model. The derivative of stator fluxes (ψd and ψq) is neglected and ωψd = ψd and ωψq = ψq is assumed (i.e. ω=1.0). This is standard when transmission network dynamics is neglected. If transmission dynamics is considered use the full order Anderson Fouad model.

Arguments

  • R::Float64: Resistance after EMF in machine per unit, validation range: (0, nothing)
  • Xd::Float64: Reactance after EMF in d-axis per unit, validation range: (0, nothing)
  • Xq::Float64: Reactance after EMF in q-axis per unit, validation range: (0, nothing)
  • Xd_p::Float64: Transient reactance after EMF in d-axis per unit, validation range: (0, nothing)
  • Xq_p::Float64: Transient reactance after EMF in q-axis per unit, validation range: (0, nothing)
  • Xd_pp::Float64: Sub-Transient reactance after EMF in d-axis per unit, validation range: (0, nothing)
  • Xq_pp::Float64: Sub-Transient reactance after EMF in q-axis per unit, validation range: (0, nothing)
  • Td0_p::Float64: Time constant of transient d-axis voltage, validation range: (0, nothing)
  • Tq0_p::Float64: Time constant of transient q-axis voltage, validation range: (0, nothing)
  • Td0_pp::Float64: Time constant of sub-transient d-axis voltage, validation range: (0, nothing)
  • Tq0_pp::Float64: Time constant of sub-transient q-axis voltage, validation range: (0, nothing)
  • MVABase::Float64: Nominal Capacity in MVA, validation range: (0, nothing)
  • ext::Dict{String, Any}
  • states::Vector{Symbol}
  • n_states::Int64
  • internal::InfrastructureSystemsInternal: power system internal reference, do not modify
source
PowerSystems.SimpleFullMachineType
mutable struct SimpleFullMachine <: Machine
    R::Float64
    R_f::Float64
    R_1d::Float64
    R_1q::Float64
    L_d::Float64
    L_q::Float64
    L_ad::Float64
    L_aq::Float64
    L_f1d::Float64
    L_ff::Float64
    L_1d::Float64
    L_1q::Float64
    MVABase::Float64
    ext::Dict{String, Any}
    inv_d_fluxlink::Array{Float64,2}
    inv_q_fluxlink::Array{Float64,2}
    states::Vector{Symbol}
    n_states::Int64
    internal::InfrastructureSystemsInternal
end

Parameter of a full order flux stator-rotor model without zero sequence flux in the stator. The derivative of stator fluxes (ψd and ψq) is neglected. This is standard when transmission network dynamics is neglected. Only one q-axis damping circuit is considered. All per unit are in machine per unit. Refer to Chapter 3 of Power System Stability and Control by P. Kundur or Chapter 11 of Power System Dynamics: Stability and Control, by J. Machowski, J. Bialek and J. Bumby, for more details. Note that the models are somewhat different (but equivalent) due to the different Park Transformation used in both books.

Arguments

  • R::Float64: Resistance after EMF in machine per unit, validation range: (0, nothing)
  • R_f::Float64: Field rotor winding resistance in per unit, validation range: (0, nothing)
  • R_1d::Float64: Damping rotor winding resistance on d-axis in per unit. This value is denoted as RD in Machowski., validation range: (0, nothing)
  • R_1q::Float64: Damping rotor winding resistance on q-axis in per unit. This value is denoted as RQ in Machowski., validation range: (0, nothing)
  • L_d::Float64: Inductance of fictitious damping that represent the effect of the three-phase stator winding in the d-axis of the rotor, in per unit. This value is denoted as Lad + Ll in Kundur (and Ld in Machowski)., validation range: (0, nothing)
  • L_q::Float64: Inductance of fictitious damping that represent the effect of the three-phase stator winding in the q-axis of the rotor, in per unit. This value is denoted as Laq + Ll in Kundur., validation range: (0, nothing)
  • L_ad::Float64: Mutual inductance between stator winding and rotor field (and damping) winding inductance on d-axis, in per unit, validation range: (0, nothing)
  • L_aq::Float64: Mutual inductance between stator winding and rotor damping winding inductance on q-axis, in per unit, validation range: (0, nothing)
  • L_f1d::Float64: Mutual inductance between rotor field winding and rotor damping winding inductance on d-axis, in per unit, validation range: (0, nothing)
  • L_ff::Float64: Field rotor winding inductance, in per unit, validation range: (0, nothing)
  • L_1d::Float64: Inductance of the d-axis rotor damping circuit, in per unit, validation range: (0, nothing)
  • L_1q::Float64: Inductance of the q-axis rotor damping circuit, in per unit, validation range: (0, nothing)
  • MVABase::Float64: Nominal Capacity in MVA, validation range: (0, nothing)
  • ext::Dict{String, Any}
  • inv_d_fluxlink::Array{Float64,2}: Equations 3.127, 3.130, 3.131 From Kundur
  • inv_q_fluxlink::Array{Float64,2}: Equations 3.128, 3.132 From Kundur
  • states::Vector{Symbol}
  • n_states::Int64
  • internal::InfrastructureSystemsInternal: power system internal reference, do not modify
source
PowerSystems.SimpleMarconatoMachineType
mutable struct SimpleMarconatoMachine <: Machine
    R::Float64
    Xd::Float64
    Xq::Float64
    Xd_p::Float64
    Xq_p::Float64
    Xd_pp::Float64
    Xq_pp::Float64
    Td0_p::Float64
    Tq0_p::Float64
    Td0_pp::Float64
    Tq0_pp::Float64
    T_AA::Float64
    MVABase::Float64
    ext::Dict{String, Any}
    γd::Float64
    γq::Float64
    states::Vector{Symbol}
    n_states::Int64
    internal::InfrastructureSystemsInternal
end

Parameters of 4-states synchronous machine: Simplified Marconato model The derivative of stator fluxes (ψd and ψq) is neglected and ωψd = ψd and ωψq = ψq is assumed (i.e. ω=1.0). This is standard when transmission network dynamics is neglected.

Arguments

  • R::Float64: Resistance after EMF in machine per unit, validation range: (0, nothing)
  • Xd::Float64: Reactance after EMF in d-axis per unit, validation range: (0, nothing)
  • Xq::Float64: Reactance after EMF in q-axis per unit, validation range: (0, nothing)
  • Xd_p::Float64: Transient reactance after EMF in d-axis per unit, validation range: (0, nothing)
  • Xq_p::Float64: Transient reactance after EMF in q-axis per unit, validation range: (0, nothing)
  • Xd_pp::Float64: Sub-Transient reactance after EMF in d-axis per unit, validation range: (0, nothing)
  • Xq_pp::Float64: Sub-Transient reactance after EMF in q-axis per unit, validation range: (0, nothing)
  • Td0_p::Float64: Time constant of transient d-axis voltage, validation range: (0, nothing)
  • Tq0_p::Float64: Time constant of transient q-axis voltage, validation range: (0, nothing)
  • Td0_pp::Float64: Time constant of sub-transient d-axis voltage, validation range: (0, nothing)
  • Tq0_pp::Float64: Time constant of sub-transient q-axis voltage, validation range: (0, nothing)
  • T_AA::Float64: Time constant of d-axis additional leakage, validation range: (0, nothing)
  • MVABase::Float64: Nominal Capacity in MVA, validation range: (0, nothing)
  • ext::Dict{String, Any}
  • γd::Float64
  • γq::Float64
  • states::Vector{Symbol}
  • n_states::Int64
  • internal::InfrastructureSystemsInternal: power system internal reference, do not modify
source
PowerSystems.SingleMassType
mutable struct SingleMass <: Shaft
    H::Float64
    D::Float64
    ext::Dict{String, Any}
    states::Vector{Symbol}
    n_states::Int64
    internal::InfrastructureSystemsInternal
end

Parameters of single mass shaft model. Typically represents the rotor mass.

Arguments

  • H::Float64: Rotor inertia constant in MWs/MVA, validation range: (0, nothing)
  • D::Float64: Rotor natural damping in pu, validation range: (0, nothing)
  • ext::Dict{String, Any}
  • states::Vector{Symbol}
  • n_states::Int64
  • internal::InfrastructureSystemsInternal: power system internal reference, do not modify
source
PowerSystems.SourceType
mutable struct Source <: StaticInjection
    name::String
    available::Bool
    bus::Bus
    activepower::Float64
    reactivepower::Float64
    X_th::Float64
    services::Vector{Service}
    ext::Dict{String, Any}
    internal::InfrastructureSystemsInternal
end

This struct acts as an infinity bus.

Arguments

  • name::String
  • available::Bool
  • bus::Bus
  • activepower::Float64
  • reactivepower::Float64
  • X_th::Float64: Source Thevenin impedance, validation range: (0, nothing)
  • services::Vector{Service}: Services that this device contributes to
  • ext::Dict{String, Any}
  • internal::InfrastructureSystemsInternal: power system internal reference, do not modify
source
PowerSystems.StaticReserveType
mutable struct StaticReserve{T <: ReserveDirection} <: Reserve{T}
    name::String
    available::Bool
    timeframe::Float64
    requirement::Float64
    ext::Dict{String, Any}
    internal::InfrastructureSystemsInternal
end

Data Structure for a proportional reserve product for system simulations.

Arguments

  • name::String
  • available::Bool
  • timeframe::Float64: the relative saturation timeframe, validation range: (0, nothing), action if invalid: error
  • requirement::Float64: the static value of required reserves, validation range: (0, nothing), action if invalid: error
  • ext::Dict{String, Any}
  • internal::InfrastructureSystemsInternal: power system internal reference, do not modify
source
PowerSystems.StaticReserveMethod
StaticReserve(name, contributingdevices, timeframe, requirement, forecasts, internal)

Allows construction of a reserve from an iterator.

source
PowerSystems.SystemType

System

A power system defined by fields for basepower, components, and forecasts.

System(basepower)
System(components, basepower)
System(buses, generators, loads, branches, storage, basepower, services, annex; kwargs...)
System(buses, generators, loads, basepower; kwargs...)
System(file; kwargs...)
System(; buses, generators, loads, branches, storage, basepower, services, annex, kwargs...)
System(; kwargs...)

Arguments

  • buses::Vector{Bus}: an array of buses
  • generators::Vector{Generator}: an array of generators of (possibly) different types
  • loads::Vector{ElectricLoad}: an array of load specifications that includes timing of the loads
  • branches::Union{Nothing, Vector{Branch}}: an array of branches; may be nothing
  • storage::Union{Nothing, Vector{Storage}}: an array of storage devices; may be nothing
  • basepower::Float64: the base power value for the system
  • services::Union{Nothing, Vector{<:Service}}: an array of services; may be nothing

Keyword arguments

  • runchecks::Bool: Run available checks on input fields and when add_component! is called. Throws InvalidRange if an error is found.
  • time_series_in_memory::Bool=false: Store time series data in memory instead of HDF5.
  • configpath::String: specify path to validation config file
source
PowerSystems.SystemMethod
System(file_path; kwargs...)

Constructs a System from a file path ending with .m, .RAW, or .json

source
PowerSystems.SystemMethod
System(data, basepower; kwargs...)

Construct a System from InfrastructureSystems.SystemData

source
PowerSystems.SystemMethod
System(basepower; kwargs...)

Construct an empty System. Useful for building a System while parsing raw data.

source
PowerSystems.SystemMethod
System(buses, generators, loads, basepower; kwargs...)

System constructor without nothing-able arguments.

source
PowerSystems.SystemMethod
System(buses, generators, loads, branches, storage, basepower, services, annex; kwargs...)

System constructor when components are constructed externally.

source
PowerSystems.SystemMethod
System(; buses, generators, loads, branches, storage, basepower, services, annex, kwargs...)

Constructs a non-functional System for demo purposes.

source
PowerSystems.SystemMethod
System(pm_data; kwargs...)

Constructs a System from PowerModelsData. Supports kwargs to supply formatters for different device types, such as bus_name_formatter or gen_name_formatter.

Examples

sys = System(
    pm_data, configpath = "ACTIVSg25k_validation.json",
    bus_name_formatter = x->string(x["name"]*"-"*string(x["index"])),
    load_name_formatter = x->strip(join(x["source_id"], "_"))
)
source
PowerSystems.SystemMethod
System(data; forecast_resolution, time_series_in_memory, time_series_directory, runchecks, kwargs...)
System(data::PowerSystemTableData)

Construct a System from PowerSystemTableData data.

Arguments

  • forecast_resolution::Union{DateTime, Nothing}=nothing: only store forecasts that match this resolution.
  • time_series_in_memory::Bool=false: Store time series data in memory instead of HDF5 file
  • time_series_directory=nothing: Store time series data in directory instead of tmpfs
  • runchecks::Bool=true: Validate struct fields.

Throws DataFormatError if forecasts with multiple resolutions are detected.

  • A forecast has a different resolution than others.
  • A forecast has a different horizon than others.
source
PowerSystems.SystemMethod
System(; basepower, buses, generators, loads, branches, storage, services, annex, kwargs...)

System constructor with keyword arguments.

source
PowerSystems.TGFixedType
mutable struct TGFixed <: TurbineGov
    efficiency::Float64
    ext::Dict{String, Any}
    states::Vector{Symbol}
    n_states::Int64
    internal::InfrastructureSystemsInternal
end

Parameters of a fixed Turbine Governor that returns a fixed mechanical torque given by the product of P_ref*efficiency

Arguments

  • efficiency::Float64: Efficiency factor that multiplies P_ref, validation range: (0, nothing)
  • ext::Dict{String, Any}
  • states::Vector{Symbol}
  • n_states::Int64
  • internal::InfrastructureSystemsInternal: power system internal reference, do not modify
source
PowerSystems.TGTypeIType
mutable struct TGTypeI <: TurbineGov
    R::Float64
    Ts::Float64
    Tc::Float64
    T3::Float64
    T4::Float64
    T5::Float64
    P_min::Float64
    P_max::Float64
    ext::Dict{String, Any}
    states::Vector{Symbol}
    n_states::Int64
    internal::InfrastructureSystemsInternal
end

Parameters of a Turbine Governor Type I.

Arguments

  • R::Float64: Droop parameter, validation range: (0, nothing)
  • Ts::Float64: Governor time constant, validation range: (0, nothing)
  • Tc::Float64: Servo time constant, validation range: (0, nothing)
  • T3::Float64: Transient gain time constant, validation range: (0, nothing)
  • T4::Float64: Power fraction time constant, validation range: (0, nothing)
  • T5::Float64: Reheat time constant, validation range: (0, nothing)
  • P_min::Float64: Min Power into the Governor, validation range: (0, nothing)
  • P_max::Float64: Max Power into the Governor, validation range: (0, nothing)
  • ext::Dict{String, Any}
  • states::Vector{Symbol}
  • n_states::Int64
  • internal::InfrastructureSystemsInternal: power system internal reference, do not modify
source
PowerSystems.TGTypeIIType
mutable struct TGTypeII <: TurbineGov
    R::Float64
    T1::Float64
    T2::Float64
    τ_min::Float64
    τ_max::Float64
    ext::Dict{String, Any}
    states::Vector{Symbol}
    n_states::Int64
    internal::InfrastructureSystemsInternal
end

Parameters of a Turbine Governor Type II.

Arguments

  • R::Float64: Droop parameter, validation range: (0, nothing)
  • T1::Float64: Transient gain time constant, validation range: (0, nothing)
  • T2::Float64: Power fraction time constant, validation range: (0, nothing)
  • τ_min::Float64: Min Power into the Governor, validation range: (0, nothing)
  • τ_max::Float64: Max Power into the Governor, validation range: (0, nothing)
  • ext::Dict{String, Any}
  • states::Vector{Symbol}
  • n_states::Int64
  • internal::InfrastructureSystemsInternal: power system internal reference, do not modify
source
PowerSystems.TapTransformerType
mutable struct TapTransformer <: ACBranch
    name::String
    available::Bool
    activepower_flow::Float64
    reactivepower_flow::Float64
    arc::Arc
    r::Float64
    x::Float64
    primaryshunt::Float64
    tap::Float64
    rate::Union{Nothing, Float64}
    services::Vector{Service}
    ext::Dict{String, Any}
    forecasts::InfrastructureSystems.Forecasts
    internal::InfrastructureSystemsInternal
end

Arguments

  • name::String
  • available::Bool
  • activepower_flow::Float64
  • reactivepower_flow::Float64
  • arc::Arc
  • r::Float64: System per-unit value, validation range: (-2, 2), action if invalid: error
  • x::Float64: System per-unit value, validation range: (-2, 4), action if invalid: error
  • primaryshunt::Float64: System per-unit value, validation range: (0, 2), action if invalid: error
  • tap::Float64, validation range: (0, 2), action if invalid: error
  • rate::Union{Nothing, Float64}, validation range: (0, nothing), action if invalid: error
  • services::Vector{Service}: Services that this device contributes to
  • ext::Dict{String, Any}
  • forecasts::InfrastructureSystems.Forecasts: internal forecast storage
  • internal::InfrastructureSystemsInternal: power system internal reference, do not modify
source
PowerSystems.ThermalStandardType
mutable struct ThermalStandard <: ThermalGen
    name::String
    available::Bool
    status::Bool
    bus::Bus
    activepower::Float64
    reactivepower::Float64
    rating::Float64
    primemover::PrimeMovers.PrimeMover
    fuel::ThermalFuels.ThermalFuel
    activepowerlimits::Min_Max
    reactivepowerlimits::Union{Nothing, Min_Max}
    ramplimits::Union{Nothing, NamedTuple{(:up, :down), Tuple{Float64, Float64}}}
    timelimits::Union{Nothing, NamedTuple{(:up, :down), Tuple{Float64, Float64}}}
    op_cost::ThreePartCost
    services::Vector{Service}
    participation_factor::Float64
    time_at_status::Float64
    dynamic_injector::Union{Nothing, DynamicInjection}
    ext::Dict{String, Any}
    forecasts::InfrastructureSystems.Forecasts
    internal::InfrastructureSystemsInternal
end

Data Structure for thermal generation technologies.

Arguments

  • name::String
  • available::Bool
  • status::Bool
  • bus::Bus
  • activepower::Float64, validation range: activepowerlimits, action if invalid: warn
  • reactivepower::Float64, validation range: reactivepowerlimits, action if invalid: warn
  • rating::Float64: Thermal limited MVA Power Output of the unit. <= Capacity, validation range: (0, nothing), action if invalid: error
  • primemover::PrimeMovers.PrimeMover: PrimeMover Technology according to EIA 923
  • fuel::ThermalFuels.ThermalFuel: PrimeMover Fuel according to EIA 923
  • activepowerlimits::Min_Max
  • reactivepowerlimits::Union{Nothing, Min_Max}
  • ramplimits::Union{Nothing, NamedTuple{(:up, :down), Tuple{Float64, Float64}}}, validation range: (0, nothing), action if invalid: error
  • timelimits::Union{Nothing, NamedTuple{(:up, :down), Tuple{Float64, Float64}}}: Minimum up and Minimum down time limits in hours, validation range: (0, nothing), action if invalid: error
  • op_cost::ThreePartCost
  • services::Vector{Service}: Services that this device contributes to
  • participation_factor::Float64: AGC Participation Factor, validation range: (0, 1.0), action if invalid: error
  • time_at_status::Float64
  • dynamic_injector::Union{Nothing, DynamicInjection}: corresponding dynamic injection device
  • ext::Dict{String, Any}
  • forecasts::InfrastructureSystems.Forecasts: internal forecast storage
  • internal::InfrastructureSystemsInternal: power system internal reference, do not modify
source
PowerSystems.ThreePartCostType
mutable struct ThreePartCost <: OperationalCost
    variable::VariableCost
    fixed::Float64
    startup::Float64
    shutdn::Float64
    forecasts::InfrastructureSystems.Forecasts
    internal::InfrastructureSystemsInternal
end

Data Structure Operational Cost Data in Three parts fixed, variable cost and start - stop costs.

Arguments

  • variable::VariableCost: variable cost
  • fixed::Float64: fixed cost
  • startup::Float64: startup cost, validation range: (0, nothing), action if invalid: warn
  • shutdn::Float64: shutdown cost, validation range: (0, nothing), action if invalid: warn
  • forecasts::InfrastructureSystems.Forecasts: internal forecast storage
  • internal::InfrastructureSystemsInternal: power system internal reference, do not modify
source
PowerSystems.TransferType
mutable struct Transfer <: Service
    name::String
    available::Bool
    requirement::Float64
    ext::Dict{String, Any}
    forecasts::InfrastructureSystems.Forecasts
    internal::InfrastructureSystemsInternal
end

Arguments

  • name::String
  • available::Bool
  • requirement::Float64
  • ext::Dict{String, Any}
  • forecasts::InfrastructureSystems.Forecasts: internal forecast storage
  • internal::InfrastructureSystemsInternal: power system internal reference, do not modify
source
PowerSystems.Transformer2WType
mutable struct Transformer2W <: ACBranch
    name::String
    available::Bool
    activepower_flow::Float64
    reactivepower_flow::Float64
    arc::Arc
    r::Float64
    x::Float64
    primaryshunt::Float64
    rate::Union{Nothing, Float64}
    services::Vector{Service}
    ext::Dict{String, Any}
    forecasts::InfrastructureSystems.Forecasts
    internal::InfrastructureSystemsInternal
end

The 2-W transformer model uses an equivalent circuit assuming the impedance is on the High Voltage Side of the transformer. The model allocates the iron losses and magnetizing susceptance to the primary side.

Arguments

  • name::String
  • available::Bool
  • activepower_flow::Float64
  • reactivepower_flow::Float64
  • arc::Arc
  • r::Float64: System per-unit value, validation range: (-2, 4), action if invalid: error
  • x::Float64: System per-unit value, validation range: (-2, 4), action if invalid: error
  • primaryshunt::Float64: System per-unit value, validation range: (0, 2), action if invalid: error
  • rate::Union{Nothing, Float64}, validation range: (0, nothing), action if invalid: error
  • services::Vector{Service}: Services that this device contributes to
  • ext::Dict{String, Any}
  • forecasts::InfrastructureSystems.Forecasts: internal forecast storage
  • internal::InfrastructureSystemsInternal: power system internal reference, do not modify
source
PowerSystems.TwoPartCostType
mutable struct TwoPartCost <: OperationalCost
    variable::VariableCost
    fixed::Float64
    forecasts::InfrastructureSystems.Forecasts
    internal::InfrastructureSystemsInternal
end

Data Structure Operational Cost Data in two parts: fixed and variable cost.

Arguments

  • variable::VariableCost: variable cost
  • fixed::Float64: fixed cost, validation range: (0, nothing), action if invalid: warn
  • forecasts::InfrastructureSystems.Forecasts: internal forecast storage
  • internal::InfrastructureSystemsInternal: power system internal reference, do not modify
source
PowerSystems.VSCDCLineType
mutable struct VSCDCLine <: DCBranch
    name::String
    available::Bool
    activepower_flow::Float64
    arc::Arc
    rectifier_taplimits::Min_Max
    rectifier_xrc::Float64
    rectifier_firing_angle::Min_Max
    inverter_taplimits::Min_Max
    inverter_xrc::Float64
    inverter_firing_angle::Min_Max
    services::Vector{Service}
    ext::Dict{String, Any}
    forecasts::InfrastructureSystems.Forecasts
    internal::InfrastructureSystemsInternal
end

As implemented in Milano's Book, Page 397.

Arguments

  • name::String
  • available::Bool
  • activepower_flow::Float64
  • arc::Arc
  • rectifier_taplimits::Min_Max
  • rectifier_xrc::Float64
  • rectifier_firing_angle::Min_Max
  • inverter_taplimits::Min_Max
  • inverter_xrc::Float64
  • inverter_firing_angle::Min_Max
  • services::Vector{Service}: Services that this device contributes to
  • ext::Dict{String, Any}
  • forecasts::InfrastructureSystems.Forecasts: internal forecast storage
  • internal::InfrastructureSystemsInternal: power system internal reference, do not modify
source
PowerSystems.VariableReserveType
mutable struct VariableReserve{T <: ReserveDirection} <: Reserve{T}
    name::String
    available::Bool
    timeframe::Float64
    requirement::Float64
    ext::Dict{String, Any}
    forecasts::InfrastructureSystems.Forecasts
    internal::InfrastructureSystemsInternal
end

Data Structure for the procurement products for system simulations.

Arguments

  • name::String
  • available::Bool
  • timeframe::Float64: the relative saturation timeframe, validation range: (0, nothing), action if invalid: error
  • requirement::Float64: the required quantity of the product should be scaled by a Forecast
  • ext::Dict{String, Any}
  • forecasts::InfrastructureSystems.Forecasts: internal forecast storage
  • internal::InfrastructureSystemsInternal: power system internal reference, do not modify
source
PowerSystems.VirtualInertiaType
mutable struct VirtualInertia <: ActivePowerControl
    Ta::Float64
    kd::Float64
    kω::Float64
    ωb::Float64
    ext::Dict{String, Any}
    states::Vector{Symbol}
    n_states::Int64
end

Parameters of a Virtual Inertia with SRF using VSM for active power controller

Arguments

  • Ta::Float64: VSM inertia constant, validation range: (0, nothing)
  • kd::Float64: VSM damping constant, validation range: (0, nothing)
  • kω::Float64: frequency droop gain, validation range: (0, nothing)
  • ωb::Float64: rated angular frequency, validation range: (0, nothing)
  • ext::Dict{String, Any}
  • states::Vector{Symbol}
  • n_states::Int64
source
PowerSystems.add_component!Method
add_component!(sys, component; kwargs...)

Add a component to the system.

Throws ArgumentError if the component's name is already stored for its concrete type. Throws ArgumentError if any Component-specific rule is violated. Throws InvalidRange if any of the component's field values are outside of defined valid range.

Examples

sys = System(100.0)

# Add a single component.
add_component!(sys, bus)

# Add many at once.
buses = [bus1, bus2, bus3]
generators = [gen1, gen2, gen3]
foreach(x -> add_component!(sys, x), Iterators.flatten((buses, generators)))
source
PowerSystems.add_forecast!Function
add_forecast!(sys, ta, component, label)
add_forecast!(sys, ta, component, label, scaling_factor)
add_forecast!(
    sys::System,
    ta::TimeSeries.TimeArray,
    component,
    label,
    scaling_factor::Union{String, Float64} = 1.0,
)

Add a forecast to a system from a TimeSeries.TimeArray.

See InfrastructureSystems.TimeseriesFileMetadata for description of scaling_factor.

source
PowerSystems.add_forecast!Function
add_forecast!(sys, filename, component, label)
add_forecast!(sys, filename, component, label, scaling_factor)
add_forecast!(
    sys::System,
    filename::AbstractString,
    component::Component,
    label::AbstractString,
    scaling_factor::Union{String, Float64} = 1.0,
)

Add a forecast to a system from a CSV file.

See InfrastructureSystems.TimeseriesFileMetadata for description of scaling_factor.

source
PowerSystems.add_forecast!Function
add_forecast!(sys, df, component, label)
add_forecast!(sys, df, component, label, scaling_factor)
add_forecast!(
    sys::System,
    df::DataFrames.DataFrame,
    component,
    label,
    scaling_factor::Union{String, Float64} = 1.0,
)

Add a forecast to a system from a DataFrames.DataFrame.

See InfrastructureSystems.TimeseriesFileMetadata for description of scaling_factor.

source
PowerSystems.add_forecast!Method
add_forecast!(sys, component, forecast)
add_forecast!(sys::System, component::Component, forecast::Forecast)

Add forecast to the system.

Throws ArgumentError if the component is not stored in the system.

source
PowerSystems.add_forecasts!Method
add_forecasts!(sys, metadata_file; resolution)
add_forecasts!(sys::System, metadata_file::AbstractString; resolution = nothing)

Adds forecasts from a metadata file or metadata descriptors.

Arguments

  • sys::System: system
  • metadata_file::AbstractString: metadata file for timeseries that includes an array of IS.TimeseriesFileMetadata instances or a vector.
  • resolution::DateTime.Period=nothing: skip forecast that don't match this resolution.
source
PowerSystems.add_forecasts!Method
add_forecasts!(sys, timeseries_metadata; resolution)
add_forecasts!(
    sys::System,
    timeseries_metadata::Vector{IS.TimeseriesFileMetadata};
    resolution = nothing,
)

Adds forecasts from a metadata file or metadata descriptors.

Arguments

  • sys::System: system
  • timeseries_metadata::Vector{IS.TimeseriesFileMetadata}: metadata for timeseries
  • resolution::DateTime.Period=nothing: skip forecast that don't match this resolution.
source
PowerSystems.add_service!Method
add_service!(device, service)
add_service!(device::Device, service::Service)

Add a service to a device.

Throws ArgumentError if the service is already attached to the device.

source
PowerSystems.add_service!Method
add_service!(sys, service, contributing_devices; kwargs...)
add_service!(sys::System, service::Service, contributing_devices; kwargs...)

Similar to add_component! but for services.

Arguments

  • sys::System: system
  • service::Service: service to add
  • contributing_devices: Must be an iterable of type Device
source
PowerSystems.are_forecasts_contiguousMethod
are_forecasts_contiguous(sys)
are_forecasts_contiguous(sys::System)

Return true if forecasts are stored contiguously.

Throws ArgumentError if there are no forecasts stored.

source
PowerSystems.convert_component!Method
convert_component!(linetype, line, sys; kwargs...)

Converts a MonitoredLine component to a Line component and replaces the original in the system

source
PowerSystems.convert_component!Method
convert_component!(linetype, line, sys; kwargs...)

Converts a Line component to a MonitoredLine component and replaces the original in the system

source
PowerSystems.generate_initial_timesMethod
generate_initial_times(component, interval, horizon; initial_time)
generate_initial_times(
    component::IS.InfrastructureSystemsType,
    interval::Dates.Period,
    horizon::Int;
    initial_time::Union{Nothing, Dates.DateTime} = nothing,
)

Generate initial times for a component.

source
PowerSystems.generate_initial_timesMethod
generate_initial_times(sys, interval, horizon; initial_time)
generate_initial_times(
    sys::System,
    interval::Dates.Period,
    horizon::Int;
    initial_time::Union{Nothing, Dates.DateTime} = nothing,
)

Generate all possible initial times for the stored forecasts. This should return the same result regardless of whether the forecasts have been stored as one contiguous array or chunks of contiguous arrays, such as one 365-day forecast vs 365 one-day forecasts.

Throws ArgumentError if there are no forecasts stored, interval is not a multiple of the system's forecast resolution, or if the stored forecasts have overlapping timestamps.

Arguments

  • sys::System: System.
  • interval::Dates.Period: Amount of time in between each initial time.
  • horizon::Int: Length of each forecast array.
  • initial_time::Union{Nothing, Dates.DateTime}=nothing: Start with this time. If nothing, use the first initial time.
source
PowerSystems.get_aggregation_topology_accessorMethod
get_aggregation_topology_accessor(?)
get_aggregation_topology_accessor(::Type{T}) where T <: AggregationTopology

Return the method to be called on a Bus to get its AggregationTopology value for this type.

source
PowerSystems.get_aggregation_topology_mappingMethod
get_aggregation_topology_mapping(?, sys)
get_aggregation_topology_mapping(::Type{T}, sys::System) where {T<:AggregationTopology}

Return a mapping of AggregationTopology name to vector of buses within it.

source
PowerSystems.get_breakpoint_upperboundsMethod
get_breakpoint_upperbounds(vc)
get_breakpoint_upperbounds(vc::VariableCost{Vector{NTuple{2, Float64}}})

Calculates the upper bounds of a variable cost function represented as a collection of piece-wise linear segments.

source
PowerSystems.get_busesMethod
get_buses(sys, aggregator)
get_buses(sys::System, aggregator::AggregationTopology)

Return a vector of buses contained within the AggregationTopology.

source
PowerSystems.get_busesMethod
get_buses(sys, bus_numbers)
get_buses(sys::System, bus_numbers::Set{Int})

Return all buses values with bus_numbers.

source
PowerSystems.get_componentMethod
get_component(::Type{T}, sys::System, name::AbstractString) where {T <: Component}

Get the component of type T with name. Returns nothing if no component matches. If T is an abstract type then the names of components across all subtypes of T must be unique.

See get_components_by_name for abstract types with non-unique names across subtypes.

Throws ArgumentError if T is not a concrete type and there is more than one component with requested name

source
PowerSystems.get_componentsMethod
get_components(::Type{T}, sys::System) where {T <: Component}

Returns an iterator of components. T can be concrete or abstract. Call collect on the result if an array is desired.

Examples

iter = PowerSystems.get_components(ThermalStandard, sys)
iter = PowerSystems.get_components(Generator, sys)
iter = PowerSystems.get_components(Generator, sys, x->(PowerSystems.get_available(x)))
generators = collect(PowerSystems.get_components(Generator, sys))

See also: iterate_components

source
PowerSystems.get_components_by_nameMethod
get_components_by_name(?, sys, name)
get_components_by_name(
                       ::Type{T},
                       sys::System,
                       name::AbstractString
                      ) where {T <: Component}

Get the components of abstract type T with name. Note that PowerSystems enforces unique names on each concrete type but not across concrete types.

See get_component if the concrete type is known.

Throws ArgumentError if T is not an abstract type.

source
PowerSystems.get_components_in_aggregation_topologyMethod
get_components_in_aggregation_topology(?, sys, aggregator)
get_components_in_aggregation_topology(
    ::Type{T},
    sys::System,
    aggregator::AggregationTopology,
) where {T <: StaticInjection}

Return a vector of components with buses in the AggregationTopology.

source
PowerSystems.get_forecastMethod
get_forecast(?, component, initial_time, label)
get_forecast(
    ::Type{T},
    component::Component,
    initial_time::Dates.DateTime,
    label::AbstractString,
) where {T <: Forecast}

Return a forecast for the entire time series range stored for these parameters.

source
PowerSystems.get_forecastMethod
get_forecast(?, component, initial_time, label, horizon)
get_forecast(
    ::Type{T},
    component::IS.InfrastructureSystemsType,
    initial_time::Dates.DateTime,
    label::AbstractString,
    horizon::Int,
) where {T <: Forecast}

Return a forecast for a subset of the time series range stored for these parameters.

source
PowerSystems.get_forecast_valuesMethod
get_forecast_values(
    ::Type{T},
    component::Component,
    initial_time::Dates.DateTime,
    label::AbstractString,
) where {T <: Forecast}

Return a TimeSeries.TimeArray where the forecast data has been multiplied by the forecasted component field.

source
PowerSystems.get_forecast_valuesMethod
get_forecast_values(
    ::Type{T},
    component::IS.InfrastructureSystemsType,
    initial_time::Dates.DateTime,
    label::AbstractString,
    horizon::Int,
) where {T <: Forecast}
source
PowerSystems.get_slopesMethod
get_slopes(vc)
get_slopes(vc::VariableCost{Vector{NTuple{2, Float64}}})

Calculates the slopes for the variable cost represented as a piece wise linear cost function. This function returns n - slopes for n - piecewise linear elements in the function. The first element of the return array corresponds to the average cost at the minimum operating point. If your formulation uses n -1 slopes, you can disregard the first component of the array.

source
PowerSystems.has_serviceMethod
has_service(device, service)
has_service(device::Device, service::Service)

Return true if the service is attached to the device.

source
PowerSystems.has_serviceMethod
has_service(device, ?)
has_service(device::Device, ::Type{T}) where T <:Service

Return true if a service with type T is attached to the device.

source
PowerSystems.iterate_forecastsMethod
iterate_forecasts(sys)
iterate_forecasts(sys::System)

Iterate over all forecasts in order of initial time.

Examples

for forecast in iterate_forecasts(sys)
    @show forecast
end
source
PowerSystems.make_forecastsMethod
make_forecasts(sys, metadata_file; resolution)
make_forecasts(sys::System, metadata_file::AbstractString; resolution = nothing)

Return a vector of forecasts from a metadata file.

Arguments

  • data::SystemData: system
  • metadata_file::AbstractString: path to metadata file
  • resolution::{Nothing, Dates.Period}: skip any forecasts that don't match this resolution

See InfrastructureSystems.TimeseriesFileMetadata for description of what the file should contain.

source
PowerSystems.make_forecastsMethod
make_forecasts(sys, metadata; resolution)
make_forecasts(
    sys::System,
    metadata::Vector{IS.TimeseriesFileMetadata};
    resolution = nothing,
)

Return a vector of forecasts from a vector of TimeseriesFileMetadata values.

Arguments

  • data::SystemData: system
  • timeseries_metadata::Vector{TimeseriesFileMetadata}: metadata values
  • resolution::{Nothing, Dates.Period}: skip any forecasts that don't match this resolution
source
PowerSystems.make_pfMethod
make_pf(system)
make_pf(sys)

Create the objects needed to solve an powerflow case using NLsolve.jl solvers. Returns an anonymous function with the powerflow equations, initial conditions and a dict to link the solutions to the original system. Only supports systems with a single generator per bus and currently doesn't support distributed slack buses and doesn't enforce reactive power limits.

Example

pf!, x0 = make_pf(sys)
res = NLsolve.nlsolve(pf!, x0)

Arguments

* `sys`::System : a PowerSystems.jl system
source
PowerSystems.remove_component!Method
remove_component!(sys::System, component::T) where {T <: Component}

Remove a component from the system by its value.

Throws ArgumentError if the component is not stored.

source
PowerSystems.remove_component!Method
remove_component!(
    ::Type{T},
    sys::System,
    name::AbstractString,
) where {T <: Component}

Remove a component from the system by its name.

Throws ArgumentError if the component is not stored.

source
PowerSystems.remove_components!Method
remove_components!(?, sys)
remove_components!(::Type{T}, sys::System) where {T <: Component}

Remove all components of type T from the system.

Throws ArgumentError if the type is not stored.

source
PowerSystems.remove_forecast!Method
remove_forecast!(?, sys, component, initial_time, label)
remove_forecast!(
    ::Type{T},
    sys::System,
    component::Component,
    initial_time::Dates.DateTime,
    label::String,
) where {T <: Forecast}

Remove the time series data for a component.

source
PowerSystems.remove_service!Method
remove_service!(device, service)
remove_service!(device::Device, service::Service)

Remove a service from a device.

Throws ArgumentError if the service is not attached to the device.

source
PowerSystems.set_dynamic_injector!Method
set_dynamic_injector!(static_injector, dynamic_injector)

Any StaticInjection struct that wants to support dynamic injectors must implement this method to set the value.

The method is only for internal uses.

source
PowerSystems.set_static_injector!Method
set_static_injector!(dynamic_injector, static_injector)

All DynamicInjection structs must implement this method to set the value.

The method is only for internal uses.

source
PowerSystems.solve_powerflow!Method
solve_powerflow!(sys, nlsolve; args...)
solve_powerflow!(sys, solve_function, args...)

Solves a the power flow into the system and writes the solution into the relevant structs. Updates generators active and reactive power setpoints and branches active and reactive power flows (calculated in the From - To direction) (see flow_val)

Requires loading NLsolve.jl to run. Internally it uses the makepf (see [`makepf`](@ref)) to create the problem and solve it. As a result it doesn't enforce reactivepower limits.

Supports passing NLsolve kwargs in the args. By default shows the solver trace.

Arguments available for nlsolve:

  • method : See NLSolve.jl documentation for available solvers
  • xtol: norm difference in x between two successive iterates under which convergence is declared. Default: 0.0.
  • ftol: infinite norm of residuals under which convergence is declared. Default: 1e-8.
  • iterations: maximum number of iterations. Default: 1_000.
  • store_trace: should a trace of the optimization algorithm's state be stored? Default: false.
  • show_trace: should a trace of the optimization algorithm's state be shown on STDOUT? Default: false.
  • extended_trace: should additifonal algorithm internals be added to the state trace? Default: false.

Examples

using NLsolve
solve_powerflow!(sys, nlsolve)
# Passing NLsolve arguments
solve_powerflow!(sys, nlsolve, method = :newton)
source
PowerSystems.to_jsonMethod
to_json(sys, filename; force)
to_json(sys::System, filename::AbstractString)

Serializes a system to a JSON string.

source

Internal

PowerSystems._pti_dtypesConstant

lookup array of data types for PTI file sections given by field_name, as enumerated by PSS/E Program Operation Manual.

source
PowerSystems.LCFilterType
mutable struct LCFilter <: Filter
    lf::Float64
    rf::Float64
    cf::Float64
    ext::Dict{String, Any}
    states::Vector{Symbol}
    n_states::Int64
end

Parameters of a LCL filter outside the converter

Arguments

  • lf::Float64: filter inductance, validation range: (0, nothing)
  • rf::Float64: filter resistance, validation range: (0, nothing)
  • cf::Float64: filter capacitance, validation range: (0, nothing)
  • ext::Dict{String, Any}
  • states::Vector{Symbol}
  • n_states::Int64
source
PowerSystems.PSSSimpleType
mutable struct PSSSimple <: PSS
    K_ω::Float64
    K_p::Float64
    ext::Dict{String, Any}
    states::Vector{Symbol}
    n_states::Int64
    internal::InfrastructureSystemsInternal
end

Parameters of a PSS that returns a proportional droop voltage to add to the reference for the AVR

Arguments

  • K_ω::Float64: Proportional gain for frequency, validation range: (0, nothing)
  • K_p::Float64: Proportional gain for active power, validation range: (0, nothing)
  • ext::Dict{String, Any}
  • states::Vector{Symbol}
  • n_states::Int64
  • internal::InfrastructureSystemsInternal: power system internal reference, do not modify
source
PowerSystems.PowerSystemTableDataMethod
PowerSystemTableData(directory, basepower, user_descriptor_file; descriptor_file, generator_mapping_file, timeseries_metadata_file)
 PowerSystemTableData(directory::AbstractString,
                      basepower::Float64,
                      user_descriptor_file::AbstractString;
                      descriptor_file=POWER_SYSTEM_DESCRIPTOR_FILE)

Reads in all the data stored in csv files The general format for data is folder: gen.csv branch.csv bus.csv .. load.csv

Arguments

  • directory::AbstractString: directory containing CSV files
  • basepower::Float64: base power for System
  • user_descriptor_file::AbstractString: customized input descriptor file
  • descriptor_file=POWER_SYSTEM_DESCRIPTOR_FILE: PowerSystems descriptor file
  • generator_mapping_file=GENERATOR_MAPPING_FILE: generator mapping configuration file
source
InfrastructureSystems.convert_typeMethod
convert_type(?, data, component_cache)

Creates a Device object by decoding the data that was in JSON. This data stores the values for buses and services as UUIDs, so this will lookup each in component_cache.

source
InfrastructureSystems.convert_typeMethod
convert_type(?, data, devices)

Creates a Service object by decoding the data that was in JSON. This data stores the values for the field contributingdevices as UUIDs, so this will lookup each device in devices.

source
JSON2.readMethod
read(io, ?)

Enables deserialization of VariableCost. The default implementation can't figure out the variable Union.

source
PowerSystems._create_starbus_from_transformerMethod
_create_starbus_from_transformer(pm_data, transformer)
create_starbus(pm_data, transformer)

Creates a starbus from a given three-winding transformer. "sourceid" is given by `["busi", "name", "I", "J", "K", "CKT"]` where "bus_i" and "name" are the modified names for the starbus, and "I", "J", "K" and "CKT" come from the originating transformer, in the PSS(R)E transformer specification.

source
PowerSystems._export_extra_dataFunction
_export_extra_data(io, data, component)
_export_extra_data(io, data, component, excluded_fields; postfix)

Export fields of a component type

source
PowerSystems._float2stringMethod
_float2string(v, float_precision)

converts a float value into a string of fixed precision

sprintf would do the job but this work around is needed because sprintf cannot take format strings during runtime

source
PowerSystems._get_bus_valueMethod
_get_bus_value(bus_i, field, pm_data)
_get_bus_value(bus_i, field, pm_data)

Returns the value of field of bus_i from the PowerModels data. Requires "bus" Dict to already be populated.

source
PowerSystems._get_line_elementsMethod
_get_line_elements(line)
_get_line_elements(line)

Internal function. Uses regular expressions to extract all separate data elements from a line of a PTI file and populate them into an Array{String}. Comments, typically indicated at the end of a line with a '/' character, are also extracted separately, and Array{Array{String}, String} is returned.

source
PowerSystems._greyMethod
_grey(s)

Makes a string grey in the terminal, does not seem to work well on Windows terminals more info can be found at https://en.wikipedia.org/wiki/ANSIescapecode

source
PowerSystems._init_bus!Method
_init_bus!(bus, id)
_init_bus!(bus, id)

Initializes a bus of id id with default values given in the PSS(R)E specification.

source
PowerSystems._parse_elementsMethod
_parse_elements(elements, dtypes, defaults, section)

This is an experimental method for parsing elements and setting defaults at the same time. It is not currently working but would reduce memory allocations if implemented correctly.

source
PowerSystems._parse_line_element!Method
_parse_line_element!(data, elements, section)
_parse_line_element!(data, elements, section)

Internal function. Parses a single "line" of data elements from a PTI file, as given by elements which is an array of the line, typically split at ,. Elements are parsed into data types given by section and saved into data::Dict.

source
PowerSystems._parse_pti_dataMethod
_parse_pti_data(data_io)
_parse_pti_data(data_string, sections)

Internal function. Parse a PTI raw file into a Dict, given the data_string of the file and a list of the sections in the PTI file (typically given by default by get_pti_sections().

source
PowerSystems._psse2pm_branch!Method
_psse2pm_branch!(pm_data, pti_data, import_all)
_psse2pm_branch!(pm_data, pti_data)

Parses PSS(R)E-style Branch data into a PowerModels-style Dict. "source_id" is given by ["I", "J", "CKT"] in PSS(R)E Branch specification.

source
PowerSystems._psse2pm_bus!Method
_psse2pm_bus!(pm_data, pti_data, import_all)
_psse2pm_bus!(pm_data, pti_data)

Parses PSS(R)E-style Bus data into a PowerModels-style Dict. "source_id" is given by ["I", "NAME"] in PSS(R)E Bus specification.

source
PowerSystems._psse2pm_dcline!Method
_psse2pm_dcline!(pm_data, pti_data, import_all)
_psse2pm_dcline!(pm_data, pti_data)

Parses PSS(R)E-style Two-Terminal and VSC DC Lines data into a PowerModels compatible Dict structure by first converting them to a simple DC Line Model. For Two-Terminal DC lines, "sourceid" is given by ["IPR", "IPI", "NAME"] in the PSS(R)E Two-Terminal DC specification. For Voltage Source Converters, "sourceid" is given by ["IBUS1", "IBUS2", "NAME"], where "IBUS1" is "IBUS" of the first converter bus, and "IBUS2" is the "IBUS" of the second converter bus, in the PSS(R)E Voltage Source Converter specification.

source
PowerSystems._psse2pm_generator!Method
_psse2pm_generator!(pm_data, pti_data, import_all)
_psse2pm_generator!(pm_data, pti_data)

Parses PSS(R)E-style Generator data in a PowerModels-style Dict. "source_id" is given by ["I", "ID"] in PSS(R)E Generator specification.

source
PowerSystems._psse2pm_load!Method
_psse2pm_load!(pm_data, pti_data, import_all)
_psse2pm_load!(pm_data, pti_data)

Parses PSS(R)E-style Load data into a PowerModels-style Dict. "source_id" is given by ["I", "ID"] in the PSS(R)E Load specification.

source
PowerSystems._psse2pm_shunt!Method
_psse2pm_shunt!(pm_data, pti_data, import_all)
_psse2pm_shunt!(pm_data, pti_data)

Parses PSS(R)E-style Fixed and Switched Shunt data into a PowerModels-style Dict. "source_id" is given by ["I", "ID"] for Fixed Shunts, and ["I", "SWREM"] for Switched Shunts, as given by the PSS(R)E Fixed and Switched Shunts specifications.

source
PowerSystems._psse2pm_transformer!Method
_psse2pm_transformer!(pm_data, pti_data, import_all)
_psse2pm_transformer!(pm_data, pti_data)

Parses PSS(R)E-style Transformer data into a PowerModels-style Dict. "source_id" is given by ["I", "J", "K", "CKT", "winding"], where "winding" is 0 if transformer is two-winding, and 1, 2, or 3 for three-winding, and the remaining keys are defined in the PSS(R)E Transformer specification.

source
PowerSystems._pti_to_powermodels!Method
_pti_to_powermodels!(pti_data; import_all, validate)
_pti_to_powermodels!(pti_data)

Converts PSS(R)E-style data parsed from a PTI raw file, passed by pti_data into a format suitable for use internally in PowerModels. Imports all remaining data from the PTI file if import_all is true (Default: false).

source
PowerSystems._read_data_rowMethod
_read_data_row(data, row, field_infos; na_to_nothing)

Reads values from dataframe row and performs necessary conversions.

source
PowerSystems._remove_pwl_cost_duplicates!Function
_remove_pwl_cost_duplicates!(id, comp, type_name)
_remove_pwl_cost_duplicates!(id, comp, type_name, tolerance)

checks that each point in the a pwl function is unqiue, simplifies the function if duplicates appear

source
PowerSystems._simplify_pwl_cost!Function
_simplify_pwl_cost!(id, comp, type_name)
_simplify_pwl_cost!(id, comp, type_name, tolerance)

checks the slope of each segment in a pwl function, simplifies the function if the slope changes is below a tolerance

source
PowerSystems._split_loads_shunts!Method
_split_loads_shunts!(data)
_split_loads_shunts!(data)

Seperates Loads and Shunts in data under separate "load" and "shunt" keys in the PowerModels data format. Includes references to originating bus via "loadbus" and "shuntbus" keys, respectively.

source
PowerSystems.adequacy_checkMethod
adequacy_check(sys)
adequacy_check(sys::System)

Checks the system for sum(generator ratings) >= sum(load ratings).

Arguments

  • sys::System: system
source
PowerSystems.bus_csv_parser!Method
bus_csv_parser!(sys, data)
bus_csv_parser!(sys::System, bus_raw::DataFrames.DataFrame)

Add buses and areas to the System from the raw data.

source
PowerSystems.calc_cost_pwl_linesMethod
calc_cost_pwl_lines(comp_dict)

compute lines in m and b from from pwl cost models data is a list of components.

Can be run on data or ref data structures

source
PowerSystems.check_component_additionMethod
check_component_addition(sys, component)

Throws ArgumentError if a PowerSystems rule blocks addition to the system.

This method is tied with handlecomponentaddition!. If the methods are re-implemented for a subtype then whatever is added in handlecomponentaddition! must be checked here.

source
PowerSystems.correct_network_data!Method
correct_network_data!(data)

Runs various data quality checks on a PowerModels data dictionary. Applies modifications in some cases. Reports modified component ids.

source
PowerSystems.correct_transformer_parameters!Method
correct_transformer_parameters!(data)

checks that each branch has a reasonable transformer parameters

this is important because setting tap == 0.0 leads to NaN computations, which are hard to debug

source
PowerSystems.flow_valMethod
flow_val(b)
flow_val(b::TapTransformer)

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

source
PowerSystems.flow_valMethod
flow_val(b)
flow_val(b::TapTransformer)

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

source
PowerSystems.flow_valMethod
flow_val(b)
flow_val(b::TapTransformer)

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

source
PowerSystems.gen_csv_parser!Method
gen_csv_parser!(sys, data)
gen_csv_parser!(sys::System, data::PowerSystemTableData)

Add generators to the System from the raw data.

source
PowerSystems.get_forecast_keysMethod
get_forecast_keys(component)
get_forecast_keys(component::Component)

Return an iterable of NamedTuple keys for forecasts stored for this component.

source
PowerSystems.get_generator_mappingFunction
get_generator_mapping()
get_generator_mapping(filename)

Return a dict where keys are a tuple of input parameters (fuel, unit_type) and values are generator types.

source
PowerSystems.get_user_fieldMethod
get_user_field(data, category, field)

Return the custom name stored in the user descriptor file.

Throws DataFormatError if a required value is not found in the file.

source
PowerSystems.im_replicateMethod
im_replicate(sn_data, count, global_keys)

Transforms a single network into a multinetwork with several deepcopies of the original network

source
PowerSystems.iterate_rowsMethod
iterate_rows(data, category; na_to_nothing)
iterate_rows(data::PowerSystemTableData, category; na_to_nothing=true)

Return a NamedTuple of parameters from the descriptor file for each row of a dataframe, making type conversions as necessary.

Refer to the PowerSystems descriptor file for field names that will be created.

source
PowerSystems.make_thermal_genMethod
make_thermal_gen(gen_name, d, bus)

The polynomial term follows the convention that for an n-degree polynomial, at least n + 1 components are needed. c(p) = cn*p^n+...+c1p+c0 co is stored in the field in of the Econ Struct

source
PowerSystems.parse_ptiMethod
parse_pti(io)
parse_pti(io::IO)

Reads PTI data in io::IO, returning a Dict of the data parsed into the proper types.

source
PowerSystems.parse_ptiMethod
parse_pti(filename)
parse_pti(filename::String)

Open PTI raw file given by filename, returning a Dict of the data parsed into the proper types.

source
PowerSystems.propagate_topology_status!Method
propagate_topology_status!(data)

finds active network buses and branches that are not necessary for the computation and sets their status to off.

Works on a PowerModels data dict, so that a it can be used without a GenericPowerModel object

Warning: this implementation has quadratic complexity, in the worst case

source
PowerSystems.read_gen!Method
read_gen!(sys, data, bus_number_to_bus; kwargs...)

Transfer generators to ps_dict according to their classification

source
PowerSystems.replicateMethod
replicate(sn_data, count; global_keys)

Turns in given single network data in multinetwork data with a count replicate of the given network. Note that this function performs a deepcopy of the network data. Significant multinetwork space savings can often be achieved by building application specific methods of building multinetwork with minimal data replication.

source
PowerSystems.total_load_ratingMethod
total_load_rating(sys)
total_load_rating(sys::System)

Checks the system for sum(generator ratings) >= sum(load ratings).

Arguments

  • sys::System: system
source
PowerSystems.validate_structMethod
validate_struct(sys, value)
validate_struct(sys::System, value::PowerSystemType)

Validate an instance of a PowerSystemType against System data. Returns true if the instance is valid.

Users implementing this function for custom types should consider implementing InfrastructureSystems.validate_struct instead if the validation logic only requires data contained within the instance.

source