PRASCore API reference

Systems

PRASCore.Systems.SystemModelType
SystemModel{N, L, T<:Period, P<:PowerUnit, E<:EnergyUnit}

A SystemModel struct contains a representation of a power system to be studied with PRAS. See system specifications for more details on components of a system model.

Type Parameters

  • N: Number of timesteps in the system model
  • L: Length of each timestep in T units
  • T: Time period type (e.g., Hour, Minute)
  • P: Power unit type (e.g., MW, GW)
  • E: Energy unit type (e.g., MWh, GWh)

Fields

  • regions: Representation of system regions (Type - Regions)
  • interfaces: Information about connections between regions (Type - Interfaces)
  • generators: Collection of system generators (Type - Generators)
  • region_gen_idxs: Mapping of generators to their respective regions
  • storages: Collection of system storages (Type - Storages)
  • region_stor_idxs: Mapping of storage resources to their respective regions
  • generatorstorages: Collection of system generation-storages (Type - GeneratorStorages)
  • region_genstor_idxs: Mapping of hybrid resources to their respective regions
  • lines: Collection of transmission lines connecting regions (Type - Lines)
  • interface_line_idxs: Mapping of transmission lines to interfaces
  • timestamps: Time range for the simulation period
  • attrs: Dictionary of system metadata and attributes

Constructors

SystemModel(regions, interfaces, generators, region_gen_idxs, storages, region_stor_idxs,
            generatorstorages, region_genstor_idxs, lines, interface_line_idxs,
            timestamps, [attrs])

Create a system model with all components specified.

SystemModel(generators, storages, generatorstorages, timestamps, load, [attrs])

Create a single-node system model with specified generators, storage, and load profile.

SystemModel(regions, interfaces, generators, region_gen_idxs, storages, region_stor_idxs,
            generatorstorages, region_genstor_idxs, lines, interface_line_idxs,
            timestamps::StepRange{DateTime}, [attrs])

Create a system model with DateTime timestamps (will be converted to UTC time zone).

source
PRASCore.Systems.RegionsType
Regions{N,P<:PowerUnit}

A struct representing regions within a power system.

Type Parameters

  • N: Number of timesteps in the system model
  • P: The power unit used for demand measurements, subtype of PowerUnit

Fields

  • names: Name of region (unique)
  • load: Aggregated electricity demand in each region for each timeperiod, in power_units (P)
source
PRASCore.Systems.GeneratorsType
Generators{N,L,T<:Period,P<:PowerUnit}

A struct representing generating assets within a power system.

Type Parameters

  • N: Number of timesteps in the system model
  • L: Length of each timestep in T units
  • T: The time period type used for temporal representation, subtype of Period
  • P: The power unit used for capacity measurements, subtype of PowerUnit

Fields

  • names: Name of generator
  • categories: Category of generator
  • capacity: Maximum available generation capacity in each timeperiod, expressed in units given by the power_units (P) type parameter
  • λ (failure probability): probability the generator transitions from operational to forced outage during a given simulation timestep (unitless)
  • μ (repair probability): probability the generator transitions from forced outage to operational during a given simulation timestep (unitless)
source
PRASCore.Systems.StoragesType
Storages{N,L,T<:Period,P<:PowerUnit,E<:EnergyUnit}

A struct representing storage devices in the system.

Type Parameters

  • N: Number of timesteps in the system model
  • L: Length of each timestep in T units
  • T: The time period type used for temporal representation, subtype of Period
  • P: The power unit used for capacity measurements, subtype of PowerUnit
  • E: The energy unit used for energy storage, subtype of EnergyUnit

Fields

  • names: Name of storage device
  • categories: Category of storage device
  • charge_capacity: Maximum available charging capacity for each storage unit in each timeperiod, expressed in units given by the power_units (P) type parameter
  • discharge_capacity: Maximum available discharging capacity for each storage unit in each timeperiod, expressed in units given by the power_units (P) type parameter
  • energy_capacity: Maximum available energy storage capacity for each storage unit in each timeperiod, expressed in units given by the energy_units (E) type parameter
  • charge_efficiency: Ratio of power injected into the storage device's reservoir to power withdrawn from the grid, for each storage unit in each timeperiod. Unitless.
  • discharge_efficiency: Ratio of power injected into the grid to power withdrawn from the storage device's reservoir, for each storage unit in each timeperiod. Unitless.
  • carryover_efficiency: Ratio of energy available in the storage device's reservoir at the beginning of one period to energy retained at the end of the previous period, for each storage unit in each timeperiod. Unitless.
  • λ (failure probability): Probability the unit transitions from operational to forced outage during a given simulation timestep, for each storage unit in each timeperiod. Unitless.
  • μ (repair probability): Probability the unit transitions from forced outage to operational during a given simulation timestep, for each storage unit in each timeperiod. Unitless.
source
PRASCore.Systems.GeneratorStoragesType
GeneratorStorages{N,L,T<:Period,P<:PowerUnit,E<:EnergyUnit}

A struct representing generator-storage hybrid devices within a power system.

Type Parameters

  • N: Number of timesteps in the system model
  • L: Length of each timestep in T units
  • T: The time period type used for temporal representation, subtype of Period
  • P: The power unit used for capacity measurements, subtype of PowerUnit
  • E: The energy unit used for energy storage, subtype of EnergyUnit

Fields

  • names: Name of generator-storage unit
  • categories: Category of generator-storage unit
  • charge_capacity: Maximum available charging capacity for each generator-storage unit in each timeperiod, in power_units (P)
  • discharge_capacity: Maximum available discharging capacity for each generator-storage unit in each timeperiod, in power_units (P)
  • energy_capacity: Maximum available energy storage capacity for each generator-storage unit in each timeperiod, in energy_units (E)
  • charge_efficiency: Ratio of power injected into the device's reservoir to power withdrawn from the grid, for each generator-storage unit in each timeperiod. Unitless.
  • discharge_efficiency: Ratio of power injected into the grid to power withdrawn from the device's reservoir, for each generator-storage unit in each timeperiod. Unitless.
  • carryover_efficiency: Ratio of energy available in the device's reservoir at the beginning of one period to energy retained at the end of the previous period, for each generator-storage unit in each timeperiod. Unitless.
  • inflow: Exogenous power inflow available to each generator-storage unit in each timeperiod, in power_units (P)
  • gridwithdrawal_capacity: Maximum available capacity to withdraw power from the grid for each generator-storage unit in each timeperiod, in power_units (P)
  • gridinjection_capacity: Maximum available capacity to inject power to the grid for each generator-storage unit in each timeperiod, in power_units (P)
  • λ (failure probability): Probability the unit transitions from operational to forced outage during a given simulation timestep, for each generator-storage unit in each timeperiod. Unitless.
  • μ (repair probability): Probability the unit transitions from forced outage to operational during a given simulation timestep, for each generator-storage unit in each timeperiod. Unitless.
source
PRASCore.Systems.LinesType
Lines{N,L,T<:Period,P<:PowerUnit}

A struct representing individual transmission lines between regions in a power system.

Type Parameters

  • N: Number of timesteps in the system model
  • L: Length of each timestep in T units
  • T: The time period type used for temporal representation, subtype of Period
  • P: The power unit used for capacity measurements, subtype of PowerUnit

Fields

  • names: Name of line
  • categories: Category of line
  • forward_capacity: Maximum available power transfer capacity from region_from to region_to along the line, for each line in each timeperiod, in power_units (P)
  • backward_capacity: Maximum available power transfer capacity from region_to to region_from along the line, for each line in each timeperiod, in power_units (P)
  • λ (failure probability): Probability the line transitions from operational to forced outage during a given simulation timestep, for each line in each timeperiod. Unitless.
  • μ (repair probability): Probability the line transitions from forced outage to operational during a given simulation timestep, for each line in each timeperiod. Unitless.
source
PRASCore.Systems.InterfacesType
Interfaces{N,P<:PowerUnit}

A struct representing transmission interfaces between regions in a power system.

Type Parameters

  • N: Number of timesteps in the system model
  • P: The power unit used for interface limits, subtype of PowerUnit

Fields

  • regions_from: Index of the first region connected by the interface
  • regions_to: Index of the second region connected by the interface
  • limit_forward: Maximum possible total power transfer from regions_from to regions_to, for each interface in each timeperiod, in power_units (P)
  • limit_backward: Maximum possible total power transfer from regions_to to regions_from, for each interface in each timeperiod, in power_units (P)
source

Simulations

PRASCore.Simulations.assessMethod
assess(system::SystemModel, method::SequentialMonteCarlo, resultspecs::ResultSpec...)

Run a Sequential Monte Carlo simulation on a system using the method data and return resultspecs.

Arguments

  • system::SystemModel: PRAS data structure
  • method::SequentialMonteCarlo: method for PRAS analysis
  • resultspecs::ResultSpec...: PRAS metric for metrics like Shortfall missing generation

Returns

  • results::Tuple{Vararg{ResultAccumulator{SequentialMonteCarlo}}}: PRAS metric results
source
PRASCore.Simulations.DispatchProblemType
DispatchProblem(sys::SystemModel)

Create a min-cost flow problem for the multi-region max power delivery problem with generation and storage discharging in decreasing order of priority, and storage charging with excess capacity. Storage and GeneratorStorage devices within a region are represented individually on the network.

This involves injections/withdrawals at one node (regional capacity surplus/shortfall) for each modelled region, as well as two/three nodes associated with each Storage/GeneratorStorage device, and a supplementary "slack" node in the network that can absorb undispatched power or pass unserved energy or unused charging capability through to satisfy power balance constraints.

Flows from the generation nodes are free, while flows to charging and from discharging nodes are costed or rewarded according to the time-to-discharge of the storage device, ensuring efficient coordination across units, while enforcing that storage is only discharged once generation capacity is exhausted (implying an operational strategy that prioritizes resource adequacy over economic arbitrage). This is based on the storage dispatch strategy of Evans, Tindemans, and Angeli, as outlined in "Minimizing Unserved Energy Using Heterogenous Storage Units" (IEEE Transactions on Power Systems, 2019).

Flows to the charging node have an attenuated negative cost (reward), incentivizing immediate storage charging if generation and transmission allows it, while avoiding charging by discharging other storage (since that would incur an overall positive cost).

Flows to the slack node (representing unused generation or storage discharge capacity) are free, but flows from the slack node to serve load incur the lost load penalty of 9999. Flows from the slack node in lieu of storage charging or discharging are free.

Flows on transmission interfaces assume a hurdle rate of 1 to keep unserved energy close to the source of the shortage and eliminate loop flows. This has the side-effect of disincentivising wheeling power across multiple regions for charging purposes, however.

Nodes in the problem are ordered as:

  1. Regions generation surplus/shortfall (Regions order)
  2. Storage discharge capacity (Storage order)
  3. Storage charge capacity (Storage order)
  4. GenerationStorage inflow capacity (GeneratorStorage order)
  5. GenerationStorage discharge capacity (GeneratorStorage order)
  6. GenerationStorage grid injection (GeneratorStorage order)
  7. GenerationStorage charge capacity (GeneratorStorage order)
  8. Slack node

Edges are ordered as:

  1. Regions demand unserved (Regions order)
  2. Regions generation unused (Regions order)
  3. Interfaces forward flow (Interfaces order)
  4. Interfaces reverse flow (Interfaces order)
  5. Storage discharge to grid (Storage order)
  6. Storage discharge unused (Storage order)
  7. Storage charge from grid (Storage order)
  8. Storage charge unused (Storage order)
  9. GenerationStorage discharge to grid (GeneratorStorage order)
  10. GenerationStorage discharge unused (GeneratorStorage order)
  11. GenerationStorage inflow to grid (GenerationStorage order)
  12. GenerationStorage total to grid (GeneratorStorage order)
  13. GenerationStorage charge from grid (GeneratorStorage order)
  14. GenerationStorage charge from inflow (GeneratorStorage order)
  15. GenerationStorage charge unused (GeneratorStorage order)
  16. GenerationStorage inflow unused (GeneratorStorage order)
source
PRASCore.Simulations.SequentialMonteCarloType
SequentialMonteCarlo(;
    samples::Int=10_000,
    seed::Integer=rand(UInt64),
    verbose::Bool=false,
    threaded::Bool=true
)

Sequential Monte Carlo simulation parameters for PRAS analysis

It it recommended that you fix the random seed for reproducibility.

Arguments

  • samples::Int=10_000: Number of samples
  • seed::Integer=rand(UInt64): Random seed
  • verbose::Bool=false: Print progress
  • threaded::Bool=true: Use multi-threading

Returns

  • SequentialMonteCarlo: PRAS simulation specification
source

Results

PRASCore.Results.LOLEType
LOLE

LOLE reports loss of load expectation over a particular time period and regional extent. When the reporting period is a single simulation timestep, the metric is equivalent to loss of load probability (LOLP).

Contains both the estimated value itself as well as the standard error of that estimate, which can be extracted with val and stderror, respectively.

source
PRASCore.Results.EUEType
EUE

EUE reports expected unserved energy over a particular time period and regional extent.

Contains both the estimated value itself as well as the standard error of that estimate, which can be extracted with val and stderror, respectively.

source
PRASCore.Results.NEUEType
NEUE

NEUE reports normalized expected unserved energy over a regional extent.

Contains both the estimated value itself as well as the standard error of that estimate, which can be extracted with val and stderror, respectively.

source
PRASCore.Results.ShortfallType
Shortfall

The Shortfall result specification reports expectation-based resource adequacy risk metrics such as EUE and LOLE, producing a ShortfallResult.

A ShortfallResult can be directly indexed by a region name and a timestamp to retrieve a tuple of sample mean and standard deviation, estimating the average unserved energy in that region and timestep. However, in most cases it's simpler to use EUE and LOLE constructors to directly retrieve standard risk metrics.

Example:

shortfall, =
    assess(sys, SequentialMonteCarlo(samples=1000), Shortfall())

period = ZonedDateTime(2020, 1, 1, 0, tz"UTC")

# Unserved energy mean and standard deviation
sf_mean, sf_std = shortfall["Region A", period]

# System-wide risk metrics
eue = EUE(shortfall)
lole = LOLE(shortfall)
neue = NEUE(shorfall)

# Regional risk metrics
regional_eue = EUE(shortfall, "Region A")
regional_lole = LOLE(shortfall, "Region A")
regional_neue = NEUE(shortfall, "Region A")

# Period-specific risk metrics
period_eue = EUE(shortfall, period)
period_lolp = LOLE(shortfall, period)

# Region- and period-specific risk metrics
period_eue = EUE(shortfall, "Region A", period)
period_lolp = LOLE(shortfall, "Region A", period)

See ShortfallSamples for recording sample-level shortfall results.

source
PRASCore.Results.ShortfallSamplesType
ShortfallSamples

The ShortfallSamples result specification reports sample-level unserved energy outcomes, producing a ShortfallSamplesResult.

A ShortfallSamplesResult can be directly indexed by a region name and a timestamp to retrieve a vector of sample-level unserved energy results in that region and timestep. EUE and LOLE constructors can also be used to retrieve standard risk metrics.

Example:

shortfall, =
    assess(sys, SequentialMonteCarlo(samples=10), ShortfallSamples())

period = ZonedDateTime(2020, 1, 1, 0, tz"UTC")

samples = shortfall["Region A", period]

@assert samples isa Vector{Float64}
@assert length(samples) == 10

# System-wide risk metrics
eue = EUE(shortfall)
lole = LOLE(shortfall)
neue = NEUE(shortfall)

# Regional risk metrics
regional_eue = EUE(shortfall, "Region A")
regional_lole = LOLE(shortfall, "Region A")
regional_neue = NEUE(shortfall, "Region A")

# Period-specific risk metrics
period_eue = EUE(shortfall, period)
period_lolp = LOLE(shortfall, period)

# Region- and period-specific risk metrics
period_eue = EUE(shortfall, "Region A", period)
period_lolp = LOLE(shortfall, "Region A", period)

Note that this result specification requires large amounts of memory for larger sample sizes. See Shortfall for average shortfall outcomes when sample-level granularity isn't required.

source
PRASCore.Results.SurplusType
Surplus

The Surplus result specification reports unused generation and storage discharge capability of Regions, producing a SurplusResult.

A SurplusResult can be indexed by region name and timestamp to retrieve a tuple of sample mean and standard deviation, estimating the average unused capacity in that region and timestep.

Example:

surplus, =
    assess(sys, SequentialMonteCarlo(samples=1000), Surplus())

surplus_mean, surplus_std =
    surplus["Region A", ZonedDateTime(2020, 1, 1, 0, tz"UTC")]

See SurplusSamples for sample-level surplus results.

source
PRASCore.Results.SurplusSamplesType
SurplusSamples

The SurplusSamples result specification reports sample-level unused generation and storage discharge capability of Regions, producing a SurplusSamplesResult.

A SurplusSamplesResult can be indexed by region name and timestamp to retrieve a vector of sample-level surplus values in that region and timestep.

Example:

surplus, =
    assess(sys, SequentialMonteCarlo(samples=10), SurplusSamples())

samples = surplus["Region A", ZonedDateTime(2020, 1, 1, 0, tz"UTC")]

@assert samples isa Vector{Float64}
@assert length(samples) == 10

Note that this result specification requires large amounts of memory for larger sample sizes. See Surplus for estimated average surplus values when sample-level granularity isn't required.

source
PRASCore.Results.FlowType
Flow

The Flow result specification reports the estimated average flow across transmission Interfaces, producing a FlowResult.

A FlowResult can be indexed by a directional Pair of region names and a timestamp to retrieve a tuple of sample mean and standard deviation, estimating the average net flow magnitude and direction relative to the given directed interface in that timestep. For a query of "Region A" => "Region B", if estimated average flow was from A to B, the reported value would be positive, while if average flow was in the reverse direction, from B to A, the value would be negative.

Example:

flows, =
    assess(sys, SequentialMonteCarlo(samples=1000), Flow())

flow_mean, flow_std =
    flows["Region A" => "Region B", ZonedDateTime(2020, 1, 1, 0, tz"UTC")]
flow2_mean, flow2_std =
    flows["Region B" => "Region A", ZonedDateTime(2020, 1, 1, 0, tz"UTC")]
@assert flow_mean == -flow2_mean

See FlowSamples for sample-level flow results.

source
PRASCore.Results.FlowSamplesType
FlowSamples

The FlowSamples result specification reports the sample-level magnitude and direction of power flows across Interfaces, producing a FlowSamplesResult.

A FlowSamplesResult can be indexed by a directional Pair of region names and a timestamp to retrieve a vector of sample-level net flow magnitudes and directions relative to the given directed interface in that timestep. For a query of "Region A" => "Region B", if flow in one sample was from A to B, the reported value would be positive, while if flow was in the reverse direction, from B to A, the value would be negative.

Example:

flows, =
    assess(sys, SequentialMonteCarlo(samples=10), FlowSamples())

samples = flows["Region A" => "Region B", ZonedDateTime(2020, 1, 1, 0, tz"UTC")]

@assert samples isa Vector{Float64}
@assert length(samples) == 10

samples2 = flows["Region B" => "Region A", ZonedDateTime(2020, 1, 1, 0, tz"UTC")]

@assert samples == -samples2

Note that this result specification requires large amounts of memory for larger sample sizes. See Flow for estimated average flow results when sample-level granularity isn't required.

source
PRASCore.Results.UtilizationType
Utilization

The Utilization result specification reports the estimated average absolute utilization of Interfaces, producing a UtilizationResult.

Whereas Flow reports the average directional power transfer across an interface, Utilization reports the absolute value of flow relative to the interface's transfer capability (counting the effects of line outages). For example, a symmetrically-constrained interface which is fully congested with max power flowing in one direction in half of the samples, and the other direction in the remaining samples, would have an average flow of 0 MW, but an average utilization of 100%.

A UtilizationResult can be indexed by a Pair of region names and a timestamp to retrieve a tuple of sample mean and standard deviation, estimating the average utilization of the interface. Given the absolute value nature of the outcome, results are independent of direction. Querying "Region A" => "Region B" will yield the same result as "Region B" => "Region A".

Example:

utils, =
    assess(sys, SequentialMonteCarlo(samples=1000), Utilization())

util_mean, util_std =
    utils["Region A" => "Region B", ZonedDateTime(2020, 1, 1, 0, tz"UTC")]

util2_mean, util2_std =
    utils["Region B" => "Region A", ZonedDateTime(2020, 1, 1, 0, tz"UTC")]

@assert util_mean == util2_mean

See UtilizationSamples for sample-level utilization results.

source
PRASCore.Results.UtilizationSamplesType
UtilizationSamples

The UtilizationSamples result specification reports the sample-level absolute utilization of Interfaces, producing a UtilizationSamplesResult.

Whereas FlowSamples reports the directional power transfer across an interface, UtilizationSamples reports the absolute value of flow relative to the interface's transfer capability (counting the effects of line outages). For example, a 100 MW symmetrically-constrained interface which is fully congested may have a flow of +100 or -100 MW, but in both cases the utilization will be 100%. If a 50 MW line in the interface went on outage, flow may drop to +50 or -50 MW, but utilization would remain at 100%.

A UtilizationSamplesResult can be indexed by a Pair of region names and a timestamp to retrieve a vector of sample-level utilizations of the interface in that timestep. Given the absolute value nature of the outcome, results are independent of direction. Querying "Region A" => "Region B" will yield the same result as "Region B" => "Region A".

Example:

utils, =
    assess(sys, SequentialMonteCarlo(samples=10), UtilizationSamples())

samples =
    utils["Region A" => "Region B", ZonedDateTime(2020, 1, 1, 0, tz"UTC")]

@assert samples isa Vector{Float64}
@assert length(samples) == 10

samples2 =
    utils["Region B" => "Region A", ZonedDateTime(2020, 1, 1, 0, tz"UTC")]

@assert samples == samples2

Note that this result specification requires large amounts of memory for larger sample sizes. See Utilization for sample-averaged utilization results when sample-level granularity isn't required.

source
PRASCore.Results.GeneratorAvailabilityType
GeneratorAvailability

The GeneratorAvailability result specification reports the sample-level discrete availability of Generators, producing a GeneratorAvailabilityResult.

A GeneratorAvailabilityResult can be indexed by generator name and timestamp to retrieve a vector of sample-level availability states for the unit in the given timestep. States are provided as a boolean with true indicating that the unit is available and false indicating that it's unavailable.

Example:

genavail, =
    assess(sys, SequentialMonteCarlo(samples=10), GeneratorAvailability())

samples = genavail["MyGenerator123", ZonedDateTime(2020, 1, 1, 0, tz"UTC")]

@assert samples isa Vector{Bool}
@assert length(samples) == 10
source
PRASCore.Results.GeneratorStorageAvailabilityType
GeneratorStorageAvailability

The GeneratorStorageAvailability result specification reports the sample-level discrete availability of GeneratorStorages, producing a GeneratorStorageAvailabilityResult.

A GeneratorStorageAvailabilityResult can be indexed by generator-storage name and timestamp to retrieve a vector of sample-level availability states for the unit in the given timestep. States are provided as a boolean with true indicating that the unit is available and false indicating that it's unavailable.

Example:

genstoravail, =
    assess(sys, SequentialMonteCarlo(samples=10), GeneratorStorageAvailability())

samples = genstoravail["MyGenerator123", ZonedDateTime(2020, 1, 1, 0, tz"UTC")]

@assert samples isa Vector{Bool}
@assert length(samples) == 10
source
PRASCore.Results.GeneratorStorageEnergyType
GeneratorStorageEnergy

The GeneratorStorageEnergy result specification reports the average state of charge of GeneratorStorages, producing a GeneratorStorageEnergyResult.

A GeneratorStorageEnergyResult can be indexed by generator-storage device name and a timestamp to retrieve a tuple of sample mean and standard deviation, estimating the average energy level for the given generator-storage device in that timestep.

Example:

genstorenergy, =
    assess(sys, SequentialMonteCarlo(samples=1000), GeneratorStorageEnergy())

soc_mean, soc_std =
    genstorenergy["MyGeneratorStorage123", ZonedDateTime(2020, 1, 1, 0, tz"UTC")]

See GeneratorStorageEnergySamples for sample-level generator-storage states of charge.

See StorageEnergy for average storage states of charge.

source
PRASCore.Results.GeneratorStorageEnergySamplesType
GeneratorStorageEnergySamples

The GeneratorStorageEnergySamples result specification reports the sample-level state of charge of GeneratorStorages, producing a GeneratorStorageEnergySamplesResult.

A GeneratorStorageEnergySamplesResult can be indexed by generator-storage device name and a timestamp to retrieve a vector of sample-level charge states for the device in the given timestep.

Example:

genstorenergy, =
    assess(sys, SequentialMonteCarlo(samples=10), GeneratorStorageEnergySamples())

samples = genstorenergy["MyGeneratorStorage123", ZonedDateTime(2020, 1, 1, 0, tz"UTC")]

@assert samples isa Vector{Float64}
@assert length(samples) == 10

Note that this result specification requires large amounts of memory for larger sample sizes. See GeneratorStorageEnergy for estimated average generator-storage state of charge when sample-level granularity isn't required.

source
PRASCore.Results.StorageAvailabilityType
StorageAvailability

The StorageAvailability result specification reports the sample-level discrete availability of Storages, producing a StorageAvailabilityResult.

A StorageAvailabilityResult can be indexed by storage device name and a timestamp to retrieve a vector of sample-level availability states for the unit in the given timestep. States are provided as a boolean with true indicating that the unit is available and false indicating that it's unavailable.

Example:

storavail, =
    assess(sys, SequentialMonteCarlo(samples=10), StorageAvailability())

samples = storavail["MyStorage123", ZonedDateTime(2020, 1, 1, 0, tz"UTC")]

@assert samples isa Vector{Bool}
@assert length(samples) == 10
source
PRASCore.Results.StorageEnergyType
StorageEnergy

The StorageEnergy result specification reports the average state of charge of Storages, producing a StorageEnergyResult.

A StorageEnergyResult can be indexed by storage device name and a timestamp to retrieve a tuple of sample mean and standard deviation, estimating the average energy level for the given storage device in that timestep.

Example:

storenergy, =
    assess(sys, SequentialMonteCarlo(samples=1000), StorageEnergy())

soc_mean, soc_std =
    storenergy["MyStorage123", ZonedDateTime(2020, 1, 1, 0, tz"UTC")]

See StorageEnergySamples for sample-level storage states of charge.

See GeneratorStorageEnergy for average generator-storage states of charge.

source
PRASCore.Results.StorageEnergySamplesType
StorageEnergySamples

The StorageEnergySamples result specification reports the sample-level state of charge of Storages, producing a StorageEnergySamplesResult.

A StorageEnergySamplesResult can be indexed by storage device name and a timestamp to retrieve a vector of sample-level charge states for the device in the given timestep.

Example:

storenergy, =
    assess(sys, SequentialMonteCarlo(samples=10), StorageEnergySamples())

samples = storenergy["MyStorage123", ZonedDateTime(2020, 1, 1, 0, tz"UTC")]

@assert samples isa Vector{Float64}
@assert length(samples) == 10

Note that this result specification requires large amounts of memory for larger sample sizes. See StorageEnergy for estimated average storage state of charge when sample-level granularity isn't required.

source
PRASCore.Results.LineAvailabilityType
LineAvailability

The LineAvailability result specification reports the sample-level discrete availability of Lines, producing a LineAvailabilityResult.

A LineAvailabilityResult can be indexed by line name and timestamp to retrieve a vector of sample-level availability states for the unit in the given timestep. States are provided as a boolean with true indicating that the unit is available and false indicating that it's unavailable.

Example:

lineavail, =
    assess(sys, SequentialMonteCarlo(samples=10), LineAvailability())

samples = lineavail["MyLine123", ZonedDateTime(2020, 1, 1, 0, tz"UTC")]

@assert samples isa Vector{Bool}
@assert length(samples) == 10
source