battery_optimizer.uk.legacy.battery_day_ahead_trading#
Classes
- class battery_optimizer.uk.legacy.battery_day_ahead_trading.BatteryDayAheadTrading(optimization_description, data, soc, battery_parameters, strategy, kwargs)#
Bases:
BasicProblem- add_const_SoC_during_DC(problem, variables)#
- add_dc_bool_constraint(problem, variables)#
- add_dc_marketed_constraint(problem, variables, data)#
NEW: dch_vol >= dch_marketed dcl_vol >= dcl_marketed
- add_dc_vol_constraint(problem, variables)#
- add_end_dc_VPP_constraint(problem, variables, soc_df)#
This is only a constraint for VPP. At the current state, the VPP is not able to perform the exact optimization solution that is provided by the optimization tool. To be noticed, this constraint should not be used, if the VPP is flexible to do SoC/SoE management (along with marketing on DC).
- add_end_dc_constraint(problem, variables, soc_ch_ramp_rate, soc_dch_ramp_rate)#
- add_no_DC_market_constraint(problem, variables, data)#
add constraints to
- add_power_swing_constraint(problem, variables, power_swing_kW=12000, baseline=2000)#
When doing DC both, the difference between contracted quantities of DCL and DCH can’t be greater than 12 MW. We also need to keep 1MW for baselining
- add_soc_during_dc_VPP_constraint(problem, variables, soc_df)#
This is only a constraint for VPP. At the current state, the VPP is not able to perform the exact optimization solution that is provided by the optimization tool. To be noticed, this constraint should not be used, if the VPP is flexible to do SoC/SoE management (along with marketing on DC).
- add_soc_during_dc_constraint(problem, variables, soc_df, soc_ch_constant_power, soc_dch_constant_power)#
- add_spot_marketed_constraint(problem, variables, data)#
NEW:
charge >= spot_bought discharge * discharge_efficiency >= spot_sold
- add_start_dc_VPP_constraint(problem, variables, soc_df)#
This is only a constraint for VPP. At the current state, the VPP is not able to perform the exact optimization solution that is provided by the optimization tool. To be noticed, this constraint should not be used, if the VPP is flexible to do SoC/SoE management (along with marketing on DC).
- add_start_dc_constraint(problem, variables, soc_ch_ramp_rate, soc_dch_ramp_rate, soc_ch_ramp_rate_triangle, soc_dch_ramp_rate_triangle)#
- get_objective_func(variables)#
variables: DataFrame, decision variables
- get_uk_battery_day_ahead_trading_problem()#
- The problem defines multiple variables:
charge and discharge which are continuous
- isCharging and isDischarging which are binary:
** isCharging is 1 if charge > 0 ** isDischarging is 1 if discharge > 0
- variables related to dynamic containment (dc) marketing:
** ‘dcl_vol’,’dch_vol’,’dcl_bool’, ‘dch_bool’, ‘dcl_and_dch_bool’, ‘start_dcl’, ‘start_dch’, ‘dc_bool’
- The problem tries to find the optimal variables to decide how much should be marketed on:
day ahead / intraday -> the maximum forecast price between day ahead and intraday price is considered
DC high and low
- The model adds dc constraints to:
ensure that the minimum energy level is reached in the settlement period before starting dc
ensure that during dc the minimum energy level is maintained
ensure that one cannot charge or discharge more than a certain energy during dc marketing due to the 5% ramp up
- The model adds Triad constraints to:
ensure that the delivery during the full Triad event is as smooth as possible (same power to be maintained over all settlement periods)
- Process:
the trading decision run at ~11:00 on D-1 for D-1 23:00 to D 23:00
the model must assume the expected SoC at D-1 22:30?