SIIP Tutorial

5-bus Market simulation with PowerSimulations.jl

Originally Contributed by: Clayton Barrows

Introduction

PowerSimulations.jl supports simulations that consist of sequential optimization problems where results from previous problems inform subsequent problems in a variety of ways. This example demonstrates some of these capabilities to represent electricity market clearing.

Dependencies and Data

First, let's create System to represent the Day-Ahead and Real-Time market clearing process with hourly, and 5-minute time series data, respectively.

Modeling Packages

using PowerSystems
using PowerSimulations
using PowerSystemCaseBuilder

Data management packages

using Dates
using DataFrames

Optimization packages

using HiGHS # mip solver
solver = optimizer_with_attributes(HiGHS.Optimizer, "mip_rel_gap" => 0.5)
MathOptInterface.OptimizerWithAttributes(HiGHS.Optimizer, Pair{MathOptInterface.AbstractOptimizerAttribute, Any}[MathOptInterface.RawOptimizerAttribute("mip_rel_gap") => 0.5])

5-bus Data

The five bus system data here includes hourly day-ahead data, 5-minute real-time market data, and 6-second actual data. We'll only use the hourly and 5-minute data for the example simulations below, but the 6-second data is included for future development.

sys_DA = build_system(SIIPExampleSystems, "5_bus_matpower_DA")
sys_RT = build_system(SIIPExampleSystems, "5_bus_matpower_RT")
System
Property Value
System Units Base SYSTEM_BASE
Base Power 100.0
Base Frequency 60.0
Num Components 30
Static Components
Type Count Has Static Time Series Has Forecasts
Arc 6 false false
Area 1 false false
Bus 5 false false
Line 5 false false
LoadZone 1 false false
PhaseShiftingTransformer 2 false false
PowerLoad 3 true true
RenewableDispatch 2 true true
ThermalStandard 5 false false
Time Series Summary
Property Value
Components with time series data 5
Total StaticTimeSeries 5
Total Forecasts 5
Resolution 60 minutes
First initial time 2020-01-01T00:00:00
Last initial time 2020-03-24T12:00:00
Horizon 12
Interval 60 minutes
Forecast window count 2005

ProblemTemplate

template_uc = template_unit_commitment(use_slacks=true)
template_ed = template_economic_dispatch(
    network=NetworkModel(CopperPlatePowerModel, duals=[CopperPlateBalanceConstraint]),
)
Network Model
Network Model PowerSimulations.CopperPlatePowerModel
Slacks false
PTDF false
Duals PowerSimulations.CopperPlateBalanceConstraint
Device Models ┌───────────────────────────────────┬──────────────────────────────────────────┬────────┐ │ Device Type │ Formulation │ Slacks │ ├───────────────────────────────────┼──────────────────────────────────────────┼────────┤ │ PowerSystems.ThermalStandard │ PowerSimulations.ThermalBasicDispatch │ false │ │ PowerSystems.HydroEnergyReservoir │ PowerSimulations.HydroDispatchRunOfRiver │ false │ │ PowerSystems.RenewableDispatch │ PowerSimulations.RenewableFullDispatch │ false │ │ PowerSystems.PowerLoad │ PowerSimulations.StaticPowerLoad │ false │ │ PowerSystems.InterruptibleLoad │ PowerSimulations.InterruptiblePowerLoad │ false │ │ PowerSystems.RenewableFix │ PowerSimulations.FixedOutput │ false │ │ PowerSystems.HydroDispatch │ PowerSimulations.HydroDispatchRunOfRiver │ false │ └───────────────────────────────────┴──────────────────────────────────────────┴────────┘
Branch Models
Branch Type Formulation Slacks
PowerSystems.Transformer2W PowerSimulations.StaticBranch false
PowerSystems.Line PowerSimulations.StaticBranch false
PowerSystems.HVDCLine PowerSimulations.HVDCDispatch false
PowerSystems.TapTransformer PowerSimulations.StaticBranch false
Service Models
Service Type Formulation Slacks Aggregated Model
PowerSystems.VariableReserve{PowerSystems.ReserveUp} PowerSimulations.RangeReserve false true
PowerSystems.VariableReserve{PowerSystems.ReserveDown} PowerSimulations.RangeReserve false true

Define the Simulation Sequence

models = SimulationModels(
    decision_models=[
        DecisionModel(template_uc, sys_DA, name="UC", optimizer=solver),
        DecisionModel(template_ed, sys_RT, name="ED", optimizer=solver),
    ],
)

feedforward = Dict(
    "ED" => [
        SemiContinuousFeedforward(
            component_type=ThermalStandard,
            source=OnVariable,
            affected_values=[ActivePowerVariable],
        ),
    ],
)

DA_RT_sequence = SimulationSequence(
    models=models,
    ini_cond_chronology=InterProblemChronology(),
    feedforwards=feedforward,
)
Simulation Sequence
Simulation Step Interval 24 hours
Number of Problems 2
Simulation Problems
Model Name Horizon Interval Executions Per Step
UC 48 1440 minutes 1
ED 12 60 minutes 24
Feedforwards
Model Name Feed Forward Type
ED PowerSimulations.SemiContinuousFeedforward

Simulation

file_path = mktempdir(cleanup=true)
sim = Simulation(
    name="5bus-test",
    steps=1,
    models=models,
    sequence=DA_RT_sequence,
    simulation_folder=file_path,
)
Simulation
Simulation Name 5bus-test
Build Status EMPTY
Run Status NOT_READY
Initial Time Unset Initial Time
Steps 1
Decision Models
Model Name Model Type Status Output Directory
UC PowerSimulations.GenericOpProblem EMPTY nothing
ED PowerSimulations.GenericOpProblem EMPTY nothing
No Emulator Model Specified
Simulation Sequence
Simulation Step Interval 24 hours
Number of Problems 2
Simulation Problems
Model Name Horizon Interval Executions Per Step
UC 48 1440 minutes 1
ED 12 60 minutes 24
Feedforwards
Model Name Feed Forward Type
ED PowerSimulations.SemiContinuousFeedforward

Build simulation

build!(sim)
PowerSimulations.BuildStatusModule.BuildStatus.BUILT = 0

Execute simulation

execute!(sim, enable_progress_bar=false)

# Results
PowerSimulations.RunStatusModule.RunStatus.SUCCESSFUL = 0

First we can load the result metadata

results = SimulationResults(sim);
uc_results = get_decision_problem_results(results, "UC")
ed_results = get_decision_problem_results(results, "ED");

Then we can read and examine the results of interest. For example, if we want to read marginal prices of the balance constraint, we can see what dual values are available:

list_dual_names(ed_results)
1-element Vector{String}:
 "CopperPlateBalanceConstraint__System"

Then, we can read the results of the dual

prices = read_dual(ed_results, "CopperPlateBalanceConstraint__System")
DataStructures.SortedDict{Dates.DateTime, DataFrames.DataFrame, Base.Order.ForwardOrdering} with 24 entries:
  DateTime("2020-01-01T00:00:00") => 12×2 DataFrame
 Row │ DateTime             CopperPlateBalanceConstraint__System
     │ DateTime             Float64
─────┼───────────────────────────────────────────────────────────
   1 │ 2020-01-01T00:00:00                                1000.0
   2 │ 2020-01-01T01:00:00                                1000.0
   3 │ 2020-01-01T02:00:00                                1000.0
   4 │ 2020-01-01T03:00:00                                1000.0
   5 │ 2020-01-01T04:00:00                                1000.0
   6 │ 2020-01-01T05:00:00                                1000.0
   7 │ 2020-01-01T06:00:00                                1000.0
   8 │ 2020-01-01T07:00:00                                1000.0
   9 │ 2020-01-01T08:00:00                                1000.0
  10 │ 2020-01-01T09:00:00                                1000.0
  11 │ 2020-01-01T10:00:00                                1000.0
  12 │ 2020-01-01T11:00:00                                1000.0
  DateTime("2020-01-01T01:00:00") => 12×2 DataFrame
 Row │ DateTime             CopperPlateBalanceConstraint__System
     │ DateTime             Float64
─────┼───────────────────────────────────────────────────────────
   1 │ 2020-01-01T01:00:00                                1000.0
   2 │ 2020-01-01T02:00:00                                1000.0
   3 │ 2020-01-01T03:00:00                                1000.0
   4 │ 2020-01-01T04:00:00                                1000.0
   5 │ 2020-01-01T05:00:00                                1000.0
   6 │ 2020-01-01T06:00:00                                1000.0
   7 │ 2020-01-01T07:00:00                                1000.0
   8 │ 2020-01-01T08:00:00                                1000.0
   9 │ 2020-01-01T09:00:00                                1000.0
  10 │ 2020-01-01T10:00:00                                1000.0
  11 │ 2020-01-01T11:00:00                                1000.0
  12 │ 2020-01-01T12:00:00                                1000.0
  DateTime("2020-01-01T02:00:00") => 12×2 DataFrame
 Row │ DateTime             CopperPlateBalanceConstraint__System
     │ DateTime             Float64
─────┼───────────────────────────────────────────────────────────
   1 │ 2020-01-01T02:00:00                                1000.0
   2 │ 2020-01-01T03:00:00                                1000.0
   3 │ 2020-01-01T04:00:00                                1000.0
   4 │ 2020-01-01T05:00:00                                1000.0
   5 │ 2020-01-01T06:00:00                                1000.0
   6 │ 2020-01-01T07:00:00                                1000.0
   7 │ 2020-01-01T08:00:00                                1000.0
   8 │ 2020-01-01T09:00:00                                1000.0
   9 │ 2020-01-01T10:00:00                                1000.0
  10 │ 2020-01-01T11:00:00                                1000.0
  11 │ 2020-01-01T12:00:00                                1000.0
  12 │ 2020-01-01T13:00:00                                1000.0
  DateTime("2020-01-01T03:00:00") => 12×2 DataFrame
 Row │ DateTime             CopperPlateBalanceConstraint__System
     │ DateTime             Float64
─────┼───────────────────────────────────────────────────────────
   1 │ 2020-01-01T03:00:00                                1000.0
   2 │ 2020-01-01T04:00:00                                1000.0
   3 │ 2020-01-01T05:00:00                                1000.0
   4 │ 2020-01-01T06:00:00                                1000.0
   5 │ 2020-01-01T07:00:00                                1000.0
   6 │ 2020-01-01T08:00:00                                1000.0
   7 │ 2020-01-01T09:00:00                                1000.0
   8 │ 2020-01-01T10:00:00                                1000.0
   9 │ 2020-01-01T11:00:00                                1000.0
  10 │ 2020-01-01T12:00:00                                1000.0
  11 │ 2020-01-01T13:00:00                                1000.0
  12 │ 2020-01-01T14:00:00                                1000.0
  DateTime("2020-01-01T04:00:00") => 12×2 DataFrame
 Row │ DateTime             CopperPlateBalanceConstraint__System
     │ DateTime             Float64
─────┼───────────────────────────────────────────────────────────
   1 │ 2020-01-01T04:00:00                                1000.0
   2 │ 2020-01-01T05:00:00                                1000.0
   3 │ 2020-01-01T06:00:00                                1000.0
   4 │ 2020-01-01T07:00:00                                1000.0
   5 │ 2020-01-01T08:00:00                                1000.0
   6 │ 2020-01-01T09:00:00                                1000.0
   7 │ 2020-01-01T10:00:00                                1000.0
   8 │ 2020-01-01T11:00:00                                1000.0
   9 │ 2020-01-01T12:00:00                                1000.0
  10 │ 2020-01-01T13:00:00                                1000.0
  11 │ 2020-01-01T14:00:00                                1000.0
  12 │ 2020-01-01T15:00:00                                1000.0
  DateTime("2020-01-01T05:00:00") => 12×2 DataFrame
 Row │ DateTime             CopperPlateBalanceConstraint__System
     │ DateTime             Float64
─────┼───────────────────────────────────────────────────────────
   1 │ 2020-01-01T05:00:00                                1000.0
   2 │ 2020-01-01T06:00:00                                1000.0
   3 │ 2020-01-01T07:00:00                                1000.0
   4 │ 2020-01-01T08:00:00                                1000.0
   5 │ 2020-01-01T09:00:00                                1000.0
   6 │ 2020-01-01T10:00:00                                1000.0
   7 │ 2020-01-01T11:00:00                                1000.0
   8 │ 2020-01-01T12:00:00                                1000.0
   9 │ 2020-01-01T13:00:00                                1000.0
  10 │ 2020-01-01T14:00:00                                1000.0
  11 │ 2020-01-01T15:00:00                                1000.0
  12 │ 2020-01-01T16:00:00                                1000.0
  DateTime("2020-01-01T06:00:00") => 12×2 DataFrame
 Row │ DateTime             CopperPlateBalanceConstraint__System
     │ DateTime             Float64
─────┼───────────────────────────────────────────────────────────
   1 │ 2020-01-01T06:00:00                                1000.0
   2 │ 2020-01-01T07:00:00                                1000.0
   3 │ 2020-01-01T08:00:00                                1000.0
   4 │ 2020-01-01T09:00:00                                1000.0
   5 │ 2020-01-01T10:00:00                                1000.0
   6 │ 2020-01-01T11:00:00                                1000.0
   7 │ 2020-01-01T12:00:00                                1000.0
   8 │ 2020-01-01T13:00:00                                1000.0
   9 │ 2020-01-01T14:00:00                                1000.0
  10 │ 2020-01-01T15:00:00                                1000.0
  11 │ 2020-01-01T16:00:00                                1000.0
  12 │ 2020-01-01T17:00:00                                1000.0
  DateTime("2020-01-01T07:00:00") => 12×2 DataFrame
 Row │ DateTime             CopperPlateBalanceConstraint__System
     │ DateTime             Float64
─────┼───────────────────────────────────────────────────────────
   1 │ 2020-01-01T07:00:00                                1000.0
   2 │ 2020-01-01T08:00:00                                1000.0
   3 │ 2020-01-01T09:00:00                                1000.0
   4 │ 2020-01-01T10:00:00                                1000.0
   5 │ 2020-01-01T11:00:00                                1000.0
   6 │ 2020-01-01T12:00:00                                1000.0
   7 │ 2020-01-01T13:00:00                                1000.0
   8 │ 2020-01-01T14:00:00                                1000.0
   9 │ 2020-01-01T15:00:00                                1000.0
  10 │ 2020-01-01T16:00:00                                1000.0
  11 │ 2020-01-01T17:00:00                                1000.0
  12 │ 2020-01-01T18:00:00                                1000.0
  DateTime("2020-01-01T08:00:00") => 12×2 DataFrame
 Row │ DateTime             CopperPlateBalanceConstraint__System
     │ DateTime             Float64
─────┼───────────────────────────────────────────────────────────
   1 │ 2020-01-01T08:00:00                                1000.0
   2 │ 2020-01-01T09:00:00                                1000.0
   3 │ 2020-01-01T10:00:00                                1000.0
   4 │ 2020-01-01T11:00:00                                1000.0
   5 │ 2020-01-01T12:00:00                                1000.0
   6 │ 2020-01-01T13:00:00                                1000.0
   7 │ 2020-01-01T14:00:00                                1000.0
   8 │ 2020-01-01T15:00:00                                1000.0
   9 │ 2020-01-01T16:00:00                                1000.0
  10 │ 2020-01-01T17:00:00                                1000.0
  11 │ 2020-01-01T18:00:00                                1000.0
  12 │ 2020-01-01T19:00:00                                1000.0
  DateTime("2020-01-01T09:00:00") => 12×2 DataFrame
 Row │ DateTime             CopperPlateBalanceConstraint__System
     │ DateTime             Float64
─────┼───────────────────────────────────────────────────────────
   1 │ 2020-01-01T09:00:00                                1000.0
   2 │ 2020-01-01T10:00:00                                1000.0
   3 │ 2020-01-01T11:00:00                                1000.0
   4 │ 2020-01-01T12:00:00                                1000.0
   5 │ 2020-01-01T13:00:00                                1000.0
   6 │ 2020-01-01T14:00:00                                1000.0
   7 │ 2020-01-01T15:00:00                                1000.0
   8 │ 2020-01-01T16:00:00                                1000.0
   9 │ 2020-01-01T17:00:00                                1000.0
  10 │ 2020-01-01T18:00:00                                1000.0
  11 │ 2020-01-01T19:00:00                                1000.0
  12 │ 2020-01-01T20:00:00                                1000.0
  DateTime("2020-01-01T10:00:00") => 12×2 DataFrame
 Row │ DateTime             CopperPlateBalanceConstraint__System
     │ DateTime             Float64
─────┼───────────────────────────────────────────────────────────
   1 │ 2020-01-01T10:00:00                                1000.0
   2 │ 2020-01-01T11:00:00                                1000.0
   3 │ 2020-01-01T12:00:00                                1000.0
   4 │ 2020-01-01T13:00:00                                1000.0
   5 │ 2020-01-01T14:00:00                                1000.0
   6 │ 2020-01-01T15:00:00                                1000.0
   7 │ 2020-01-01T16:00:00                                1000.0
   8 │ 2020-01-01T17:00:00                                1000.0
   9 │ 2020-01-01T18:00:00                                1000.0
  10 │ 2020-01-01T19:00:00                                1000.0
  11 │ 2020-01-01T20:00:00                                1000.0
  12 │ 2020-01-01T21:00:00                                1000.0
  DateTime("2020-01-01T11:00:00") => 12×2 DataFrame
 Row │ DateTime             CopperPlateBalanceConstraint__System
     │ DateTime             Float64
─────┼───────────────────────────────────────────────────────────
   1 │ 2020-01-01T11:00:00                                1000.0
   2 │ 2020-01-01T12:00:00                                1000.0
   3 │ 2020-01-01T13:00:00                                1000.0
   4 │ 2020-01-01T14:00:00                                1000.0
   5 │ 2020-01-01T15:00:00                                1000.0
   6 │ 2020-01-01T16:00:00                                1000.0
   7 │ 2020-01-01T17:00:00                                1000.0
   8 │ 2020-01-01T18:00:00                                1000.0
   9 │ 2020-01-01T19:00:00                                1000.0
  10 │ 2020-01-01T20:00:00                                1000.0
  11 │ 2020-01-01T21:00:00                                1000.0
  12 │ 2020-01-01T22:00:00                                1000.0
  DateTime("2020-01-01T12:00:00") => 12×2 DataFrame
 Row │ DateTime             CopperPlateBalanceConstraint__System
     │ DateTime             Float64
─────┼───────────────────────────────────────────────────────────
   1 │ 2020-01-01T12:00:00                                1000.0
   2 │ 2020-01-01T13:00:00                                1000.0
   3 │ 2020-01-01T14:00:00                                1000.0
   4 │ 2020-01-01T15:00:00                                1000.0
   5 │ 2020-01-01T16:00:00                                1000.0
   6 │ 2020-01-01T17:00:00                                1000.0
   7 │ 2020-01-01T18:00:00                                1000.0
   8 │ 2020-01-01T19:00:00                                1000.0
   9 │ 2020-01-01T20:00:00                                1000.0
  10 │ 2020-01-01T21:00:00                                1000.0
  11 │ 2020-01-01T22:00:00                                1000.0
  12 │ 2020-01-01T23:00:00                                1000.0
  DateTime("2020-01-01T13:00:00") => 12×2 DataFrame
 Row │ DateTime             CopperPlateBalanceConstraint__System
     │ DateTime             Float64
─────┼───────────────────────────────────────────────────────────
   1 │ 2020-01-01T13:00:00                                1000.0
   2 │ 2020-01-01T14:00:00                                1000.0
   3 │ 2020-01-01T15:00:00                                1000.0
   4 │ 2020-01-01T16:00:00                                1000.0
   5 │ 2020-01-01T17:00:00                                1000.0
   6 │ 2020-01-01T18:00:00                                1000.0
   7 │ 2020-01-01T19:00:00                                1000.0
   8 │ 2020-01-01T20:00:00                                1000.0
   9 │ 2020-01-01T21:00:00                                1000.0
  10 │ 2020-01-01T22:00:00                                1000.0
  11 │ 2020-01-01T23:00:00                                1000.0
  12 │ 2020-01-02T00:00:00                                1000.0
  DateTime("2020-01-01T14:00:00") => 12×2 DataFrame
 Row │ DateTime             CopperPlateBalanceConstraint__System
     │ DateTime             Float64
─────┼───────────────────────────────────────────────────────────
   1 │ 2020-01-01T14:00:00                                1000.0
   2 │ 2020-01-01T15:00:00                                1000.0
   3 │ 2020-01-01T16:00:00                                1000.0
   4 │ 2020-01-01T17:00:00                                1000.0
   5 │ 2020-01-01T18:00:00                                1000.0
   6 │ 2020-01-01T19:00:00                                1000.0
   7 │ 2020-01-01T20:00:00                                1000.0
   8 │ 2020-01-01T21:00:00                                1000.0
   9 │ 2020-01-01T22:00:00                                1000.0
  10 │ 2020-01-01T23:00:00                                1000.0
  11 │ 2020-01-02T00:00:00                                1000.0
  12 │ 2020-01-02T01:00:00                                1000.0
  DateTime("2020-01-01T15:00:00") => 12×2 DataFrame
 Row │ DateTime             CopperPlateBalanceConstraint__System
     │ DateTime             Float64
─────┼───────────────────────────────────────────────────────────
   1 │ 2020-01-01T15:00:00                                1000.0
   2 │ 2020-01-01T16:00:00                                1000.0
   3 │ 2020-01-01T17:00:00                                1000.0
   4 │ 2020-01-01T18:00:00                                1000.0
   5 │ 2020-01-01T19:00:00                                1000.0
   6 │ 2020-01-01T20:00:00                                1000.0
   7 │ 2020-01-01T21:00:00                                1000.0
   8 │ 2020-01-01T22:00:00                                1000.0
   9 │ 2020-01-01T23:00:00                                1000.0
  10 │ 2020-01-02T00:00:00                                1000.0
  11 │ 2020-01-02T01:00:00                                1000.0
  12 │ 2020-01-02T02:00:00                                1000.0
  DateTime("2020-01-01T16:00:00") => 12×2 DataFrame
 Row │ DateTime             CopperPlateBalanceConstraint__System
     │ DateTime             Float64
─────┼───────────────────────────────────────────────────────────
   1 │ 2020-01-01T16:00:00                                1000.0
   2 │ 2020-01-01T17:00:00                                1000.0
   3 │ 2020-01-01T18:00:00                                1000.0
   4 │ 2020-01-01T19:00:00                                1000.0
   5 │ 2020-01-01T20:00:00                                1000.0
   6 │ 2020-01-01T21:00:00                                1000.0
   7 │ 2020-01-01T22:00:00                                1000.0
   8 │ 2020-01-01T23:00:00                                1000.0
   9 │ 2020-01-02T00:00:00                                1000.0
  10 │ 2020-01-02T01:00:00                                1000.0
  11 │ 2020-01-02T02:00:00                                1000.0
  12 │ 2020-01-02T03:00:00                                1000.0
  DateTime("2020-01-01T17:00:00") => 12×2 DataFrame
 Row │ DateTime             CopperPlateBalanceConstraint__System
     │ DateTime             Float64
─────┼───────────────────────────────────────────────────────────
   1 │ 2020-01-01T17:00:00                                1000.0
   2 │ 2020-01-01T18:00:00                                1000.0
   3 │ 2020-01-01T19:00:00                                1000.0
   4 │ 2020-01-01T20:00:00                                1000.0
   5 │ 2020-01-01T21:00:00                                1000.0
   6 │ 2020-01-01T22:00:00                                1000.0
   7 │ 2020-01-01T23:00:00                                1000.0
   8 │ 2020-01-02T00:00:00                                1000.0
   9 │ 2020-01-02T01:00:00                                1000.0
  10 │ 2020-01-02T02:00:00                                1000.0
  11 │ 2020-01-02T03:00:00                                1000.0
  12 │ 2020-01-02T04:00:00                                1000.0
  DateTime("2020-01-01T18:00:00") => 12×2 DataFrame
 Row │ DateTime             CopperPlateBalanceConstraint__System
     │ DateTime             Float64
─────┼───────────────────────────────────────────────────────────
   1 │ 2020-01-01T18:00:00                                1000.0
   2 │ 2020-01-01T19:00:00                                1000.0
   3 │ 2020-01-01T20:00:00                                1000.0
   4 │ 2020-01-01T21:00:00                                1000.0
   5 │ 2020-01-01T22:00:00                                1000.0
   6 │ 2020-01-01T23:00:00                                1000.0
   7 │ 2020-01-02T00:00:00                                1000.0
   8 │ 2020-01-02T01:00:00                                1000.0
   9 │ 2020-01-02T02:00:00                                1000.0
  10 │ 2020-01-02T03:00:00                                1000.0
  11 │ 2020-01-02T04:00:00                                1000.0
  12 │ 2020-01-02T05:00:00                                1000.0
  DateTime("2020-01-01T19:00:00") => 12×2 DataFrame
 Row │ DateTime             CopperPlateBalanceConstraint__System
     │ DateTime             Float64
─────┼───────────────────────────────────────────────────────────
   1 │ 2020-01-01T19:00:00                                1000.0
   2 │ 2020-01-01T20:00:00                                1000.0
   3 │ 2020-01-01T21:00:00                                1000.0
   4 │ 2020-01-01T22:00:00                                1000.0
   5 │ 2020-01-01T23:00:00                                1000.0
   6 │ 2020-01-02T00:00:00                                1000.0
   7 │ 2020-01-02T01:00:00                                1000.0
   8 │ 2020-01-02T02:00:00                                1000.0
   9 │ 2020-01-02T03:00:00                                1000.0
  10 │ 2020-01-02T04:00:00                                1000.0
  11 │ 2020-01-02T05:00:00                                1000.0
  12 │ 2020-01-02T06:00:00                                1000.0
  DateTime("2020-01-01T20:00:00") => 12×2 DataFrame
 Row │ DateTime             CopperPlateBalanceConstraint__System
     │ DateTime             Float64
─────┼───────────────────────────────────────────────────────────
   1 │ 2020-01-01T20:00:00                                1000.0
   2 │ 2020-01-01T21:00:00                                1000.0
   3 │ 2020-01-01T22:00:00                                1000.0
   4 │ 2020-01-01T23:00:00                                1000.0
   5 │ 2020-01-02T00:00:00                                1000.0
   6 │ 2020-01-02T01:00:00                                1000.0
   7 │ 2020-01-02T02:00:00                                1000.0
   8 │ 2020-01-02T03:00:00                                1000.0
   9 │ 2020-01-02T04:00:00                                1000.0
  10 │ 2020-01-02T05:00:00                                1000.0
  11 │ 2020-01-02T06:00:00                                1000.0
  12 │ 2020-01-02T07:00:00                                1000.0
  DateTime("2020-01-01T21:00:00") => 12×2 DataFrame
 Row │ DateTime             CopperPlateBalanceConstraint__System
     │ DateTime             Float64
─────┼───────────────────────────────────────────────────────────
   1 │ 2020-01-01T21:00:00                                1000.0
   2 │ 2020-01-01T22:00:00                                1000.0
   3 │ 2020-01-01T23:00:00                                1000.0
   4 │ 2020-01-02T00:00:00                                1000.0
   5 │ 2020-01-02T01:00:00                                1000.0
   6 │ 2020-01-02T02:00:00                                1000.0
   7 │ 2020-01-02T03:00:00                                1000.0
   8 │ 2020-01-02T04:00:00                                1000.0
   9 │ 2020-01-02T05:00:00                                1000.0
  10 │ 2020-01-02T06:00:00                                1000.0
  11 │ 2020-01-02T07:00:00                                1000.0
  12 │ 2020-01-02T08:00:00                                1000.0
  DateTime("2020-01-01T22:00:00") => 12×2 DataFrame
 Row │ DateTime             CopperPlateBalanceConstraint__System
     │ DateTime             Float64
─────┼───────────────────────────────────────────────────────────
   1 │ 2020-01-01T22:00:00                                1000.0
   2 │ 2020-01-01T23:00:00                                1000.0
   3 │ 2020-01-02T00:00:00                                1000.0
   4 │ 2020-01-02T01:00:00                                1000.0
   5 │ 2020-01-02T02:00:00                                1000.0
   6 │ 2020-01-02T03:00:00                                1000.0
   7 │ 2020-01-02T04:00:00                                1000.0
   8 │ 2020-01-02T05:00:00                                1000.0
   9 │ 2020-01-02T06:00:00                                1000.0
  10 │ 2020-01-02T07:00:00                                1000.0
  11 │ 2020-01-02T08:00:00                                1000.0
  12 │ 2020-01-02T09:00:00                                1000.0
  DateTime("2020-01-01T23:00:00") => 12×2 DataFrame
 Row │ DateTime             CopperPlateBalanceConstraint__System
     │ DateTime             Float64
─────┼───────────────────────────────────────────────────────────
   1 │ 2020-01-01T23:00:00                                1000.0
   2 │ 2020-01-02T00:00:00                                1000.0
   3 │ 2020-01-02T01:00:00                                1000.0
   4 │ 2020-01-02T02:00:00                                1000.0
   5 │ 2020-01-02T03:00:00                                1000.0
   6 │ 2020-01-02T04:00:00                                1000.0
   7 │ 2020-01-02T05:00:00                                1000.0
   8 │ 2020-01-02T06:00:00                                1000.0
   9 │ 2020-01-02T07:00:00                                1000.0
  10 │ 2020-01-02T08:00:00                                1000.0
  11 │ 2020-01-02T09:00:00                                1000.0
  12 │ 2020-01-02T10:00:00                                1000.0

or if we want to look at the realized values

read_realized_dual(ed_results, "CopperPlateBalanceConstraint__System")

24 rows × 2 columns

DateTimeCopperPlateBalanceConstraint__System
DateTimeFloat64
12020-01-01T00:00:001000.0
22020-01-01T01:00:001000.0
32020-01-01T02:00:001000.0
42020-01-01T03:00:001000.0
52020-01-01T04:00:001000.0
62020-01-01T05:00:001000.0
72020-01-01T06:00:001000.0
82020-01-01T07:00:001000.0
92020-01-01T08:00:001000.0
102020-01-01T09:00:001000.0
112020-01-01T10:00:001000.0
122020-01-01T11:00:001000.0
132020-01-01T12:00:001000.0
142020-01-01T13:00:001000.0
152020-01-01T14:00:001000.0
162020-01-01T15:00:001000.0
172020-01-01T16:00:001000.0
182020-01-01T17:00:001000.0
192020-01-01T18:00:001000.0
202020-01-01T19:00:001000.0
212020-01-01T20:00:001000.0
222020-01-01T21:00:001000.0
232020-01-01T22:00:001000.0
242020-01-01T23:00:001000.0

Note that in this simulation the prices are all equal to the balance slack penalty value of $100000/MWh because there is unserved energy in the result

CC BY-SA 4.0 "Dheepak Krishnamurthy". Last modified: August 26, 2022. Website built with Franklin.jl and the Julia programming language.