Test Inventory#
Our optimizer is automatically tested with 574 test cases. Below is an overview of these tests, grouped by module.
tests/test_absolute_soe.py#
Test Name |
Description (Risk/Safety Check) |
|---|---|
test_capacity_nominal_with_capacity_schedule |
No description available. |
test_capacity_nominal_with_fixed_capacity |
No description available. |
test_no_capacity_nominal_with_capacity_schedule |
No description available. |
test_capacity_nominal_is_optional_and_defaults_to_single_capacity |
No description available. |
test_initial_soe_kwh_default |
No description available. |
test_initial_soe_kwh_must_match_initial_soe |
No description available. |
test_asset_state_soe_target_kwh_default |
No description available. |
test_asset_state_soe_target_kwh_must_match_fraction |
No description available. |
tests/test_app/test_endpoints.py#
Test Name |
Description (Risk/Safety Check) |
|---|---|
test_optimize_endpoint_problem_type_supported Parameters:
|
No description available. |
test_optimize_endpoint_problem_type_supported Parameters:
|
No description available. |
test_optimize_endpoint_problem_type_supported Parameters:
|
No description available. |
test_optimize_endpoint_problem_type_supported Parameters:
|
No description available. |
test_optimize_endpoint_problem_type_supported Parameters:
|
No description available. |
test_optimize_endpoint_problem_type_supported Parameters:
|
No description available. |
test_send_max_daily_cycle_requests_to_optimize_endpoint Parameters:
|
https://eon-seed.visualstudio.com/Flexibility%20Trading%20Technologies/_workitems/edit/110129 |
test_send_max_daily_cycle_requests_to_optimize_endpoint Parameters:
|
https://eon-seed.visualstudio.com/Flexibility%20Trading%20Technologies/_workitems/edit/110129 |
test_optimize_endpoint_problem_type_supported Parameters:
|
No description available. |
test_optimize_endpoint_problem_type_supported Parameters:
|
No description available. |
test_optimize_endpoint_problem_type_supported Parameters:
|
No description available. |
test_optimize_endpoint_problem_type_supported Parameters:
|
No description available. |
test_optimize_endpoint_problem_type_supported Parameters:
|
No description available. |
test_optimize_endpoint_problem_type_supported Parameters:
|
No description available. |
test_send_max_daily_cycle_requests_to_optimize_endpoint Parameters:
|
https://eon-seed.visualstudio.com/Flexibility%20Trading%20Technologies/_workitems/edit/110129 |
test_send_max_daily_cycle_requests_to_optimize_endpoint Parameters:
|
https://eon-seed.visualstudio.com/Flexibility%20Trading%20Technologies/_workitems/edit/110129 |
tests/test_availabilities.py#
Test Name |
Description (Risk/Safety Check) |
|---|---|
test_availability_preprocessing_modifies_power_limits Parameters:
|
Test that availability preprocessing correctly sets power limits to zero when availability is false. |
test_availability_preprocessing_modifies_power_limits Parameters:
|
Test that availability preprocessing correctly sets power limits to zero when availability is false. |
test_optimization_with_limited_availability_basic Parameters:
|
Test optimization with availability constraints. |
test_optimization_with_limited_availability_basic Parameters:
|
Test optimization with availability constraints. |
test_solver_with_varying_unavailable_periods Parameters:
|
Test solver behavior with different amounts of unavailable periods. |
test_solver_with_varying_unavailable_periods Parameters:
|
Test solver behavior with different amounts of unavailable periods. |
test_solver_with_varying_unavailable_periods Parameters:
|
Test solver behavior with different amounts of unavailable periods. |
test_solver_with_varying_unavailable_periods Parameters:
|
Test solver behavior with different amounts of unavailable periods. |
test_solver_with_varying_unavailable_periods Parameters:
|
Test solver behavior with different amounts of unavailable periods. |
tests/test_commercial_objectives.py#
Test Name |
Description (Risk/Safety Check) |
|---|---|
test_de_commercial_objectives_threshold Parameters:
|
This test shows the behavior of the commercial objectives threshold. The expected behaviour is: - if no commercial objectives are defined, the optimization runs as usual - if the commercial objectives threshold is not reached, no trading takes place The tested cases are: - only epex_IDA1 - an intraday optimization without prior epexIDA1 optimization - an intraday optimization with prior epexIDA1 optimization |
test_de_commercial_objectives_threshold Parameters:
|
This test shows the behavior of the commercial objectives threshold. The expected behaviour is: - if no commercial objectives are defined, the optimization runs as usual - if the commercial objectives threshold is not reached, no trading takes place The tested cases are: - only epex_IDA1 - an intraday optimization without prior epexIDA1 optimization - an intraday optimization with prior epexIDA1 optimization |
test_de_commercial_objectives_threshold Parameters:
|
This test shows the behavior of the commercial objectives threshold. The expected behaviour is: - if no commercial objectives are defined, the optimization runs as usual - if the commercial objectives threshold is not reached, no trading takes place The tested cases are: - only epex_IDA1 - an intraday optimization without prior epexIDA1 optimization - an intraday optimization with prior epexIDA1 optimization |
test_objective_span_contains_min_revenue_per_sell_adjustment Parameters:
|
In this test we are testing that get_result_dict trace span contains the min_revenue_per_sell_adjustment_total objective. |
test_objective_span_contains_min_revenue_per_sell_adjustment Parameters:
|
In this test we are testing that get_result_dict trace span contains the min_revenue_per_sell_adjustment_total objective. |
test_objective_span_contains_min_revenue_per_sell_adjustment Parameters:
|
In this test we are testing that get_result_dict trace span contains the min_revenue_per_sell_adjustment_total objective. |
test_objective_span_contains_min_revenue_per_sell_adjustment Parameters:
|
In this test we are testing that get_result_dict trace span contains the min_revenue_per_sell_adjustment_total objective. |
test_objective_span_contains_min_revenue_per_sell_adjustment Parameters:
|
In this test we are testing that get_result_dict trace span contains the min_revenue_per_sell_adjustment_total objective. |
test_objective_span_results_are_the_close_enough_to_dataframe_results Parameters:
|
This test checks that the pnl based on the objective values in the get_result_dict span and the pnl based on the results dataframe are close enough. |
test_objective_span_results_are_the_close_enough_to_dataframe_results Parameters:
|
This test checks that the pnl based on the objective values in the get_result_dict span and the pnl based on the results dataframe are close enough. |
test_objective_span_results_are_the_close_enough_to_dataframe_results Parameters:
|
This test checks that the pnl based on the objective values in the get_result_dict span and the pnl based on the results dataframe are close enough. |
test_de_commercial_objectives_threshold_change_in_relative_pnl Parameters:
|
This test shows the behavior of the commercial objectives threshold. The expected behaviour is: - the relative pnl per sell position increases when a commercial objective threshold is set - the sell positions decrease when a commercial objective threshold is set The tested cases are: - only epex_IDA1 - an intraday optimization without prior epexIDA1 optimization - an intraday optimization with prior epexIDA1 optimization |
test_de_commercial_objectives_threshold_change_in_relative_pnl Parameters:
|
This test shows the behavior of the commercial objectives threshold. The expected behaviour is: - the relative pnl per sell position increases when a commercial objective threshold is set - the sell positions decrease when a commercial objective threshold is set The tested cases are: - only epex_IDA1 - an intraday optimization without prior epexIDA1 optimization - an intraday optimization with prior epexIDA1 optimization |
test_de_commercial_objectives_threshold_change_in_relative_pnl Parameters:
|
This test shows the behavior of the commercial objectives threshold. The expected behaviour is: - the relative pnl per sell position increases when a commercial objective threshold is set - the sell positions decrease when a commercial objective threshold is set The tested cases are: - only epex_IDA1 - an intraday optimization without prior epexIDA1 optimization - an intraday optimization with prior epexIDA1 optimization |
test_uk_commercial_objectives_threshold_change_in_relative_pnl Parameters:
|
This test shows the behavior of the commercial objectives threshold. The expected behaviour is: - the relative pnl per sell position increases when a commercial objective threshold is set - the sell positions decrease when a commercial objective threshold is set The tested cases are: - only epex_IDA1 - an intraday optimization without prior epexIDA1 optimization - an intraday optimization with prior epexIDA1 optimization |
test_uk_commercial_objectives_threshold_change_in_relative_pnl Parameters:
|
This test shows the behavior of the commercial objectives threshold. The expected behaviour is: - the relative pnl per sell position increases when a commercial objective threshold is set - the sell positions decrease when a commercial objective threshold is set The tested cases are: - only epex_IDA1 - an intraday optimization without prior epexIDA1 optimization - an intraday optimization with prior epexIDA1 optimization |
test_de_set_commercial_objectives_dont_get_changed Parameters:
|
This test checks that when setting commercial objectives for different markets, the values for the other markets are set to the default value (currently 0.01). And when setting for both markets, both values are set correctly and don’t get overwritten. |
test_de_set_commercial_objectives_dont_get_changed Parameters:
|
This test checks that when setting commercial objectives for different markets, the values for the other markets are set to the default value (currently 0.01). And when setting for both markets, both values are set correctly and don’t get overwritten. |
test_de_set_commercial_objectives_dont_get_changed Parameters:
|
This test checks that when setting commercial objectives for different markets, the values for the other markets are set to the default value (currently 0.01). And when setting for both markets, both values are set correctly and don’t get overwritten. |
test_that_min_revenue_sell_prohibits_small_pnl Parameters:
|
This test checks that when setting a min revenue per sell that is higher than the relative pnl per sell, the optimizer avoids trading and the resulting pnl is lower than without the threshold. Additionally, it checks that the position change in the intraday market corresponds to the expected position change based on initial SoE and target SoE. |
tests/test_datetime_records_to_dataframe.py#
Test Name |
Description (Risk/Safety Check) |
|---|---|
test_datetime_records_to_dataframe_empty_df |
No description available. |
test_datetime_records_to_dataframe_records |
No description available. |
test_datetime_records_to_dataframe_less_than_three |
No description available. |
test_datetime_records_to_dataframe_non_empty_df |
No description available. |
test_datetime_records_to_dataframe_index_set |
No description available. |
test_datetime_records_to_dataframe_index_column_missing |
No description available. |
tests/test_efa_blocks.py#
Test Name |
Description (Risk/Safety Check) |
|---|---|
test_settlement_period_id_within_efa_block |
No description available. |
tests/test_request_asset_validation.py#
Test Name |
Description (Risk/Safety Check) |
|---|---|
test_asset_validation Parameters:
|
Test that Asset class raises ValidationError when required fields are missing or invalid. |
test_asset_validation Parameters:
|
Test that Asset class raises ValidationError when required fields are missing or invalid. |
test_asset_validation Parameters:
|
Test that Asset class raises ValidationError when required fields are missing or invalid. |
test_asset_validation Parameters:
|
Test that Asset class raises ValidationError when required fields are missing or invalid. |
test_asset_validation Parameters:
|
Test that Asset class raises ValidationError when required fields are missing or invalid. |
test_asset_validation Parameters:
|
Test that Asset class raises ValidationError when required fields are missing or invalid. |
test_asset_validation Parameters:
|
Test that Asset class raises ValidationError when required fields are missing or invalid. |
test_asset_validation Parameters:
|
Test that Asset class raises ValidationError when required fields are missing or invalid. |
test_validate_asset_state_soe_targets Parameters:
|
Test to validate if soe targets for asset state exceed boundaries (min & max). |
test_validate_asset_state_soe_targets Parameters:
|
Test to validate if soe targets for asset state exceed boundaries (min & max). |
test_validate_asset_state_soe_targets Parameters:
|
Test to validate if soe targets for asset state exceed boundaries (min & max). |
test_validate_asset_state_soe_targets Parameters:
|
Test to validate if soe targets for asset state exceed boundaries (min & max). |
test_validate_asset_state_soe_targets Parameters:
|
Test to validate if soe targets for asset state exceed boundaries (min & max). |
test_validate_asset_state_soe_targets Parameters:
|
Test to validate if soe targets for asset state exceed boundaries (min & max). |
tests/test_request_strategy_optimization.py#
Test Name |
Description (Risk/Safety Check) |
|---|---|
test_validation_min_frequency Parameters:
|
Test to ensure minimum frequency validation error raised. |
test_validation_min_frequency Parameters:
|
Test to ensure minimum frequency validation error raised. |
test_validation_min_frequency Parameters:
|
Test to ensure minimum frequency validation error raised. |
test_validation_min_frequency Parameters:
|
Test to ensure minimum frequency validation error raised. |
test_validation_min_frequency Parameters:
|
Test to ensure minimum frequency validation error raised. |
test_validation_min_frequency Parameters:
|
Test to ensure minimum frequency validation error raised. |
test_validation_markets Parameters:
|
Test to ensure markets validation error is raised for invalid values. |
test_validation_markets Parameters:
|
Test to ensure markets validation error is raised for invalid values. |
test_validation_markets Parameters:
|
Test to ensure markets validation error is raised for invalid values. |
test_validation_markets Parameters:
|
Test to ensure markets validation error is raised for invalid values. |
test_validation_markets Parameters:
|
Test to ensure markets validation error is raised for invalid values. |
test_validation_markets Parameters:
|
Test to ensure markets validation error is raised for invalid values. |
test_validation_end_greater_than_start Parameters:
|
Test to ensure horizon start and end daterange validation error raised. |
test_validation_end_greater_than_start Parameters:
|
Test to ensure horizon start and end daterange validation error raised. |
test_validation_horizon_min_max_in_trader_exclusion_timeframe Parameters:
|
Test to ensure horizon min max trade exclusion timeframe validation error raised. |
test_validation_horizon_min_max_in_trader_exclusion_timeframe Parameters:
|
Test to ensure horizon min max trade exclusion timeframe validation error raised. |
test_validation_optimization_horizon Parameters:
|
Test to ensure OptimizationHorizon validation error is raised for invalid start and end times. |
test_validation_optimization_horizon Parameters:
|
Test to ensure OptimizationHorizon validation error is raised for invalid start and end times. |
test_validation_optimization_horizon Parameters:
|
Test to ensure OptimizationHorizon validation error is raised for invalid start and end times. |
test_validation_optimization_horizon Parameters:
|
Test to ensure OptimizationHorizon validation error is raised for invalid start and end times. |
test_validation_optimization_horizon Parameters:
|
Test to ensure OptimizationHorizon validation error is raised for invalid start and end times. |
test_validation_optimization_horizon Parameters:
|
Test to ensure OptimizationHorizon validation error is raised for invalid start and end times. |
tests/test_request_validation.py#
Test Name |
Description (Risk/Safety Check) |
|---|---|
test_working_request Parameters:
|
Test that a working request will throw no validation error. |
test_working_request Parameters:
|
Test that a working request will throw no validation error. |
test_validation_ensure_soc_rate_in_range Parameters:
|
Test to check battery max soe and min soe in expected range; otherwise, raise a validation error. |
test_validation_ensure_soc_rate_in_range Parameters:
|
Test to check battery max soe and min soe in expected range; otherwise, raise a validation error. |
test_validation_ensure_soc_rate_in_range Parameters:
|
Test to check battery max soe and min soe in expected range; otherwise, raise a validation error. |
test_validation_ensure_soc_rate_in_range Parameters:
|
Test to check battery max soe and min soe in expected range; otherwise, raise a validation error. |
test_validation_ensure_efficiency_rate_in_range Parameters:
|
Test to check battery efficiency range in expected range; otherwise, raise a validation error. |
test_validation_ensure_efficiency_rate_in_range Parameters:
|
Test to check battery efficiency range in expected range; otherwise, raise a validation error. |
test_validation_ensure_efficiency_rate_in_range Parameters:
|
Test to check battery efficiency range in expected range; otherwise, raise a validation error. |
test_validation_ensure_efficiency_rate_in_range Parameters:
|
Test to check battery efficiency range in expected range; otherwise, raise a validation error. |
test_validation_max_daily_cycle_feasible Parameters:
|
Test to check battery max daily cycle is feasible; otherwise, raise a validation error. |
test_validation_max_daily_cycle_feasible Parameters:
|
Test to check battery max daily cycle is feasible; otherwise, raise a validation error. |
test_validation_ensure_max_daily_cycles_errors_optimization_horizon Parameters:
|
Test to check battery max daily cycle optimal in optimization horizon; otherwise, raise a validation error. |
test_validation_ensure_max_daily_cycles_errors_optimization_horizon Parameters:
|
Test to check battery max daily cycle optimal in optimization horizon; otherwise, raise a validation error. |
test_ensure_initial_market_commitments_respect_initial_soe Parameters:
|
Test to ensure initial market commitment respect soe and value error raised. |
test_ensure_initial_market_commitments_respect_initial_soe Parameters:
|
Test to ensure initial market commitment respect soe and value error raised. |
test_ensure_initial_market_commitments_respect_initial_soe Parameters:
|
Test to ensure initial market commitment respect soe and value error raised. |
test_ensure_initial_market_commitments_respect_initial_soe Parameters:
|
Test to ensure initial market commitment respect soe and value error raised. |
test_ensure_asset_state_settlement_periods_are_sensible Parameters:
|
Test to ensure asset states settlement period are sensible and value error raised. |
test_ensure_asset_state_settlement_periods_are_sensible Parameters:
|
Test to ensure asset states settlement period are sensible and value error raised. |
test_ensure_asset_state_settlement_periods_are_sensible Parameters:
|
Test to ensure asset states settlement period are sensible and value error raised. |
test_ensure_asset_state_settlement_periods_are_sensible Parameters:
|
Test to ensure asset states settlement period are sensible and value error raised. |
test_ensure_asset_state_settlement_periods_are_sensible Parameters:
|
Test to ensure asset states settlement period are sensible and value error raised. |
test_ensure_asset_state_settlement_periods_are_sensible Parameters:
|
Test to ensure asset states settlement period are sensible and value error raised. |
test_ensure_asset_state_soe_are_sensible Parameters:
|
Test to ensure asset states soe are sensible and value error raised. |
test_ensure_asset_state_soe_are_sensible Parameters:
|
Test to ensure asset states soe are sensible and value error raised. |
test_ensure_asset_state_soe_are_sensible Parameters:
|
Test to ensure asset states soe are sensible and value error raised. |
test_ensure_asset_state_soe_are_sensible Parameters:
|
Test to ensure asset states soe are sensible and value error raised. |
test_ensure_asset_state_soe_are_sensible Parameters:
|
Test to ensure asset states soe are sensible and value error raised. |
test_ensure_asset_state_soe_are_sensible Parameters:
|
Test to ensure asset states soe are sensible and value error raised. |
test_validation_ensure_charging_power_in_range Parameters:
|
Test to check battery max charging & discharging power in expected range; otherwise, raise a validation error. |
test_validation_ensure_charging_power_in_range Parameters:
|
Test to check battery max charging & discharging power in expected range; otherwise, raise a validation error. |
test_validation_ensure_charging_power_in_range Parameters:
|
Test to check battery max charging & discharging power in expected range; otherwise, raise a validation error. |
test_validation_ensure_charging_power_in_range Parameters:
|
Test to check battery max charging & discharging power in expected range; otherwise, raise a validation error. |
test_validation_ensure_charging_power_in_range Parameters:
|
Test to check battery max charging & discharging power in expected range; otherwise, raise a validation error. |
test_validation_ensure_charging_power_in_range Parameters:
|
Test to check battery max charging & discharging power in expected range; otherwise, raise a validation error. |
test_validation_ensure_charging_power_in_range Parameters:
|
Test to check battery max charging & discharging power in expected range; otherwise, raise a validation error. |
test_validation_ensure_charging_power_in_range Parameters:
|
Test to check battery max charging & discharging power in expected range; otherwise, raise a validation error. |
test_validation_ensure_charging_power_in_range Parameters:
|
Test to check battery max charging & discharging power in expected range; otherwise, raise a validation error. |
test_validation_ensure_charging_power_in_range Parameters:
|
Test to check battery max charging & discharging power in expected range; otherwise, raise a validation error. |
test_rounding_of_price_forecasts Parameters:
|
Test that a working request will throw no validation error. |
test_rounding_of_price_forecasts Parameters:
|
Test that a working request will throw no validation error. |
tests/test_result_max_charging_power_kw.py#
Test Name |
Description (Risk/Safety Check) |
|---|---|
test_get_soe_with_series_max_charging_power_kw_deoptimizer |
Integration test: Use DEBatteryOptimizer to test that result.get_soe works correctly when max_charging_power_kw is a Series (time-dependent). |
tests/test_scip.py#
Test Name |
Description (Risk/Safety Check) |
|---|---|
test_scip_cmd_solves_simple_linear_problem |
Minimal PuLP test solved by SCIP_CMD. Builds a 1-variable LP: max x s.t. x <= 1, x >= 0 Expects optimal solution x = 1. |
tests/test_slack_rebuild.py#
Test Name |
Description (Risk/Safety Check) |
|---|---|
test_constraint_rebuild_no_inplace_modification Parameters:
|
No description available. |
test_constraint_rebuild_no_inplace_modification Parameters:
|
No description available. |
test_constraint_rebuild_no_inplace_modification Parameters:
|
No description available. |
test_double_call_guard |
No description available. |
tests/test_time_dependent_battery_parameters.py#
Test Name |
Description (Risk/Safety Check) |
|---|---|
test_all_floats_converted_to_series |
No description available. |
test_series_with_correct_index_passes |
No description available. |
test_series_with_wrong_index_raises |
No description available. |
test_time_varying_capacity_kwh |
No description available. |
tests/test_upper_bound_risk_increment.py#
Test Name |
Description (Risk/Safety Check) |
|---|---|
test_upper_bound_risk_increment_effect_on_buy_sell_limits |
This test checks that the failing buy/sell limits issue on 2025-10-14 is resolved |
test_computation_of_upper_bound_risk_increment Parameters:
|
This test checks that the upper bound risk increment is computed correctly when not set by the user |
test_computation_of_upper_bound_risk_increment Parameters:
|
This test checks that the upper bound risk increment is computed correctly when not set by the user |
test_computation_of_upper_bound_risk_increment Parameters:
|
This test checks that the upper bound risk increment is computed correctly when not set by the user |
test_computation_of_upper_bound_risk_increment Parameters:
|
This test checks that the upper bound risk increment is computed correctly when not set by the user |
test_upper_bound_risk_increment_not_changed_when_already_set Parameters:
|
This test checks that the value of upper bound risk increment is not changed when already set in the received request |
test_upper_bound_risk_increment_not_changed_when_already_set Parameters:
|
This test checks that the value of upper bound risk increment is not changed when already set in the received request |
test_upper_bound_risk_increment_not_changed_when_already_set Parameters:
|
This test checks that the value of upper bound risk increment is not changed when already set in the received request |
test_upper_bound_risk_increment_not_changed_when_already_set Parameters:
|
This test checks that the value of upper bound risk increment is not changed when already set in the received request |
tests/test_utils.py#
Test Name |
Description (Risk/Safety Check) |
|---|---|
test_country_from_str_valid Parameters:
|
Test valid string inputs to country enum converter. Confirms various aliases map correctly to ‘Country’ enum values. |
test_country_from_str_valid Parameters:
|
Test valid string inputs to country enum converter. Confirms various aliases map correctly to ‘Country’ enum values. |
test_country_from_str_valid Parameters:
|
Test valid string inputs to country enum converter. Confirms various aliases map correctly to ‘Country’ enum values. |
test_country_from_str_valid Parameters:
|
Test valid string inputs to country enum converter. Confirms various aliases map correctly to ‘Country’ enum values. |
test_country_from_str_valid Parameters:
|
Test valid string inputs to country enum converter. Confirms various aliases map correctly to ‘Country’ enum values. |
test_country_from_str_valid Parameters:
|
Test valid string inputs to country enum converter. Confirms various aliases map correctly to ‘Country’ enum values. |
test_country_from_str_valid Parameters:
|
Test valid string inputs to country enum converter. Confirms various aliases map correctly to ‘Country’ enum values. |
test_country_from_str_valid Parameters:
|
Test valid string inputs to country enum converter. Confirms various aliases map correctly to ‘Country’ enum values. |
test_country_from_str_invalid Parameters:
|
Test invalid string inputs raise a KeyError when converting to ‘Country’. Ensures the converter fails on unsupported or unrecognized names. |
test_country_from_str_invalid Parameters:
|
Test invalid string inputs raise a KeyError when converting to ‘Country’. Ensures the converter fails on unsupported or unrecognized names. |
test_country_from_str_invalid Parameters:
|
Test invalid string inputs raise a KeyError when converting to ‘Country’. Ensures the converter fails on unsupported or unrecognized names. |
test_country_from_str_invalid Parameters:
|
Test invalid string inputs raise a KeyError when converting to ‘Country’. Ensures the converter fails on unsupported or unrecognized names. |
test_country_from_str_invalid Parameters:
|
Test invalid string inputs raise a KeyError when converting to ‘Country’. Ensures the converter fails on unsupported or unrecognized names. |
tests/tests_de/test_afrr.py#
Test Name |
Description (Risk/Safety Check) |
|---|---|
test_de_afrr_base_case Parameters:
|
Test that aFRR constraints are respected during day ahead optimization when aFRR is requested. |
test_de_afrr_base_case Parameters:
|
Test that aFRR constraints are respected during day ahead optimization when aFRR is requested. |
test_de_afrr_base_case Parameters:
|
Test that aFRR constraints are respected during day ahead optimization when aFRR is requested. |
test_de_afrr_base_case Parameters:
|
Test that aFRR constraints are respected during day ahead optimization when aFRR is requested. |
test_de_afrr_base_case Parameters:
|
Test that aFRR constraints are respected during day ahead optimization when aFRR is requested. |
test_de_afrr_intraday_respects_marketed_afrr Parameters:
|
Test that aFRR volumes are respected during intraday optimization. |
test_de_afrr_intraday_respects_marketed_afrr Parameters:
|
Test that aFRR volumes are respected during intraday optimization. |
test_de_afrr_intraday_respects_marketed_afrr Parameters:
|
Test that aFRR volumes are respected during intraday optimization. |
test_de_afrr_intraday_respects_marketed_afrr Parameters:
|
Test that aFRR volumes are respected during intraday optimization. |
test_de_afrr_intraday_respects_marketed_afrr Parameters:
|
Test that aFRR volumes are respected during intraday optimization. |
test_de_afrr_input_checks |
Test that aFRR input checks work as expected. |
test_de_afrr_testing_load_management_for_pq Parameters:
|
Test that aFRR capacity volumes are respected during intraday optimization. |
test_de_afrr_testing_load_management_for_pq Parameters:
|
Test that aFRR capacity volumes are respected during intraday optimization. |
test_de_afrr_testing_load_management_for_pq Parameters:
|
Test that aFRR capacity volumes are respected during intraday optimization. |
test_de_afrr_testing_load_management_for_pq Parameters:
|
Test that aFRR capacity volumes are respected during intraday optimization. |
test_de_afrr_intraday_behaviour_for_different_soe |
Test that intraday is within the limits of the battery and blocked aFRR power and that both intraday and aFRR are within the battery limits. |
tests/tests_de/test_afrr_energy.py#
Test Name |
Description (Risk/Safety Check) |
|---|---|
test_afrr_energy_untradable_intraday Parameters:
|
Test aFRR Energy market participation with counter-trade on untradable intraday market. |
test_afrr_energy_untradable_intraday Parameters:
|
Test aFRR Energy market participation with counter-trade on untradable intraday market. |
test_afrr_energy_previous_dayahead_shifted_intraday_prices Parameters:
|
Test aFRR Energy market participation after day-ahead wholesale optimization with counter deals in price-shifted intraday continuous. |
test_afrr_energy_previous_dayahead_shifted_intraday_prices Parameters:
|
Test aFRR Energy market participation after day-ahead wholesale optimization with counter deals in price-shifted intraday continuous. |
test_afrr_energy_wrapped_request_handling |
Test aFRR energy wrapped request handling given existing day-ahead wholesale positions |
test_afrr_energy_wrapped_intraday_orderbook |
Test aFRR energy wrapped request handling with intraday orderbook |
test_afrr_energy_wrapped_with_existing_afrr_energy_positions Parameters:
|
Test aFRR energy with existing aFRR energy positions |
test_afrr_energy_wrapped_with_existing_afrr_energy_positions Parameters:
|
Test aFRR energy with existing aFRR energy positions |
test_afrr_energy_wrapped_with_existing_afrr_energy_positions Parameters:
|
Test aFRR energy with existing aFRR energy positions |
test_setting_of_afrr_energy_throughput_in_request_handler |
Test aFRR energy wrapped request handling with intraday orderbook |
test_setting_flex_markets_energy_throughput Parameters:
|
Test aFRR energy wrapped request handling with intraday orderbook |
test_setting_flex_markets_energy_throughput Parameters:
|
Test aFRR energy wrapped request handling with intraday orderbook |
test_setting_flex_markets_energy_throughput Parameters:
|
Test aFRR energy wrapped request handling with intraday orderbook |
test_setting_flex_markets_energy_throughput Parameters:
|
Test aFRR energy wrapped request handling with intraday orderbook |
test_2026_01_22_afrr_energy_after_idc_afrr_negative_expected |
No description available. |
test_2026_01_22_afrr_energy_after_idc_afrr_null_premium Parameters:
|
No description available. |
test_2026_01_22_afrr_energy_after_idc_afrr_null_premium Parameters:
|
No description available. |
test_2026_01_23_afrr_energy_after_idc_counterdeals_expected |
No description available. |
test_2026_01_28_afrr_energy_sequence_idc_04_20 |
Intraday continuous optimization run in the context of aFRR backtesting. Here we ensure that the current IDC optimization run respects the energy we need to reserve for potential full aFRR negative activation. Thus we expect that following existing aFRR negative marketed positions, the IDC optimizer does not propose buying any more intraday wholesale. Args: request_2026_01_28_afrr_energy_sequence_idc_04_20 (dict): Test fixture with existing aFRR negative marketed positions. |
test_2026_01_28_afrr_energy_sequence_idc_04_20_initial_soe_scenarios Parameters:
|
Intraday continuous optimization run in the context of aFRR backtesting. Here we ensure that the current IDC optimization run respects the energy we need to reserve for potential full aFRR negative activation. Thus we expect that following existing aFRR negative marketed positions, the IDC optimizer does not propose buying any more intraday wholesale. We further ensure that his holds true even when we set the initial SoE high and low bounds to be increasingly wide around the initial SoE, thus restricting the intraday wholesale optimizer’s range of tradable SoE at the beginning of the optimization horizon. Args: request_2026_01_28_afrr_energy_sequence_idc_04_20 (dict): Test fixture with existing aFRR negative marketed positions. initial_soe_high_low_fraction (float): Fraction to set the initial SoE high and low bounds around the initial SoE. If 0, the bounds are not set. |
test_2026_01_28_afrr_energy_sequence_idc_04_20_initial_soe_scenarios Parameters:
|
Intraday continuous optimization run in the context of aFRR backtesting. Here we ensure that the current IDC optimization run respects the energy we need to reserve for potential full aFRR negative activation. Thus we expect that following existing aFRR negative marketed positions, the IDC optimizer does not propose buying any more intraday wholesale. We further ensure that his holds true even when we set the initial SoE high and low bounds to be increasingly wide around the initial SoE, thus restricting the intraday wholesale optimizer’s range of tradable SoE at the beginning of the optimization horizon. Args: request_2026_01_28_afrr_energy_sequence_idc_04_20 (dict): Test fixture with existing aFRR negative marketed positions. initial_soe_high_low_fraction (float): Fraction to set the initial SoE high and low bounds around the initial SoE. If 0, the bounds are not set. |
test_2026_01_28_afrr_energy_sequence_idc_04_20_initial_soe_scenarios Parameters:
|
Intraday continuous optimization run in the context of aFRR backtesting. Here we ensure that the current IDC optimization run respects the energy we need to reserve for potential full aFRR negative activation. Thus we expect that following existing aFRR negative marketed positions, the IDC optimizer does not propose buying any more intraday wholesale. We further ensure that his holds true even when we set the initial SoE high and low bounds to be increasingly wide around the initial SoE, thus restricting the intraday wholesale optimizer’s range of tradable SoE at the beginning of the optimization horizon. Args: request_2026_01_28_afrr_energy_sequence_idc_04_20 (dict): Test fixture with existing aFRR negative marketed positions. initial_soe_high_low_fraction (float): Fraction to set the initial SoE high and low bounds around the initial SoE. If 0, the bounds are not set. |
test_2026_01_28_afrr_energy_sequence_idc_04_20_initial_soe_scenarios Parameters:
|
Intraday continuous optimization run in the context of aFRR backtesting. Here we ensure that the current IDC optimization run respects the energy we need to reserve for potential full aFRR negative activation. Thus we expect that following existing aFRR negative marketed positions, the IDC optimizer does not propose buying any more intraday wholesale. We further ensure that his holds true even when we set the initial SoE high and low bounds to be increasingly wide around the initial SoE, thus restricting the intraday wholesale optimizer’s range of tradable SoE at the beginning of the optimization horizon. Args: request_2026_01_28_afrr_energy_sequence_idc_04_20 (dict): Test fixture with existing aFRR negative marketed positions. initial_soe_high_low_fraction (float): Fraction to set the initial SoE high and low bounds around the initial SoE. If 0, the bounds are not set. |
test_2026_01_28_afrr_energy_sequence_idc_04_20_initial_soe_scenarios Parameters:
|
Intraday continuous optimization run in the context of aFRR backtesting. Here we ensure that the current IDC optimization run respects the energy we need to reserve for potential full aFRR negative activation. Thus we expect that following existing aFRR negative marketed positions, the IDC optimizer does not propose buying any more intraday wholesale. We further ensure that his holds true even when we set the initial SoE high and low bounds to be increasingly wide around the initial SoE, thus restricting the intraday wholesale optimizer’s range of tradable SoE at the beginning of the optimization horizon. Args: request_2026_01_28_afrr_energy_sequence_idc_04_20 (dict): Test fixture with existing aFRR negative marketed positions. initial_soe_high_low_fraction (float): Fraction to set the initial SoE high and low bounds around the initial SoE. If 0, the bounds are not set. |
test_2026_01_28_afrr_energy_sequence_idc_04_20_initial_soe_scenarios Parameters:
|
Intraday continuous optimization run in the context of aFRR backtesting. Here we ensure that the current IDC optimization run respects the energy we need to reserve for potential full aFRR negative activation. Thus we expect that following existing aFRR negative marketed positions, the IDC optimizer does not propose buying any more intraday wholesale. We further ensure that his holds true even when we set the initial SoE high and low bounds to be increasingly wide around the initial SoE, thus restricting the intraday wholesale optimizer’s range of tradable SoE at the beginning of the optimization horizon. Args: request_2026_01_28_afrr_energy_sequence_idc_04_20 (dict): Test fixture with existing aFRR negative marketed positions. initial_soe_high_low_fraction (float): Fraction to set the initial SoE high and low bounds around the initial SoE. If 0, the bounds are not set. |
test_2026_01_28_afrr_energy_sequence_idc_04_20_initial_soe_scenarios Parameters:
|
Intraday continuous optimization run in the context of aFRR backtesting. Here we ensure that the current IDC optimization run respects the energy we need to reserve for potential full aFRR negative activation. Thus we expect that following existing aFRR negative marketed positions, the IDC optimizer does not propose buying any more intraday wholesale. We further ensure that his holds true even when we set the initial SoE high and low bounds to be increasingly wide around the initial SoE, thus restricting the intraday wholesale optimizer’s range of tradable SoE at the beginning of the optimization horizon. Args: request_2026_01_28_afrr_energy_sequence_idc_04_20 (dict): Test fixture with existing aFRR negative marketed positions. initial_soe_high_low_fraction (float): Fraction to set the initial SoE high and low bounds around the initial SoE. If 0, the bounds are not set. |
test_2026_01_28_afrr_energy_sequence_idc_04_20_initial_soe_scenarios Parameters:
|
Intraday continuous optimization run in the context of aFRR backtesting. Here we ensure that the current IDC optimization run respects the energy we need to reserve for potential full aFRR negative activation. Thus we expect that following existing aFRR negative marketed positions, the IDC optimizer does not propose buying any more intraday wholesale. We further ensure that his holds true even when we set the initial SoE high and low bounds to be increasingly wide around the initial SoE, thus restricting the intraday wholesale optimizer’s range of tradable SoE at the beginning of the optimization horizon. Args: request_2026_01_28_afrr_energy_sequence_idc_04_20 (dict): Test fixture with existing aFRR negative marketed positions. initial_soe_high_low_fraction (float): Fraction to set the initial SoE high and low bounds around the initial SoE. If 0, the bounds are not set. |
test_2026_01_28_afrr_energy_sequence_idc_04_20_initial_soe_scenarios Parameters:
|
Intraday continuous optimization run in the context of aFRR backtesting. Here we ensure that the current IDC optimization run respects the energy we need to reserve for potential full aFRR negative activation. Thus we expect that following existing aFRR negative marketed positions, the IDC optimizer does not propose buying any more intraday wholesale. We further ensure that his holds true even when we set the initial SoE high and low bounds to be increasingly wide around the initial SoE, thus restricting the intraday wholesale optimizer’s range of tradable SoE at the beginning of the optimization horizon. Args: request_2026_01_28_afrr_energy_sequence_idc_04_20 (dict): Test fixture with existing aFRR negative marketed positions. initial_soe_high_low_fraction (float): Fraction to set the initial SoE high and low bounds around the initial SoE. If 0, the bounds are not set. |
test_2026_01_28_afrr_energy_sequence_idc_04_20_initial_soe_scenarios Parameters:
|
Intraday continuous optimization run in the context of aFRR backtesting. Here we ensure that the current IDC optimization run respects the energy we need to reserve for potential full aFRR negative activation. Thus we expect that following existing aFRR negative marketed positions, the IDC optimizer does not propose buying any more intraday wholesale. We further ensure that his holds true even when we set the initial SoE high and low bounds to be increasingly wide around the initial SoE, thus restricting the intraday wholesale optimizer’s range of tradable SoE at the beginning of the optimization horizon. Args: request_2026_01_28_afrr_energy_sequence_idc_04_20 (dict): Test fixture with existing aFRR negative marketed positions. initial_soe_high_low_fraction (float): Fraction to set the initial SoE high and low bounds around the initial SoE. If 0, the bounds are not set. |
test_2026_01_28_afrr_energy_parameter_default_values |
Check that by default we reserve 60 minutes for aFRR capacity and 15 minutes for aFRR energy. |
test_setting_affr_energy_with_existing_afrr_capacity |
Test aFRR energy wrapped request handling with intraday orderbook |
tests/tests_de/test_blocked_capacities.py#
Test Name |
Description (Risk/Safety Check) |
|---|---|
test_afrr_energy_wrapped_intraday_orderbook_with_blocked_capacities Parameters:
|
Test aFRR energy optimization with blocked orderbook capacities |
test_afrr_energy_wrapped_intraday_orderbook_with_blocked_capacities Parameters:
|
Test aFRR energy optimization with blocked orderbook capacities |
test_afrr_energy_wrapped_intraday_orderbook_with_blocked_capacities Parameters:
|
Test aFRR energy optimization with blocked orderbook capacities |
test_afrr_energy_wrapped_intraday_orderbook_with_blocked_capacities Parameters:
|
Test aFRR energy optimization with blocked orderbook capacities |
test_block_best_orderbook_buckets_effect Parameters:
|
Test that blocking reduces orderbook volumes correctly for different directions and volumes |
test_block_best_orderbook_buckets_effect Parameters:
|
Test that blocking reduces orderbook volumes correctly for different directions and volumes |
test_block_best_orderbook_buckets_effect Parameters:
|
Test that blocking reduces orderbook volumes correctly for different directions and volumes |
test_block_best_orderbook_buckets_effect Parameters:
|
Test that blocking reduces orderbook volumes correctly for different directions and volumes |
test_block_best_orderbook_buckets_effect Parameters:
|
Test that blocking reduces orderbook volumes correctly for different directions and volumes |
test_block_best_orderbook_buckets_effect Parameters:
|
Test that blocking reduces orderbook volumes correctly for different directions and volumes |
test_block_best_orderbook_buckets_effect Parameters:
|
Test that blocking reduces orderbook volumes correctly for different directions and volumes |
test_block_best_orderbook_buckets_effect Parameters:
|
Test that blocking reduces orderbook volumes correctly for different directions and volumes |
test_block_best_orderbook_buckets_effect Parameters:
|
Test that blocking reduces orderbook volumes correctly for different directions and volumes |
test_pnl_optimization_intraday_with_blocked_capacities Parameters:
|
Test PNL optimization with blocked intraday orderbook capacities |
test_pnl_optimization_intraday_with_blocked_capacities Parameters:
|
Test PNL optimization with blocked intraday orderbook capacities |
test_pnl_optimization_intraday_with_blocked_capacities Parameters:
|
Test PNL optimization with blocked intraday orderbook capacities |
test_pnl_optimization_intraday_with_blocked_capacities Parameters:
|
Test PNL optimization with blocked intraday orderbook capacities |
test_market_positions_intraday_prices_after_blocking |
Test blocking capacities constrains volumes and degrades prices. Runs baseline first, identifies actual trading timestamps, then blocks more than baseline volume to force measurable constraint effects. |
test_afrr_energy_request_with_empty_blocked_capacities |
Test that aFRR energy optimization works with empty blocked capacities. This validates that the aFRR energy optimization can handle empty blocked capacities in the request without errors, since blocking is not applicable for this optimization type. |
test_afrr_energy_blocked_capacities_match_activation_volume |
Test that blocked capacities in output only include counter trades up to aFRR activation volume. This test verifies that: 1. Blocked capacities should not exceed aFRR activation volume 2. The cumsum filtering correctly separates counter trades from P&L optimization 3. Counter trades (blocked capacities) sum up to economically viable counter trades 4. Any gap between activation and blocked capacities represents unhedged activation (goes to imbalance penalty) 5. Any additional intraday trades beyond activation are P&L optimization (not blocked) |
test_afrr_energy_blocked_capacities_spillover_effect |
Test that blocked capacities correctly span multiple timestamps when constrained. When we block capacity at a timestamp where the optimizer wants to trade, and the remaining capacity is insufficient for the full activation volume, the optimizer should distribute trades across multiple timestamps rather than violating capacity limits. For negative aFRR, we counter-trade by selling to the market, which requires buy orders. |
test_aggregate_blocked_capacities_groups_and_sums_overlaps_in_isolation |
No description available. |
tests/tests_de/test_de_epexDA.py#
Test Name |
Description (Risk/Safety Check) |
|---|---|
test_run_epexda_optimization_and_compare_to_backtest_result Parameters:
|
This test is based on backtest results for Germany. The epexIDA1 entries are replaced with epexDA. The expected behaviour is: - when going through the handling_request-route, the result type is of type DEResult - the result dataframe for the new implementation contains the same values as the data frame based on the backtest results - the columns ‘buyDischarge’, ‘sellDischarge’, ‘buyCharge’, ‘sellCharge’ are ignored The tested cases are: - only epex_DA - an intraday optimization without prior epexDA optimization - an intraday optimization with prior epexDA optimization |
test_run_epexda_optimization_and_compare_to_backtest_result Parameters:
|
This test is based on backtest results for Germany. The epexIDA1 entries are replaced with epexDA. The expected behaviour is: - when going through the handling_request-route, the result type is of type DEResult - the result dataframe for the new implementation contains the same values as the data frame based on the backtest results - the columns ‘buyDischarge’, ‘sellDischarge’, ‘buyCharge’, ‘sellCharge’ are ignored The tested cases are: - only epex_DA - an intraday optimization without prior epexDA optimization - an intraday optimization with prior epexDA optimization |
test_run_epexda_optimization_and_compare_to_backtest_result Parameters:
|
This test is based on backtest results for Germany. The epexIDA1 entries are replaced with epexDA. The expected behaviour is: - when going through the handling_request-route, the result type is of type DEResult - the result dataframe for the new implementation contains the same values as the data frame based on the backtest results - the columns ‘buyDischarge’, ‘sellDischarge’, ‘buyCharge’, ‘sellCharge’ are ignored The tested cases are: - only epex_DA - an intraday optimization without prior epexDA optimization - an intraday optimization with prior epexDA optimization |
test_epexda_and_epexida1_work_together Parameters:
|
This test checks that epexDA and epexIDA1 can get optimized together. We increase the price forecasts such that - all selling happens on epexDA - all buying happens on epexIDA1 |
tests/tests_de/test_de_epexIDA1.py#
Test Name |
Description (Risk/Safety Check) |
|---|---|
test_run_optimization_and_compare_to_backtest_result Parameters:
|
This test is based on backtest results for Germany. The expected behaviour is: - when going through the handling_request-route, the result type is of type DEResult - the result dataframe for the new implementation contains the same values as the data frame based on the backtest results - the columns ‘buyDischarge’, ‘sellDischarge’, ‘buyCharge’, ‘sellCharge’ are ignored The tested cases are: - only epex_IDA1 - an intraday optimization without prior epexIDA1 optimization - an intraday optimization with prior epexIDA1 optimization |
test_run_optimization_and_compare_to_backtest_result Parameters:
|
This test is based on backtest results for Germany. The expected behaviour is: - when going through the handling_request-route, the result type is of type DEResult - the result dataframe for the new implementation contains the same values as the data frame based on the backtest results - the columns ‘buyDischarge’, ‘sellDischarge’, ‘buyCharge’, ‘sellCharge’ are ignored The tested cases are: - only epex_IDA1 - an intraday optimization without prior epexIDA1 optimization - an intraday optimization with prior epexIDA1 optimization |
test_run_optimization_and_compare_to_backtest_result Parameters:
|
This test is based on backtest results for Germany. The expected behaviour is: - when going through the handling_request-route, the result type is of type DEResult - the result dataframe for the new implementation contains the same values as the data frame based on the backtest results - the columns ‘buyDischarge’, ‘sellDischarge’, ‘buyCharge’, ‘sellCharge’ are ignored The tested cases are: - only epex_IDA1 - an intraday optimization without prior epexIDA1 optimization - an intraday optimization with prior epexIDA1 optimization |
tests/tests_de/test_de_intraday.py#
Test Name |
Description (Risk/Safety Check) |
|---|---|
test_de_intraday |
Test to ensure the functionality of intraday run for DE market. Run contain data for 2 days. Using the batteryoptimizer for DE, ensure the returned result has expected columns for evaluation, 15 min interval trades, intraday bought and sold volumes atleast greater than 0 MW. |
test_wrapped_de_intraday |
Test to ensure the functionality of intraday run for DE market, using the APIWrapper function triggers the batteryoptimization. Run contain data for 2 days. |
tests/tests_de/test_de_orderbook_bucketing.py#
Test Name |
Description (Risk/Safety Check) |
|---|---|
test_get_de_orderbook_in_buckets Parameters:
|
Test to get orderbook for DE market converted into buckets based on various bucketing approaches, max power and bucket size for vwap and max. |
test_get_de_orderbook_in_buckets Parameters:
|
Test to get orderbook for DE market converted into buckets based on various bucketing approaches, max power and bucket size for vwap and max. |
test_get_de_orderbook_in_buckets Parameters:
|
Test to get orderbook for DE market converted into buckets based on various bucketing approaches, max power and bucket size for vwap and max. |
tests/tests_de/test_de_request_debug.py#
Test Name |
Description (Risk/Safety Check) |
|---|---|
test_request_2025_08_15_imbalance_intraday |
No description available. |
tests/tests_de/test_de_solved_bugs.py#
Test Name |
Description (Risk/Safety Check) |
|---|---|
test_bug_108898_de |
This test checks that bug 108898 is solved. The results of the optimization are not showing the exaggerated buy/sell volumes any more. The buy/sell volumes for EPEX IDA1 should not exceed the max charging/discharging power of the battery because there are no negative bid ask spreads to be exploited. |
test_bug_112816_de Parameters:
|
This test checks that bug 112816 is solved. The results of the optimization are no longer showing solutions where the battery max charging or discharging power is exceeded by the sum over all marketed volumes. |
test_bug_112816_de Parameters:
|
This test checks that bug 112816 is solved. The results of the optimization are no longer showing solutions where the battery max charging or discharging power is exceeded by the sum over all marketed volumes. |
test_bug_118168_de |
This test checks that bug 118168 is solved. The results of the optimization show no longer positions for epexIDA1 that are greater than 10. |
tests/tests_de/test_decouple_optimization_from_trading.py#
Test Name |
Description (Risk/Safety Check) |
|---|---|
test_payload_parsing_for_decoupled_optimization_no_tradeable_time_window |
Test that the payload parsing for decoupled optimization works correctly: Since no tradeable time window is provided, the last intraday traded timestamp should be set to the end of the optimization horizon. |
test_payload_parsing_for_decoupled_optimization Parameters:
|
Test that the payload parsing for decoupled optimization works correctly: The last intraday traded timestamp should be set to the end of the optimization horizon minus the tradeable time window. |
test_payload_parsing_for_decoupled_optimization Parameters:
|
Test that the payload parsing for decoupled optimization works correctly: The last intraday traded timestamp should be set to the end of the optimization horizon minus the tradeable time window. |
test_payload_parsing_for_decoupled_optimization Parameters:
|
Test that the payload parsing for decoupled optimization works correctly: The last intraday traded timestamp should be set to the end of the optimization horizon minus the tradeable time window. |
test_payload_parsing_for_decoupled_optimization Parameters:
|
Test that the payload parsing for decoupled optimization works correctly: The last intraday traded timestamp should be set to the end of the optimization horizon minus the tradeable time window. |
test_optimization_for_decoupled_optimization_with_tradeable_time_window |
Test that the optimization for decoupled optimization works correctly: Test that after the tradeable time window, no buckets are marked as to_market; before or at the window, all are. Validates correct handling of tradeable time windows in decoupled optimization. |
tests/tests_de/test_fcr.py#
Test Name |
Description (Risk/Safety Check) |
|---|---|
test_de_fcr_base_case Parameters:
|
Test that FCR constraints are respected during day ahead optimization when FCR is requested. |
test_de_fcr_base_case Parameters:
|
Test that FCR constraints are respected during day ahead optimization when FCR is requested. |
test_de_fcr_base_case Parameters:
|
Test that FCR constraints are respected during day ahead optimization when FCR is requested. |
test_de_fcr_base_case Parameters:
|
Test that FCR constraints are respected during day ahead optimization when FCR is requested. |
test_de_fcr_base_case Parameters:
|
Test that FCR constraints are respected during day ahead optimization when FCR is requested. |
test_de_fcr_intraday_respects_marketed_fcr Parameters:
|
Test that FCR volumes are respected during intraday optimization. |
test_de_fcr_intraday_respects_marketed_fcr Parameters:
|
Test that FCR volumes are respected during intraday optimization. |
test_de_fcr_intraday_respects_marketed_fcr Parameters:
|
Test that FCR volumes are respected during intraday optimization. |
test_de_fcr_intraday_respects_marketed_fcr Parameters:
|
Test that FCR volumes are respected during intraday optimization. |
test_de_fcr_intraday_respects_marketed_fcr Parameters:
|
Test that FCR volumes are respected during intraday optimization. |
test_de_fcr_intraday_after_fcr_activation Parameters:
|
Test that FCR volumes are respected during intraday optimization. |
test_de_fcr_intraday_after_fcr_activation Parameters:
|
Test that FCR volumes are respected during intraday optimization. |
test_de_fcr_intraday_after_fcr_activation Parameters:
|
Test that FCR volumes are respected during intraday optimization. |
test_de_fcr_intraday_after_fcr_activation Parameters:
|
Test that FCR volumes are respected during intraday optimization. |
test_de_fcr_intraday_after_fcr_activation Parameters:
|
Test that FCR volumes are respected during intraday optimization. |
test_de_fcr_input_checks |
Test that FCR input checks work as expected. |
test_de_fcr_testing_load_management_for_pq Parameters:
|
Test that FCR volumes are respected during intraday optimization. |
test_de_fcr_testing_load_management_for_pq Parameters:
|
Test that FCR volumes are respected during intraday optimization. |
test_de_fcr_testing_load_management_for_pq Parameters:
|
Test that FCR volumes are respected during intraday optimization. |
test_de_fcr_testing_load_management_for_pq Parameters:
|
Test that FCR volumes are respected during intraday optimization. |
test_de_fcr_testing_load_management_for_pq Parameters:
|
Test that FCR volumes are respected during intraday optimization. |
test_de_fcr_intraday_behaviour_for_different_soe |
Test that intraday deals are only done when SoC is not within PQ limits and no price incentives for intraday are present. |
tests/tests_de/test_ongoing_debugging.py#
Test Name |
Description (Risk/Safety Check) |
|---|---|
test_2025_10_10_failing_intraday |
Request request_2025_10_10_failing_intraday contains duplicate price_forecast timestamps. Here, we check that the APIWrappedBatteryOptimizer raises a ValidationError for this. |
test_infeasible_solution_prep_de_afrre Parameters:
|
https://dev.azure.com/eon-seed/Flexibility%20Trading%20Technologies/_workitems/edit/110377/ |
test_infeasible_solution_prep_de_afrre Parameters:
|
https://dev.azure.com/eon-seed/Flexibility%20Trading%20Technologies/_workitems/edit/110377/ |
test_infeasible_solution_prep_de_idc Parameters:
|
https://dev.azure.com/eon-seed/Flexibility%20Trading%20Technologies/_workitems/edit/110377/ |
test_infeasible_solution_prep_de_idc Parameters:
|
https://dev.azure.com/eon-seed/Flexibility%20Trading%20Technologies/_workitems/edit/110377/ |
test_infeasible_solution_prep_de_idc Parameters:
|
https://dev.azure.com/eon-seed/Flexibility%20Trading%20Technologies/_workitems/edit/110377/ |
test_infeasible_solution_prep_de_idc Parameters:
|
https://dev.azure.com/eon-seed/Flexibility%20Trading%20Technologies/_workitems/edit/110377/ |
test_infeasible_solution_prep_de_idc Parameters:
|
https://dev.azure.com/eon-seed/Flexibility%20Trading%20Technologies/_workitems/edit/110377/ |
test_2025_12_10_non_aggregated_blocked_capacities_de |
Test that a request with non-aggregated blocked capacities is handled correctly. |
test_prod_infeasible_outage_pnl |
No description available. |
test_intraday_fcr_marketed_but_intraday_outage |
https://eon-seed.visualstudio.com/Flexibility%20Trading%20Technologies/_workitems/edit/107364/ This request used to fail because mid-EFA block outages in combination with already marketed capacity were modelled incorrectly in the within day process. |
test_2026_01_02_float_division_by_zero |
Test that a request that would lead to a float division by zero in the normalization of charging power raises a ValidationError instead. |
test_2025_12_22_day_ahead_prod |
Test that a request with day-ahead production is handled correctly. |
test_2026_03_25_idc_extreme_orderbook |
Test that a request with an extreme order book in the IDC market is handled correctly. |
tests/tests_de/test_partial_outages.py#
Test Name |
Description (Risk/Safety Check) |
|---|---|
test_partial_outages_intraday_de Parameters:
|
Test DE intraday optimizer with partial outages (time-dependent battery parameters). In the first half, battery is fully available; in the second half, only partially available. |
test_partial_outages_intraday_de Parameters:
|
Test DE intraday optimizer with partial outages (time-dependent battery parameters). In the first half, battery is fully available; in the second half, only partially available. |
test_partial_outages_intraday_de Parameters:
|
Test DE intraday optimizer with partial outages (time-dependent battery parameters). In the first half, battery is fully available; in the second half, only partially available. |
test_partial_outages_intraday_de Parameters:
|
Test DE intraday optimizer with partial outages (time-dependent battery parameters). In the first half, battery is fully available; in the second half, only partially available. |
test_partial_outages_intraday_de Parameters:
|
Test DE intraday optimizer with partial outages (time-dependent battery parameters). In the first half, battery is fully available; in the second half, only partially available. |
test_partial_outages_intraday_de Parameters:
|
Test DE intraday optimizer with partial outages (time-dependent battery parameters). In the first half, battery is fully available; in the second half, only partially available. |
test_partial_outages_intraday_de Parameters:
|
Test DE intraday optimizer with partial outages (time-dependent battery parameters). In the first half, battery is fully available; in the second half, only partially available. |
test_partial_outages_intraday_de Parameters:
|
Test DE intraday optimizer with partial outages (time-dependent battery parameters). In the first half, battery is fully available; in the second half, only partially available. |
test_partial_outages_intraday_de Parameters:
|
Test DE intraday optimizer with partial outages (time-dependent battery parameters). In the first half, battery is fully available; in the second half, only partially available. |
test_partial_outages_intraday_de Parameters:
|
Test DE intraday optimizer with partial outages (time-dependent battery parameters). In the first half, battery is fully available; in the second half, only partially available. |
test_partial_outages_intraday_de Parameters:
|
Test DE intraday optimizer with partial outages (time-dependent battery parameters). In the first half, battery is fully available; in the second half, only partially available. |
tests/tests_de/test_rolling_optimizztion.py#
Test Name |
Description (Risk/Safety Check) |
|---|---|
test_rolling_optimization Parameters:
|
Test rolling optimization: Extend an existing intraday-only optimization request with a full day of day-ahead |
test_rolling_optimization Parameters:
|
Test rolling optimization: Extend an existing intraday-only optimization request with a full day of day-ahead |
tests/tests_de/test_unwind_intraday.py#
Test Name |
Description (Risk/Safety Check) |
|---|---|
test_de_intraday_with_fault Parameters:
|
No description available. |
test_de_intraday_with_fault Parameters:
|
No description available. |
test_de_intraday_planned_outage_insertion |
No description available. |
test_unplanned_fault_reaction_without_availability_block Parameters:
|
No description available. |
test_unplanned_fault_now Parameters:
|
No description available. |
test_unplanned_fault_now Parameters:
|
No description available. |
tests/tests_de_ev/test_intraday_de_ev.py#
Test Name |
Description (Risk/Safety Check) |
|---|---|
test_intraday_de_ev_sample_request |
Test aFRR energy wrapped request handling with intraday orderbook |
test_bidirectional_intraday_de_ev_sample_request |
No description available. |
test_bidi_reduced_sample_request |
No description available. |
test_upper_bound_error |
No description available. |
test_2025_12_18_division_by_zero |
No description available. |
tests/tests_uk/integration_tests/test_request_asset_validation.py#
Test Name |
Description (Risk/Safety Check) |
|---|---|
test_fill_in_sell_and_buy_columns_with_mean_column Parameters:
|
Test buy and sell columns are filled with mean column values. |
test_ensure_PV_forecast_respects_grid_connection Parameters:
|
Test to ensure the PV forecast values are within acceptable range for grid connection export. |
test_ensure_PV_forecast_respects_grid_connection Parameters:
|
Test to ensure the PV forecast values are within acceptable range for grid connection export. |
test_ensure_PV_forecast_respects_grid_connection Parameters:
|
Test to ensure the PV forecast values are within acceptable range for grid connection export. |
test_asset_validation Parameters:
|
Test that Asset class raises ValidationError when required fields are missing or invalid. |
tests/tests_uk/integration_tests/test_request_strategy_optimization.py#
Test Name |
Description (Risk/Safety Check) |
|---|---|
test_validation_ensure_energy_cost_provided_if_customer_perspective Parameters:
|
Test to ensure energy cost for customer perspective validation error raised. |
test_validation_ensure_energy_cost_provided_if_customer_perspective Parameters:
|
Test to ensure energy cost for customer perspective validation error raised. |
tests/tests_uk/integration_tests/test_request_validation.py#
Test Name |
Description (Risk/Safety Check) |
|---|---|
test_validation_ensure_dc_ramp_rate_not_too_steep |
Test to ensure the DC ramp rate is within the expected range; otherwise, raise a validation error. |
test_validation_ensure_dc_energy_rec_in_range |
Test to ensure the DC min energy recovery percentage in the expected range; otherwise, raise a validation error. |
test_validation_ensure_dc_delivery_duration_in_range |
Test to ensure the DC duration is within the expected range; otherwise, raise a validation error. |
test_baseline_buffer_perc_constraints_dm |
Test to ensure the DM baseline buffer in expected range; otherwise, raise a validation error. |
test_delivery_duration_buffer_perc_constraints_dm |
Test to ensure the DM delivery buffer in the expected range; otherwise, raise a validation error. |
test_min_energy_recovery_perc_constraints_dm |
Test to ensure the DM min energy recovery % in the expected range; otherwise, raise a validation error. |
test_delivery_duration_sec_casting_dm |
Test to ensure the DM delivery duration in the expected range; otherwise, raise a validation error. |
test_baseline_buffer_perc_constraints_dr |
Test to ensure the DR baseline buffer within the expected range; otherwise, raise a validation error. |
test_delivery_duration_buffer_perc_constraints_dr |
Test to ensure the DR delivery buffer is within the expected range; otherwise, raise a validation error. |
test_min_energy_recovery_perc_constraints_dr |
Test to ensure the DR min energy recovery in expected range; otherwise, raise a validation error. |
test_delivery_duration_sec_casting_dr |
Test to ensure the DR delivery duration in the expected range; otherwise, raise a validation error. |
test_validation_ensure_grid_connection_not_too_steep Parameters:
|
Test to check grid connection import & export in expected range; otherwise, raise a validation error. |
test_validation_ensure_grid_connection_not_too_steep Parameters:
|
Test to check grid connection import & export in expected range; otherwise, raise a validation error. |
test_validation_ensure_power_swing_limit Parameters:
|
Test to check battery power swing limit is feasible; otherwise, raise an error. |
test_validation_ensure_power_swing_limit Parameters:
|
Test to check battery power swing limit is feasible; otherwise, raise an error. |
test_validation_ensure_power_swing_limit Parameters:
|
Test to check battery power swing limit is feasible; otherwise, raise an error. |
test_validation_ensure_power_swing_limit Parameters:
|
Test to check battery power swing limit is feasible; otherwise, raise an error. |
test_fixture_epex_ds_battery_marketed_respects_battery_parameters |
Test to given pytest fixture battery marketed respects batter parameters. |
test_battery_marketed_valid_data |
Test ensure battery marketed works with valid data. |
test_battery_marketed_missing_field |
Test ensure battery marketed raises validation error with invalid data. |
test_missing_required_fields_trade_exclusion |
Test trade exclusion required fields have all fields; otherwise, raise validation error. |
test_ensure_ds_marketed_in_integer_increments_of_MW Parameters:
|
Test to ensure ds marketed integer increments and value error raised. |
test_ensure_ds_marketed_in_integer_increments_of_MW Parameters:
|
Test to ensure ds marketed integer increments and value error raised. |
test_ensure_ds_marketed_in_integer_increments_of_MW Parameters:
|
Test to ensure ds marketed integer increments and value error raised. |
tests/tests_uk/test_battery_optimizer.py#
Test Name |
Description (Risk/Safety Check) |
|---|---|
test_efa_blocks_no_dst_change |
No description available. |
test_efa_blocks_dst_lose_one_hour_at_beginning |
No description available. |
test_efa_blocks_dst_lose_gain_hour_at_beginning |
No description available. |
tests/tests_uk/test_battery_optimizer_app.py#
Test Name |
Description (Risk/Safety Check) |
|---|---|
test_handle_request_pnl_with_order_book |
Test pnl request with order book will return the correct result type. |
test_handle_request_pnl_with_only_forecasts |
Test pnl request with only forecasts is returning the correct result type. |
test_handle_request_bod |
Test working Bod optimization. For problem type bod the corresponding response type is expected. |
tests/tests_uk/test_bod.py#
Test Name |
Description (Risk/Safety Check) |
|---|---|
test_bod_computation |
Test that bod computation gives the correct prices and volumes. Test data compares against static result. |
test_bod_computation_volume_reservation_zero_mel |
Test that the bod computation takes mel into account. For 0MW MEL and positive min_physical_notification, the pair_p1_offer price should be below the given maximal price per MWh. For 0MW MEL and negative min_physical_notification, the pair_p1_offer price should be the maximal price. This should prevent receiving a BOA lower than the required power for SOE Management after dynamic service delivery. |
test_bod_computation_volume_reservation_zero_mil |
Test that the bod computation takes mel into account. For 0MW MIL and negative max_physical_notification, the pair_n1_bid price should be below the given maximal price per MWh. For 0MW MIL and positive max_physical_notification, the pair_n1_bid price should be the maximal price. This should prevent receiving a BOA lower than the required power for SOE Management after dynamic service delivery. |
test_bod_request_missing_keys |
Test that missing data will result in a Validation Error |
test_bod_result_contains_maximum_four_pairs |
Test that the bod results consists of minimum 2 pairs and maximum 8. Also tested, but might be removed in the future: result only contains pair_n1 and pair_p1 |
tests/tests_uk/test_dynamic_services_buffers.py#
Test Name |
Description (Risk/Safety Check) |
|---|---|
test_dynamic_services_buffers Parameters:
|
Test UK intraday optimizer with partial outages (time-dependent battery parameters). In the first half, battery is fully available; in the second half, only partially available. |
tests/tests_uk/test_iis.py#
Test Name |
Description (Risk/Safety Check) |
|---|---|
test_scip_iis_commandline |
Test for implementing commandline-based IIS computation in SCIP. Payload based on https://eon-seed.visualstudio.com/Flexibility%20Trading%20Technologies/_workitems/edit/86190 |
test_scip_iis_commandline_no_executable |
Force the IIS computation to use a bogus SCIP executable name so the ‘SCIP binary not found’ branch in get_scip_iis_message is covered. |
test_scip_iis_commandline_timeout |
Force the IIS computation to run into a timeout so the ‘SCIP IIS computation timed out’ branch in get_scip_iis_message is covered. |
tests/tests_uk/test_intraday.py#
Test Name |
Description (Risk/Safety Check) |
|---|---|
test_intraday_book_keeping |
Test that two consecutive intraday runs change the result. Both runs contain data for 3 days. The first run has an intraday price of 10 for the first half and 100 for the second half of timestamps.The second run has an updated intraday price of 30 for the first third, 5 for the second third and 100 for the last third of timestamps. Expectation: The first run will buy energy in the first half and sell energy in the second half. The second run should undo the trades, and rather sell energy in the first third, buy as much as possible in the second third and sell everything in the last third. This should result in a higher objective function result. |
test_intraday_finding_better_solution_with_DA_deals |
Test that two consecutive intraday runs change the result. The first run optimizes a DA market with constant prices, except for 2 timestamps t1, t2 with low prices and 2 timestamps with high prices t3, t4. It is tested that energy is bought at a low price and sold at a high price. The result is put into the battery marketed of the second optimization run, optimizing the intraday market. Prices are constant again, except for timestamps t1, t2 with HIGH prices and timestamps t3, t4 with LOW prices (so the price structure is flipped). It is checked that the intraday buys more than was sold before and sells more than was bought before. This effectively will undo the epex trades and compensate in intraday market. |
test_that_initial_soe_level_outside_allowed_range_is_recovered_in_sp1 |
Test, that if the initial soe level is below min_soe or above max_soe, it is recovered in the first settlement period resulting in a target soe level in a valid range. |
test_cycles_are_respected_in_intraday_with_filled_with_DA |
Test, that if the daily cycle is completely filled with DA positions, it is still respected in the intraday optimization. This means the intraday positions cannot exceed the given limit. |
test_intraday_partial_cycle_limits |
This test optimizes 3 days intraday. Each day has a different cycle limit (day 1: 1 cycle, day 2: 2 cycles, day 3: 3 cycles). We initiate a battery without third party costs and a limited efficiency. The full discharge in MW of one day is 2*battery_capacity, independent of the efficiency. For day 1 we assert that it is 1*full discharge, day2 2*full discharge, day 3 3*full discharge. |
test_intraday_bucketing |
The existing Result logic still works with intraday bucketing since intraday_sell and intraday_buy variables are simply the sum of the corresponding bucket volumes. Hence, when e.g. requesting a results dataframe, the corresponding entries for intraday equal the sum of bucket volumes: (Note that we checked above that there are no existing already marketed intraday positions, hence these volumes come from the current optimization run) |
test_intraday_bucketing_intraday_strategy |
Check for implemented intraday strategy and correct validation error. |
test_intraday_bucketing_vwap_with_price_buckets |
Test that requesting intraday strategy “{self.intraday_strategy}” with price_buckets as an input results in a validation error. |
test_intraday_bucketing_orderbook_request |
Test intraday bucketing result minmax aggregation |
test_intraday_empty_price_buckets |
Assert that an empty orderbook will result in default prices of 9999 £/MWh in the intraday buckets |
test_markets_time_series_conversion |
Assert that the orderbook data is correctly fetched for intraday strategy bucket for emtpy price buckets |
test_time_series_markets_all_the_same_intraday_marketed |
Test that already marketed intraday is not overwritten by the optimizer when re-running an optimization but is kept in the result. |
test_time_series_markets_imbalance_intraday |
Test to validate the correct behavior of the optimization logic in a scenario where: Intraday markets are active throughout the optimization time range. Only the first settlement period is optimized for imbalance, while the rest are optimized for intraday. Intraday pre-marketed volumes are correctly enforced as lower bounds. |
test_intraday_bucketing_negative_pnl |
In this test we show that occasional negative P&L we see on particular continuous intraday runs result from numerical rounding issues (imbalances) due to existing market positions (e.g. existing day-ahead positions). The optimizer sees this numerical imbalance and chooses to fill this numerical imbalance in with either the intraday or the imbalance market as demonstrated below. Hence, it makes sense for us to refuse intraday results whose P&L is negative since our goal in continuous intraday trading is not to constantly fix numerical rounding issues. Our intention is to trade with a positive P&L while fixing numerical rounding issues happens as a by-product during positive P&L runs. |
tests/tests_uk/test_iterative_rounding.py#
Test Name |
Description (Risk/Safety Check) |
|---|---|
test_marketed_volumes_validation_rounding_methods |
Test that the optimizer correctly validates and handles marketed volumes for the specific case on 2025-02-10. Solves the optimization problem using a two-stage MIP → IP process. Here we iterate over different rounding methods. |
tests/tests_uk/test_joerg_dc_test_cases.py#
Test Name |
Description (Risk/Safety Check) |
|---|---|
test_dc_1 |
Start_SoE 0.5, DC low 0 GBP, DC high 12 GBP ==> We expect DCH only. Note that third party costs aren’t affected by the way we treat DC - i.e. our DC variables do not feed into a cost position in our objective function. Hence, here in a DC-only scenario we expect the optimizer to always fill in DC to maximize DC revenue, irrespective of DC prices. |
test_dc_2 |
Start_SoE 0.5, DC low 12 GBP, DC high 0 GBP ==> We expect DCL only. Note that third party costs aren’t affected by the way we treat DC - i.e. our DC variables do not feed into a cost position in our objective function. Hence, here in a DC-only scenario we expect the optimizer to always fill in DC to maximize DC revenue, irrespective of DC prices. |
test_dc_3 |
Start_SoE 0.5, DC low 11.9 GBP, DC high 12 GBP ==> We expect DC both limited by swing limit. Note that third party costs aren’t affected by the way we treat DC - i.e. our DC variables do not feed into a cost position in our objective function. Hence, here in a DC-only scenario we expect the optimizer to always fill in DC to maximize DC revenue, irrespective of DC prices. |
test_dc_4 |
Start_SoE 0.5, DC low 12 GBP, DC high 12 GBP ==> We expect DCL only. Note that third party costs aren’t affected by the way we treat DC - i.e. our DC variables do not feed into a cost position in our objective function. Hence, here in a DC-only scenario we expect the optimizer to always fill in DC to maximize DC revenue, irrespective of DC prices. |
test_dc_5 |
Start_SoE 0.5, DC low 12 GBP, DC high 0 GBP ==> We expect DCL only. Note that third party costs aren’t affected by the way we treat DC - i.e. our DC variables do not feed into a cost position in our objective function. Hence, here in a DC-only scenario we expect the optimizer to always fill in DC to maximize DC revenue, irrespective of DC prices. |
test_dc_6 |
Start_SoE 0.5, DC low 12. GBP, DC high 12 GBP ==> We expect DC both limited by 12% baselining constraint. Note that third party costs aren’t affected by the way we treat DC - i.e. our DC variables do not feed into a cost position in our objective function. Hence, here in a DC-only scenario we expect the optimizer to always fill in DC to maximize DC revenue, irrespective of DC prices. |
test_dc_7 |
Start_SoE 0 0,2, DC low 5,00 GBP, DC High 5,00 GBP ==> DC high 6 MW |
test_dc_8 |
Start_SoE 0 0,8, DC low 1,00 GBP, DC High 12,00 GBP ==> DC low 21 MW |
tests/tests_uk/test_joerg_epex_test_cases.py#
Test Name |
Description (Risk/Safety Check) |
|---|---|
test_spot_epex_1 |
Start SoE Level 80% and 1 hour spot = 111 ==> discharging in that hour and recharging afterwards (or maybe nothing in case the battery stays empty) |
test_spot_epex_2 |
Start SoE Level 20% and 1 hour spot = 111 ==> charging at the beginning (limited charging with 6.8 MW due to Grid constraint) discharging in that hour |
test_spot_epex_3 |
Start SoE Level 80% and 1 hour spot = 110. The battery is discharged in the 2 SPs with high price, it is brought form 80% SOE level to a SoE level of 20%. Not charged afterwards. As no charging event is needed to make money, it does not matter, if the high price is over or under the strike. By selling energy and empyting the battery you always make money over the optimisation horizon. But the battery is empty at the end! |
test_spot_epex_4 |
Start SoE Level 20% and 1 hour spot = 110 ==> no charging/discharging at the beginning (or maybe discharging at the end in case the battery will be emptiey to earn money at the end) |
test_spot_epex_5 |
Start SoE Level 50% and 1 hour spot = 111 ==> charging at the beginning, discharging in that hour and recharging afterwards (or maybe nothing in case the battery stays empty) the battery is charged at the beginning (SP 1 and SP2) from 50% up to 70% SOE level; but in SP1 only with 2MW, in the other SP with 6,8MW (=possible solution chosen by solver). The battery is discharged in the SP where the price is 111, it is brought back to a SoE level of 20%. As a discharge over 1 SP leads in maximum to a reduction of SoE of roughly 50%, the charging at the beginning only delivers a 50% higher SoE level [from 20% to 70%, not up to max of 80%] |
tests/tests_uk/test_joerg_n2ex_cycles.py#
Test Name |
Description (Risk/Safety Check) |
|---|---|
test_n2ex_cycle_0 |
start at SoE level of 80% and one hour (1:00 - 2:00) with a price of 111 GBP and cycle = 2; the result will be the same as in test N2EX spot 1, as expected. Optimum does not need more than 1 cycle in this situation |
test_n2ex_cycle_1 |
Start SoE Level 80% and 2 hour spot = 111, cycle = 1 ==> discharge in the first high price hour, charge in the period between the 2 hours, discharge again in the 2nd hour with 111 GBP, but charging and discharging will be limited to not have more than 1 cycle. |
test_n2ex_cycle_2 |
Start SoE Level 80% and 2 hour spot = 111, cycle = 2 ==> discharge in the first high price hour, charge in the period between the 2 hours, discharge again in the 2nd hour with 111 GBP; Discharging will use full range from 80% SoE to 20% SoE, charging will use fulll range between 20% SoE and 80% SoE. |
test_n2ex_cycle_3 |
Start SoE Level 20% and 2 hour spot = 111, cycle = 1 ==> charging at the beginning, discharge in the first high price hour, charge in the period between the 2 hours, discharge again in the 2nd hour with 111 GBP, but charging and discharging will be limited to not have more than 1 cycle |
test_n2ex_cycle_4 |
Start SoE Level 20% and 2 hour spot = 111, cycle = 2 ==> charging at the beginning, discharge in the first high price hour, charge in the period between the 2 hours, discharge again in the 2nd hour with 111 GBP; Discharging will use full range from 80% SoE to 20% SoE, charging will use fulll range between 20% SoE and 80% SoE |
test_DA_DS_low_energy_throughput_cycle_limit Parameters:
|
Test that the energy throughput of dynamic servie low contribute to the daily cycles. If the battery is already fully discharged in one day or if the daily cycle is set to 0, the dynamic services should be 0. for positive energy throughput. If the energy throughput is set to 0. the low DS do not contribute to the discharging cycle and therefore, DS low can be marketed. |
test_DA_DS_low_energy_throughput_cycle_limit Parameters:
|
Test that the energy throughput of dynamic servie low contribute to the daily cycles. If the battery is already fully discharged in one day or if the daily cycle is set to 0, the dynamic services should be 0. for positive energy throughput. If the energy throughput is set to 0. the low DS do not contribute to the discharging cycle and therefore, DS low can be marketed. |
tests/tests_uk/test_joerg_n2ex_test_cases.py#
Test Name |
Description (Risk/Safety Check) |
|---|---|
test_spot_n2ex_1 |
Start SoE Level 80% and 1 hour spot = 111 ==> discharging in that hour and recharging afterwards (or maybe nothing in case the battery stays empty) |
test_spot_n2ex_2 |
Start SoE Level 20% and 1 hour spot = 111 ==> charging at the beginning (limited charging with 6.8 MW due to Grid constraint) discharging in that hour |
test_spot_n2ex_3 |
Start SoE Level 80% and 1 hour spot = 110. The battery is discharged in the 2 SPs with high price, it is brought form 80% SOE level to a SoE level of 20%. Not charged afterwards. As no charging event is needed to make money, it does not matter, if the high price is over or under the strike. By selling energy and empyting the battery you always make money over the optimisation horizon. But the battery is empty at the end! |
test_spot_n2ex_4 |
Start SoE Level 20% and 1 hour spot = 110 ==> no charging/discharging at the beginning (or maybe discharging at the end in case the battery will be emptiey to earn money at the end) |
test_spot_n2ex_5 |
Start SoE Level 50% and 1 hour spot = 111 ==> charging at the beginning, discharging in that hour and recharging afterwards (or maybe nothing in case the battery stays empty) |
test_spot_n2ex_6 |
Start with SoE level of 20% and test strike price. At a price of 10.88 GBP the battery is not charged / discharged. With a low initial SoE at the strike price being 10.88 GBP, we don’t expect anything to happen since we have no initial “free” energy to sell and we’re below the strike price to buy and sell at a profit. |
test_spot_n2ex_7 |
Start with SoE level of 20% and test strike price. At a price of 10.89 GBP the battery is charged prior to high price, and discharged during high price periods. Compare with test case 6 where strike price is 10.88 GBP and no charging / discharging happens. |
tests/tests_uk/test_logger.py#
Test Name |
Description (Risk/Safety Check) |
|---|---|
test_get_logger_single_line_exceptions |
Test that the logger formats exceptions as single-line messages given ‘single_line_exceptions=True’. Verifies that log output contains ‘ | ‘, indicating single-line formatting and no multi-line traceback is present. |
test_get_logger_default_formatter |
Test that the logger uses the default multi-line formatter when no special formatting options are specified. Verifies presence of ‘Traceback’ to confirm a full stack trace is included. |
test_get_logger_prepend_pid_direct |
Test that the logger prepends the process ID (PID) to log messages. |
test_single_line_formatter_all_levels Parameters:
|
No description available. |
test_single_line_formatter_all_levels Parameters:
|
No description available. |
test_single_line_formatter_all_levels Parameters:
|
No description available. |
test_single_line_formatter_exception |
No description available. |
test_single_line_formatter_edge_cases |
No description available. |
test_single_line_formatter_tabs_and_spaces |
No description available. |
test_single_line_formatter_crlf |
No description available. |
test_single_line_formatter_message_and_exception |
No description available. |
test_single_line_formatter_empty_message |
No description available. |
test_single_line_formatter_whitespace_only |
No description available. |
test_single_line_formatter_with_args |
No description available. |
tests/tests_uk/test_main.py#
Test Name |
Description (Risk/Safety Check) |
|---|---|
test_optimize_wrapped_problem Parameters:
|
Test to ensure functionality of ‘optimize_wrapped_problem’ using different parameterized input, and returned result is of correct class type and does not return error. |
test_optimize_wrapped_problem Parameters:
|
Test to ensure functionality of ‘optimize_wrapped_problem’ using different parameterized input, and returned result is of correct class type and does not return error. |
test_optimize_wrapped_problem Parameters:
|
Test to ensure functionality of ‘optimize_wrapped_problem’ using different parameterized input, and returned result is of correct class type and does not return error. |
test_optimize_wrapped_problem Parameters:
|
Test to ensure functionality of ‘optimize_wrapped_problem’ using different parameterized input, and returned result is of correct class type and does not return error. |
test_optimize_wrapped_problem Parameters:
|
Test to ensure functionality of ‘optimize_wrapped_problem’ using different parameterized input, and returned result is of correct class type and does not return error. |
test_optimize_wrapped_problem Parameters:
|
Test to ensure functionality of ‘optimize_wrapped_problem’ using different parameterized input, and returned result is of correct class type and does not return error. |
test_optimize_wrapped_problem_bad_request Parameters:
|
Test to ensure functionality of ‘optimize_wrapped_problem’ raises Error for a given incorrect problem type as part of bad request input. |
test_optimize_wrapped_problem_validation_error |
Test to ensure ValidationError is raised when given incorrect arguments passed to function ‘optimize_wrapped_problem’ |
test_logging_queue_put_get_dict |
Test to check functionality of getting and putting dict item to and from logging queue. |
test_logging_queue_put_get_object |
Test to check functionality of getting and putting object to and from logging queue. |
test_async_optimizer_initialization |
Test to ensure functionality of optimizer initialization using MockEnv and MockKafkaConsumer. |
test_consume_optimize_write_result_error Parameters:
|
Test that the optimizer correctly captures and returns validation errors. Modifies input to trigger a validation failure and asserts error output. |
test_optimize_file_returns_valid_excel_content Parameters:
|
Test uploading an Excel file to the optimization endpoint returns expected sheets. Confirms sheet presence and validates that returned data is non-empty. |
test_optimize_file_returns_valid_excel_content Parameters:
|
Test uploading an Excel file to the optimization endpoint returns expected sheets. Confirms sheet presence and validates that returned data is non-empty. |
test_optimize_file_returns_valid_excel_content Parameters:
|
Test uploading an Excel file to the optimization endpoint returns expected sheets. Confirms sheet presence and validates that returned data is non-empty. |
test_optimize_file_varying_content Parameters:
|
Test optimization endpoint with varying file types and expected status codes. Handles supported formats and ensures unsupported types raise a ValueError. |
test_optimize_file_varying_content Parameters:
|
Test optimization endpoint with varying file types and expected status codes. Handles supported formats and ensures unsupported types raise a ValueError. |
test_optimize_file_varying_content Parameters:
|
Test optimization endpoint with varying file types and expected status codes. Handles supported formats and ensures unsupported types raise a ValueError. |
test_optimize_file_json_expected_problem_type Parameters:
|
Test optimization of different problem types via JSON input file. Verifies that the output Excel contains problem-type-specific result columns. |
test_optimize_file_json_expected_problem_type Parameters:
|
Test optimization of different problem types via JSON input file. Verifies that the output Excel contains problem-type-specific result columns. |
test_optimize_file_json_expected_problem_type Parameters:
|
Test optimization of different problem types via JSON input file. Verifies that the output Excel contains problem-type-specific result columns. |
test_optimize_file_json_expected_problem_type Parameters:
|
Test optimization of different problem types via JSON input file. Verifies that the output Excel contains problem-type-specific result columns. |
test_2026_03_26_uk_idc_division_by_zero |
Error propagation test: For a divison by zero error in one of the validators, we want to pass back to the caller the full traceback to facilitate debugging on the caller side. This test ensures that the traceback is included in the error message when such an error occurs. |
tests/tests_uk/test_mel_mil_business_scenarios.py#
Test Name |
Description (Risk/Safety Check) |
|---|---|
test_business_scenario_1 |
Test that MEL MIL is calculated correctly under dynamic service and wholesale market trading. This does include possible recovery from a boa and fulfillment of future SOE-constraints. This test checks for the correct the power constraint of mel mil calculation, i.e. that mel mil are reduced by dynamic service but are not influenced by wholesale market trading. |
test_business_scenario_2 |
Test that MEL MIL is calculated correctly under dynamic service only. This test checks for the correct the power constraint of mel mil calculation, i.e. that mel mil are reduced by dynamic service but are not influenced by wholesale market trading. |
test_business_scenario_3 |
Test that MEL MIL is calculated correctly under dynamic service and wholesale market trading. This does include possible recovery from a boa and fulfillment of future SOE-constraints with declining recovery the closer dynamic service soe requirements have to be reached. It is tested, that the SoE Management buffers from dynamic services should be ignored in the MEl/MIL calculation. This test checks for the correct the power constraint of mel mil calculation, i.e. that mel mil are reduced by dynamic service but are not influenced by wholesale market trading. |
test_business_scenario_4 |
Test that MEL MIL is calculated correctly under dynamic service and wholesale market trading. In this test case, we start with small initial soe_level, have a buy and sell deal in the future. As soon as the buy deal is placed, MEL should increase, but only as long as it is recoverable. This means, as soon as the frozen period starts, it should be minimized again to allow the wohlesale market trade. This test also verfies the correct MEL MIL calculation in the energy limited MELMIL case. |
tests/tests_uk/test_melmil_request.py#
Test Name |
Description (Risk/Safety Check) |
|---|---|
test_maximum_MELMIL_for_asymmetric_charging_discharging_power |
Test working MELMIL Request and correct handling. max_charging_power_kw and max_discharging_power_kw are not symmetrical, and MEL/MIL should take that correctly into account. |
test_MELMIL_request_mil_zero_for_maximum_soe |
Test working MELMIL Request with no deals and inital soe = maximum soe. The expected MIL is 0 MW. |
test_MELMIL_request_mel_zero_for_minimum_soe |
Test working MELMIL Request with no deals and inital soe = minimum soe. The expected MEL is 0 MW. |
test_bm_availabilities |
Test that mel mil calculation returns 0 MW, if the battery is not available. |
test_MELMIL_request_with_DC |
Test, that MELMIL is reduced by dynamic service |
tests/tests_uk/test_melmil_validations.py#
Test Name |
Description (Risk/Safety Check) |
|---|---|
test_MELMILBOA_request_requires_end_of_boa_timestamp_in_baseline |
Test MELMILBOA Request requires end of boa timestamp in baseline to work |
test_MELMILBOA_request_requires_soe_after_end_of_boa_timestamp_in_baseline |
Test MELMILBOA Request requires end of boa timestamp in baseline to work |
test_MELMILBOA_request_requires_Baseline_data |
Test MELMILBOA Request requires baseline and boa data and throws an error if they are not present |
test_MELMIL_request_with_Baseline_and_BOA_data |
Test that MEL MIL Request is ignoring baseline and boa data if they are given and the correct problemtype is returned |
test_MELMIL_request_requires_boa_or_start |
Test that MEL MIL BOA Request is requiring either start or boas, otherwise an error is thrown. |
tests/tests_uk/test_melmilboa_request.py#
Test Name |
Description (Risk/Safety Check) |
|---|---|
test_MelMilBoa_request |
Test working MELMILBOA request. |
test_MelMilBoa_request_creation Parameters:
|
Test working MELMILBOA request is updating the request as expected to guarantee that the running SP has the correct remaining power output. This is tested for positive and negative baseline values |
test_MelMilBoa_request_creation Parameters:
|
Test working MELMILBOA request is updating the request as expected to guarantee that the running SP has the correct remaining power output. This is tested for positive and negative baseline values |
test_MelMilBoa_request_with_start_parameter |
Test working MELMILBOA request with start parameter instead of boas given. |
test_Boa_request_with_DC_during_EFA_block |
Test working MELMILBOA request with Dynamic services during a running block. |
test_Boa_request_with_trading |
Test working MELMILBOA request with existing charging/discharging. |
test_MelMilBoa_request_with_MEL_0_after_maximum_boa |
Test working MELMILBOA request. First we do a normal mel mil optimization with a already low inital soe level. We take the MEL value and create a boa with exactly this power. This should result in a soe level at (almost) minimum soe. The resulting MEL after mel mil boa optimization should be 0 MW. |
test_MelMilBoa_request_with_MIL_0_after_maximum_boa |
Test working MELMILBOA request. First we do a normal mel mil optimization with a already high inital soe level. We take the MIL value and create a boa with exactly this power. This should result in a soe level at (almost) maximum soe. The resulting MIL after mel mil boa optimization should be 0 MW. |
test_Boa_request_with_energy_throughput |
Test that the MEL MIL BOA requests takes the energy throughput of dynamic services correctly in account, when creating the updated running settlement period. |
test_MelMilBoa_request_with_non_overlapping_boas |
Test working MELMILBOA request. Mutiple boas are added, that are non overlapping. The result should contain a mel mil optimization after the latest boa, ignoring the time between the two boas. |
tests/tests_uk/test_melmilnow_request.py#
Test Name |
Description (Risk/Safety Check) |
|---|---|
test_MELMILNOW_request |
Test working MELMILNOW request with no restrictions. Expeted mel and mil are maximum discharge/ maximum charge power. Correct timestamp is checked. |
test_MELMILNOW_request_energy_restricted |
Test MELMILNOW with limited energy in the battery. The expected output should match the restricted energy that can be delivered for the remaining time of the settlement period. Also tested: a timestamp, that is not in the current but in the next SP. Still, the MELMILNOW should return only one SP with the remaining time of SP1. |
test_MELMILNOW_request_with_dcl |
Test mel mil now request with completely blocked power by dynamic serivces. Expected mel should be close to 0. |
test_MELMILNOW_request_with_dcl_power_block |
Test mel mil now request with blocked power by dynamic serivces, but no energy restriction. Expected mel should be max discharge - blocked power. |
tests/tests_uk/test_ongoing_debugging.py#
Test Name |
Description (Risk/Safety Check) |
|---|---|
test_2025_02_11_ds_both_baseline_buffer |
Here we test that the optimizer respects the SoE management rules in case of marketing DS both Note that the below ‘min_energy_recovery_perc’ of 0.2 comes from the official guideline on this: “SOE Monitoring Guidance For Energy Limited DC/DM/DR Providers”: https://www.neso.energy/document/347241/download In case of participating in DC high and DC low at the same time, we need to keep 20% = 0.2 of the opposite direction free for SoE management, hence (for a 15-minute delivery duration for DC) 0.2 * 15 min / 30 min = 0.1 of the opposite direction free DC both rule as described in https://www.neso.energy/document/347241/download |
test_2025_02_10_marketed_volumes_validation |
Test that the optimizer correctly validates and handles marketed volumes for the specific case on 2025-02-10. Solves the optimization problem using a two-stage MIP → IP process. |
test_2025_02_20_no_dr |
Test that we entered DR deals and no DC deals when DR prices are higher |
test_2025_02_21_infeasible_intraday |
Test that the optimizer correctly throws an error when DS both positions with violating SoE management rules are provided in battery_marketed |
test_2025_02_25_long_running_epex_dc_dm_dr |
Test that a long-running example json has a shorter optimization time than 180 s (was previously longer). |
test_2025_03_11_infeasible_melmil |
https://eon-seed.visualstudio.com/Flexibility%20Trading%20Technologies/_workitems/edit/86190 PyDantic validator trips because an asset state target SoE is set to a value greater than the max SoE. Removing the validator leads to an infeasible solution - the optimizer cannot reach the target SoE. Implementing the asset state target SoE as a relaxed best effort target allows the optimizer to reach a feasible solution. |
test_2025_03_11_infeasible_epex |
https://dev.azure.com/eon-seed/Flexibility%20Trading%20Technologies/_workitems/edit/86721 The end of day 1 of this EPEX request has a SoE target that is not reachable. |
test_2025_03_11_infeasible_melmil_validate_initial_dch |
Here, VPP sends an initial DCH position that is not supported by the initial SoE in the same request: https://dev.azure.com/eon-seed/Flexibility%20Trading%20Technologies/_workitems/edit/86190#14191306 As we are in the within-day process here (MELMIL optimization specificially), we expect that the relatively high initial SoE in this request is due to recent DS high activation. Hence, we expect that in this optimization run, we do not need to fully meet DS SoE requirements but that we rather need to restore these DS SoE requirements as quickly as possible: https://dev.azure.com/eon-seed/Flexibility%20Trading%20Technologies/_workitems/edit/90360 |
test_2025_04_09_initial_soe_check_for_ds_energy_too_conservative |
Test that initial dynamic services positions are only checked if we are optimizing dynamic services exclusively. If nothing but dynamic services are requested at the beginning of the request, then we cannot modify the SoE at the beginning of the optimization horizon, hence we need to ensure that we respect the initial SoE with our newly proposed dynamic services volumes. Test that warning log messages contain request IDs. |
test_2025_03_20_melmil_infeasible_solution |
Test that potential the undoing of a BOA in the soe scenarios for mel mil optimization will not result in a infeasible solution in case high and low dynamic services are in place. This test includes a specific json request, that resulted in an infeasible solution before. |
test_2025_04_23_availability_flag_for_planned_outages_only |
Verify that the optimizer throws a validation error when the battery is unavailable but positions are provided in the ‘battery_marketed’ parameter. The error should no longer occur when the positions during the unavailability are set to 0. |
test_2025_06_30_infeasible_solution Parameters:
|
No description available. |
test_2025_06_30_infeasible_solution Parameters:
|
No description available. |
test_2025_06_30_infeasible_solution_melmilboa |
No description available. |
test_2025_07_24_respect_target_soe |
Test that the optimizer respects the target SoE at the end of the optimization horizon. |
test_2025_12_02_prod_infeasible_solution |
Test that we can solve a request that previously led to an infeasible solution in production. |
test_2026_01_29_soe_target_bigger_than_1 |
Test that we correctly handle a request where the target SoE is bigger than 1. |
tests/tests_uk/test_orderbook_bucketing.py#
Test Name |
Description (Risk/Safety Check) |
|---|---|
test_get_all_orders_per_delivery_time Parameters:
|
Test orderbook functionality with bucketing approach ‘whole’: The passed order book is filtered such that the returned orders are offering enough energy to fulfill the requested max energy. All orders needed to fulfill the requested energy based on the passed orderbook. |
test_get_all_orders_per_delivery_time Parameters:
|
Test orderbook functionality with bucketing approach ‘whole’: The passed order book is filtered such that the returned orders are offering enough energy to fulfill the requested max energy. All orders needed to fulfill the requested energy based on the passed orderbook. |
test_get_all_orders_per_delivery_time Parameters:
|
Test orderbook functionality with bucketing approach ‘whole’: The passed order book is filtered such that the returned orders are offering enough energy to fulfill the requested max energy. All orders needed to fulfill the requested energy based on the passed orderbook. |
test_get_all_orders_per_delivery_time Parameters:
|
Test orderbook functionality with bucketing approach ‘whole’: The passed order book is filtered such that the returned orders are offering enough energy to fulfill the requested max energy. All orders needed to fulfill the requested energy based on the passed orderbook. |
test_get_all_orders_per_delivery_time Parameters:
|
Test orderbook functionality with bucketing approach ‘whole’: The passed order book is filtered such that the returned orders are offering enough energy to fulfill the requested max energy. All orders needed to fulfill the requested energy based on the passed orderbook. |
test_get_all_orders_per_delivery_time Parameters:
|
Test orderbook functionality with bucketing approach ‘whole’: The passed order book is filtered such that the returned orders are offering enough energy to fulfill the requested max energy. All orders needed to fulfill the requested energy based on the passed orderbook. |
test_get_max_prices_per_bucket Parameters:
|
Test orderbook functionality with bucketing approach ‘max’: The maximum price of a bucket is always the maximum/minimum price that is needed to fulfill the bucket plus the buckets before. |
test_get_max_prices_per_bucket Parameters:
|
Test orderbook functionality with bucketing approach ‘max’: The maximum price of a bucket is always the maximum/minimum price that is needed to fulfill the bucket plus the buckets before. |
test_get_max_prices_per_bucket Parameters:
|
Test orderbook functionality with bucketing approach ‘max’: The maximum price of a bucket is always the maximum/minimum price that is needed to fulfill the bucket plus the buckets before. |
test_get_max_prices_per_bucket Parameters:
|
Test orderbook functionality with bucketing approach ‘max’: The maximum price of a bucket is always the maximum/minimum price that is needed to fulfill the bucket plus the buckets before. |
test_get_max_prices_per_bucket Parameters:
|
Test orderbook functionality with bucketing approach ‘max’: The maximum price of a bucket is always the maximum/minimum price that is needed to fulfill the bucket plus the buckets before. |
test_get_max_prices_per_bucket Parameters:
|
Test orderbook functionality with bucketing approach ‘max’: The maximum price of a bucket is always the maximum/minimum price that is needed to fulfill the bucket plus the buckets before. |
test_get_vwap_per_bucket Parameters:
|
Test orderbook functionality with bucketing approach ‘vwap’: The vwap of a bucket is the vwap of all prices that are needed to fulfill energy needed in the bucket. If an order is needed in two buckets, the order is split into two orders for which the energy is the sum of the original order and the price is the same. |
test_get_vwap_per_bucket Parameters:
|
Test orderbook functionality with bucketing approach ‘vwap’: The vwap of a bucket is the vwap of all prices that are needed to fulfill energy needed in the bucket. If an order is needed in two buckets, the order is split into two orders for which the energy is the sum of the original order and the price is the same. |
test_get_vwap_per_bucket Parameters:
|
Test orderbook functionality with bucketing approach ‘vwap’: The vwap of a bucket is the vwap of all prices that are needed to fulfill energy needed in the bucket. If an order is needed in two buckets, the order is split into two orders for which the energy is the sum of the original order and the price is the same. |
test_get_vwap_per_bucket Parameters:
|
Test orderbook functionality with bucketing approach ‘vwap’: The vwap of a bucket is the vwap of all prices that are needed to fulfill energy needed in the bucket. If an order is needed in two buckets, the order is split into two orders for which the energy is the sum of the original order and the price is the same. |
test_get_vwap_per_bucket Parameters:
|
Test orderbook functionality with bucketing approach ‘vwap’: The vwap of a bucket is the vwap of all prices that are needed to fulfill energy needed in the bucket. If an order is needed in two buckets, the order is split into two orders for which the energy is the sum of the original order and the price is the same. |
test_get_vwap_per_bucket Parameters:
|
Test orderbook functionality with bucketing approach ‘vwap’: The vwap of a bucket is the vwap of all prices that are needed to fulfill energy needed in the bucket. If an order is needed in two buckets, the order is split into two orders for which the energy is the sum of the original order and the price is the same. |
test_convert_to_timestamp |
Test to ensure the functionality of convert_to_timestamp function given a series, the returned result is of type pandas Series containing elements are of type Timestamp. |
test_read_decompress_convert_orderbook |
Test orderbook functionality with read gzipped_orderbook and return bytes, decompress to bytes orderbook to utf-8 and returns string and convert the unzipped string to dataframe. |
test_filter_orderbook Parameters:
|
Test orderbook functionality to filter based on delivery_length type, deliveryStartTime and deliveryEndTime. |
test_filter_orderbook Parameters:
|
Test orderbook functionality to filter based on delivery_length type, deliveryStartTime and deliveryEndTime. |
test_filter_orderbook Parameters:
|
Test orderbook functionality to filter based on delivery_length type, deliveryStartTime and deliveryEndTime. |
test_filter_orderbook Parameters:
|
Test orderbook functionality to filter based on delivery_length type, deliveryStartTime and deliveryEndTime. |
test_filter_EPEX_orderbook Parameters:
|
Test orderbook functionality with filter EPEX based on product with parameterized inputs and deliveryStartTime. |
test_filter_EPEX_orderbook Parameters:
|
Test orderbook functionality with filter EPEX based on product with parameterized inputs and deliveryStartTime. |
test_filter_EPEX_orderbook Parameters:
|
Test orderbook functionality with filter EPEX based on product with parameterized inputs and deliveryStartTime. |
test_get_orderbook_in_buckets Parameters:
|
Test to get orderbook converted into buckets based on various bucketing approaches, max power and bucket size for vwap and max. |
test_get_orderbook_in_buckets Parameters:
|
Test to get orderbook converted into buckets based on various bucketing approaches, max power and bucket size for vwap and max. |
test_get_orderbook_in_buckets Parameters:
|
Test to get orderbook converted into buckets based on various bucketing approaches, max power and bucket size for vwap and max. |
test_get_EPEX_orderbook_in_buckets Parameters:
|
Test to get EPEX orderbook in buckets based on varying bucketing approaches, expected key and bucket sizes for vwap and max. |
test_get_EPEX_orderbook_in_buckets Parameters:
|
Test to get EPEX orderbook in buckets based on varying bucketing approaches, expected key and bucket sizes for vwap and max. |
test_get_EPEX_orderbook_in_buckets Parameters:
|
Test to get EPEX orderbook in buckets based on varying bucketing approaches, expected key and bucket sizes for vwap and max. |
test_get_EPEX_orderbook_in_buckets Parameters:
|
Test to get EPEX orderbook in buckets based on varying bucketing approaches, expected key and bucket sizes for vwap and max. |
test_get_EPEX_orderbook_in_buckets Parameters:
|
Test to get EPEX orderbook in buckets based on varying bucketing approaches, expected key and bucket sizes for vwap and max. |
test_get_EPEX_orderbook_in_buckets Parameters:
|
Test to get EPEX orderbook in buckets based on varying bucketing approaches, expected key and bucket sizes for vwap and max. |
test_missing_market_sides_are_filled |
Test to check for missing parts in orderbook if filled with default values for market sides. |
tests/tests_uk/test_partial_outages.py#
Test Name |
Description (Risk/Safety Check) |
|---|---|
test_partial_outages_intraday_uk Parameters:
|
Test UK intraday optimizer with partial outages (time-dependent battery parameters). In the first half, battery is fully available; in the second half, only partially available. |
test_partial_outages_intraday_uk Parameters:
|
Test UK intraday optimizer with partial outages (time-dependent battery parameters). In the first half, battery is fully available; in the second half, only partially available. |
test_partial_outages_intraday_uk Parameters:
|
Test UK intraday optimizer with partial outages (time-dependent battery parameters). In the first half, battery is fully available; in the second half, only partially available. |
test_partial_outages_intraday_uk Parameters:
|
Test UK intraday optimizer with partial outages (time-dependent battery parameters). In the first half, battery is fully available; in the second half, only partially available. |
test_partial_outages_intraday_uk Parameters:
|
Test UK intraday optimizer with partial outages (time-dependent battery parameters). In the first half, battery is fully available; in the second half, only partially available. |
test_partial_outages_intraday_uk Parameters:
|
Test UK intraday optimizer with partial outages (time-dependent battery parameters). In the first half, battery is fully available; in the second half, only partially available. |
test_partial_outages_intraday_uk Parameters:
|
Test UK intraday optimizer with partial outages (time-dependent battery parameters). In the first half, battery is fully available; in the second half, only partially available. |
test_partial_outages_intraday_uk Parameters:
|
Test UK intraday optimizer with partial outages (time-dependent battery parameters). In the first half, battery is fully available; in the second half, only partially available. |
test_partial_outages_intraday_uk Parameters:
|
Test UK intraday optimizer with partial outages (time-dependent battery parameters). In the first half, battery is fully available; in the second half, only partially available. |
test_partial_outages_intraday_uk Parameters:
|
Test UK intraday optimizer with partial outages (time-dependent battery parameters). In the first half, battery is fully available; in the second half, only partially available. |
test_partial_outages_intraday_uk Parameters:
|
Test UK intraday optimizer with partial outages (time-dependent battery parameters). In the first half, battery is fully available; in the second half, only partially available. |
test_partial_outages_intraday_uk Parameters:
|
Test UK intraday optimizer with partial outages (time-dependent battery parameters). In the first half, battery is fully available; in the second half, only partially available. |
test_partial_outages_intraday_uk Parameters:
|
Test UK intraday optimizer with partial outages (time-dependent battery parameters). In the first half, battery is fully available; in the second half, only partially available. |
test_partial_outages_intraday_uk Parameters:
|
Test UK intraday optimizer with partial outages (time-dependent battery parameters). In the first half, battery is fully available; in the second half, only partially available. |
test_partial_outages_intraday_uk Parameters:
|
Test UK intraday optimizer with partial outages (time-dependent battery parameters). In the first half, battery is fully available; in the second half, only partially available. |
test_partial_outages_intraday_uk Parameters:
|
Test UK intraday optimizer with partial outages (time-dependent battery parameters). In the first half, battery is fully available; in the second half, only partially available. |
test_partial_outages_intraday_uk Parameters:
|
Test UK intraday optimizer with partial outages (time-dependent battery parameters). In the first half, battery is fully available; in the second half, only partially available. |
test_partial_outages_intraday_uk Parameters:
|
Test UK intraday optimizer with partial outages (time-dependent battery parameters). In the first half, battery is fully available; in the second half, only partially available. |
test_partial_outages_intraday_uk Parameters:
|
Test UK intraday optimizer with partial outages (time-dependent battery parameters). In the first half, battery is fully available; in the second half, only partially available. |
test_partial_outages_intraday_uk Parameters:
|
Test UK intraday optimizer with partial outages (time-dependent battery parameters). In the first half, battery is fully available; in the second half, only partially available. |
test_partial_outages_intraday_uk Parameters:
|
Test UK intraday optimizer with partial outages (time-dependent battery parameters). In the first half, battery is fully available; in the second half, only partially available. |
test_partial_outages_intraday_uk Parameters:
|
Test UK intraday optimizer with partial outages (time-dependent battery parameters). In the first half, battery is fully available; in the second half, only partially available. |
tests/tests_uk/test_prod_warrington.py#
Test Name |
Description (Risk/Safety Check) |
|---|---|
test_2025_09_22_prod_intraday_infeasible Parameters:
|
No description available. |
test_2025_09_22_prod_intraday_infeasible Parameters:
|
No description available. |
tests/tests_uk/test_result.py#
Test Name |
Description (Risk/Safety Check) |
|---|---|
test_commit_sha_in_result |
Ensure that the result includes a commit SHA to enhance transparency, indicating the version the optimizer was run |
tests/tests_uk/test_tracing.py#
Test Name |
Description (Risk/Safety Check) |
|---|---|
test_trace_in_result |
Test that trace with correct spans and resources are part of the result of the optimization. |
tests/tests_uk/test_uk_optimization_refactor.py#
Test Name |
Description (Risk/Safety Check) |
|---|---|
test_handle_request_auto_intraday Parameters:
|
Ensures that intraday results before the refactor are the same as after the refactor. |
test_handle_request_auto_intraday Parameters:
|
Ensures that intraday results before the refactor are the same as after the refactor. |
test_handle_request_bod Parameters:
|
Ensures that BOD results before the refactor are the same as after the refactor. |
test_handle_request_melmil Parameters:
|
Ensures that MELMIL results before the refactor are the same as after the refactor. |
test_handle_request_melmil_boa Parameters:
|
Ensures that MELMILBOA results before the refactor are the same as after the refactor. |
test_handle_request_day_ahead Parameters:
|
Ensures that day-ahead EPEX+DS results before the refactor are the same as after the refactor. |
test_handle_request_day_ahead_non_iterative Parameters:
|
Ensures that day-ahead EPEX+DS results before the refactor are the same as after the refactor. |
test_handle_request_day_ahead_non_iterative_gapRel_0 Parameters:
|
Ensures that day-ahead EPEX+DS results before the refactor are the same as after the refactor. |
test_handle_request_day_ahead_epex30min_only Parameters:
|
Ensures that day-ahead EPEX results before the refactor are the same as after the refactor. |
tests/tests_uk/test_uk_regression_testing.py#
Test Name |
Description (Risk/Safety Check) |
|---|---|
test_2025_10_15_regression_test_dc_parameters_1 |
No description available. |
tests/tests_uk_ev/test_intraday_uk_ev.py#
Test Name |
Description (Risk/Safety Check) |
|---|---|
test_intraday_uk_ev_sample_request |
Test EV UK wrapped request handling with intraday orderbook |