From 4371fee47aa3f01cc85e9c0eba54abf3a3c1ae62 Mon Sep 17 00:00:00 2001 From: Pauline Jean-Marie Date: Tue, 3 Sep 2024 17:26:42 +0200 Subject: [PATCH] Remove curative stop criterion and 'optimize curative if preventive unsecure' and partially replace them by 'enforce curative security' NB. Curative min objective does no longer exist and is replaced by Curative have the same objective than the Preventive results Signed-off-by: Pauline Jean-Marie --- docs/parameters.md | 29 +---- python-util/rao_parameter_modification.py | 117 +++++++++++++++--- .../openrao/raoapi/RaoParametersCommons.java | 3 +- .../json/JsonObjectiveFunctionParameters.java | 18 +-- .../ObjectiveFunctionParameters.java | 33 ++--- .../raoapi/json/JsonRaoParametersTest.java | 5 +- .../parameters/RaoParametersConfigTest.java | 7 +- .../RaoParametersYamlConfigTest.java | 8 +- .../test/resources/RaoParametersSet_v2.json | 3 +- ...arametersWithCurStopCriterionError_v2.json | 83 ------------- .../RaoParametersWithExtension_v2.json | 3 +- .../RaoParametersWithLoopFlowError_v2.json | 1 - ...rametersWithPrevStopCriterionError_v2.json | 3 +- .../RaoParametersWithWrongField_v2.json | 1 - .../RaoParameters_config_withExtensions.json | 3 +- .../RaoParameters_config_withOLFParams.json | 3 +- ...rameters_config_withPartialExtensions.json | 3 +- ...aoParameters_config_withoutExtensions.json | 3 +- .../resources/RaoParameters_update_v2.json | 3 +- .../src/test/resources/RaoParameters_v2.json | 3 +- .../test/resources/config_withExtensions.yml | 1 - .../config_withPartialExtensions.yml | 1 - .../resources/config_withoutExtensions.yml | 3 +- .../algorithm/CastorFullOptimization.java | 8 +- .../algorithm/CastorSecondPreventive.java | 36 ++---- .../commons/parameters/TreeParameters.java | 24 ++-- .../algorithm/CastorFullOptimizationTest.java | 14 +-- .../algorithm/CastorSecondPreventiveTest.java | 40 +----- .../parameters/TreeParametersTest.java | 31 ++--- .../parameters/RaoParameters_2P_v2.json | 4 +- .../parameters/RaoParameters_DC.json | 4 +- .../RaoParameters_oneIteration_v2.json | 4 +- .../parameters/RaoParameters_secure.json | 3 +- .../US15_7.feature | 1 + .../common/RaoParameters_default.json | 3 +- .../RaoParameters_maxMargin_ampere.json | 4 +- .../RaoParameters_maxMargin_ampere_mip.json | 4 +- ...ameters_maxMargin_ampere_withFallback.json | 4 +- .../RaoParameters_maxMargin_megawatt_ac.json | 4 +- .../RaoParameters_maxMargin_megawatt_dc.json | 4 +- ...s_maxMargin_megawatt_dc_withLoopFlows.json | 4 +- .../RaoParameters_posMargin_ampere.json | 3 +- ...ameters_posMargin_ampere_withFallback.json | 3 +- .../RaoParameters_posMargin_megawatt_ac.json | 3 +- .../RaoParameters_posMargin_megawatt_dc.json | 3 +- .../RaoParameters_securityAnalysis.json | 3 +- .../RaoParameters_simple_AC_loopflow.json | 3 +- .../RaoParameters_relMargin_megawatt.json | 4 +- .../epic10/conf_ep10us2case1.json | 4 +- .../epic10/conf_ep10us2case2.json | 4 +- .../epic10/conf_ep10us3case1.json | 4 +- .../epic10/conf_ep10us4case1.json | 4 +- ...rs_maxMargin_megawatt_ac_mnecDimin180.json | 4 +- ...ers_maxMargin_megawatt_ac_mnecDimin20.json | 4 +- ...rs_posMargin_ampere_mnecDiminMinusInf.json | 3 +- .../raoParametersSweIDCC_minObjective.json | 4 +- ...ametersSweIDCC_minObjectiveDisabled2P.json | 4 +- ...etersSweIDCC_minObjectiveWithGlobal2P.json | 4 +- .../epic13/RaoParameters_13_6_11.json | 2 +- .../epic13/RaoParameters_13_6_2.json | 4 +- ...ameters_best_preventive_by_300_secure.json | 2 +- .../RaoParameters_best_preventive_by_500.json | 2 +- .../RaoParameters_best_preventive_by_628.json | 2 +- .../epic13/RaoParameters_ep13us6case8.json | 4 +- .../epic13/RaoParameters_ep13us7case6.json | 4 +- ...Parameters_maxMargin_ampere_2p_global.json | 4 +- ...s_maxMargin_ampere_absolute_threshold.json | 4 +- ...axMargin_ampere_absolute_threshold_12.json | 4 +- .../RaoParameters_relMargin_ampere.json | 4 +- ...arameters_stop_curative_at_preventive.json | 2 +- .../epic15/RaoParameters_ep15us11-2.json | 3 +- .../epic15/RaoParameters_ep15us11-4.json | 4 +- .../epic15/RaoParameters_ep15us11-5-1.json | 4 +- .../epic15/RaoParameters_ep15us11-5-2.json | 3 +- .../epic15/RaoParameters_ep15us11-5-3-3.json | 4 +- .../epic15/RaoParameters_ep15us13case1.json | 4 +- .../epic15/RaoParameters_ep15us13case10.json | 4 +- .../epic15/RaoParameters_ep15us13case2.json | 4 +- .../epic15/RaoParameters_ep15us13case5.json | 4 +- .../epic15/RaoParameters_ep15us13case6.json | 4 +- .../epic15/RaoParameters_ep15us13case7.json | 4 +- .../epic15/RaoParameters_ep15us13case8.json | 4 +- .../epic15/RaoParameters_ep15us17case10.json | 3 +- .../epic15/RaoParameters_ep15us17case11.json | 3 +- .../epic15/RaoParameters_ep15us17case12.json | 4 +- .../epic15/RaoParameters_ep15us17case2.json | 3 +- .../epic15/RaoParameters_ep15us17case6.json | 3 +- .../epic15/RaoParameters_ep15us7-2.json | 7 ++ .../raoParametersSweIDCC_withoutPsts.json | 3 +- .../epic19/RaoParameters_19_10_10&11.json | 4 +- .../epic19/RaoParameters_19_11_9.json | 4 +- .../epic19/RaoParameters_19_11_9_bis.json | 4 +- .../epic19/RaoParameters_dc_discrete.json | 4 +- ...oParameters_maxMargin_ampere_shareCra.json | 4 +- ...arameters_maxMargin_megawatt_shareCra.json | 4 +- ...rameters_maxRelMargin_ampere_shareCra.json | 4 +- ...ters_maxRelMargin_ampere_shareCra_mip.json | 4 +- ...meters_maxRelMargin_megawatt_shareCra.json | 4 +- ...rs_maxRelMargin_megawatt_shareCra_mip.json | 4 +- .../epic20/RaoParameters_20_4.json | 2 +- .../epic20/RaoParameters_20_6_1.json | 4 +- .../epic20/RaoParameters_20_6_2.json | 4 +- ...ameters_maxMargin_MW_DC_withLF_with2P.json | 2 +- ..._maxMargin_ampere_2p_if_cost_increase.json | 4 +- ...maxMargin_ampere_forbid_cost_increase.json | 4 +- ...rs_maxMargin_ampere_second_preventive.json | 4 +- ...meters_posMargin_ampere_ac_divergence.json | 3 +- ...gin_ampere_withFallback_ac_divergence.json | 4 +- ...re_withFallback_differentFallbackCost.json | 3 +- ...meters_maxMargin_absoluteMinImpact190.json | 4 +- ...meters_maxMargin_absoluteMinImpact195.json | 4 +- .../RaoParameters_maxMargin_maxDepth.json | 4 +- ...arameters_maxMargin_relativeMinImpact.json | 4 +- ...eters_maxMargin_mw_ac_lf_false_10_100.json | 4 +- ...meters_maxMargin_mw_ac_lf_false_5_100.json | 4 +- ..._maxMargin_mw_ac_lf_false_5_100_BE_NL.json | 4 +- ...ers_maxMargin_mw_ac_lf_false_5_100_NL.json | 4 +- ...n_mw_ac_lf_false_5_100_lfAugmentation.json | 4 +- ...ameters_maxMargin_mw_ac_lf_true_5_100.json | 4 +- ...ers_maxMargin_mw_dc_lf_accurate_5_100.json | 4 +- ...eters_maxMargin_mw_dc_lf_false_10_100.json | 4 +- ...meters_maxMargin_mw_dc_lf_false_5_100.json | 4 +- ...rs_maxMargin_mw_dc_lf_inBetween_5_100.json | 4 +- .../RaoParameters_case_91_12_search_tree.json | 4 +- .../RaoParameters_case_91_12_secure.json | 3 +- ...RaoParameters_case_91_12_secure_2PRAO.json | 3 +- .../epic91/RaoParameters_case_91_13_1.json | 3 +- .../epic91/RaoParameters_case_91_1_1.json | 3 +- .../epic91/RaoParameters_case_91_1_12.json | 4 +- .../epic91/RaoParameters_case_91_1_3.json | 4 +- .../epic91/RaoParameters_case_91_1_6.json | 3 +- .../epic91/RaoParameters_case_91_1_7.json | 3 +- .../RaoParameters_interrupt_search_tree.json | 3 +- ...eters_interrupt_search_tree_2_threads.json | 3 +- ...meters_maxMargin_mw_ac_lf_false_3_100.json | 4 +- ...rs_maxMargin_mw_ac_lf_false_3_100_mip.json | 4 +- ...rameters_maxMargin_ampere_highPSTcost.json | 4 +- 137 files changed, 367 insertions(+), 515 deletions(-) delete mode 100644 ra-optimisation/rao-api/src/test/resources/RaoParametersWithCurStopCriterionError_v2.json create mode 100644 tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us7-2.json diff --git a/docs/parameters.md b/docs/parameters.md index 926f485e48..b9cd8e0051 100644 --- a/docs/parameters.md +++ b/docs/parameters.md @@ -51,34 +51,13 @@ These parameters (objective-function) configure the remedial action optimisation - **SECURE**: the search-tree will stop as soon as it finds a solution where the minimum margin is positive. *Note: if the best possible minimum margin is negative, both stop criterion will return the same solution.* -#### curative-stop-criterion -- **Expected value**: one of the following: - - "MIN_OBJECTIVE" - - "SECURE" - - "PREVENTIVE_OBJECTIVE" - - "PREVENTIVE_OBJECTIVE_AND_SECURE" -- **Default value**: "MIN_OBJECTIVE" -- **Usage**: stop criterion for the curative RAO search-tree. - - **MIN_OBJECTIVE**: the search-tree will maximize the minimum margin until it converges to a - maximum value, or until another stop criterion has been reached (e.g. [max-curative-search-tree-depth](#max-curative-search-tree-depth)). - - **SECURE**: the search-tree will stop as soon as it finds a solution where the minimum margin is positive. - - **PREVENTIVE_OBJECTIVE**: the search-tree will stop as soon as the preventive RAO's objective value is reached, - and improved by at least ["curative-rao-min-obj-improvement"](#curative-min-obj-improvement). - - **PREVENTIVE_OBJECTIVE_AND_SECURE**: the search-tree will stop as soon as the preventive RAO's objective value is - reached, and improved by at least ["curative-rao-min-obj-improvement"](#curative-min-obj-improvement), and all - margins are positive. - - *The values "PREVENTIVE_OBJECTIVE" and "PREVENTIVE_OBJECTIVE_AND_SECURE" allow you to speed up the curative RAO - without deteriorating the final solution (minimum margin over all perimeters). However, using them means the flow-based - domain is not maximised for all perimeters.* - #### curative-min-obj-improvement - **Expected value**: numeric value, where the unit is that of the objective function - **Default value**: 0 - **Usage**: used as a minimum improvement of the preventive RAO objective value for the curative RAO stop criterion, when it is set to PREVENTIVE_OBJECTIVE or PREVENTIVE_OBJECTIVE_AND_SECURE. -#### optimize-curative-if-preventive-unsecure +#### enforce-curative-security - **Expected value**: true/false - **Default value**: false - **Usage**: if this parameter is set to true, OpenRAO will continue optimizing curative states even if preventive state @@ -314,7 +293,7 @@ These parameters (second-preventive-rao) tune the behaviour of the [second preve during curative RAO - **POSSIBLE_CURATIVE_IMPROVEMENT**: a 2nd preventive RAO is run only if it is possible to improve a curative perimeter, i.e. if the curative RAO stop criterion on at least one contingency is not reached. - This depends on the value of parameter [curative-stop-criterion](#curative-stop-criterion): + This depends on the value of parameter [preventive-stop-criterion](#preventive-stop-criterion): - **SECURE**: 2nd preventive RAO is run if one curative perimeter is not secure after optimisation - **PREVENTIVE_OBJECTIVE**: 2nd preventive RAO is run if one curative perimeter reached an objective function value after optimisation that is worse than the preventive perimeter's (decreased by [curative-min-obj-improvement](#curative-min-obj-improvement)) @@ -575,8 +554,7 @@ Zones are seperated by + or -. "type" : "MAX_MIN_RELATIVE_MARGIN_IN_AMPERE", "curative-min-obj-improvement" : 0.0, "preventive-stop-criterion" : "SECURE", - "curative-stop-criterion" : "PREVENTIVE_OBJECTIVE", - "optimize-curative-if-preventive-unsecure" : true + "enforce-curative-security" : true }, "range-actions-optimization" : { "max-mip-iterations" : 5, @@ -693,7 +671,6 @@ Based on PowSyBl's [configuration mechanism](inv:powsyblcore:std:doc#user/config rao-objective-function: type: MAX_MIN_MARGIN_IN_AMPERE preventive-stop-criterion: SECURE - curative-stop-criterion: SECURE rao-range-actions-optimization: max-mip-iterations: 5 diff --git a/python-util/rao_parameter_modification.py b/python-util/rao_parameter_modification.py index 55a3acac51..a7f709ab6d 100644 --- a/python-util/rao_parameter_modification.py +++ b/python-util/rao_parameter_modification.py @@ -6,35 +6,114 @@ import os import json +from json import JSONDecodeError +import yaml -root_directory = os.path.join(os.getcwd(), "..") +current_directory = os.getcwd() +tag_by_file_type = {"json": "objective-function", "yaml": "rao-objective-function"} + def rao_parameters_file(file_path): correct_version = False - obj_fun = False - if file_path.endswith(".json") or file_path.endswith(".yml"): + score = 0 + if "target" not in file_path and (file_path.endswith(".json") or file_path.endswith(".yml")): + ftype = "json" if file_path.endswith(".json") else "yaml" with open(os.path.join(dirpath, filename), 'r') as file: for line in file: - if "objective-function" in line: - obj_fun = True if '"version" : "2.4"' in line or '"version" : "2.5"' in line: correct_version = True - if correct_version and obj_fun: + if tag_by_file_type[ftype] in line: + score += 1 + if "MAX_MIN_MARGIN_IN" in line or "MAX_MIN_RELATIVE_MARGIN_IN" in line: + score += 1 + if correct_version and score >= 2: return True return False +def read_data(file_path) -> tuple[dict, str]: + if file_path.endswith(".json"): + with open(file_path, 'r') as file: + try: + return json.load(file), "json" + except JSONDecodeError as je: + print("in file " + file_path) + raise je + if file_path.endswith(".yml"): + with open(file_path, 'r') as file: + return yaml.safe_load(file), "yaml" # ["rao-parameters"] + +def extract_leading_whitespace(line): + leading_whitespace = "" + for char in line: + if char.isspace(): + leading_whitespace += char + else: + break + return leading_whitespace + +def write_data(new_data, file_path, file_type): + with open(file_path, 'r') as file: + lines = file.readlines() + lines_to_write = [] + inside_obj_fun_to_replace = False + for line in lines: + if tag_by_file_type[file_type] in line and tag_by_file_type[file_type] in new_data: + leading_whitespace = extract_leading_whitespace(line) + inside_obj_fun_to_replace = True + if inside_obj_fun_to_replace and ((file_type == "json" and "}" in line) or (file_type == "yaml" and line == "\n")): + obj_fun_str = f'"{tag_by_file_type[file_type]}" : ' + obj_function_as_str_lines(new_data, file_type) + for new_line in obj_fun_str.splitlines(True): + lines_to_write.append(leading_whitespace + new_line) + inside_obj_fun_to_replace = False + elif not inside_obj_fun_to_replace: + lines_to_write.append(line) + with open(file_path, 'w') as file: + file.writelines(lines_to_write) + + +def obj_function_as_str_lines(new_data, file_type): + if file_type == "json": + return json.dumps(new_data[tag_by_file_type[file_type]], indent=2, separators=(',', ' : ')) + ',\n' + else: + return yaml.dump(new_data[tag_by_file_type[file_type]], default_flow_style=False) + '\n' + + + +def new_rao_param(data: dict, file_path: str, file_type: str) -> dict: + try: + old_obj_fun = data[tag_by_file_type[file_type]] + new_obj_fun = {} + for key in old_obj_fun: + if key not in ("curative-stop-criterion", "optimize-curative-if-preventive-unsecure"): + new_obj_fun[key] = old_obj_fun[key] + prev_secure = "preventive-stop-criterion" not in old_obj_fun or old_obj_fun["preventive-stop-criterion"] == "SECURE" + if prev_secure: + if "optimize-curative-if-preventive-unsecure" in old_obj_fun: + new_obj_fun["enforce-curative-security"] = old_obj_fun["optimize-curative-if-preventive-unsecure"] + else: + cur_secure = "curative-stop-criterion" in old_obj_fun and old_obj_fun["curative-stop-criterion"] in ("SECURE", "PREVENTIVE_OBJECTIVE_AND_SECURE") + if cur_secure: + new_obj_fun["enforce-curative-security"] = True + else: + new_obj_fun["enforce-curative-security"] = False + cur_min = "curative-stop-criterion" in old_obj_fun and old_obj_fun["curative-stop-criterion"] == "MIN_OBJECTIVE" + if cur_min: + new_obj_fun["curative-min-obj-improvement"] = 10000.0 + (old_obj_fun["curative-min-obj-improvement"] if "curative-min-obj-improvement" in old_obj_fun else 0.0) + except KeyError as ke: + raise KeyError("in file " + file_path) from ke + data[tag_by_file_type[file_type]] = new_obj_fun + return data + + -for dirpath, dirnames, filenames in os.walk(root_directory): - for filename in filenames: - file_path = os.path.join(dirpath, filename) - if rao_parameters_file(file_path): - print("file to change : " + file_path) - lines = None - if file_path.endswith(".json"): - with open(file_path, 'r') as file: - lines = file.readlines() - lines = [line.replace('"version" : "2.4"', '"version" : "2.5"') for line in lines if "forbid-cost-increase" not in line] - if lines is not None: - with open(file_path, 'w') as file: - file.writelines(lines) +if __name__ == "__main__": + base_dir = os.path.join(current_directory, "..") + print(base_dir) + for dirpath, dirnames, filenames in os.walk(base_dir): + for filename in filenames: + file_path = os.path.join(dirpath, filename) + if rao_parameters_file(file_path): + data, file_type = read_data(file_path) + new_rao_params = new_rao_param(data, file_path, file_type) + write_data(new_rao_params, file_path, file_type) diff --git a/ra-optimisation/rao-api/src/main/java/com/powsybl/openrao/raoapi/RaoParametersCommons.java b/ra-optimisation/rao-api/src/main/java/com/powsybl/openrao/raoapi/RaoParametersCommons.java index 35a0261247..fa0bcae7af 100644 --- a/ra-optimisation/rao-api/src/main/java/com/powsybl/openrao/raoapi/RaoParametersCommons.java +++ b/ra-optimisation/rao-api/src/main/java/com/powsybl/openrao/raoapi/RaoParametersCommons.java @@ -27,8 +27,7 @@ private RaoParametersCommons() { public static final String TYPE = "type"; public static final String CURATIVE_MIN_OBJ_IMPROVEMENT = "curative-min-obj-improvement"; public static final String PREVENTIVE_STOP_CRITERION = "preventive-stop-criterion"; - public static final String CURATIVE_STOP_CRITERION = "curative-stop-criterion"; - public static final String OPTIMIZE_CURATIVE_IF_PREVENTIVE_UNSECURE = "optimize-curative-if-preventive-unsecure"; + public static final String ENFORCE_CURATIVE_SECURITY = "enforce-curative-security"; // range actions optimization parameters public static final String RANGE_ACTIONS_OPTIMIZATION = "range-actions-optimization"; diff --git a/ra-optimisation/rao-api/src/main/java/com/powsybl/openrao/raoapi/json/JsonObjectiveFunctionParameters.java b/ra-optimisation/rao-api/src/main/java/com/powsybl/openrao/raoapi/json/JsonObjectiveFunctionParameters.java index af4ae6b069..34f8a0809d 100644 --- a/ra-optimisation/rao-api/src/main/java/com/powsybl/openrao/raoapi/json/JsonObjectiveFunctionParameters.java +++ b/ra-optimisation/rao-api/src/main/java/com/powsybl/openrao/raoapi/json/JsonObjectiveFunctionParameters.java @@ -28,9 +28,8 @@ static void serialize(RaoParameters parameters, JsonGenerator jsonGenerator) thr jsonGenerator.writeObjectFieldStart(OBJECTIVE_FUNCTION); jsonGenerator.writeObjectField(TYPE, parameters.getObjectiveFunctionParameters().getType()); jsonGenerator.writeObjectField(PREVENTIVE_STOP_CRITERION, parameters.getObjectiveFunctionParameters().getPreventiveStopCriterion()); - jsonGenerator.writeObjectField(CURATIVE_STOP_CRITERION, parameters.getObjectiveFunctionParameters().getCurativeStopCriterion()); jsonGenerator.writeNumberField(CURATIVE_MIN_OBJ_IMPROVEMENT, parameters.getObjectiveFunctionParameters().getCurativeMinObjImprovement()); - jsonGenerator.writeBooleanField(OPTIMIZE_CURATIVE_IF_PREVENTIVE_UNSECURE, parameters.getObjectiveFunctionParameters().getOptimizeCurativeIfPreventiveUnsecure()); + jsonGenerator.writeBooleanField(ENFORCE_CURATIVE_SECURITY, parameters.getObjectiveFunctionParameters().getEnforceCurativeSecurity()); jsonGenerator.writeEndObject(); } @@ -43,16 +42,13 @@ static void deserialize(JsonParser jsonParser, RaoParameters raoParameters) thro case PREVENTIVE_STOP_CRITERION: raoParameters.getObjectiveFunctionParameters().setPreventiveStopCriterion(stringToPreventiveStopCriterion(jsonParser.nextTextValue())); break; - case CURATIVE_STOP_CRITERION: - raoParameters.getObjectiveFunctionParameters().setCurativeStopCriterion(stringToCurativeStopCriterion(jsonParser.nextTextValue())); - break; case CURATIVE_MIN_OBJ_IMPROVEMENT: jsonParser.nextToken(); raoParameters.getObjectiveFunctionParameters().setCurativeMinObjImprovement(jsonParser.getValueAsDouble()); break; - case OPTIMIZE_CURATIVE_IF_PREVENTIVE_UNSECURE: + case ENFORCE_CURATIVE_SECURITY: jsonParser.nextToken(); - raoParameters.getObjectiveFunctionParameters().setOptimizeCurativeIfPreventiveUnsecure(jsonParser.getBooleanValue()); + raoParameters.getObjectiveFunctionParameters().setEnforceCurativeSecurity(jsonParser.getBooleanValue()); break; default: throw new OpenRaoException(String.format("Cannot deserialize objective function parameters: unexpected field in %s (%s)", OBJECTIVE_FUNCTION, jsonParser.getCurrentName())); @@ -76,12 +72,4 @@ private static ObjectiveFunctionParameters.PreventiveStopCriterion stringToPreve } } - private static ObjectiveFunctionParameters.CurativeStopCriterion stringToCurativeStopCriterion(String string) { - try { - return ObjectiveFunctionParameters.CurativeStopCriterion.valueOf(string); - } catch (IllegalArgumentException e) { - throw new OpenRaoException(String.format("Unknown curative stop criterion: %s", string)); - } - } - } diff --git a/ra-optimisation/rao-api/src/main/java/com/powsybl/openrao/raoapi/parameters/ObjectiveFunctionParameters.java b/ra-optimisation/rao-api/src/main/java/com/powsybl/openrao/raoapi/parameters/ObjectiveFunctionParameters.java index 2b0aee4dca..133d4217d6 100644 --- a/ra-optimisation/rao-api/src/main/java/com/powsybl/openrao/raoapi/parameters/ObjectiveFunctionParameters.java +++ b/ra-optimisation/rao-api/src/main/java/com/powsybl/openrao/raoapi/parameters/ObjectiveFunctionParameters.java @@ -24,14 +24,12 @@ public class ObjectiveFunctionParameters { private static final ObjectiveFunctionType DEFAULT_OBJECTIVE_FUNCTION = ObjectiveFunctionType.MAX_MIN_MARGIN_IN_MEGAWATT; private static final double DEFAULT_CURATIVE_MIN_OBJ_IMPROVEMENT = 0; private static final PreventiveStopCriterion DEFAULT_PREVENTIVE_STOP_CRITERION = PreventiveStopCriterion.SECURE; - private static final CurativeStopCriterion DEFAULT_CURATIVE_STOP_CRITERION = CurativeStopCriterion.MIN_OBJECTIVE; - private static final boolean DEFAULT_OPTIMIZE_CURATIVE_IF_PREVENTIVE_UNSECURE = false; + private static final boolean DEFAULT_ENFORCE_CURATIVE_SECURITY = false; // Attributes private ObjectiveFunctionType type = DEFAULT_OBJECTIVE_FUNCTION; private double curativeMinObjImprovement = DEFAULT_CURATIVE_MIN_OBJ_IMPROVEMENT; private PreventiveStopCriterion preventiveStopCriterion = DEFAULT_PREVENTIVE_STOP_CRITERION; - private CurativeStopCriterion curativeStopCriterion = DEFAULT_CURATIVE_STOP_CRITERION; - private boolean optimizeCurativeIfPreventiveUnsecure = DEFAULT_OPTIMIZE_CURATIVE_IF_PREVENTIVE_UNSECURE; + private boolean enforceCurativeSecurity = DEFAULT_ENFORCE_CURATIVE_SECURITY; // Enum public enum ObjectiveFunctionType { @@ -60,13 +58,6 @@ public enum PreventiveStopCriterion { SECURE } - public enum CurativeStopCriterion { - MIN_OBJECTIVE, // only stop after minimizing objective - SECURE, //stop when objective is strictly negative - PREVENTIVE_OBJECTIVE, // stop when preventive objective is reached, or bested by curativeRaoMinObjImprovement - PREVENTIVE_OBJECTIVE_AND_SECURE // stop when preventive objective is reached or bested by curativeRaoMinObjImprovement, and the situation is secure - } - // Getters and setters public ObjectiveFunctionType getType() { return type; @@ -88,20 +79,12 @@ public PreventiveStopCriterion getPreventiveStopCriterion() { return preventiveStopCriterion; } - public CurativeStopCriterion getCurativeStopCriterion() { - return curativeStopCriterion; - } - - public void setCurativeStopCriterion(CurativeStopCriterion curativeStopCriterion) { - this.curativeStopCriterion = curativeStopCriterion; - } - - public boolean getOptimizeCurativeIfPreventiveUnsecure() { - return optimizeCurativeIfPreventiveUnsecure; + public boolean getEnforceCurativeSecurity() { + return enforceCurativeSecurity; } - public void setOptimizeCurativeIfPreventiveUnsecure(boolean optimizeCurativeIfPreventiveUnsecure) { - this.optimizeCurativeIfPreventiveUnsecure = optimizeCurativeIfPreventiveUnsecure; + public void setEnforceCurativeSecurity(boolean enforceCurativeSecurity) { + this.enforceCurativeSecurity = enforceCurativeSecurity; } public static ObjectiveFunctionParameters load(PlatformConfig platformConfig) { @@ -114,9 +97,7 @@ public static ObjectiveFunctionParameters load(PlatformConfig platformConfig) { parameters.setCurativeMinObjImprovement(config.getDoubleProperty(CURATIVE_MIN_OBJ_IMPROVEMENT, DEFAULT_CURATIVE_MIN_OBJ_IMPROVEMENT)); parameters.setPreventiveStopCriterion(config.getEnumProperty(PREVENTIVE_STOP_CRITERION, PreventiveStopCriterion.class, DEFAULT_PREVENTIVE_STOP_CRITERION)); - parameters.setCurativeStopCriterion(config.getEnumProperty(CURATIVE_STOP_CRITERION, CurativeStopCriterion.class, - DEFAULT_CURATIVE_STOP_CRITERION)); - parameters.setOptimizeCurativeIfPreventiveUnsecure(config.getBooleanProperty(OPTIMIZE_CURATIVE_IF_PREVENTIVE_UNSECURE, DEFAULT_OPTIMIZE_CURATIVE_IF_PREVENTIVE_UNSECURE)); + parameters.setEnforceCurativeSecurity(config.getBooleanProperty(ENFORCE_CURATIVE_SECURITY, DEFAULT_ENFORCE_CURATIVE_SECURITY)); }); return parameters; } diff --git a/ra-optimisation/rao-api/src/test/java/com/powsybl/openrao/raoapi/json/JsonRaoParametersTest.java b/ra-optimisation/rao-api/src/test/java/com/powsybl/openrao/raoapi/json/JsonRaoParametersTest.java index 27d7fdfdef..1894204992 100644 --- a/ra-optimisation/rao-api/src/test/java/com/powsybl/openrao/raoapi/json/JsonRaoParametersTest.java +++ b/ra-optimisation/rao-api/src/test/java/com/powsybl/openrao/raoapi/json/JsonRaoParametersTest.java @@ -54,9 +54,8 @@ void roundTrip() throws IOException { // Objective Function parameters parameters.getObjectiveFunctionParameters().setType(ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_MARGIN_IN_AMPERE); parameters.getObjectiveFunctionParameters().setPreventiveStopCriterion(ObjectiveFunctionParameters.PreventiveStopCriterion.MIN_OBJECTIVE); - parameters.getObjectiveFunctionParameters().setCurativeStopCriterion(ObjectiveFunctionParameters.CurativeStopCriterion.PREVENTIVE_OBJECTIVE_AND_SECURE); parameters.getObjectiveFunctionParameters().setCurativeMinObjImprovement(983); - parameters.getObjectiveFunctionParameters().setOptimizeCurativeIfPreventiveUnsecure(true); + parameters.getObjectiveFunctionParameters().setEnforceCurativeSecurity(true); // RangeActionsOptimization parameters parameters.getRangeActionsOptimizationParameters().setMaxMipIterations(30); parameters.getRangeActionsOptimizationParameters().setPstPenaltyCost(10); @@ -176,7 +175,7 @@ void testFailOnOldVersion() { } @ParameterizedTest - @ValueSource(strings = {"LoopFlowError", "PrevStopCriterionError", "CurStopCriterionError", "WrongField"}) + @ValueSource(strings = {"LoopFlowError", "PrevStopCriterionError", "WrongField"}) void importNokTest(String source) { InputStream inputStream = getClass().getResourceAsStream("/RaoParametersWith" + source + "_v2.json"); assertThrows(OpenRaoException.class, () -> JsonRaoParameters.read(inputStream)); diff --git a/ra-optimisation/rao-api/src/test/java/com/powsybl/openrao/raoapi/parameters/RaoParametersConfigTest.java b/ra-optimisation/rao-api/src/test/java/com/powsybl/openrao/raoapi/parameters/RaoParametersConfigTest.java index 90ad9a330d..6383571cc9 100644 --- a/ra-optimisation/rao-api/src/test/java/com/powsybl/openrao/raoapi/parameters/RaoParametersConfigTest.java +++ b/ra-optimisation/rao-api/src/test/java/com/powsybl/openrao/raoapi/parameters/RaoParametersConfigTest.java @@ -25,6 +25,7 @@ /** * @author Godelaine de Montmorillon {@literal } */ + class RaoParametersConfigTest { private PlatformConfig mockedPlatformConfig; private InMemoryPlatformConfig platformCfg; @@ -43,8 +44,7 @@ void checkObjectiveFunctionConfig() { objectiveFunctionModuleConfig.setStringProperty("type", "MAX_MIN_RELATIVE_MARGIN_IN_AMPERE"); objectiveFunctionModuleConfig.setStringProperty("curative-min-obj-improvement", Objects.toString(123.0)); objectiveFunctionModuleConfig.setStringProperty("preventive-stop-criterion", "MIN_OBJECTIVE"); - objectiveFunctionModuleConfig.setStringProperty("curative-stop-criterion", "PREVENTIVE_OBJECTIVE"); - objectiveFunctionModuleConfig.setStringProperty("optimize-curative-if-preventive-unsecure", "true"); + objectiveFunctionModuleConfig.setStringProperty("enforce-curative-security", "false"); RaoParameters parameters = new RaoParameters(); RaoParameters.load(parameters, platformCfg); @@ -52,8 +52,7 @@ void checkObjectiveFunctionConfig() { assertEquals(ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_RELATIVE_MARGIN_IN_AMPERE, objectiveFunctionParameters.getType()); assertEquals(123, objectiveFunctionParameters.getCurativeMinObjImprovement(), DOUBLE_TOLERANCE); assertEquals(ObjectiveFunctionParameters.PreventiveStopCriterion.MIN_OBJECTIVE, objectiveFunctionParameters.getPreventiveStopCriterion()); - assertEquals(ObjectiveFunctionParameters.CurativeStopCriterion.PREVENTIVE_OBJECTIVE, objectiveFunctionParameters.getCurativeStopCriterion()); - assertTrue(objectiveFunctionParameters.getOptimizeCurativeIfPreventiveUnsecure()); + assertFalse(objectiveFunctionParameters.getEnforceCurativeSecurity()); } @Test diff --git a/ra-optimisation/rao-api/src/test/java/com/powsybl/openrao/raoapi/parameters/RaoParametersYamlConfigTest.java b/ra-optimisation/rao-api/src/test/java/com/powsybl/openrao/raoapi/parameters/RaoParametersYamlConfigTest.java index ef6b62e36f..776e9999e8 100644 --- a/ra-optimisation/rao-api/src/test/java/com/powsybl/openrao/raoapi/parameters/RaoParametersYamlConfigTest.java +++ b/ra-optimisation/rao-api/src/test/java/com/powsybl/openrao/raoapi/parameters/RaoParametersYamlConfigTest.java @@ -27,6 +27,7 @@ /** * @author Godelaine de Montmorillon {@literal } */ + class RaoParametersYamlConfigTest extends AbstractSerDeTest { static final double DOUBLE_TOLERANCE = 1e-6; @@ -45,7 +46,7 @@ void testConfigWithExtensions() throws IOException { assertEquals(ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_MARGIN_IN_AMPERE, objectiveFunctionParameters.getType()); assertEquals(3, objectiveFunctionParameters.getCurativeMinObjImprovement(), DOUBLE_TOLERANCE); assertEquals(ObjectiveFunctionParameters.PreventiveStopCriterion.MIN_OBJECTIVE, objectiveFunctionParameters.getPreventiveStopCriterion()); - assertEquals(ObjectiveFunctionParameters.CurativeStopCriterion.PREVENTIVE_OBJECTIVE, objectiveFunctionParameters.getCurativeStopCriterion()); + assertFalse(objectiveFunctionParameters.getEnforceCurativeSecurity()); RangeActionsOptimizationParameters rangeActionsOptimizationParameters = parameters.getRangeActionsOptimizationParameters(); assertEquals(2, rangeActionsOptimizationParameters.getMaxMipIterations(), DOUBLE_TOLERANCE); @@ -127,8 +128,7 @@ void testConfigWithoutExtensions() throws IOException { assertEquals(ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_MARGIN_IN_AMPERE, objectiveFunctionParameters.getType()); assertEquals(3, objectiveFunctionParameters.getCurativeMinObjImprovement(), DOUBLE_TOLERANCE); assertEquals(ObjectiveFunctionParameters.PreventiveStopCriterion.MIN_OBJECTIVE, objectiveFunctionParameters.getPreventiveStopCriterion()); - assertEquals(ObjectiveFunctionParameters.CurativeStopCriterion.PREVENTIVE_OBJECTIVE, objectiveFunctionParameters.getCurativeStopCriterion()); - assertTrue(objectiveFunctionParameters.getOptimizeCurativeIfPreventiveUnsecure()); + assertFalse(objectiveFunctionParameters.getEnforceCurativeSecurity()); RangeActionsOptimizationParameters rangeActionsOptimizationParameters = parameters.getRangeActionsOptimizationParameters(); assertEquals(2, rangeActionsOptimizationParameters.getMaxMipIterations(), DOUBLE_TOLERANCE); @@ -197,7 +197,7 @@ void testConfigWithPartialExtensions() throws IOException { assertEquals(ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_MARGIN_IN_MEGAWATT, objectiveFunctionParameters.getType()); assertEquals(3, objectiveFunctionParameters.getCurativeMinObjImprovement(), DOUBLE_TOLERANCE); assertEquals(ObjectiveFunctionParameters.PreventiveStopCriterion.MIN_OBJECTIVE, objectiveFunctionParameters.getPreventiveStopCriterion()); - assertEquals(ObjectiveFunctionParameters.CurativeStopCriterion.PREVENTIVE_OBJECTIVE, objectiveFunctionParameters.getCurativeStopCriterion()); + assertFalse(objectiveFunctionParameters.getEnforceCurativeSecurity()); RangeActionsOptimizationParameters rangeActionsOptimizationParameters = parameters.getRangeActionsOptimizationParameters(); assertEquals(10, rangeActionsOptimizationParameters.getMaxMipIterations(), DOUBLE_TOLERANCE); diff --git a/ra-optimisation/rao-api/src/test/resources/RaoParametersSet_v2.json b/ra-optimisation/rao-api/src/test/resources/RaoParametersSet_v2.json index 0422d7c1e6..30c532ab6c 100644 --- a/ra-optimisation/rao-api/src/test/resources/RaoParametersSet_v2.json +++ b/ra-optimisation/rao-api/src/test/resources/RaoParametersSet_v2.json @@ -3,9 +3,8 @@ "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_AMPERE", "preventive-stop-criterion" : "MIN_OBJECTIVE", - "curative-stop-criterion" : "PREVENTIVE_OBJECTIVE_AND_SECURE", "curative-min-obj-improvement" : 983.0, - "optimize-curative-if-preventive-unsecure" : true + "enforce-curative-security" : true }, "range-actions-optimization" : { "max-mip-iterations" : 30, diff --git a/ra-optimisation/rao-api/src/test/resources/RaoParametersWithCurStopCriterionError_v2.json b/ra-optimisation/rao-api/src/test/resources/RaoParametersWithCurStopCriterionError_v2.json deleted file mode 100644 index ecdda18e3e..0000000000 --- a/ra-optimisation/rao-api/src/test/resources/RaoParametersWithCurStopCriterionError_v2.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "version" : "2.5", - "objective-function" : { - "type" : "MAX_MIN_MARGIN_IN_MEGAWATT", - "preventive-stop-criterion" : "WRONG", - "curative-stop-criterion" : "MIN_OBJECTIVE", - "curative-min-obj-improvement" : 0.0 - }, - "range-actions-optimization" : { - "max-mip-iterations" : 10, - "pst-penalty-cost" : 0.01, - "pst-sensitivity-threshold" : 1.0E-6, - "pst-model" : "CONTINUOUS", - "hvdc-penalty-cost" : 0.001, - "hvdc-sensitivity-threshold" : 1.0E-6, - "injection-ra-penalty-cost" : 0.001, - "injection-ra-sensitivity-threshold" : 1.0E-6, - "linear-optimization-solver" : { - "solver" : "CBC", - "relative-mip-gap" : 1.0E-4, - "solver-specific-parameters" : null - } - }, - "topological-actions-optimization" : { - "max-preventive-search-tree-depth" : 2147483647, - "max-auto-search-tree-depth" : 2147483647, - "max-curative-search-tree-depth" : 2147483647, - "predefined-combinations" : [ ], - "relative-minimum-impact-threshold" : 0.0, - "absolute-minimum-impact-threshold" : 0.0, - "skip-actions-far-from-most-limiting-element" : false, - "max-number-of-boundaries-for-skipping-actions" : 2 - }, - "second-preventive-rao" : { - "execution-condition" : "DISABLED", - "re-optimize-curative-range-actions" : false, - "hint-from-first-preventive-rao" : false - }, - "not-optimized-cnecs" : { - "do-not-optimize-curative-cnecs-for-tsos-without-cras" : false - }, - "load-flow-and-sensitivity-computation" : { - "load-flow-provider" : "OpenLoadFlow", - "sensitivity-provider" : "OpenLoadFlow", - "sensitivity-failure-overcost" : 10000.0, - "sensitivity-parameters" : { - "version" : "1.0", - "load-flow-parameters" : { - "version" : "1.8", - "voltageInitMode" : "UNIFORM_VALUES", - "transformerVoltageControlOn" : false, - "phaseShifterRegulationOn" : false, - "useReactiveLimits" : true, - "twtSplitShuntAdmittance" : false, - "shuntCompensatorVoltageControlOn" : false, - "readSlackBus" : true, - "writeSlackBus" : true, - "dc" : false, - "distributedSlack" : true, - "balanceType" : "PROPORTIONAL_TO_GENERATION_P_MAX", - "dcUseTransformerRatio" : true, - "countriesToBalance" : [ ], - "connectedComponentMode" : "MAIN", - "hvdcAcEmulation" : true - } - } - }, - "multi-threading" : { - "contingency-scenarios-in-parallel" : 1, - "preventive-leaves-in-parallel" : 1, - "auto-leaves-in-parallel" : 1, - "curative-leaves-in-parallel" : 1 - }, - "extensions" : { - "loop-flow-parameters" : { - "acceptable-increase" : 0.0, - "ptdf-approximation" : "FIXED_PTDF", - "constraint-adjustment-coefficient" : 0.0, - "violation-cost" : 0.0, - "countries" : [ ] - } - } -} \ No newline at end of file diff --git a/ra-optimisation/rao-api/src/test/resources/RaoParametersWithExtension_v2.json b/ra-optimisation/rao-api/src/test/resources/RaoParametersWithExtension_v2.json index 299d44dcb6..800323d649 100644 --- a/ra-optimisation/rao-api/src/test/resources/RaoParametersWithExtension_v2.json +++ b/ra-optimisation/rao-api/src/test/resources/RaoParametersWithExtension_v2.json @@ -3,9 +3,8 @@ "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_MEGAWATT", "preventive-stop-criterion" : "SECURE", - "curative-stop-criterion" : "MIN_OBJECTIVE", "curative-min-obj-improvement" : 0.0, - "optimize-curative-if-preventive-unsecure" : false + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 10, diff --git a/ra-optimisation/rao-api/src/test/resources/RaoParametersWithLoopFlowError_v2.json b/ra-optimisation/rao-api/src/test/resources/RaoParametersWithLoopFlowError_v2.json index 1ffbec315d..ebbbf7e5c8 100644 --- a/ra-optimisation/rao-api/src/test/resources/RaoParametersWithLoopFlowError_v2.json +++ b/ra-optimisation/rao-api/src/test/resources/RaoParametersWithLoopFlowError_v2.json @@ -3,7 +3,6 @@ "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_MEGAWATT", "preventive-stop-criterion" : "SECURE", - "curative-stop-criterion" : "MIN_OBJECTIVE", "curative-min-obj-improvement" : 0.0 }, "range-actions-optimization" : { diff --git a/ra-optimisation/rao-api/src/test/resources/RaoParametersWithPrevStopCriterionError_v2.json b/ra-optimisation/rao-api/src/test/resources/RaoParametersWithPrevStopCriterionError_v2.json index 8f4fba3851..d15bec1b7e 100644 --- a/ra-optimisation/rao-api/src/test/resources/RaoParametersWithPrevStopCriterionError_v2.json +++ b/ra-optimisation/rao-api/src/test/resources/RaoParametersWithPrevStopCriterionError_v2.json @@ -2,8 +2,7 @@ "version" : "2.5", "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_MEGAWATT", - "preventive-stop-criterion" : "SECURE", - "curative-stop-criterion" : "WRONG", + "preventive-stop-criterion" : "WRONG", "curative-min-obj-improvement" : 0.0 }, "range-actions-optimization" : { diff --git a/ra-optimisation/rao-api/src/test/resources/RaoParametersWithWrongField_v2.json b/ra-optimisation/rao-api/src/test/resources/RaoParametersWithWrongField_v2.json index d9e9896e4d..9f8e1a8dfb 100644 --- a/ra-optimisation/rao-api/src/test/resources/RaoParametersWithWrongField_v2.json +++ b/ra-optimisation/rao-api/src/test/resources/RaoParametersWithWrongField_v2.json @@ -3,7 +3,6 @@ "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_MEGAWATT", "preventive-stop-criterion" : "SECURE", - "curative-stop-criterion" : "MIN_OBJECTIVE", "curative-min-obj-improvement" : 0.0 }, "range-actions-optimization" : { diff --git a/ra-optimisation/rao-api/src/test/resources/RaoParameters_config_withExtensions.json b/ra-optimisation/rao-api/src/test/resources/RaoParameters_config_withExtensions.json index adbd34a32e..66b09077ba 100644 --- a/ra-optimisation/rao-api/src/test/resources/RaoParameters_config_withExtensions.json +++ b/ra-optimisation/rao-api/src/test/resources/RaoParameters_config_withExtensions.json @@ -3,9 +3,8 @@ "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_AMPERE", "preventive-stop-criterion" : "MIN_OBJECTIVE", - "curative-stop-criterion" : "PREVENTIVE_OBJECTIVE", "curative-min-obj-improvement" : 3.0, - "optimize-curative-if-preventive-unsecure" : false + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 2, diff --git a/ra-optimisation/rao-api/src/test/resources/RaoParameters_config_withOLFParams.json b/ra-optimisation/rao-api/src/test/resources/RaoParameters_config_withOLFParams.json index d2c0f17e04..5bba5b5e63 100644 --- a/ra-optimisation/rao-api/src/test/resources/RaoParameters_config_withOLFParams.json +++ b/ra-optimisation/rao-api/src/test/resources/RaoParameters_config_withOLFParams.json @@ -3,9 +3,8 @@ "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_MEGAWATT", "preventive-stop-criterion" : "SECURE", - "curative-stop-criterion" : "MIN_OBJECTIVE", "curative-min-obj-improvement" : 0.0, - "optimize-curative-if-preventive-unsecure" : false + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 10, diff --git a/ra-optimisation/rao-api/src/test/resources/RaoParameters_config_withPartialExtensions.json b/ra-optimisation/rao-api/src/test/resources/RaoParameters_config_withPartialExtensions.json index 6f26d8e352..e0c79ea5c8 100644 --- a/ra-optimisation/rao-api/src/test/resources/RaoParameters_config_withPartialExtensions.json +++ b/ra-optimisation/rao-api/src/test/resources/RaoParameters_config_withPartialExtensions.json @@ -3,9 +3,8 @@ "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_MEGAWATT", "preventive-stop-criterion" : "MIN_OBJECTIVE", - "curative-stop-criterion" : "PREVENTIVE_OBJECTIVE", "curative-min-obj-improvement" : 3.0, - "optimize-curative-if-preventive-unsecure" : false + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 10, diff --git a/ra-optimisation/rao-api/src/test/resources/RaoParameters_config_withoutExtensions.json b/ra-optimisation/rao-api/src/test/resources/RaoParameters_config_withoutExtensions.json index fabde397b7..252c132c93 100644 --- a/ra-optimisation/rao-api/src/test/resources/RaoParameters_config_withoutExtensions.json +++ b/ra-optimisation/rao-api/src/test/resources/RaoParameters_config_withoutExtensions.json @@ -3,9 +3,8 @@ "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_AMPERE", "preventive-stop-criterion" : "MIN_OBJECTIVE", - "curative-stop-criterion" : "PREVENTIVE_OBJECTIVE", "curative-min-obj-improvement" : 3.0, - "optimize-curative-if-preventive-unsecure" : true + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 2, diff --git a/ra-optimisation/rao-api/src/test/resources/RaoParameters_update_v2.json b/ra-optimisation/rao-api/src/test/resources/RaoParameters_update_v2.json index 34c57510e4..071ce5977c 100644 --- a/ra-optimisation/rao-api/src/test/resources/RaoParameters_update_v2.json +++ b/ra-optimisation/rao-api/src/test/resources/RaoParameters_update_v2.json @@ -2,7 +2,8 @@ "version" : "2.5", "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_MEGAWATT", - "preventive-stop-criterion" : "MIN_OBJECTIVE" + "preventive-stop-criterion" : "MIN_OBJECTIVE", + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 5, diff --git a/ra-optimisation/rao-api/src/test/resources/RaoParameters_v2.json b/ra-optimisation/rao-api/src/test/resources/RaoParameters_v2.json index c05a509bd9..b9782070b1 100644 --- a/ra-optimisation/rao-api/src/test/resources/RaoParameters_v2.json +++ b/ra-optimisation/rao-api/src/test/resources/RaoParameters_v2.json @@ -3,9 +3,8 @@ "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_MEGAWATT", "preventive-stop-criterion" : "SECURE", - "curative-stop-criterion" : "MIN_OBJECTIVE", "curative-min-obj-improvement" : 0.0, - "optimize-curative-if-preventive-unsecure" : false + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 10, diff --git a/ra-optimisation/rao-api/src/test/resources/config_withExtensions.yml b/ra-optimisation/rao-api/src/test/resources/config_withExtensions.yml index f2413d6201..dda8abd801 100644 --- a/ra-optimisation/rao-api/src/test/resources/config_withExtensions.yml +++ b/ra-optimisation/rao-api/src/test/resources/config_withExtensions.yml @@ -1,7 +1,6 @@ rao-objective-function: type: MAX_MIN_MARGIN_IN_AMPERE preventive-stop-criterion: MIN_OBJECTIVE - curative-stop-criterion: PREVENTIVE_OBJECTIVE curative-min-obj-improvement: 3.0 rao-range-actions-optimization: diff --git a/ra-optimisation/rao-api/src/test/resources/config_withPartialExtensions.yml b/ra-optimisation/rao-api/src/test/resources/config_withPartialExtensions.yml index 53a2794f9e..3a37e14d7e 100644 --- a/ra-optimisation/rao-api/src/test/resources/config_withPartialExtensions.yml +++ b/ra-optimisation/rao-api/src/test/resources/config_withPartialExtensions.yml @@ -1,6 +1,5 @@ rao-objective-function: preventive-stop-criterion: MIN_OBJECTIVE - curative-stop-criterion: PREVENTIVE_OBJECTIVE curative-min-obj-improvement: 3.0 rao-range-actions-optimization: diff --git a/ra-optimisation/rao-api/src/test/resources/config_withoutExtensions.yml b/ra-optimisation/rao-api/src/test/resources/config_withoutExtensions.yml index 229f5ada7e..e0d7d35028 100644 --- a/ra-optimisation/rao-api/src/test/resources/config_withoutExtensions.yml +++ b/ra-optimisation/rao-api/src/test/resources/config_withoutExtensions.yml @@ -1,9 +1,8 @@ rao-objective-function: type: MAX_MIN_MARGIN_IN_AMPERE preventive-stop-criterion: MIN_OBJECTIVE - curative-stop-criterion: PREVENTIVE_OBJECTIVE curative-min-obj-improvement: 3.0 - optimize-curative-if-preventive-unsecure: true + enforce-curative-security: false rao-range-actions-optimization: max-mip-iterations: 2 diff --git a/ra-optimisation/search-tree-rao/src/main/java/com/powsybl/openrao/searchtreerao/castor/algorithm/CastorFullOptimization.java b/ra-optimisation/search-tree-rao/src/main/java/com/powsybl/openrao/searchtreerao/castor/algorithm/CastorFullOptimization.java index 8dd0911580..1a793d5335 100644 --- a/ra-optimisation/search-tree-rao/src/main/java/com/powsybl/openrao/searchtreerao/castor/algorithm/CastorFullOptimization.java +++ b/ra-optimisation/search-tree-rao/src/main/java/com/powsybl/openrao/searchtreerao/castor/algorithm/CastorFullOptimization.java @@ -181,8 +181,8 @@ public CompletableFuture run() { private boolean shouldStopOptimisationIfPreventiveUnsecure(double preventiveOptimalCost) { return raoParameters.getObjectiveFunctionParameters().getPreventiveStopCriterion().equals(ObjectiveFunctionParameters.PreventiveStopCriterion.SECURE) - && preventiveOptimalCost > 0 - && !raoParameters.getObjectiveFunctionParameters().getOptimizeCurativeIfPreventiveUnsecure(); + && preventiveOptimalCost > 0 + && !raoParameters.getObjectiveFunctionParameters().getEnforceCurativeSecurity(); } /** @@ -202,8 +202,8 @@ private boolean secondPreventiveImprovesResults(RaoResult secondPreventiveRaoRes double secondPreventiveCost = secondPreventiveRaoResults.getCost(curativeInstant); if (secondPreventiveCost > firstPreventiveCost) { BUSINESS_LOGS.info("Second preventive step has increased the overall cost from {} (functional: {}, virtual: {}) to {} (functional: {}, virtual: {}). Falling back to previous solution:", - formatDoubleBasedOnMargin(firstPreventiveCost, -firstPreventiveCost), formatDoubleBasedOnMargin(mergedRaoResults.getFunctionalCost(curativeInstant), -firstPreventiveCost), formatDoubleBasedOnMargin(mergedRaoResults.getVirtualCost(curativeInstant), -firstPreventiveCost), - formatDoubleBasedOnMargin(secondPreventiveCost, -secondPreventiveCost), formatDoubleBasedOnMargin(secondPreventiveRaoResults.getFunctionalCost(curativeInstant), -secondPreventiveCost), formatDoubleBasedOnMargin(secondPreventiveRaoResults.getVirtualCost(curativeInstant), -secondPreventiveCost)); + formatDoubleBasedOnMargin(firstPreventiveCost, -firstPreventiveCost), formatDoubleBasedOnMargin(mergedRaoResults.getFunctionalCost(curativeInstant), -firstPreventiveCost), formatDoubleBasedOnMargin(mergedRaoResults.getVirtualCost(curativeInstant), -firstPreventiveCost), + formatDoubleBasedOnMargin(secondPreventiveCost, -secondPreventiveCost), formatDoubleBasedOnMargin(secondPreventiveRaoResults.getFunctionalCost(curativeInstant), -secondPreventiveCost), formatDoubleBasedOnMargin(secondPreventiveRaoResults.getVirtualCost(curativeInstant), -secondPreventiveCost)); return false; } return true; diff --git a/ra-optimisation/search-tree-rao/src/main/java/com/powsybl/openrao/searchtreerao/castor/algorithm/CastorSecondPreventive.java b/ra-optimisation/search-tree-rao/src/main/java/com/powsybl/openrao/searchtreerao/castor/algorithm/CastorSecondPreventive.java index 58fbb2c1bb..97072ea6f5 100644 --- a/ra-optimisation/search-tree-rao/src/main/java/com/powsybl/openrao/searchtreerao/castor/algorithm/CastorSecondPreventive.java +++ b/ra-optimisation/search-tree-rao/src/main/java/com/powsybl/openrao/searchtreerao/castor/algorithm/CastorSecondPreventive.java @@ -95,30 +95,20 @@ boolean shouldRunSecondPreventiveRao(OptimizationResult firstPreventiveResult, C // only compare initial cost with the curative costs return false; } - if (raoParameters.getObjectiveFunctionParameters().getPreventiveStopCriterion().equals(ObjectiveFunctionParameters.PreventiveStopCriterion.SECURE) - && firstPreventiveResult.getCost() > 0) { - // in case of curative optimization even if preventive unsecure (see parameter optimize-curative-if-preventive-unsecure) - // we do not want to run a second preventive that would not be able to fix the situation, to save time - BUSINESS_LOGS.info("First preventive RAO was not able to fix all preventive constraints, second preventive RAO cancelled to save computation time."); - return false; + ObjectiveFunctionParameters.PreventiveStopCriterion preventiveStopCriterion = raoParameters.getObjectiveFunctionParameters().getPreventiveStopCriterion(); + if (preventiveStopCriterion.equals(ObjectiveFunctionParameters.PreventiveStopCriterion.SECURE)) { + if (firstPreventiveResult.getCost() > 0) { + // in case of curative optimization even if preventive unsecure (see parameter enforce-curative-security) + // we do not want to run a second preventive that would not be able to fix the situation, to save time + BUSINESS_LOGS.info("First preventive RAO was not able to fix all preventive constraints, second preventive RAO cancelled to save computation time."); + return false; + } + // Run 2nd preventive RAO if one perimeter of the curative optimization is unsecure + return isAnyResultUnsecure(curativeRaoResults); + } else { // MIN_OBJECTIVE + // Run 2nd preventive RAO if the final result has a worse cost than the preventive perimeter + return isFinalCostWorseThanPreventive(raoParameters.getObjectiveFunctionParameters().getCurativeMinObjImprovement(), firstPreventiveResult, postFirstRaoResult, lastCurativeInstant); } - ObjectiveFunctionParameters.CurativeStopCriterion curativeStopCriterion = raoParameters.getObjectiveFunctionParameters().getCurativeStopCriterion(); - return switch (curativeStopCriterion) { - case MIN_OBJECTIVE -> - // Run 2nd preventive RAO in all cases - true; - case SECURE -> - // Run 2nd preventive RAO if one perimeter of the curative optimization is unsecure - isAnyResultUnsecure(curativeRaoResults); - case PREVENTIVE_OBJECTIVE -> - // Run 2nd preventive RAO if the final result has a worse cost than the preventive perimeter - isFinalCostWorseThanPreventive(raoParameters.getObjectiveFunctionParameters().getCurativeMinObjImprovement(), firstPreventiveResult, postFirstRaoResult, lastCurativeInstant); - case PREVENTIVE_OBJECTIVE_AND_SECURE -> - // Run 2nd preventive RAO if the final result has a worse cost than the preventive perimeter or is unsecure - isAnyResultUnsecure(curativeRaoResults) || isFinalCostWorseThanPreventive(raoParameters.getObjectiveFunctionParameters().getCurativeMinObjImprovement(), firstPreventiveResult, postFirstRaoResult, lastCurativeInstant); - default -> - throw new OpenRaoException(String.format("Unknown curative RAO stop criterion: %s", curativeStopCriterion)); - }; } /** diff --git a/ra-optimisation/search-tree-rao/src/main/java/com/powsybl/openrao/searchtreerao/commons/parameters/TreeParameters.java b/ra-optimisation/search-tree-rao/src/main/java/com/powsybl/openrao/searchtreerao/commons/parameters/TreeParameters.java index 300af61bb1..256bbab297 100644 --- a/ra-optimisation/search-tree-rao/src/main/java/com/powsybl/openrao/searchtreerao/commons/parameters/TreeParameters.java +++ b/ra-optimisation/search-tree-rao/src/main/java/com/powsybl/openrao/searchtreerao/commons/parameters/TreeParameters.java @@ -53,27 +53,20 @@ public static TreeParameters buildForAutomatonPerimeter(RaoParameters parameters } public static TreeParameters buildForCurativePerimeter(RaoParameters parameters, Double preventiveOptimizedCost) { - StopCriterion stopCriterion; + StopCriterion stopCriterion = StopCriterion.AT_TARGET_OBJECTIVE_VALUE; double targetObjectiveValue; - switch (parameters.getObjectiveFunctionParameters().getCurativeStopCriterion()) { + switch (parameters.getObjectiveFunctionParameters().getPreventiveStopCriterion()) { case MIN_OBJECTIVE: - stopCriterion = StopCriterion.MIN_OBJECTIVE; - targetObjectiveValue = 0.0; + targetObjectiveValue = preventiveOptimizedCost - parameters.getObjectiveFunctionParameters().getCurativeMinObjImprovement(); + if (parameters.getObjectiveFunctionParameters().getEnforceCurativeSecurity()) { + targetObjectiveValue = Math.min(targetObjectiveValue, 0); + } break; case SECURE: - stopCriterion = StopCriterion.AT_TARGET_OBJECTIVE_VALUE; targetObjectiveValue = 0.0; break; - case PREVENTIVE_OBJECTIVE: - stopCriterion = StopCriterion.AT_TARGET_OBJECTIVE_VALUE; - targetObjectiveValue = preventiveOptimizedCost - parameters.getObjectiveFunctionParameters().getCurativeMinObjImprovement(); - break; - case PREVENTIVE_OBJECTIVE_AND_SECURE: - stopCriterion = StopCriterion.AT_TARGET_OBJECTIVE_VALUE; - targetObjectiveValue = Math.min(preventiveOptimizedCost - parameters.getObjectiveFunctionParameters().getCurativeMinObjImprovement(), 0); - break; default: - throw new OpenRaoException("Unknown curative stop criterion: " + parameters.getObjectiveFunctionParameters().getCurativeStopCriterion()); + throw new OpenRaoException("Unknown preventive stop criterion: " + parameters.getObjectiveFunctionParameters().getPreventiveStopCriterion()); } RangeActionsOptimizationParameters.RaRangeShrinking raRangeShrinking = parameters.getRangeActionsOptimizationParameters().getRaRangeShrinking(); boolean shouldShrinkRaRange = raRangeShrinking.equals(RangeActionsOptimizationParameters.RaRangeShrinking.ENABLED_IN_FIRST_PRAO_AND_CRAO) || @@ -87,8 +80,7 @@ public static TreeParameters buildForCurativePerimeter(RaoParameters parameters, public static TreeParameters buildForSecondPreventivePerimeter(RaoParameters parameters) { boolean raRangeShrinking = parameters.getRangeActionsOptimizationParameters().getRaRangeShrinking().equals(RangeActionsOptimizationParameters.RaRangeShrinking.ENABLED); - if (parameters.getObjectiveFunctionParameters().getPreventiveStopCriterion().equals(ObjectiveFunctionParameters.PreventiveStopCriterion.SECURE) - && !parameters.getObjectiveFunctionParameters().getCurativeStopCriterion().equals(ObjectiveFunctionParameters.CurativeStopCriterion.MIN_OBJECTIVE)) { + if (parameters.getObjectiveFunctionParameters().getPreventiveStopCriterion().equals(ObjectiveFunctionParameters.PreventiveStopCriterion.SECURE)) { return new TreeParameters(StopCriterion.AT_TARGET_OBJECTIVE_VALUE, 0.0, // secure parameters.getTopoOptimizationParameters().getMaxPreventiveSearchTreeDepth(), diff --git a/ra-optimisation/search-tree-rao/src/test/java/com/powsybl/openrao/searchtreerao/castor/algorithm/CastorFullOptimizationTest.java b/ra-optimisation/search-tree-rao/src/test/java/com/powsybl/openrao/searchtreerao/castor/algorithm/CastorFullOptimizationTest.java index 0b29e01552..135c15d3da 100644 --- a/ra-optimisation/search-tree-rao/src/test/java/com/powsybl/openrao/searchtreerao/castor/algorithm/CastorFullOptimizationTest.java +++ b/ra-optimisation/search-tree-rao/src/test/java/com/powsybl/openrao/searchtreerao/castor/algorithm/CastorFullOptimizationTest.java @@ -473,7 +473,7 @@ void curativeOptimizationShouldNotBeDoneIfPreventiveUnsecure() throws IOExceptio RaoParameters raoParameters = JsonRaoParameters.read(getClass().getResourceAsStream("/parameters/RaoParameters_2P_v2.json")); raoParameters.getObjectiveFunctionParameters().setPreventiveStopCriterion(ObjectiveFunctionParameters.PreventiveStopCriterion.SECURE); - raoParameters.getObjectiveFunctionParameters().setOptimizeCurativeIfPreventiveUnsecure(false); + raoParameters.getObjectiveFunctionParameters().setEnforceCurativeSecurity(false); // Run RAO RaoResult raoResult = new CastorFullOptimization(raoInput, raoParameters, null).run().join(); @@ -488,7 +488,7 @@ void curativeOptimizationShouldBeDoneIfPreventiveSecure() throws IOException { RaoParameters raoParameters = JsonRaoParameters.read(getClass().getResourceAsStream("/parameters/RaoParameters_2P_v2.json")); raoParameters.getObjectiveFunctionParameters().setPreventiveStopCriterion(ObjectiveFunctionParameters.PreventiveStopCriterion.SECURE); - raoParameters.getObjectiveFunctionParameters().setOptimizeCurativeIfPreventiveUnsecure(false); + raoParameters.getObjectiveFunctionParameters().setEnforceCurativeSecurity(false); // Run RAO RaoResult raoResult = new CastorFullOptimization(raoInput, raoParameters, null).run().join(); @@ -502,7 +502,7 @@ void curativeOptimizationShouldBeDoneIfPreventiveMinMarginNegative() throws IOEx RaoInput raoInput = RaoInput.build(network, crac).build(); RaoParameters raoParameters = JsonRaoParameters.read(getClass().getResourceAsStream("/parameters/RaoParameters_2P_v2.json")); - raoParameters.getObjectiveFunctionParameters().setOptimizeCurativeIfPreventiveUnsecure(false); + raoParameters.getObjectiveFunctionParameters().setEnforceCurativeSecurity(false); // Run RAO RaoResult raoResult = new CastorFullOptimization(raoInput, raoParameters, null).run().join(); @@ -517,7 +517,7 @@ void curativeOptimizationShouldBeDoneIfPreventiveUnsecureAndAssociatedParameterS RaoParameters raoParameters = JsonRaoParameters.read(getClass().getResourceAsStream("/parameters/RaoParameters_2P_v2.json")); raoParameters.getObjectiveFunctionParameters().setPreventiveStopCriterion(ObjectiveFunctionParameters.PreventiveStopCriterion.SECURE); - raoParameters.getObjectiveFunctionParameters().setOptimizeCurativeIfPreventiveUnsecure(true); + raoParameters.getObjectiveFunctionParameters().setEnforceCurativeSecurity(true); // Run RAO RaoResult raoResult = new CastorFullOptimization(raoInput, raoParameters, null).run().join(); @@ -532,7 +532,7 @@ void curativeOptimizationShouldBeDoneIfPreventiveSecureAndAssociatedParameterSet RaoParameters raoParameters = JsonRaoParameters.read(getClass().getResourceAsStream("/parameters/RaoParameters_2P_v2.json")); raoParameters.getObjectiveFunctionParameters().setPreventiveStopCriterion(ObjectiveFunctionParameters.PreventiveStopCriterion.SECURE); - raoParameters.getObjectiveFunctionParameters().setOptimizeCurativeIfPreventiveUnsecure(true); + raoParameters.getObjectiveFunctionParameters().setEnforceCurativeSecurity(true); // Run RAO RaoResult raoResult = new CastorFullOptimization(raoInput, raoParameters, null).run().join(); @@ -546,7 +546,7 @@ void curativeOptimizationShouldBeDoneIfPreventiveMinMarginNegativeAndAssociatedP RaoInput raoInput = RaoInput.build(network, crac).build(); RaoParameters raoParameters = JsonRaoParameters.read(getClass().getResourceAsStream("/parameters/RaoParameters_2P_v2.json")); - raoParameters.getObjectiveFunctionParameters().setOptimizeCurativeIfPreventiveUnsecure(true); + raoParameters.getObjectiveFunctionParameters().setEnforceCurativeSecurity(true); // Run RAO RaoResult raoResult = new CastorFullOptimization(raoInput, raoParameters, null).run().join(); @@ -560,7 +560,7 @@ void curativeStopCriterionReachedSkipsPerimeterBuilding() throws IOException { RaoInput raoInput = RaoInput.build(network, crac).build(); RaoParameters raoParameters = JsonRaoParameters.read(getClass().getResourceAsStream("/parameters/RaoParameters_secure.json")); - raoParameters.getObjectiveFunctionParameters().setOptimizeCurativeIfPreventiveUnsecure(true); + raoParameters.getObjectiveFunctionParameters().setEnforceCurativeSecurity(true); // Run RAO, if not skipping, then tap to -15, since skipping, it stays at preventive optimization value (-12) RaoResult raoResult = new CastorFullOptimization(raoInput, raoParameters, null).run().join(); diff --git a/ra-optimisation/search-tree-rao/src/test/java/com/powsybl/openrao/searchtreerao/castor/algorithm/CastorSecondPreventiveTest.java b/ra-optimisation/search-tree-rao/src/test/java/com/powsybl/openrao/searchtreerao/castor/algorithm/CastorSecondPreventiveTest.java index 70962c9bde..4a46bb58b1 100644 --- a/ra-optimisation/search-tree-rao/src/test/java/com/powsybl/openrao/searchtreerao/castor/algorithm/CastorSecondPreventiveTest.java +++ b/ra-optimisation/search-tree-rao/src/test/java/com/powsybl/openrao/searchtreerao/castor/algorithm/CastorSecondPreventiveTest.java @@ -273,13 +273,9 @@ void testShouldRunSecondPreventiveRaoSimple() { parameters.getSecondPreventiveRaoParameters().setExecutionCondition(SecondPreventiveRaoParameters.ExecutionCondition.DISABLED); assertFalse(castorSecondPreventive.shouldRunSecondPreventiveRao(preventiveResult, curativeResults, null, 0)); - // CurativeStopCriterion.MIN_OBJECTIVE + // PreventiveStopCriterion.SECURE, secure case parameters.getSecondPreventiveRaoParameters().setExecutionCondition(SecondPreventiveRaoParameters.ExecutionCondition.POSSIBLE_CURATIVE_IMPROVEMENT); - parameters.getObjectiveFunctionParameters().setCurativeStopCriterion(ObjectiveFunctionParameters.CurativeStopCriterion.MIN_OBJECTIVE); - assertTrue(castorSecondPreventive.shouldRunSecondPreventiveRao(preventiveResult, curativeResults, null, 0)); - - // CurativeStopCriterion.SECURE, secure case - parameters.getObjectiveFunctionParameters().setCurativeStopCriterion(ObjectiveFunctionParameters.CurativeStopCriterion.SECURE); + parameters.getObjectiveFunctionParameters().setPreventiveStopCriterion(ObjectiveFunctionParameters.PreventiveStopCriterion.SECURE); Mockito.doReturn(-1.).when(optimizationResult1).getFunctionalCost(); Mockito.doReturn(-10.).when(optimizationResult2).getFunctionalCost(); Mockito.doReturn(0.).when(optimizationResult1).getVirtualCost(); @@ -318,8 +314,8 @@ void testShouldRunSecondPreventiveRaoAdvanced() { when(preventiveResult.getCost()).thenReturn(-500.); CastorSecondPreventive castorSecondPreventive = new CastorSecondPreventive(crac, parameters, network, null, null, null); - // CurativeStopCriterion.PREVENTIVE_OBJECTIVE - parameters.getObjectiveFunctionParameters().setCurativeStopCriterion(ObjectiveFunctionParameters.CurativeStopCriterion.PREVENTIVE_OBJECTIVE); + // PreventiveStopCriterion.MIN_OBJECTIVE + parameters.getObjectiveFunctionParameters().setPreventiveStopCriterion(ObjectiveFunctionParameters.PreventiveStopCriterion.MIN_OBJECTIVE); setCost(preventiveResult, -100.); // case 1 : final cost is better than preventive (cost < preventive cost - minObjImprovement) when(postFirstPreventiveRaoResult.getCost(curativeInstant)).thenReturn(-200.); @@ -330,30 +326,6 @@ void testShouldRunSecondPreventiveRaoAdvanced() { // case 3 : final cost > preventive cost - minObjImprovement when(postFirstPreventiveRaoResult.getCost(curativeInstant)).thenReturn(-109.); assertTrue(castorSecondPreventive.shouldRunSecondPreventiveRao(preventiveResult, curativeResults, postFirstPreventiveRaoResult, 0)); - - // CurativeStopCriterion.PREVENTIVE_OBJECTIVE_AND_SECURE - parameters.getObjectiveFunctionParameters().setCurativeStopCriterion(ObjectiveFunctionParameters.CurativeStopCriterion.PREVENTIVE_OBJECTIVE_AND_SECURE); - // case 1 : all curatives are better than preventive (cost <= preventive cost - minObjImprovement), SECURE - setCost(optimizationResult1, -200.); - setCost(optimizationResult2, -300.); - when(postFirstPreventiveRaoResult.getCost(curativeInstant)).thenReturn(-200.); - assertFalse(castorSecondPreventive.shouldRunSecondPreventiveRao(preventiveResult, curativeResults, postFirstPreventiveRaoResult, 0)); - setCost(optimizationResult1, -110.); - when(postFirstPreventiveRaoResult.getCost(curativeInstant)).thenReturn(-110.); - assertFalse(castorSecondPreventive.shouldRunSecondPreventiveRao(preventiveResult, curativeResults, postFirstPreventiveRaoResult, 0)); - // case 2 : all curatives are better than preventive (cost < preventive cost - minObjImprovement), UNSECURE - setCost(preventiveResult, -500.); - setCost(optimizationResult1, -200.); - when(postFirstPreventiveRaoResult.getCost(curativeInstant)).thenReturn(0.); - assertTrue(castorSecondPreventive.shouldRunSecondPreventiveRao(preventiveResult, curativeResults, postFirstPreventiveRaoResult, 0)); - setCost(optimizationResult1, 10.); - when(postFirstPreventiveRaoResult.getCost(curativeInstant)).thenReturn(10.); - assertTrue(castorSecondPreventive.shouldRunSecondPreventiveRao(preventiveResult, curativeResults, postFirstPreventiveRaoResult, 0)); - // case 3 : one curative has cost > preventive cost - minObjImprovement, SECURE - setCost(preventiveResult, -100.); - setCost(optimizationResult1, -109.); - when(postFirstPreventiveRaoResult.getCost(curativeInstant)).thenReturn(-109.); - assertTrue(castorSecondPreventive.shouldRunSecondPreventiveRao(preventiveResult, curativeResults, postFirstPreventiveRaoResult, 0)); } @Test @@ -365,7 +337,7 @@ void testShouldRunSecondPreventiveRaoTime() { Collection curativeResults = Set.of(optimizationResult1, optimizationResult2); parameters.getSecondPreventiveRaoParameters().setExecutionCondition(SecondPreventiveRaoParameters.ExecutionCondition.POSSIBLE_CURATIVE_IMPROVEMENT); - parameters.getObjectiveFunctionParameters().setCurativeStopCriterion(ObjectiveFunctionParameters.CurativeStopCriterion.MIN_OBJECTIVE); + // Default objective function parameters are enough for SecondPreventiveRaoParameters to be true if there is enough time CastorSecondPreventive castorSecondPreventive = new CastorSecondPreventive(crac, parameters, network, null, null, java.time.Instant.now().plusSeconds(200)); // Enough time @@ -386,7 +358,7 @@ void testShouldRunSecondPreventiveRaoCostIncrease() { Collection curativeResults = Set.of(optimizationResult1, optimizationResult2); parameters.getSecondPreventiveRaoParameters().setExecutionCondition(SecondPreventiveRaoParameters.ExecutionCondition.COST_INCREASE); - parameters.getObjectiveFunctionParameters().setCurativeStopCriterion(ObjectiveFunctionParameters.CurativeStopCriterion.MIN_OBJECTIVE); + // Default objective function parameters are enough for SecondPreventiveRaoParameters to be true if cost at curative allows it RaoResult postFirstRaoResult = Mockito.mock(RaoResult.class); when(postFirstRaoResult.getCost(null)).thenReturn(-100.); diff --git a/ra-optimisation/search-tree-rao/src/test/java/com/powsybl/openrao/searchtreerao/commons/parameters/TreeParametersTest.java b/ra-optimisation/search-tree-rao/src/test/java/com/powsybl/openrao/searchtreerao/commons/parameters/TreeParametersTest.java index 8c1f0eb3fe..060027af85 100644 --- a/ra-optimisation/search-tree-rao/src/test/java/com/powsybl/openrao/searchtreerao/commons/parameters/TreeParametersTest.java +++ b/ra-optimisation/search-tree-rao/src/test/java/com/powsybl/openrao/searchtreerao/commons/parameters/TreeParametersTest.java @@ -64,22 +64,9 @@ void testPreventive() { assertTrue(treeParameters.raRangeShrinking()); } - @Test - void testCurativeMinObjective() { - raoParameters.getObjectiveFunctionParameters().setCurativeStopCriterion(ObjectiveFunctionParameters.CurativeStopCriterion.MIN_OBJECTIVE); - raoParameters.getNotOptimizedCnecsParameters().setDoNotOptimizeCurativeCnecsForTsosWithoutCras(false); - raoParameters.getRangeActionsOptimizationParameters().setRaRangeShrinking(RangeActionsOptimizationParameters.RaRangeShrinking.DISABLED); - TreeParameters treeParameters = TreeParameters.buildForCurativePerimeter(raoParameters, 100.0); - - assertEquals(TreeParameters.StopCriterion.MIN_OBJECTIVE, treeParameters.stopCriterion()); - assertEquals(2, treeParameters.leavesInParallel()); - assertEquals(6, treeParameters.maximumSearchDepth()); - assertFalse(treeParameters.raRangeShrinking()); - } - @Test void testCurativeSecureStopCriterion() { - raoParameters.getObjectiveFunctionParameters().setCurativeStopCriterion(ObjectiveFunctionParameters.CurativeStopCriterion.SECURE); + raoParameters.getObjectiveFunctionParameters().setPreventiveStopCriterion(ObjectiveFunctionParameters.PreventiveStopCriterion.SECURE); raoParameters.getMultithreadingParameters().setCurativeLeavesInParallel(16); raoParameters.getRangeActionsOptimizationParameters().setRaRangeShrinking(RangeActionsOptimizationParameters.RaRangeShrinking.ENABLED_IN_FIRST_PRAO_AND_CRAO); TreeParameters treeParameters = TreeParameters.buildForCurativePerimeter(raoParameters, 100.0); @@ -93,7 +80,8 @@ void testCurativeSecureStopCriterion() { @Test void testCurativePreventiveObjectiveStopCriterion() { - raoParameters.getObjectiveFunctionParameters().setCurativeStopCriterion(ObjectiveFunctionParameters.CurativeStopCriterion.PREVENTIVE_OBJECTIVE); + raoParameters.getObjectiveFunctionParameters().setPreventiveStopCriterion(ObjectiveFunctionParameters.PreventiveStopCriterion.MIN_OBJECTIVE); + raoParameters.getObjectiveFunctionParameters().setEnforceCurativeSecurity(false); raoParameters.getObjectiveFunctionParameters().setCurativeMinObjImprovement(35); raoParameters.getTopoOptimizationParameters().setMaxPreventiveSearchTreeDepth(0); raoParameters.getTopoOptimizationParameters().setMaxAutoSearchTreeDepth(0); @@ -110,7 +98,8 @@ void testCurativePreventiveObjectiveStopCriterion() { @Test void testCurativePreventiveObjectiveAndSecureStopCriterion() { - raoParameters.getObjectiveFunctionParameters().setCurativeStopCriterion(ObjectiveFunctionParameters.CurativeStopCriterion.PREVENTIVE_OBJECTIVE_AND_SECURE); + raoParameters.getObjectiveFunctionParameters().setPreventiveStopCriterion(ObjectiveFunctionParameters.PreventiveStopCriterion.MIN_OBJECTIVE); + raoParameters.getObjectiveFunctionParameters().setEnforceCurativeSecurity(true); raoParameters.getObjectiveFunctionParameters().setCurativeMinObjImprovement(35); // limited by secure @@ -139,7 +128,7 @@ void testCurativePreventiveObjectiveAndSecureStopCriterion() { void testSecondPreventive() { // test with min objective raoParameters.getObjectiveFunctionParameters().setPreventiveStopCriterion(ObjectiveFunctionParameters.PreventiveStopCriterion.MIN_OBJECTIVE); - raoParameters.getObjectiveFunctionParameters().setCurativeStopCriterion(ObjectiveFunctionParameters.CurativeStopCriterion.MIN_OBJECTIVE); + raoParameters.getObjectiveFunctionParameters().setEnforceCurativeSecurity(false); raoParameters.getRangeActionsOptimizationParameters().setRaRangeShrinking(RangeActionsOptimizationParameters.RaRangeShrinking.DISABLED); TreeParameters treeParameters = TreeParameters.buildForSecondPreventivePerimeter(raoParameters); @@ -150,7 +139,7 @@ void testSecondPreventive() { // test with secure raoParameters.getObjectiveFunctionParameters().setPreventiveStopCriterion(ObjectiveFunctionParameters.PreventiveStopCriterion.SECURE); - raoParameters.getObjectiveFunctionParameters().setCurativeStopCriterion(ObjectiveFunctionParameters.CurativeStopCriterion.SECURE); + raoParameters.getObjectiveFunctionParameters().setEnforceCurativeSecurity(false); raoParameters.getRangeActionsOptimizationParameters().setRaRangeShrinking(RangeActionsOptimizationParameters.RaRangeShrinking.ENABLED_IN_FIRST_PRAO_AND_CRAO); treeParameters = TreeParameters.buildForSecondPreventivePerimeter(raoParameters); @@ -162,18 +151,18 @@ void testSecondPreventive() { // other combinations raoParameters.getObjectiveFunctionParameters().setPreventiveStopCriterion(ObjectiveFunctionParameters.PreventiveStopCriterion.SECURE); - raoParameters.getObjectiveFunctionParameters().setCurativeStopCriterion(ObjectiveFunctionParameters.CurativeStopCriterion.MIN_OBJECTIVE); + raoParameters.getObjectiveFunctionParameters().setEnforceCurativeSecurity(false); raoParameters.getRangeActionsOptimizationParameters().setRaRangeShrinking(RangeActionsOptimizationParameters.RaRangeShrinking.ENABLED); treeParameters = TreeParameters.buildForSecondPreventivePerimeter(raoParameters); - assertEquals(TreeParameters.StopCriterion.MIN_OBJECTIVE, treeParameters.stopCriterion()); + assertEquals(TreeParameters.StopCriterion.AT_TARGET_OBJECTIVE_VALUE, treeParameters.stopCriterion()); assertEquals(4, treeParameters.leavesInParallel()); assertEquals(6, treeParameters.maximumSearchDepth()); assertTrue(treeParameters.raRangeShrinking()); // still another combination raoParameters.getObjectiveFunctionParameters().setPreventiveStopCriterion(ObjectiveFunctionParameters.PreventiveStopCriterion.SECURE); - raoParameters.getObjectiveFunctionParameters().setCurativeStopCriterion(ObjectiveFunctionParameters.CurativeStopCriterion.PREVENTIVE_OBJECTIVE_AND_SECURE); + raoParameters.getObjectiveFunctionParameters().setEnforceCurativeSecurity(true); raoParameters.getMultithreadingParameters().setPreventiveLeavesInParallel(8); raoParameters.getTopoOptimizationParameters().setMaxPreventiveSearchTreeDepth(15); raoParameters.getTopoOptimizationParameters().setMaxAutoSearchTreeDepth(5); diff --git a/ra-optimisation/search-tree-rao/src/test/resources/parameters/RaoParameters_2P_v2.json b/ra-optimisation/search-tree-rao/src/test/resources/parameters/RaoParameters_2P_v2.json index 4bcc3ef4db..78ed0b746d 100644 --- a/ra-optimisation/search-tree-rao/src/test/resources/parameters/RaoParameters_2P_v2.json +++ b/ra-optimisation/search-tree-rao/src/test/resources/parameters/RaoParameters_2P_v2.json @@ -2,9 +2,9 @@ "version" : "2.5", "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_AMPERE", - "curative-min-obj-improvement" : 0.0, + "curative-min-obj-improvement" : 10000.0, "preventive-stop-criterion" : "MIN_OBJECTIVE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 5, diff --git a/ra-optimisation/search-tree-rao/src/test/resources/parameters/RaoParameters_DC.json b/ra-optimisation/search-tree-rao/src/test/resources/parameters/RaoParameters_DC.json index d5e79c99bd..7d97a8c79b 100644 --- a/ra-optimisation/search-tree-rao/src/test/resources/parameters/RaoParameters_DC.json +++ b/ra-optimisation/search-tree-rao/src/test/resources/parameters/RaoParameters_DC.json @@ -2,9 +2,9 @@ "version" : "2.5", "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_MEGAWATT", - "curative-min-obj-improvement" : 0.0, + "curative-min-obj-improvement" : 10000.0, "preventive-stop-criterion" : "MIN_OBJECTIVE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 5, diff --git a/ra-optimisation/search-tree-rao/src/test/resources/parameters/RaoParameters_oneIteration_v2.json b/ra-optimisation/search-tree-rao/src/test/resources/parameters/RaoParameters_oneIteration_v2.json index 38af7218b2..9a228dae04 100644 --- a/ra-optimisation/search-tree-rao/src/test/resources/parameters/RaoParameters_oneIteration_v2.json +++ b/ra-optimisation/search-tree-rao/src/test/resources/parameters/RaoParameters_oneIteration_v2.json @@ -2,9 +2,9 @@ "version" : "2.5", "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_AMPERE", - "curative-min-obj-improvement" : 0.0, + "curative-min-obj-improvement" : 10000.0, "preventive-stop-criterion" : "MIN_OBJECTIVE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 5, diff --git a/ra-optimisation/search-tree-rao/src/test/resources/parameters/RaoParameters_secure.json b/ra-optimisation/search-tree-rao/src/test/resources/parameters/RaoParameters_secure.json index ad65ede1cd..90c796da81 100644 --- a/ra-optimisation/search-tree-rao/src/test/resources/parameters/RaoParameters_secure.json +++ b/ra-optimisation/search-tree-rao/src/test/resources/parameters/RaoParameters_secure.json @@ -3,8 +3,7 @@ "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_MEGAWATT", "curative-min-obj-improvement" : 0.0, - "preventive-stop-criterion" : "SECURE", - "curative-stop-criterion" : "SECURE" + "preventive-stop-criterion" : "SECURE" }, "range-actions-optimization" : { "max-mip-iterations" : 5, diff --git a/tests/src/test/resources/com/powsybl/openrao/tests/features/epic15_specific_network_elements/US15_7.feature b/tests/src/test/resources/com/powsybl/openrao/tests/features/epic15_specific_network_elements/US15_7.feature index 22cbfb1074..974e79f278 100644 --- a/tests/src/test/resources/com/powsybl/openrao/tests/features/epic15_specific_network_elements/US15_7.feature +++ b/tests/src/test/resources/com/powsybl/openrao/tests/features/epic15_specific_network_elements/US15_7.feature @@ -17,6 +17,7 @@ Feature: US 15.7: Injection setpoint with absolute and relative target Scenario: US 15.7.2: Curative search tree RAO with absolute injectionSetpoint curative ra Given network file is "common/TestCase12Nodes.uct" Given crac file is "epic15/cse_crac_1_curative_ra.xml" + Given configuration file is "epic15/RaoParameters_ep15us7-2.json" When I launch search_tree_rao at "2021-04-30 22:30" Then 0 remedial actions are used in preventive And the remedial action "cra_1" is used after "outage_1" at "curative" diff --git a/tests/src/test/resources/files/configurations/common/RaoParameters_default.json b/tests/src/test/resources/files/configurations/common/RaoParameters_default.json index f45bccb8f6..54d5831edb 100644 --- a/tests/src/test/resources/files/configurations/common/RaoParameters_default.json +++ b/tests/src/test/resources/files/configurations/common/RaoParameters_default.json @@ -3,8 +3,7 @@ "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_MEGAWATT", "curative-min-obj-improvement" : 0.0, - "preventive-stop-criterion" : "SECURE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "preventive-stop-criterion" : "SECURE" }, "range-actions-optimization" : { "max-mip-iterations" : 5, diff --git a/tests/src/test/resources/files/configurations/common/RaoParameters_maxMargin_ampere.json b/tests/src/test/resources/files/configurations/common/RaoParameters_maxMargin_ampere.json index bd86a1b087..f946c1265c 100644 --- a/tests/src/test/resources/files/configurations/common/RaoParameters_maxMargin_ampere.json +++ b/tests/src/test/resources/files/configurations/common/RaoParameters_maxMargin_ampere.json @@ -2,9 +2,9 @@ "version" : "2.5", "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_AMPERE", - "curative-min-obj-improvement" : 0.0, + "curative-min-obj-improvement" : 10000.0, "preventive-stop-criterion" : "MIN_OBJECTIVE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 10, diff --git a/tests/src/test/resources/files/configurations/common/RaoParameters_maxMargin_ampere_mip.json b/tests/src/test/resources/files/configurations/common/RaoParameters_maxMargin_ampere_mip.json index 18aeb43ced..3a87baebe4 100644 --- a/tests/src/test/resources/files/configurations/common/RaoParameters_maxMargin_ampere_mip.json +++ b/tests/src/test/resources/files/configurations/common/RaoParameters_maxMargin_ampere_mip.json @@ -2,9 +2,9 @@ "version" : "2.5", "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_AMPERE", - "curative-min-obj-improvement" : 0.0, + "curative-min-obj-improvement" : 10000.0, "preventive-stop-criterion" : "MIN_OBJECTIVE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 10, diff --git a/tests/src/test/resources/files/configurations/common/RaoParameters_maxMargin_ampere_withFallback.json b/tests/src/test/resources/files/configurations/common/RaoParameters_maxMargin_ampere_withFallback.json index 11f37c9f79..909fefb026 100644 --- a/tests/src/test/resources/files/configurations/common/RaoParameters_maxMargin_ampere_withFallback.json +++ b/tests/src/test/resources/files/configurations/common/RaoParameters_maxMargin_ampere_withFallback.json @@ -2,9 +2,9 @@ "version" : "2.5", "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_AMPERE", - "curative-min-obj-improvement" : 0.0, + "curative-min-obj-improvement" : 10000.0, "preventive-stop-criterion" : "MIN_OBJECTIVE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 20, diff --git a/tests/src/test/resources/files/configurations/common/RaoParameters_maxMargin_megawatt_ac.json b/tests/src/test/resources/files/configurations/common/RaoParameters_maxMargin_megawatt_ac.json index 399f0e4823..2d2ea1f6d3 100644 --- a/tests/src/test/resources/files/configurations/common/RaoParameters_maxMargin_megawatt_ac.json +++ b/tests/src/test/resources/files/configurations/common/RaoParameters_maxMargin_megawatt_ac.json @@ -2,9 +2,9 @@ "version" : "2.5", "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_MEGAWATT", - "curative-min-obj-improvement" : 0.0, + "curative-min-obj-improvement" : 10000.0, "preventive-stop-criterion" : "MIN_OBJECTIVE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 10, diff --git a/tests/src/test/resources/files/configurations/common/RaoParameters_maxMargin_megawatt_dc.json b/tests/src/test/resources/files/configurations/common/RaoParameters_maxMargin_megawatt_dc.json index 17aa66eef2..7a2b0d023f 100644 --- a/tests/src/test/resources/files/configurations/common/RaoParameters_maxMargin_megawatt_dc.json +++ b/tests/src/test/resources/files/configurations/common/RaoParameters_maxMargin_megawatt_dc.json @@ -2,9 +2,9 @@ "version" : "2.5", "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_MEGAWATT", - "curative-min-obj-improvement" : 0.0, + "curative-min-obj-improvement" : 10000.0, "preventive-stop-criterion" : "MIN_OBJECTIVE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 10, diff --git a/tests/src/test/resources/files/configurations/common/RaoParameters_maxMargin_megawatt_dc_withLoopFlows.json b/tests/src/test/resources/files/configurations/common/RaoParameters_maxMargin_megawatt_dc_withLoopFlows.json index 04be142e7c..3bc0c4a84f 100644 --- a/tests/src/test/resources/files/configurations/common/RaoParameters_maxMargin_megawatt_dc_withLoopFlows.json +++ b/tests/src/test/resources/files/configurations/common/RaoParameters_maxMargin_megawatt_dc_withLoopFlows.json @@ -2,9 +2,9 @@ "version" : "2.5", "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_MEGAWATT", - "curative-min-obj-improvement" : 0.0, + "curative-min-obj-improvement" : 10000.0, "preventive-stop-criterion" : "MIN_OBJECTIVE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 10, diff --git a/tests/src/test/resources/files/configurations/common/RaoParameters_posMargin_ampere.json b/tests/src/test/resources/files/configurations/common/RaoParameters_posMargin_ampere.json index c9e2b82287..d5e1320257 100644 --- a/tests/src/test/resources/files/configurations/common/RaoParameters_posMargin_ampere.json +++ b/tests/src/test/resources/files/configurations/common/RaoParameters_posMargin_ampere.json @@ -3,8 +3,7 @@ "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_AMPERE", "curative-min-obj-improvement" : 0.0, - "preventive-stop-criterion" : "SECURE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "preventive-stop-criterion" : "SECURE" }, "range-actions-optimization" : { "max-mip-iterations" : 10, diff --git a/tests/src/test/resources/files/configurations/common/RaoParameters_posMargin_ampere_withFallback.json b/tests/src/test/resources/files/configurations/common/RaoParameters_posMargin_ampere_withFallback.json index fd487ecacc..70f96d7d9a 100644 --- a/tests/src/test/resources/files/configurations/common/RaoParameters_posMargin_ampere_withFallback.json +++ b/tests/src/test/resources/files/configurations/common/RaoParameters_posMargin_ampere_withFallback.json @@ -3,8 +3,7 @@ "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_AMPERE", "curative-min-obj-improvement" : 0.0, - "preventive-stop-criterion" : "SECURE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "preventive-stop-criterion" : "SECURE" }, "range-actions-optimization" : { "max-mip-iterations" : 20, diff --git a/tests/src/test/resources/files/configurations/common/RaoParameters_posMargin_megawatt_ac.json b/tests/src/test/resources/files/configurations/common/RaoParameters_posMargin_megawatt_ac.json index 5c6202fde6..72ceef349e 100644 --- a/tests/src/test/resources/files/configurations/common/RaoParameters_posMargin_megawatt_ac.json +++ b/tests/src/test/resources/files/configurations/common/RaoParameters_posMargin_megawatt_ac.json @@ -3,8 +3,7 @@ "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_MEGAWATT", "curative-min-obj-improvement" : 0.0, - "preventive-stop-criterion" : "SECURE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "preventive-stop-criterion" : "SECURE" }, "range-actions-optimization" : { "max-mip-iterations" : 10, diff --git a/tests/src/test/resources/files/configurations/common/RaoParameters_posMargin_megawatt_dc.json b/tests/src/test/resources/files/configurations/common/RaoParameters_posMargin_megawatt_dc.json index 039ccf7775..4f346521ea 100644 --- a/tests/src/test/resources/files/configurations/common/RaoParameters_posMargin_megawatt_dc.json +++ b/tests/src/test/resources/files/configurations/common/RaoParameters_posMargin_megawatt_dc.json @@ -3,8 +3,7 @@ "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_MEGAWATT", "curative-min-obj-improvement" : 0.0, - "preventive-stop-criterion" : "SECURE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "preventive-stop-criterion" : "SECURE" }, "range-actions-optimization" : { "max-mip-iterations" : 10, diff --git a/tests/src/test/resources/files/configurations/common/RaoParameters_securityAnalysis.json b/tests/src/test/resources/files/configurations/common/RaoParameters_securityAnalysis.json index 6e5f5c6f0e..337acd27a4 100644 --- a/tests/src/test/resources/files/configurations/common/RaoParameters_securityAnalysis.json +++ b/tests/src/test/resources/files/configurations/common/RaoParameters_securityAnalysis.json @@ -3,8 +3,7 @@ "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_AMPERE", "curative-min-obj-improvement" : 0.0, - "preventive-stop-criterion" : "SECURE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "preventive-stop-criterion" : "SECURE" }, "range-actions-optimization" : { "max-mip-iterations" : 20, diff --git a/tests/src/test/resources/files/configurations/common/RaoParameters_simple_AC_loopflow.json b/tests/src/test/resources/files/configurations/common/RaoParameters_simple_AC_loopflow.json index 2ccf092538..923cbb912b 100644 --- a/tests/src/test/resources/files/configurations/common/RaoParameters_simple_AC_loopflow.json +++ b/tests/src/test/resources/files/configurations/common/RaoParameters_simple_AC_loopflow.json @@ -3,8 +3,7 @@ "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_MEGAWATT", "curative-min-obj-improvement" : 0.0, - "preventive-stop-criterion" : "SECURE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "preventive-stop-criterion" : "SECURE" }, "range-actions-optimization" : { "max-mip-iterations" : 20, diff --git a/tests/src/test/resources/files/configurations/epic10/RaoParameters_relMargin_megawatt.json b/tests/src/test/resources/files/configurations/epic10/RaoParameters_relMargin_megawatt.json index eb1c314b5f..1f87dddf6e 100644 --- a/tests/src/test/resources/files/configurations/epic10/RaoParameters_relMargin_megawatt.json +++ b/tests/src/test/resources/files/configurations/epic10/RaoParameters_relMargin_megawatt.json @@ -2,9 +2,9 @@ "version" : "2.5", "objective-function" : { "type" : "MAX_MIN_RELATIVE_MARGIN_IN_MEGAWATT", - "curative-min-obj-improvement" : 0.0, + "curative-min-obj-improvement" : 10000.0, "preventive-stop-criterion" : "MIN_OBJECTIVE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 10, diff --git a/tests/src/test/resources/files/configurations/epic10/conf_ep10us2case1.json b/tests/src/test/resources/files/configurations/epic10/conf_ep10us2case1.json index 94823d453b..ed8c046153 100644 --- a/tests/src/test/resources/files/configurations/epic10/conf_ep10us2case1.json +++ b/tests/src/test/resources/files/configurations/epic10/conf_ep10us2case1.json @@ -2,9 +2,9 @@ "version" : "2.5", "objective-function" : { "type" : "MAX_MIN_RELATIVE_MARGIN_IN_MEGAWATT", - "curative-min-obj-improvement" : 0.0, + "curative-min-obj-improvement" : 10000.0, "preventive-stop-criterion" : "MIN_OBJECTIVE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 10, diff --git a/tests/src/test/resources/files/configurations/epic10/conf_ep10us2case2.json b/tests/src/test/resources/files/configurations/epic10/conf_ep10us2case2.json index 2a5e6a0a50..7ad0f13faf 100644 --- a/tests/src/test/resources/files/configurations/epic10/conf_ep10us2case2.json +++ b/tests/src/test/resources/files/configurations/epic10/conf_ep10us2case2.json @@ -2,9 +2,9 @@ "version" : "2.5", "objective-function" : { "type" : "MAX_MIN_RELATIVE_MARGIN_IN_MEGAWATT", - "curative-min-obj-improvement" : 0.0, + "curative-min-obj-improvement" : 10000.0, "preventive-stop-criterion" : "MIN_OBJECTIVE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 10, diff --git a/tests/src/test/resources/files/configurations/epic10/conf_ep10us3case1.json b/tests/src/test/resources/files/configurations/epic10/conf_ep10us3case1.json index 8e6f8e0225..29c70396fa 100644 --- a/tests/src/test/resources/files/configurations/epic10/conf_ep10us3case1.json +++ b/tests/src/test/resources/files/configurations/epic10/conf_ep10us3case1.json @@ -2,9 +2,9 @@ "version" : "2.5", "objective-function" : { "type" : "MAX_MIN_RELATIVE_MARGIN_IN_MEGAWATT", - "curative-min-obj-improvement" : 0.0, + "curative-min-obj-improvement" : 10000.0, "preventive-stop-criterion" : "MIN_OBJECTIVE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 10, diff --git a/tests/src/test/resources/files/configurations/epic10/conf_ep10us4case1.json b/tests/src/test/resources/files/configurations/epic10/conf_ep10us4case1.json index f15fbb3d31..565a41b6f1 100644 --- a/tests/src/test/resources/files/configurations/epic10/conf_ep10us4case1.json +++ b/tests/src/test/resources/files/configurations/epic10/conf_ep10us4case1.json @@ -2,9 +2,9 @@ "version" : "2.5", "objective-function" : { "type" : "MAX_MIN_RELATIVE_MARGIN_IN_MEGAWATT", - "curative-min-obj-improvement" : 0.0, + "curative-min-obj-improvement" : 10000.0, "preventive-stop-criterion" : "MIN_OBJECTIVE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 10, diff --git a/tests/src/test/resources/files/configurations/epic11/RaoParameters_maxMargin_megawatt_ac_mnecDimin180.json b/tests/src/test/resources/files/configurations/epic11/RaoParameters_maxMargin_megawatt_ac_mnecDimin180.json index c15888d393..9f439d027b 100644 --- a/tests/src/test/resources/files/configurations/epic11/RaoParameters_maxMargin_megawatt_ac_mnecDimin180.json +++ b/tests/src/test/resources/files/configurations/epic11/RaoParameters_maxMargin_megawatt_ac_mnecDimin180.json @@ -2,9 +2,9 @@ "version" : "2.5", "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_MEGAWATT", - "curative-min-obj-improvement" : 0.0, + "curative-min-obj-improvement" : 10000.0, "preventive-stop-criterion" : "MIN_OBJECTIVE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 10, diff --git a/tests/src/test/resources/files/configurations/epic11/RaoParameters_maxMargin_megawatt_ac_mnecDimin20.json b/tests/src/test/resources/files/configurations/epic11/RaoParameters_maxMargin_megawatt_ac_mnecDimin20.json index d83fcc6597..e6760eb3dd 100644 --- a/tests/src/test/resources/files/configurations/epic11/RaoParameters_maxMargin_megawatt_ac_mnecDimin20.json +++ b/tests/src/test/resources/files/configurations/epic11/RaoParameters_maxMargin_megawatt_ac_mnecDimin20.json @@ -2,9 +2,9 @@ "version" : "2.5", "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_MEGAWATT", - "curative-min-obj-improvement" : 0.0, + "curative-min-obj-improvement" : 10000.0, "preventive-stop-criterion" : "MIN_OBJECTIVE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 10, diff --git a/tests/src/test/resources/files/configurations/epic11/RaoParameters_posMargin_ampere_mnecDiminMinusInf.json b/tests/src/test/resources/files/configurations/epic11/RaoParameters_posMargin_ampere_mnecDiminMinusInf.json index ec6869a5a1..b4e04266be 100644 --- a/tests/src/test/resources/files/configurations/epic11/RaoParameters_posMargin_ampere_mnecDiminMinusInf.json +++ b/tests/src/test/resources/files/configurations/epic11/RaoParameters_posMargin_ampere_mnecDiminMinusInf.json @@ -3,8 +3,7 @@ "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_AMPERE", "curative-min-obj-improvement" : 0.0, - "preventive-stop-criterion" : "SECURE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "preventive-stop-criterion" : "SECURE" }, "range-actions-optimization" : { "max-mip-iterations" : 10, diff --git a/tests/src/test/resources/files/configurations/epic12/raoParametersSweIDCC_minObjective.json b/tests/src/test/resources/files/configurations/epic12/raoParametersSweIDCC_minObjective.json index 1559db9162..e4333c32cd 100644 --- a/tests/src/test/resources/files/configurations/epic12/raoParametersSweIDCC_minObjective.json +++ b/tests/src/test/resources/files/configurations/epic12/raoParametersSweIDCC_minObjective.json @@ -2,9 +2,9 @@ "version" : "2.5", "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_AMPERE", - "curative-min-obj-improvement" : 0.0, + "curative-min-obj-improvement" : 10000.0, "preventive-stop-criterion" : "MIN_OBJECTIVE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 5, diff --git a/tests/src/test/resources/files/configurations/epic12/raoParametersSweIDCC_minObjectiveDisabled2P.json b/tests/src/test/resources/files/configurations/epic12/raoParametersSweIDCC_minObjectiveDisabled2P.json index 70d06af30e..bcccd0a781 100644 --- a/tests/src/test/resources/files/configurations/epic12/raoParametersSweIDCC_minObjectiveDisabled2P.json +++ b/tests/src/test/resources/files/configurations/epic12/raoParametersSweIDCC_minObjectiveDisabled2P.json @@ -2,9 +2,9 @@ "version" : "2.5", "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_AMPERE", - "curative-min-obj-improvement" : 0.0, + "curative-min-obj-improvement" : 10000.0, "preventive-stop-criterion" : "MIN_OBJECTIVE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 5, diff --git a/tests/src/test/resources/files/configurations/epic12/raoParametersSweIDCC_minObjectiveWithGlobal2P.json b/tests/src/test/resources/files/configurations/epic12/raoParametersSweIDCC_minObjectiveWithGlobal2P.json index e4e14b37db..0f497d4d3a 100644 --- a/tests/src/test/resources/files/configurations/epic12/raoParametersSweIDCC_minObjectiveWithGlobal2P.json +++ b/tests/src/test/resources/files/configurations/epic12/raoParametersSweIDCC_minObjectiveWithGlobal2P.json @@ -2,9 +2,9 @@ "version" : "2.5", "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_AMPERE", - "curative-min-obj-improvement" : 0.0, + "curative-min-obj-improvement" : 10000.0, "preventive-stop-criterion" : "MIN_OBJECTIVE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 5, diff --git a/tests/src/test/resources/files/configurations/epic13/RaoParameters_13_6_11.json b/tests/src/test/resources/files/configurations/epic13/RaoParameters_13_6_11.json index 3f874d10cb..877618c0db 100644 --- a/tests/src/test/resources/files/configurations/epic13/RaoParameters_13_6_11.json +++ b/tests/src/test/resources/files/configurations/epic13/RaoParameters_13_6_11.json @@ -4,7 +4,7 @@ "type" : "MAX_MIN_MARGIN_IN_MEGAWATT", "curative-min-obj-improvement" : 0.0, "preventive-stop-criterion" : "MIN_OBJECTIVE", - "curative-stop-criterion" : "PREVENTIVE_OBJECTIVE" + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 10, diff --git a/tests/src/test/resources/files/configurations/epic13/RaoParameters_13_6_2.json b/tests/src/test/resources/files/configurations/epic13/RaoParameters_13_6_2.json index 8267ce1a5b..7b05d9c7f2 100644 --- a/tests/src/test/resources/files/configurations/epic13/RaoParameters_13_6_2.json +++ b/tests/src/test/resources/files/configurations/epic13/RaoParameters_13_6_2.json @@ -2,9 +2,9 @@ "version" : "2.5", "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_MEGAWATT", - "curative-min-obj-improvement" : 0.0, + "curative-min-obj-improvement" : 10000.0, "preventive-stop-criterion" : "MIN_OBJECTIVE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 10, diff --git a/tests/src/test/resources/files/configurations/epic13/RaoParameters_best_preventive_by_300_secure.json b/tests/src/test/resources/files/configurations/epic13/RaoParameters_best_preventive_by_300_secure.json index 9877e663ab..835f554a88 100644 --- a/tests/src/test/resources/files/configurations/epic13/RaoParameters_best_preventive_by_300_secure.json +++ b/tests/src/test/resources/files/configurations/epic13/RaoParameters_best_preventive_by_300_secure.json @@ -4,7 +4,7 @@ "type" : "MAX_MIN_MARGIN_IN_AMPERE", "curative-min-obj-improvement" : 300.0, "preventive-stop-criterion" : "MIN_OBJECTIVE", - "curative-stop-criterion" : "PREVENTIVE_OBJECTIVE_AND_SECURE" + "enforce-curative-security" : true }, "range-actions-optimization" : { "max-mip-iterations" : 10, diff --git a/tests/src/test/resources/files/configurations/epic13/RaoParameters_best_preventive_by_500.json b/tests/src/test/resources/files/configurations/epic13/RaoParameters_best_preventive_by_500.json index eb0fcdc9fa..efee8f5ef1 100644 --- a/tests/src/test/resources/files/configurations/epic13/RaoParameters_best_preventive_by_500.json +++ b/tests/src/test/resources/files/configurations/epic13/RaoParameters_best_preventive_by_500.json @@ -4,7 +4,7 @@ "type" : "MAX_MIN_MARGIN_IN_AMPERE", "curative-min-obj-improvement" : 500.0, "preventive-stop-criterion" : "MIN_OBJECTIVE", - "curative-stop-criterion" : "PREVENTIVE_OBJECTIVE" + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 10, diff --git a/tests/src/test/resources/files/configurations/epic13/RaoParameters_best_preventive_by_628.json b/tests/src/test/resources/files/configurations/epic13/RaoParameters_best_preventive_by_628.json index 310fa200f5..f1e0b5f530 100644 --- a/tests/src/test/resources/files/configurations/epic13/RaoParameters_best_preventive_by_628.json +++ b/tests/src/test/resources/files/configurations/epic13/RaoParameters_best_preventive_by_628.json @@ -4,7 +4,7 @@ "type" : "MAX_MIN_MARGIN_IN_AMPERE", "curative-min-obj-improvement" : 628.0, "preventive-stop-criterion" : "MIN_OBJECTIVE", - "curative-stop-criterion" : "PREVENTIVE_OBJECTIVE" + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 10, diff --git a/tests/src/test/resources/files/configurations/epic13/RaoParameters_ep13us6case8.json b/tests/src/test/resources/files/configurations/epic13/RaoParameters_ep13us6case8.json index 4bcd2e354c..ed6070a0a9 100644 --- a/tests/src/test/resources/files/configurations/epic13/RaoParameters_ep13us6case8.json +++ b/tests/src/test/resources/files/configurations/epic13/RaoParameters_ep13us6case8.json @@ -2,9 +2,9 @@ "version" : "2.5", "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_MEGAWATT", - "curative-min-obj-improvement" : 0.0, + "curative-min-obj-improvement" : 10000.0, "preventive-stop-criterion" : "MIN_OBJECTIVE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 10, diff --git a/tests/src/test/resources/files/configurations/epic13/RaoParameters_ep13us7case6.json b/tests/src/test/resources/files/configurations/epic13/RaoParameters_ep13us7case6.json index 650ca44b1f..77c173b955 100644 --- a/tests/src/test/resources/files/configurations/epic13/RaoParameters_ep13us7case6.json +++ b/tests/src/test/resources/files/configurations/epic13/RaoParameters_ep13us7case6.json @@ -2,9 +2,9 @@ "version" : "2.5", "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_MEGAWATT", - "curative-min-obj-improvement" : 0.0, + "curative-min-obj-improvement" : 10000.0, "preventive-stop-criterion" : "MIN_OBJECTIVE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 10, diff --git a/tests/src/test/resources/files/configurations/epic13/RaoParameters_maxMargin_ampere_2p_global.json b/tests/src/test/resources/files/configurations/epic13/RaoParameters_maxMargin_ampere_2p_global.json index 62a0a12c23..dbbda62c30 100644 --- a/tests/src/test/resources/files/configurations/epic13/RaoParameters_maxMargin_ampere_2p_global.json +++ b/tests/src/test/resources/files/configurations/epic13/RaoParameters_maxMargin_ampere_2p_global.json @@ -2,9 +2,9 @@ "version" : "2.5", "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_AMPERE", - "curative-min-obj-improvement" : 0.0, + "curative-min-obj-improvement" : 10000.0, "preventive-stop-criterion" : "MIN_OBJECTIVE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 10, diff --git a/tests/src/test/resources/files/configurations/epic13/RaoParameters_maxMargin_ampere_absolute_threshold.json b/tests/src/test/resources/files/configurations/epic13/RaoParameters_maxMargin_ampere_absolute_threshold.json index ac57dd11e5..e33afb2390 100644 --- a/tests/src/test/resources/files/configurations/epic13/RaoParameters_maxMargin_ampere_absolute_threshold.json +++ b/tests/src/test/resources/files/configurations/epic13/RaoParameters_maxMargin_ampere_absolute_threshold.json @@ -2,9 +2,9 @@ "version" : "2.5", "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_AMPERE", - "curative-min-obj-improvement" : 0.0, + "curative-min-obj-improvement" : 10000.0, "preventive-stop-criterion" : "MIN_OBJECTIVE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 10, diff --git a/tests/src/test/resources/files/configurations/epic13/RaoParameters_maxMargin_ampere_absolute_threshold_12.json b/tests/src/test/resources/files/configurations/epic13/RaoParameters_maxMargin_ampere_absolute_threshold_12.json index 872622a915..3175286422 100644 --- a/tests/src/test/resources/files/configurations/epic13/RaoParameters_maxMargin_ampere_absolute_threshold_12.json +++ b/tests/src/test/resources/files/configurations/epic13/RaoParameters_maxMargin_ampere_absolute_threshold_12.json @@ -2,9 +2,9 @@ "version" : "2.5", "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_AMPERE", - "curative-min-obj-improvement" : 0.0, + "curative-min-obj-improvement" : 10000.0, "preventive-stop-criterion" : "MIN_OBJECTIVE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 10, diff --git a/tests/src/test/resources/files/configurations/epic13/RaoParameters_relMargin_ampere.json b/tests/src/test/resources/files/configurations/epic13/RaoParameters_relMargin_ampere.json index 814b3adffb..792d71a696 100644 --- a/tests/src/test/resources/files/configurations/epic13/RaoParameters_relMargin_ampere.json +++ b/tests/src/test/resources/files/configurations/epic13/RaoParameters_relMargin_ampere.json @@ -2,9 +2,9 @@ "version" : "2.5", "objective-function" : { "type" : "MAX_MIN_RELATIVE_MARGIN_IN_AMPERE", - "curative-min-obj-improvement" : 0.0, + "curative-min-obj-improvement" : 10000.0, "preventive-stop-criterion" : "MIN_OBJECTIVE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 10, diff --git a/tests/src/test/resources/files/configurations/epic13/RaoParameters_stop_curative_at_preventive.json b/tests/src/test/resources/files/configurations/epic13/RaoParameters_stop_curative_at_preventive.json index 750e190141..1dacc9d575 100644 --- a/tests/src/test/resources/files/configurations/epic13/RaoParameters_stop_curative_at_preventive.json +++ b/tests/src/test/resources/files/configurations/epic13/RaoParameters_stop_curative_at_preventive.json @@ -4,7 +4,7 @@ "type" : "MAX_MIN_MARGIN_IN_AMPERE", "curative-min-obj-improvement" : 0.0, "preventive-stop-criterion" : "MIN_OBJECTIVE", - "curative-stop-criterion" : "PREVENTIVE_OBJECTIVE" + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 10, diff --git a/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us11-2.json b/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us11-2.json index 6bd88615fd..2c148ed2a9 100644 --- a/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us11-2.json +++ b/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us11-2.json @@ -3,8 +3,7 @@ "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_AMPERE", "curative-min-obj-improvement" : 0.0, - "preventive-stop-criterion" : "SECURE", - "curative-stop-criterion" : "SECURE" + "preventive-stop-criterion" : "SECURE" }, "range-actions-optimization" : { "max-mip-iterations" : 10, diff --git a/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us11-4.json b/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us11-4.json index 86b24c56c4..ed7997dee5 100644 --- a/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us11-4.json +++ b/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us11-4.json @@ -2,9 +2,9 @@ "version" : "2.5", "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_MEGAWATT", - "curative-min-obj-improvement" : 0.0, + "curative-min-obj-improvement" : 10000.0, "preventive-stop-criterion" : "MIN_OBJECTIVE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 10, diff --git a/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us11-5-1.json b/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us11-5-1.json index 4ae52f1333..c7be9e5775 100644 --- a/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us11-5-1.json +++ b/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us11-5-1.json @@ -2,9 +2,9 @@ "version" : "2.5", "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_MEGAWATT", - "curative-min-obj-improvement" : 0.0, + "curative-min-obj-improvement" : 10000.0, "preventive-stop-criterion" : "MIN_OBJECTIVE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 5, diff --git a/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us11-5-2.json b/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us11-5-2.json index a1a261658e..af8adfad33 100644 --- a/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us11-5-2.json +++ b/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us11-5-2.json @@ -3,8 +3,7 @@ "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_MEGAWATT", "curative-min-obj-improvement" : 0.0, - "preventive-stop-criterion" : "SECURE", - "curative-stop-criterion" : "SECURE" + "preventive-stop-criterion" : "SECURE" }, "range-actions-optimization" : { "max-mip-iterations" : 5, diff --git a/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us11-5-3-3.json b/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us11-5-3-3.json index faf195c545..2280689477 100644 --- a/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us11-5-3-3.json +++ b/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us11-5-3-3.json @@ -2,9 +2,9 @@ "version" : "2.5", "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_MEGAWATT", - "curative-min-obj-improvement" : 0.0, + "curative-min-obj-improvement" : 10000.0, "preventive-stop-criterion" : "MIN_OBJECTIVE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 5, diff --git a/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us13case1.json b/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us13case1.json index 0caf50c0a4..9b0111d9f4 100644 --- a/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us13case1.json +++ b/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us13case1.json @@ -2,9 +2,9 @@ "version" : "2.5", "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_AMPERE", - "curative-min-obj-improvement" : 0.0, + "curative-min-obj-improvement" : 10000.0, "preventive-stop-criterion" : "MIN_OBJECTIVE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 10, diff --git a/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us13case10.json b/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us13case10.json index 619048ab81..60649946b0 100644 --- a/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us13case10.json +++ b/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us13case10.json @@ -2,9 +2,9 @@ "version" : "2.5", "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_AMPERE", - "curative-min-obj-improvement" : 0.0, + "curative-min-obj-improvement" : 10000.0, "preventive-stop-criterion" : "MIN_OBJECTIVE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 10, diff --git a/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us13case2.json b/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us13case2.json index 37bee2f618..e36ff9693f 100644 --- a/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us13case2.json +++ b/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us13case2.json @@ -2,9 +2,9 @@ "version" : "2.5", "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_AMPERE", - "curative-min-obj-improvement" : 0.0, + "curative-min-obj-improvement" : 10000.0, "preventive-stop-criterion" : "MIN_OBJECTIVE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 10, diff --git a/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us13case5.json b/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us13case5.json index fa7f516fc3..ba086344c8 100644 --- a/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us13case5.json +++ b/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us13case5.json @@ -2,9 +2,9 @@ "version" : "2.5", "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_AMPERE", - "curative-min-obj-improvement" : 0.0, + "curative-min-obj-improvement" : 10000.0, "preventive-stop-criterion" : "MIN_OBJECTIVE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 10, diff --git a/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us13case6.json b/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us13case6.json index de6bb291b8..474ece869a 100644 --- a/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us13case6.json +++ b/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us13case6.json @@ -2,9 +2,9 @@ "version" : "2.5", "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_AMPERE", - "curative-min-obj-improvement" : 0.0, + "curative-min-obj-improvement" : 10000.0, "preventive-stop-criterion" : "MIN_OBJECTIVE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 10, diff --git a/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us13case7.json b/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us13case7.json index b342ec4aeb..1f98ae478c 100644 --- a/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us13case7.json +++ b/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us13case7.json @@ -2,9 +2,9 @@ "version" : "2.5", "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_AMPERE", - "curative-min-obj-improvement" : 0.0, + "curative-min-obj-improvement" : 10000.0, "preventive-stop-criterion" : "MIN_OBJECTIVE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 10, diff --git a/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us13case8.json b/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us13case8.json index b62006e0fc..5163474191 100644 --- a/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us13case8.json +++ b/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us13case8.json @@ -2,9 +2,9 @@ "version" : "2.5", "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_AMPERE", - "curative-min-obj-improvement" : 0.0, + "curative-min-obj-improvement" : 10000.0, "preventive-stop-criterion" : "MIN_OBJECTIVE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 10, diff --git a/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us17case10.json b/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us17case10.json index ece67003bf..7475d2daf3 100644 --- a/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us17case10.json +++ b/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us17case10.json @@ -3,8 +3,7 @@ "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_AMPERE", "curative-min-obj-improvement" : 0.0, - "preventive-stop-criterion" : "SECURE", - "curative-stop-criterion" : "SECURE" + "preventive-stop-criterion" : "SECURE" }, "range-actions-optimization" : { "max-mip-iterations" : 10, diff --git a/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us17case11.json b/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us17case11.json index ece67003bf..7475d2daf3 100644 --- a/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us17case11.json +++ b/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us17case11.json @@ -3,8 +3,7 @@ "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_AMPERE", "curative-min-obj-improvement" : 0.0, - "preventive-stop-criterion" : "SECURE", - "curative-stop-criterion" : "SECURE" + "preventive-stop-criterion" : "SECURE" }, "range-actions-optimization" : { "max-mip-iterations" : 10, diff --git a/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us17case12.json b/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us17case12.json index 33a70428d6..36a6c76481 100644 --- a/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us17case12.json +++ b/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us17case12.json @@ -2,9 +2,9 @@ "version" : "2.5", "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_AMPERE", - "curative-min-obj-improvement" : 0.0, + "curative-min-obj-improvement" : 10000.0, "preventive-stop-criterion" : "MIN_OBJECTIVE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 10, diff --git a/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us17case2.json b/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us17case2.json index 7be7b2d665..2c30a7029f 100644 --- a/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us17case2.json +++ b/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us17case2.json @@ -3,8 +3,7 @@ "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_AMPERE", "curative-min-obj-improvement" : 0.0, - "preventive-stop-criterion" : "SECURE", - "curative-stop-criterion" : "SECURE" + "preventive-stop-criterion" : "SECURE" }, "range-actions-optimization" : { "max-mip-iterations" : 5, diff --git a/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us17case6.json b/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us17case6.json index 7be7b2d665..2c30a7029f 100644 --- a/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us17case6.json +++ b/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us17case6.json @@ -3,8 +3,7 @@ "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_AMPERE", "curative-min-obj-improvement" : 0.0, - "preventive-stop-criterion" : "SECURE", - "curative-stop-criterion" : "SECURE" + "preventive-stop-criterion" : "SECURE" }, "range-actions-optimization" : { "max-mip-iterations" : 5, diff --git a/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us7-2.json b/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us7-2.json new file mode 100644 index 0000000000..f6435f0428 --- /dev/null +++ b/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us7-2.json @@ -0,0 +1,7 @@ +{ + "version" : "2.5", + "objective-function" : { + "preventive-stop-criterion" : "MIN_OBJECTIVE", + "curative-min-obj-improvement" : 10000.0 + } +} \ No newline at end of file diff --git a/tests/src/test/resources/files/configurations/epic15/raoParametersSweIDCC_withoutPsts.json b/tests/src/test/resources/files/configurations/epic15/raoParametersSweIDCC_withoutPsts.json index 3d4a6533fc..fa17158d51 100644 --- a/tests/src/test/resources/files/configurations/epic15/raoParametersSweIDCC_withoutPsts.json +++ b/tests/src/test/resources/files/configurations/epic15/raoParametersSweIDCC_withoutPsts.json @@ -3,8 +3,7 @@ "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_AMPERE", "curative-min-obj-improvement" : 0.0, - "preventive-stop-criterion" : "SECURE", - "curative-stop-criterion" : "SECURE" + "preventive-stop-criterion" : "SECURE" }, "range-actions-optimization" : { "max-mip-iterations" : 5, diff --git a/tests/src/test/resources/files/configurations/epic19/RaoParameters_19_10_10&11.json b/tests/src/test/resources/files/configurations/epic19/RaoParameters_19_10_10&11.json index 3d8df46e53..ee42664592 100644 --- a/tests/src/test/resources/files/configurations/epic19/RaoParameters_19_10_10&11.json +++ b/tests/src/test/resources/files/configurations/epic19/RaoParameters_19_10_10&11.json @@ -2,9 +2,9 @@ "version" : "2.5", "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_MEGAWATT", - "curative-min-obj-improvement" : 0.0, + "curative-min-obj-improvement" : 10000.0, "preventive-stop-criterion" : "MIN_OBJECTIVE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 10, diff --git a/tests/src/test/resources/files/configurations/epic19/RaoParameters_19_11_9.json b/tests/src/test/resources/files/configurations/epic19/RaoParameters_19_11_9.json index 5b33107bec..9e20f5043a 100644 --- a/tests/src/test/resources/files/configurations/epic19/RaoParameters_19_11_9.json +++ b/tests/src/test/resources/files/configurations/epic19/RaoParameters_19_11_9.json @@ -2,9 +2,9 @@ "version" : "2.5", "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_AMPERE", - "curative-min-obj-improvement" : 0.0, + "curative-min-obj-improvement" : 10000.0, "preventive-stop-criterion" : "MIN_OBJECTIVE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 5, diff --git a/tests/src/test/resources/files/configurations/epic19/RaoParameters_19_11_9_bis.json b/tests/src/test/resources/files/configurations/epic19/RaoParameters_19_11_9_bis.json index 95138ef84c..bf6624a935 100644 --- a/tests/src/test/resources/files/configurations/epic19/RaoParameters_19_11_9_bis.json +++ b/tests/src/test/resources/files/configurations/epic19/RaoParameters_19_11_9_bis.json @@ -2,9 +2,9 @@ "version" : "2.5", "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_AMPERE", - "curative-min-obj-improvement" : 0.0, + "curative-min-obj-improvement" : 10000.0, "preventive-stop-criterion" : "MIN_OBJECTIVE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 5, diff --git a/tests/src/test/resources/files/configurations/epic19/RaoParameters_dc_discrete.json b/tests/src/test/resources/files/configurations/epic19/RaoParameters_dc_discrete.json index c5ac7c6d31..c064eadbe8 100644 --- a/tests/src/test/resources/files/configurations/epic19/RaoParameters_dc_discrete.json +++ b/tests/src/test/resources/files/configurations/epic19/RaoParameters_dc_discrete.json @@ -2,9 +2,9 @@ "version" : "2.5", "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_MEGAWATT", - "curative-min-obj-improvement" : 0.0, + "curative-min-obj-improvement" : 10000.0, "preventive-stop-criterion" : "MIN_OBJECTIVE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 5, diff --git a/tests/src/test/resources/files/configurations/epic19/RaoParameters_maxMargin_ampere_shareCra.json b/tests/src/test/resources/files/configurations/epic19/RaoParameters_maxMargin_ampere_shareCra.json index d806a66959..c5bc1fd805 100644 --- a/tests/src/test/resources/files/configurations/epic19/RaoParameters_maxMargin_ampere_shareCra.json +++ b/tests/src/test/resources/files/configurations/epic19/RaoParameters_maxMargin_ampere_shareCra.json @@ -2,9 +2,9 @@ "version" : "2.5", "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_AMPERE", - "curative-min-obj-improvement" : 0.0, + "curative-min-obj-improvement" : 10000.0, "preventive-stop-criterion" : "MIN_OBJECTIVE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 10, diff --git a/tests/src/test/resources/files/configurations/epic19/RaoParameters_maxMargin_megawatt_shareCra.json b/tests/src/test/resources/files/configurations/epic19/RaoParameters_maxMargin_megawatt_shareCra.json index 683c788d60..12b99c7fef 100644 --- a/tests/src/test/resources/files/configurations/epic19/RaoParameters_maxMargin_megawatt_shareCra.json +++ b/tests/src/test/resources/files/configurations/epic19/RaoParameters_maxMargin_megawatt_shareCra.json @@ -2,9 +2,9 @@ "version" : "2.5", "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_MEGAWATT", - "curative-min-obj-improvement" : 0.0, + "curative-min-obj-improvement" : 10000.0, "preventive-stop-criterion" : "MIN_OBJECTIVE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 10, diff --git a/tests/src/test/resources/files/configurations/epic19/RaoParameters_maxRelMargin_ampere_shareCra.json b/tests/src/test/resources/files/configurations/epic19/RaoParameters_maxRelMargin_ampere_shareCra.json index a741808d75..bc712485b0 100644 --- a/tests/src/test/resources/files/configurations/epic19/RaoParameters_maxRelMargin_ampere_shareCra.json +++ b/tests/src/test/resources/files/configurations/epic19/RaoParameters_maxRelMargin_ampere_shareCra.json @@ -2,9 +2,9 @@ "version" : "2.5", "objective-function" : { "type" : "MAX_MIN_RELATIVE_MARGIN_IN_AMPERE", - "curative-min-obj-improvement" : 0.0, + "curative-min-obj-improvement" : 10000.0, "preventive-stop-criterion" : "MIN_OBJECTIVE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 10, diff --git a/tests/src/test/resources/files/configurations/epic19/RaoParameters_maxRelMargin_ampere_shareCra_mip.json b/tests/src/test/resources/files/configurations/epic19/RaoParameters_maxRelMargin_ampere_shareCra_mip.json index 6c1e5ad214..1948a0657f 100644 --- a/tests/src/test/resources/files/configurations/epic19/RaoParameters_maxRelMargin_ampere_shareCra_mip.json +++ b/tests/src/test/resources/files/configurations/epic19/RaoParameters_maxRelMargin_ampere_shareCra_mip.json @@ -2,9 +2,9 @@ "version" : "2.5", "objective-function" : { "type" : "MAX_MIN_RELATIVE_MARGIN_IN_AMPERE", - "curative-min-obj-improvement" : 0.0, + "curative-min-obj-improvement" : 10000.0, "preventive-stop-criterion" : "MIN_OBJECTIVE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 10, diff --git a/tests/src/test/resources/files/configurations/epic19/RaoParameters_maxRelMargin_megawatt_shareCra.json b/tests/src/test/resources/files/configurations/epic19/RaoParameters_maxRelMargin_megawatt_shareCra.json index 0fe8706bec..41e026fbf1 100644 --- a/tests/src/test/resources/files/configurations/epic19/RaoParameters_maxRelMargin_megawatt_shareCra.json +++ b/tests/src/test/resources/files/configurations/epic19/RaoParameters_maxRelMargin_megawatt_shareCra.json @@ -2,9 +2,9 @@ "version" : "2.5", "objective-function" : { "type" : "MAX_MIN_RELATIVE_MARGIN_IN_MEGAWATT", - "curative-min-obj-improvement" : 0.0, + "curative-min-obj-improvement" : 10000.0, "preventive-stop-criterion" : "MIN_OBJECTIVE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 10, diff --git a/tests/src/test/resources/files/configurations/epic19/RaoParameters_maxRelMargin_megawatt_shareCra_mip.json b/tests/src/test/resources/files/configurations/epic19/RaoParameters_maxRelMargin_megawatt_shareCra_mip.json index 9904e03010..8d3e7ae83a 100644 --- a/tests/src/test/resources/files/configurations/epic19/RaoParameters_maxRelMargin_megawatt_shareCra_mip.json +++ b/tests/src/test/resources/files/configurations/epic19/RaoParameters_maxRelMargin_megawatt_shareCra_mip.json @@ -2,9 +2,9 @@ "version" : "2.5", "objective-function" : { "type" : "MAX_MIN_RELATIVE_MARGIN_IN_MEGAWATT", - "curative-min-obj-improvement" : 0.0, + "curative-min-obj-improvement" : 10000.0, "preventive-stop-criterion" : "MIN_OBJECTIVE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 10, diff --git a/tests/src/test/resources/files/configurations/epic20/RaoParameters_20_4.json b/tests/src/test/resources/files/configurations/epic20/RaoParameters_20_4.json index d2c84cf807..81e4f73afc 100644 --- a/tests/src/test/resources/files/configurations/epic20/RaoParameters_20_4.json +++ b/tests/src/test/resources/files/configurations/epic20/RaoParameters_20_4.json @@ -4,7 +4,7 @@ "type" : "MAX_MIN_MARGIN_IN_MEGAWATT", "curative-min-obj-improvement" : 0.0, "preventive-stop-criterion" : "MIN_OBJECTIVE", - "curative-stop-criterion" : "PREVENTIVE_OBJECTIVE" + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 10, diff --git a/tests/src/test/resources/files/configurations/epic20/RaoParameters_20_6_1.json b/tests/src/test/resources/files/configurations/epic20/RaoParameters_20_6_1.json index 42f84d3e39..80a40d6c57 100644 --- a/tests/src/test/resources/files/configurations/epic20/RaoParameters_20_6_1.json +++ b/tests/src/test/resources/files/configurations/epic20/RaoParameters_20_6_1.json @@ -2,9 +2,9 @@ "version" : "2.5", "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_MEGAWATT", - "curative-min-obj-improvement" : 0.0, + "curative-min-obj-improvement" : 10000.0, "preventive-stop-criterion" : "MIN_OBJECTIVE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 5, diff --git a/tests/src/test/resources/files/configurations/epic20/RaoParameters_20_6_2.json b/tests/src/test/resources/files/configurations/epic20/RaoParameters_20_6_2.json index bd8fcefbdd..25e390318c 100644 --- a/tests/src/test/resources/files/configurations/epic20/RaoParameters_20_6_2.json +++ b/tests/src/test/resources/files/configurations/epic20/RaoParameters_20_6_2.json @@ -2,9 +2,9 @@ "version" : "2.5", "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_MEGAWATT", - "curative-min-obj-improvement" : 0.0, + "curative-min-obj-improvement" : 10000.0, "preventive-stop-criterion" : "MIN_OBJECTIVE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 5, diff --git a/tests/src/test/resources/files/configurations/epic20/RaoParameters_maxMargin_MW_DC_withLF_with2P.json b/tests/src/test/resources/files/configurations/epic20/RaoParameters_maxMargin_MW_DC_withLF_with2P.json index b140383053..c0042d30a5 100644 --- a/tests/src/test/resources/files/configurations/epic20/RaoParameters_maxMargin_MW_DC_withLF_with2P.json +++ b/tests/src/test/resources/files/configurations/epic20/RaoParameters_maxMargin_MW_DC_withLF_with2P.json @@ -4,7 +4,7 @@ "type" : "MAX_MIN_MARGIN_IN_MEGAWATT", "curative-min-obj-improvement" : 50.0, "preventive-stop-criterion" : "MIN_OBJECTIVE", - "curative-stop-criterion" : "PREVENTIVE_OBJECTIVE_AND_SECURE" + "enforce-curative-security" : true }, "range-actions-optimization" : { "max-mip-iterations" : 10, diff --git a/tests/src/test/resources/files/configurations/epic20/RaoParameters_maxMargin_ampere_2p_if_cost_increase.json b/tests/src/test/resources/files/configurations/epic20/RaoParameters_maxMargin_ampere_2p_if_cost_increase.json index b914550ed7..1821c2965e 100644 --- a/tests/src/test/resources/files/configurations/epic20/RaoParameters_maxMargin_ampere_2p_if_cost_increase.json +++ b/tests/src/test/resources/files/configurations/epic20/RaoParameters_maxMargin_ampere_2p_if_cost_increase.json @@ -2,9 +2,9 @@ "version" : "2.5", "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_AMPERE", - "curative-min-obj-improvement" : 0.0, + "curative-min-obj-improvement" : 10000.0, "preventive-stop-criterion" : "MIN_OBJECTIVE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 10, diff --git a/tests/src/test/resources/files/configurations/epic20/RaoParameters_maxMargin_ampere_forbid_cost_increase.json b/tests/src/test/resources/files/configurations/epic20/RaoParameters_maxMargin_ampere_forbid_cost_increase.json index bd86a1b087..f946c1265c 100644 --- a/tests/src/test/resources/files/configurations/epic20/RaoParameters_maxMargin_ampere_forbid_cost_increase.json +++ b/tests/src/test/resources/files/configurations/epic20/RaoParameters_maxMargin_ampere_forbid_cost_increase.json @@ -2,9 +2,9 @@ "version" : "2.5", "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_AMPERE", - "curative-min-obj-improvement" : 0.0, + "curative-min-obj-improvement" : 10000.0, "preventive-stop-criterion" : "MIN_OBJECTIVE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 10, diff --git a/tests/src/test/resources/files/configurations/epic20/RaoParameters_maxMargin_ampere_second_preventive.json b/tests/src/test/resources/files/configurations/epic20/RaoParameters_maxMargin_ampere_second_preventive.json index ca6265b397..febce2b3f2 100644 --- a/tests/src/test/resources/files/configurations/epic20/RaoParameters_maxMargin_ampere_second_preventive.json +++ b/tests/src/test/resources/files/configurations/epic20/RaoParameters_maxMargin_ampere_second_preventive.json @@ -2,9 +2,9 @@ "version" : "2.5", "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_AMPERE", - "curative-min-obj-improvement" : 0.0, + "curative-min-obj-improvement" : 10000.0, "preventive-stop-criterion" : "MIN_OBJECTIVE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 10, diff --git a/tests/src/test/resources/files/configurations/epic4/RaoParameters_posMargin_ampere_ac_divergence.json b/tests/src/test/resources/files/configurations/epic4/RaoParameters_posMargin_ampere_ac_divergence.json index 60b4d7c477..bd40b180b6 100644 --- a/tests/src/test/resources/files/configurations/epic4/RaoParameters_posMargin_ampere_ac_divergence.json +++ b/tests/src/test/resources/files/configurations/epic4/RaoParameters_posMargin_ampere_ac_divergence.json @@ -3,8 +3,7 @@ "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_AMPERE", "curative-min-obj-improvement" : 0.0, - "preventive-stop-criterion" : "SECURE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "preventive-stop-criterion" : "SECURE" }, "range-actions-optimization" : { "max-mip-iterations" : 20, diff --git a/tests/src/test/resources/files/configurations/epic4/RaoParameters_posMargin_ampere_withFallback_ac_divergence.json b/tests/src/test/resources/files/configurations/epic4/RaoParameters_posMargin_ampere_withFallback_ac_divergence.json index 1b95b4d32b..a51e1fcc02 100644 --- a/tests/src/test/resources/files/configurations/epic4/RaoParameters_posMargin_ampere_withFallback_ac_divergence.json +++ b/tests/src/test/resources/files/configurations/epic4/RaoParameters_posMargin_ampere_withFallback_ac_divergence.json @@ -2,9 +2,9 @@ "version" : "2.5", "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_AMPERE", - "curative-min-obj-improvement" : 0.0, + "curative-min-obj-improvement" : 10000.0, "preventive-stop-criterion" : "MIN_OBJECTIVE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 20, diff --git a/tests/src/test/resources/files/configurations/epic4/RaoParameters_posMargin_ampere_withFallback_differentFallbackCost.json b/tests/src/test/resources/files/configurations/epic4/RaoParameters_posMargin_ampere_withFallback_differentFallbackCost.json index 1ec2e9698f..c040661518 100644 --- a/tests/src/test/resources/files/configurations/epic4/RaoParameters_posMargin_ampere_withFallback_differentFallbackCost.json +++ b/tests/src/test/resources/files/configurations/epic4/RaoParameters_posMargin_ampere_withFallback_differentFallbackCost.json @@ -3,8 +3,7 @@ "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_AMPERE", "curative-min-obj-improvement" : 0.0, - "preventive-stop-criterion" : "SECURE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "preventive-stop-criterion" : "SECURE" }, "range-actions-optimization" : { "max-mip-iterations" : 20, diff --git a/tests/src/test/resources/files/configurations/epic5/RaoParameters_maxMargin_absoluteMinImpact190.json b/tests/src/test/resources/files/configurations/epic5/RaoParameters_maxMargin_absoluteMinImpact190.json index a021239045..b3c2d3bf90 100644 --- a/tests/src/test/resources/files/configurations/epic5/RaoParameters_maxMargin_absoluteMinImpact190.json +++ b/tests/src/test/resources/files/configurations/epic5/RaoParameters_maxMargin_absoluteMinImpact190.json @@ -2,9 +2,9 @@ "version" : "2.5", "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_MEGAWATT", - "curative-min-obj-improvement" : 0.0, + "curative-min-obj-improvement" : 10000.0, "preventive-stop-criterion" : "MIN_OBJECTIVE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 10, diff --git a/tests/src/test/resources/files/configurations/epic5/RaoParameters_maxMargin_absoluteMinImpact195.json b/tests/src/test/resources/files/configurations/epic5/RaoParameters_maxMargin_absoluteMinImpact195.json index fdfd674f8e..10077f3a4b 100644 --- a/tests/src/test/resources/files/configurations/epic5/RaoParameters_maxMargin_absoluteMinImpact195.json +++ b/tests/src/test/resources/files/configurations/epic5/RaoParameters_maxMargin_absoluteMinImpact195.json @@ -2,9 +2,9 @@ "version" : "2.5", "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_MEGAWATT", - "curative-min-obj-improvement" : 0.0, + "curative-min-obj-improvement" : 10000.0, "preventive-stop-criterion" : "MIN_OBJECTIVE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 10, diff --git a/tests/src/test/resources/files/configurations/epic5/RaoParameters_maxMargin_maxDepth.json b/tests/src/test/resources/files/configurations/epic5/RaoParameters_maxMargin_maxDepth.json index 37dab04520..bd265fb42a 100644 --- a/tests/src/test/resources/files/configurations/epic5/RaoParameters_maxMargin_maxDepth.json +++ b/tests/src/test/resources/files/configurations/epic5/RaoParameters_maxMargin_maxDepth.json @@ -2,9 +2,9 @@ "version" : "2.5", "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_MEGAWATT", - "curative-min-obj-improvement" : 0.0, + "curative-min-obj-improvement" : 10000.0, "preventive-stop-criterion" : "MIN_OBJECTIVE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 10, diff --git a/tests/src/test/resources/files/configurations/epic5/RaoParameters_maxMargin_relativeMinImpact.json b/tests/src/test/resources/files/configurations/epic5/RaoParameters_maxMargin_relativeMinImpact.json index b4ab1e6470..931b553b76 100644 --- a/tests/src/test/resources/files/configurations/epic5/RaoParameters_maxMargin_relativeMinImpact.json +++ b/tests/src/test/resources/files/configurations/epic5/RaoParameters_maxMargin_relativeMinImpact.json @@ -2,9 +2,9 @@ "version" : "2.5", "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_MEGAWATT", - "curative-min-obj-improvement" : 0.0, + "curative-min-obj-improvement" : 10000.0, "preventive-stop-criterion" : "MIN_OBJECTIVE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 10, diff --git a/tests/src/test/resources/files/configurations/epic7/RaoParameters_maxMargin_mw_ac_lf_false_10_100.json b/tests/src/test/resources/files/configurations/epic7/RaoParameters_maxMargin_mw_ac_lf_false_10_100.json index 5538785330..1758d7ad39 100644 --- a/tests/src/test/resources/files/configurations/epic7/RaoParameters_maxMargin_mw_ac_lf_false_10_100.json +++ b/tests/src/test/resources/files/configurations/epic7/RaoParameters_maxMargin_mw_ac_lf_false_10_100.json @@ -2,9 +2,9 @@ "version" : "2.5", "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_MEGAWATT", - "curative-min-obj-improvement" : 0.0, + "curative-min-obj-improvement" : 10000.0, "preventive-stop-criterion" : "MIN_OBJECTIVE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 10, diff --git a/tests/src/test/resources/files/configurations/epic7/RaoParameters_maxMargin_mw_ac_lf_false_5_100.json b/tests/src/test/resources/files/configurations/epic7/RaoParameters_maxMargin_mw_ac_lf_false_5_100.json index b3b02f9607..1ce7cf7d44 100644 --- a/tests/src/test/resources/files/configurations/epic7/RaoParameters_maxMargin_mw_ac_lf_false_5_100.json +++ b/tests/src/test/resources/files/configurations/epic7/RaoParameters_maxMargin_mw_ac_lf_false_5_100.json @@ -2,9 +2,9 @@ "version" : "2.5", "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_MEGAWATT", - "curative-min-obj-improvement" : 0.0, + "curative-min-obj-improvement" : 10000.0, "preventive-stop-criterion" : "MIN_OBJECTIVE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 10, diff --git a/tests/src/test/resources/files/configurations/epic7/RaoParameters_maxMargin_mw_ac_lf_false_5_100_BE_NL.json b/tests/src/test/resources/files/configurations/epic7/RaoParameters_maxMargin_mw_ac_lf_false_5_100_BE_NL.json index 5155e886a1..1c3d36def3 100644 --- a/tests/src/test/resources/files/configurations/epic7/RaoParameters_maxMargin_mw_ac_lf_false_5_100_BE_NL.json +++ b/tests/src/test/resources/files/configurations/epic7/RaoParameters_maxMargin_mw_ac_lf_false_5_100_BE_NL.json @@ -2,9 +2,9 @@ "version" : "2.5", "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_MEGAWATT", - "curative-min-obj-improvement" : 0.0, + "curative-min-obj-improvement" : 10000.0, "preventive-stop-criterion" : "MIN_OBJECTIVE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 10, diff --git a/tests/src/test/resources/files/configurations/epic7/RaoParameters_maxMargin_mw_ac_lf_false_5_100_NL.json b/tests/src/test/resources/files/configurations/epic7/RaoParameters_maxMargin_mw_ac_lf_false_5_100_NL.json index 694ea72f00..8dfb7d47e7 100644 --- a/tests/src/test/resources/files/configurations/epic7/RaoParameters_maxMargin_mw_ac_lf_false_5_100_NL.json +++ b/tests/src/test/resources/files/configurations/epic7/RaoParameters_maxMargin_mw_ac_lf_false_5_100_NL.json @@ -2,9 +2,9 @@ "version" : "2.5", "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_MEGAWATT", - "curative-min-obj-improvement" : 0.0, + "curative-min-obj-improvement" : 10000.0, "preventive-stop-criterion" : "MIN_OBJECTIVE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 10, diff --git a/tests/src/test/resources/files/configurations/epic7/RaoParameters_maxMargin_mw_ac_lf_false_5_100_lfAugmentation.json b/tests/src/test/resources/files/configurations/epic7/RaoParameters_maxMargin_mw_ac_lf_false_5_100_lfAugmentation.json index aabbc0056c..0d9d5ed929 100644 --- a/tests/src/test/resources/files/configurations/epic7/RaoParameters_maxMargin_mw_ac_lf_false_5_100_lfAugmentation.json +++ b/tests/src/test/resources/files/configurations/epic7/RaoParameters_maxMargin_mw_ac_lf_false_5_100_lfAugmentation.json @@ -2,9 +2,9 @@ "version" : "2.5", "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_MEGAWATT", - "curative-min-obj-improvement" : 0.0, + "curative-min-obj-improvement" : 10000.0, "preventive-stop-criterion" : "MIN_OBJECTIVE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 10, diff --git a/tests/src/test/resources/files/configurations/epic7/RaoParameters_maxMargin_mw_ac_lf_true_5_100.json b/tests/src/test/resources/files/configurations/epic7/RaoParameters_maxMargin_mw_ac_lf_true_5_100.json index 045bd0f42b..770854062b 100644 --- a/tests/src/test/resources/files/configurations/epic7/RaoParameters_maxMargin_mw_ac_lf_true_5_100.json +++ b/tests/src/test/resources/files/configurations/epic7/RaoParameters_maxMargin_mw_ac_lf_true_5_100.json @@ -2,9 +2,9 @@ "version" : "2.5", "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_MEGAWATT", - "curative-min-obj-improvement" : 0.0, + "curative-min-obj-improvement" : 10000.0, "preventive-stop-criterion" : "MIN_OBJECTIVE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 10, diff --git a/tests/src/test/resources/files/configurations/epic7/RaoParameters_maxMargin_mw_dc_lf_accurate_5_100.json b/tests/src/test/resources/files/configurations/epic7/RaoParameters_maxMargin_mw_dc_lf_accurate_5_100.json index 95f2050a45..ca22728162 100644 --- a/tests/src/test/resources/files/configurations/epic7/RaoParameters_maxMargin_mw_dc_lf_accurate_5_100.json +++ b/tests/src/test/resources/files/configurations/epic7/RaoParameters_maxMargin_mw_dc_lf_accurate_5_100.json @@ -2,9 +2,9 @@ "version" : "2.5", "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_MEGAWATT", - "curative-min-obj-improvement" : 0.0, + "curative-min-obj-improvement" : 10000.0, "preventive-stop-criterion" : "MIN_OBJECTIVE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 10, diff --git a/tests/src/test/resources/files/configurations/epic7/RaoParameters_maxMargin_mw_dc_lf_false_10_100.json b/tests/src/test/resources/files/configurations/epic7/RaoParameters_maxMargin_mw_dc_lf_false_10_100.json index 97c5a8a9cb..6aa35a76f7 100644 --- a/tests/src/test/resources/files/configurations/epic7/RaoParameters_maxMargin_mw_dc_lf_false_10_100.json +++ b/tests/src/test/resources/files/configurations/epic7/RaoParameters_maxMargin_mw_dc_lf_false_10_100.json @@ -2,9 +2,9 @@ "version" : "2.5", "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_MEGAWATT", - "curative-min-obj-improvement" : 0.0, + "curative-min-obj-improvement" : 10000.0, "preventive-stop-criterion" : "MIN_OBJECTIVE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 10, diff --git a/tests/src/test/resources/files/configurations/epic7/RaoParameters_maxMargin_mw_dc_lf_false_5_100.json b/tests/src/test/resources/files/configurations/epic7/RaoParameters_maxMargin_mw_dc_lf_false_5_100.json index 6ca3089e6a..05688feda9 100644 --- a/tests/src/test/resources/files/configurations/epic7/RaoParameters_maxMargin_mw_dc_lf_false_5_100.json +++ b/tests/src/test/resources/files/configurations/epic7/RaoParameters_maxMargin_mw_dc_lf_false_5_100.json @@ -2,9 +2,9 @@ "version" : "2.5", "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_MEGAWATT", - "curative-min-obj-improvement" : 0.0, + "curative-min-obj-improvement" : 10000.0, "preventive-stop-criterion" : "MIN_OBJECTIVE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 10, diff --git a/tests/src/test/resources/files/configurations/epic7/RaoParameters_maxMargin_mw_dc_lf_inBetween_5_100.json b/tests/src/test/resources/files/configurations/epic7/RaoParameters_maxMargin_mw_dc_lf_inBetween_5_100.json index 1086b79451..83a76ff7d8 100644 --- a/tests/src/test/resources/files/configurations/epic7/RaoParameters_maxMargin_mw_dc_lf_inBetween_5_100.json +++ b/tests/src/test/resources/files/configurations/epic7/RaoParameters_maxMargin_mw_dc_lf_inBetween_5_100.json @@ -2,9 +2,9 @@ "version" : "2.5", "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_MEGAWATT", - "curative-min-obj-improvement" : 0.0, + "curative-min-obj-improvement" : 10000.0, "preventive-stop-criterion" : "MIN_OBJECTIVE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 10, diff --git a/tests/src/test/resources/files/configurations/epic91/RaoParameters_case_91_12_search_tree.json b/tests/src/test/resources/files/configurations/epic91/RaoParameters_case_91_12_search_tree.json index 756e48d25c..67cb497029 100644 --- a/tests/src/test/resources/files/configurations/epic91/RaoParameters_case_91_12_search_tree.json +++ b/tests/src/test/resources/files/configurations/epic91/RaoParameters_case_91_12_search_tree.json @@ -2,9 +2,9 @@ "version" : "2.5", "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_MEGAWATT", - "curative-min-obj-improvement" : 0.0, + "curative-min-obj-improvement" : 10000.0, "preventive-stop-criterion" : "MIN_OBJECTIVE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 10, diff --git a/tests/src/test/resources/files/configurations/epic91/RaoParameters_case_91_12_secure.json b/tests/src/test/resources/files/configurations/epic91/RaoParameters_case_91_12_secure.json index 4949a354f0..e4bbaf265b 100644 --- a/tests/src/test/resources/files/configurations/epic91/RaoParameters_case_91_12_secure.json +++ b/tests/src/test/resources/files/configurations/epic91/RaoParameters_case_91_12_secure.json @@ -3,8 +3,7 @@ "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_MEGAWATT", "curative-min-obj-improvement" : 0.0, - "preventive-stop-criterion" : "SECURE", - "curative-stop-criterion" : "SECURE" + "preventive-stop-criterion" : "SECURE" }, "range-actions-optimization" : { "max-mip-iterations" : 10, diff --git a/tests/src/test/resources/files/configurations/epic91/RaoParameters_case_91_12_secure_2PRAO.json b/tests/src/test/resources/files/configurations/epic91/RaoParameters_case_91_12_secure_2PRAO.json index c1457f5861..862f32bbc7 100644 --- a/tests/src/test/resources/files/configurations/epic91/RaoParameters_case_91_12_secure_2PRAO.json +++ b/tests/src/test/resources/files/configurations/epic91/RaoParameters_case_91_12_secure_2PRAO.json @@ -3,8 +3,7 @@ "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_MEGAWATT", "curative-min-obj-improvement" : 0.0, - "preventive-stop-criterion" : "SECURE", - "curative-stop-criterion" : "SECURE" + "preventive-stop-criterion" : "SECURE" }, "range-actions-optimization" : { "max-mip-iterations" : 10, diff --git a/tests/src/test/resources/files/configurations/epic91/RaoParameters_case_91_13_1.json b/tests/src/test/resources/files/configurations/epic91/RaoParameters_case_91_13_1.json index c088e2934b..8902463dda 100644 --- a/tests/src/test/resources/files/configurations/epic91/RaoParameters_case_91_13_1.json +++ b/tests/src/test/resources/files/configurations/epic91/RaoParameters_case_91_13_1.json @@ -3,8 +3,7 @@ "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_MEGAWATT", "curative-min-obj-improvement" : 0.0, - "preventive-stop-criterion" : "SECURE", - "curative-stop-criterion" : "SECURE" + "preventive-stop-criterion" : "SECURE" }, "range-actions-optimization" : { "max-mip-iterations" : 10, diff --git a/tests/src/test/resources/files/configurations/epic91/RaoParameters_case_91_1_1.json b/tests/src/test/resources/files/configurations/epic91/RaoParameters_case_91_1_1.json index cf41d51c42..6dbc8caf08 100644 --- a/tests/src/test/resources/files/configurations/epic91/RaoParameters_case_91_1_1.json +++ b/tests/src/test/resources/files/configurations/epic91/RaoParameters_case_91_1_1.json @@ -3,8 +3,7 @@ "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_AMPERE", "curative-min-obj-improvement" : 0.0, - "preventive-stop-criterion" : "SECURE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "preventive-stop-criterion" : "SECURE" }, "range-actions-optimization" : { "max-mip-iterations" : 10, diff --git a/tests/src/test/resources/files/configurations/epic91/RaoParameters_case_91_1_12.json b/tests/src/test/resources/files/configurations/epic91/RaoParameters_case_91_1_12.json index 665d802f8c..af49829956 100644 --- a/tests/src/test/resources/files/configurations/epic91/RaoParameters_case_91_1_12.json +++ b/tests/src/test/resources/files/configurations/epic91/RaoParameters_case_91_1_12.json @@ -2,9 +2,9 @@ "version" : "2.5", "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_AMPERE", - "curative-min-obj-improvement" : 0.0, + "curative-min-obj-improvement" : 10000.0, "preventive-stop-criterion" : "MIN_OBJECTIVE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 10, diff --git a/tests/src/test/resources/files/configurations/epic91/RaoParameters_case_91_1_3.json b/tests/src/test/resources/files/configurations/epic91/RaoParameters_case_91_1_3.json index 517f2e21ff..766a206c5f 100644 --- a/tests/src/test/resources/files/configurations/epic91/RaoParameters_case_91_1_3.json +++ b/tests/src/test/resources/files/configurations/epic91/RaoParameters_case_91_1_3.json @@ -2,9 +2,9 @@ "version" : "2.5", "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_AMPERE", - "curative-min-obj-improvement" : 0.0, + "curative-min-obj-improvement" : 10000.0, "preventive-stop-criterion" : "MIN_OBJECTIVE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 10, diff --git a/tests/src/test/resources/files/configurations/epic91/RaoParameters_case_91_1_6.json b/tests/src/test/resources/files/configurations/epic91/RaoParameters_case_91_1_6.json index 17e235efad..33168b4a28 100644 --- a/tests/src/test/resources/files/configurations/epic91/RaoParameters_case_91_1_6.json +++ b/tests/src/test/resources/files/configurations/epic91/RaoParameters_case_91_1_6.json @@ -3,8 +3,7 @@ "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_AMPERE", "curative-min-obj-improvement" : 0.0, - "preventive-stop-criterion" : "SECURE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "preventive-stop-criterion" : "SECURE" }, "range-actions-optimization" : { "max-mip-iterations" : 10, diff --git a/tests/src/test/resources/files/configurations/epic91/RaoParameters_case_91_1_7.json b/tests/src/test/resources/files/configurations/epic91/RaoParameters_case_91_1_7.json index b08396edea..ea5bbc7870 100644 --- a/tests/src/test/resources/files/configurations/epic91/RaoParameters_case_91_1_7.json +++ b/tests/src/test/resources/files/configurations/epic91/RaoParameters_case_91_1_7.json @@ -3,8 +3,7 @@ "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_AMPERE", "curative-min-obj-improvement" : 0.0, - "preventive-stop-criterion" : "SECURE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "preventive-stop-criterion" : "SECURE" }, "range-actions-optimization" : { "max-mip-iterations" : 10, diff --git a/tests/src/test/resources/files/configurations/epic91/RaoParameters_interrupt_search_tree.json b/tests/src/test/resources/files/configurations/epic91/RaoParameters_interrupt_search_tree.json index 29d1fb763e..688bf1eeca 100644 --- a/tests/src/test/resources/files/configurations/epic91/RaoParameters_interrupt_search_tree.json +++ b/tests/src/test/resources/files/configurations/epic91/RaoParameters_interrupt_search_tree.json @@ -3,8 +3,7 @@ "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_MEGAWATT", "curative-min-obj-improvement" : 0.0, - "preventive-stop-criterion" : "SECURE", - "curative-stop-criterion" : "SECURE" + "preventive-stop-criterion" : "SECURE" }, "range-actions-optimization" : { "max-mip-iterations" : 10, diff --git a/tests/src/test/resources/files/configurations/epic91/RaoParameters_interrupt_search_tree_2_threads.json b/tests/src/test/resources/files/configurations/epic91/RaoParameters_interrupt_search_tree_2_threads.json index 776c8e7812..ae6394a4a4 100644 --- a/tests/src/test/resources/files/configurations/epic91/RaoParameters_interrupt_search_tree_2_threads.json +++ b/tests/src/test/resources/files/configurations/epic91/RaoParameters_interrupt_search_tree_2_threads.json @@ -3,8 +3,7 @@ "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_MEGAWATT", "curative-min-obj-improvement" : 0.0, - "preventive-stop-criterion" : "SECURE", - "curative-stop-criterion" : "SECURE" + "preventive-stop-criterion" : "SECURE" }, "range-actions-optimization" : { "max-mip-iterations" : 10, diff --git a/tests/src/test/resources/files/configurations/epic91/RaoParameters_maxMargin_mw_ac_lf_false_3_100.json b/tests/src/test/resources/files/configurations/epic91/RaoParameters_maxMargin_mw_ac_lf_false_3_100.json index 0f2c178a94..949b331f5d 100644 --- a/tests/src/test/resources/files/configurations/epic91/RaoParameters_maxMargin_mw_ac_lf_false_3_100.json +++ b/tests/src/test/resources/files/configurations/epic91/RaoParameters_maxMargin_mw_ac_lf_false_3_100.json @@ -2,9 +2,9 @@ "version" : "2.5", "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_MEGAWATT", - "curative-min-obj-improvement" : 0.0, + "curative-min-obj-improvement" : 10000.0, "preventive-stop-criterion" : "MIN_OBJECTIVE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 10, diff --git a/tests/src/test/resources/files/configurations/epic91/RaoParameters_maxMargin_mw_ac_lf_false_3_100_mip.json b/tests/src/test/resources/files/configurations/epic91/RaoParameters_maxMargin_mw_ac_lf_false_3_100_mip.json index 6b05a4eaa3..37bec14dce 100644 --- a/tests/src/test/resources/files/configurations/epic91/RaoParameters_maxMargin_mw_ac_lf_false_3_100_mip.json +++ b/tests/src/test/resources/files/configurations/epic91/RaoParameters_maxMargin_mw_ac_lf_false_3_100_mip.json @@ -2,9 +2,9 @@ "version" : "2.5", "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_MEGAWATT", - "curative-min-obj-improvement" : 0.0, + "curative-min-obj-improvement" : 10000.0, "preventive-stop-criterion" : "MIN_OBJECTIVE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 10, diff --git a/tests/src/test/resources/files/configurations/rao1/RaoParameters_maxMargin_ampere_highPSTcost.json b/tests/src/test/resources/files/configurations/rao1/RaoParameters_maxMargin_ampere_highPSTcost.json index 2c03926ed8..3d157d4667 100644 --- a/tests/src/test/resources/files/configurations/rao1/RaoParameters_maxMargin_ampere_highPSTcost.json +++ b/tests/src/test/resources/files/configurations/rao1/RaoParameters_maxMargin_ampere_highPSTcost.json @@ -2,9 +2,9 @@ "version" : "2.5", "objective-function" : { "type" : "MAX_MIN_MARGIN_IN_AMPERE", - "curative-min-obj-improvement" : 0.0, + "curative-min-obj-improvement" : 10000.0, "preventive-stop-criterion" : "MIN_OBJECTIVE", - "curative-stop-criterion" : "MIN_OBJECTIVE" + "enforce-curative-security" : false }, "range-actions-optimization" : { "max-mip-iterations" : 10,