The energy income (in Euros) based on the difference between the baseline and final power profile for a certain demand. The difference represents the optimal changes due to flexibility, so this function calculates the income from applying this demand-side flexibility.
Examples
df <- dplyr::select(
energy_profiles,
datetime,
demand_baseline = building,
price_turn_up,
price_turn_down
)
# Build another random consumption profile
building_variation <- rnorm(nrow(df), mean = 0, sd = 1)
df <- dplyr::mutate(
df, demand_final = demand_baseline + building_variation
)
head(df)
#> # A tibble: 6 × 5
#> datetime demand_baseline price_turn_up price_turn_down demand_final
#> <dttm> <dbl> <dbl> <dbl> <dbl>
#> 1 2023-01-01 00:00:00 2.61 0 0.209 1.21
#> 2 2023-01-01 00:15:00 2.42 0 0.0233 2.68
#> 3 2023-01-01 00:30:00 2.23 0 0.0256 -0.203
#> 4 2023-01-01 00:45:00 2.04 0 0.0406 2.04
#> 5 2023-01-01 01:00:00 1.85 0.0328 0.0406 2.48
#> 6 2023-01-01 01:15:00 1.78 0.0351 0 2.93
head(get_imbalance_income(df))
#> # A tibble: 6 × 9
#> datetime demand_baseline price_turn_up price_turn_down demand_final
#> <dttm> <dbl> <dbl> <dbl> <dbl>
#> 1 2023-01-01 00:00:00 2.61 0 0.209 1.21
#> 2 2023-01-01 00:15:00 2.42 0 0.0233 2.68
#> 3 2023-01-01 00:30:00 2.23 0 0.0256 -0.203
#> 4 2023-01-01 00:45:00 2.04 0 0.0406 2.04
#> 5 2023-01-01 01:00:00 1.85 0.0328 0.0406 2.48
#> 6 2023-01-01 01:15:00 1.78 0.0351 0 2.93
#> # ℹ 4 more variables: demand_diff <dbl>, demand_turn_up <dbl>,
#> # demand_turn_down <dbl>, income <dbl>