Originally Contributed by: Clayton Barrows
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.
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.
using PowerSystems
using PowerSimulations
using PowerSystemCaseBuilder
using Dates
using DataFrames
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])
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
System Units Base |
SYSTEM_BASE |
Base Power |
100.0 |
Base Frequency |
60.0 |
Num Components |
30 |
Static Components
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
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 |
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
PowerSystems.Transformer2W |
PowerSimulations.StaticBranch |
false |
PowerSystems.Line |
PowerSimulations.StaticBranch |
false |
PowerSystems.HVDCLine |
PowerSimulations.HVDCDispatch |
false |
PowerSystems.TapTransformer |
PowerSimulations.StaticBranch |
false |
Service Models
PowerSystems.VariableReserve{PowerSystems.ReserveUp} |
PowerSimulations.RangeReserve |
false |
true |
PowerSystems.VariableReserve{PowerSystems.ReserveDown} |
PowerSimulations.RangeReserve |
false |
true |
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
UC |
48 |
1440 minutes |
1 |
ED |
12 |
60 minutes |
24 |
Feedforwards
ED |
PowerSimulations.SemiContinuousFeedforward |
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
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
UC |
48 |
1440 minutes |
1 |
ED |
12 |
60 minutes |
24 |
Feedforwards
ED |
PowerSimulations.SemiContinuousFeedforward |
build!(sim)
PowerSimulations.BuildStatusModule.BuildStatus.BUILT = 0
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
| 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 |
---|
13 | 2020-01-01T12:00:00 | 1000.0 |
---|
14 | 2020-01-01T13:00:00 | 1000.0 |
---|
15 | 2020-01-01T14:00:00 | 1000.0 |
---|
16 | 2020-01-01T15:00:00 | 1000.0 |
---|
17 | 2020-01-01T16:00:00 | 1000.0 |
---|
18 | 2020-01-01T17:00:00 | 1000.0 |
---|
19 | 2020-01-01T18:00:00 | 1000.0 |
---|
20 | 2020-01-01T19:00:00 | 1000.0 |
---|
21 | 2020-01-01T20:00:00 | 1000.0 |
---|
22 | 2020-01-01T21:00:00 | 1000.0 |
---|
23 | 2020-01-01T22:00:00 | 1000.0 |
---|
24 | 2020-01-01T23:00:00 | 1000.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