diff --git a/commons/src/main/java/com/powsybl/openrao/commons/Unit.java b/commons/src/main/java/com/powsybl/openrao/commons/Unit.java
index a496c47b01..afc28a2933 100644
--- a/commons/src/main/java/com/powsybl/openrao/commons/Unit.java
+++ b/commons/src/main/java/com/powsybl/openrao/commons/Unit.java
@@ -42,6 +42,15 @@ public String toString() {
return symbol;
}
+ public static Unit getEnum(String value) {
+ for (Unit v : values()) {
+ if (v.toString().equalsIgnoreCase(value)) {
+ return v;
+ }
+ }
+ throw new IllegalArgumentException();
+ }
+
public void checkPhysicalParameter(PhysicalParameter requestedPhysicalParameter) {
if (!requestedPhysicalParameter.equals(physicalParameter)) {
throw new OpenRaoException(String.format("%s Unit is not suited to measure a %s value.", this.toString(), requestedPhysicalParameter));
diff --git a/data/result-exporter/core-cne-exporter/src/test/java/com/powsybl/openrao/data/corecneexporter/CoreCneCnecsCreatorTest.java b/data/result-exporter/core-cne-exporter/src/test/java/com/powsybl/openrao/data/corecneexporter/CoreCneCnecsCreatorTest.java
index 39389cf41a..6c761a3449 100644
--- a/data/result-exporter/core-cne-exporter/src/test/java/com/powsybl/openrao/data/corecneexporter/CoreCneCnecsCreatorTest.java
+++ b/data/result-exporter/core-cne-exporter/src/test/java/com/powsybl/openrao/data/corecneexporter/CoreCneCnecsCreatorTest.java
@@ -230,7 +230,8 @@ void testExportPreventivePureMnec() {
mockCnecResult(cnec1, 80, 20, 200, .1);
- raoParameters.getObjectiveFunctionParameters().setType(ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_RELATIVE_MARGIN_IN_MEGAWATT);
+ raoParameters.getObjectiveFunctionParameters().setType(ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_RELATIVE_MARGIN);
+ raoParameters.getObjectiveFunctionParameters().setUnit(Unit.MEGAWATT);
CneHelper cneHelper = new CneHelper(crac, raoResult, properties, CORE_CNE_EXPORT_PROPERTIES_PREFIX);
CoreCneCnecsCreator cneCnecsCreator = new CoreCneCnecsCreator(cneHelper, new MockCracCreationContext(crac));
@@ -268,7 +269,8 @@ void testExportPreventiveCnecAndMnec() {
mockCnecResult(cnec1, 80, 20, 200, .1);
- raoParameters.getObjectiveFunctionParameters().setType(ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_RELATIVE_MARGIN_IN_MEGAWATT);
+ raoParameters.getObjectiveFunctionParameters().setType(ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_RELATIVE_MARGIN);
+ raoParameters.getObjectiveFunctionParameters().setUnit(Unit.MEGAWATT);
CneHelper cneHelper = new CneHelper(crac, raoResult, properties, CORE_CNE_EXPORT_PROPERTIES_PREFIX);
CoreCneCnecsCreator cneCnecsCreator = new CoreCneCnecsCreator(cneHelper, new MockCracCreationContext(crac));
diff --git a/docs/castor/linear-problem/max-min-relative-margin-filler.md b/docs/castor/linear-problem/max-min-relative-margin-filler.md
index aa4f3917b3..bf02cfb2fc 100644
--- a/docs/castor/linear-problem/max-min-relative-margin-filler.md
+++ b/docs/castor/linear-problem/max-min-relative-margin-filler.md
@@ -21,7 +21,7 @@ And $PTDF_{zTos}(z1, c)$, the zone-to-slack PTDF of bidding zone $z1$ on CNEC $c
| Name | Symbol | Details |
|------------------------------------------------------------------------|----------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
-| [type](/parameters.md#type) | | This filler is only used if the objective function is MAX_MIN_MARGIN_IN_MEGAWATT, or MAX_MIN_MARGIN_IN_AMPERE. This parameter is also used to set the unit (AMPERE/MW) of the objective function |
+| [type](/parameters.md#type) | | This filler is only used if the objective function is MAX_MIN_MARGIN. |
| [ptdf-sum-lower-bound](/parameters.md#ptdf-sum-lower-bound) | $\varepsilon_{PTDF}$ | zToz PTDF sum below this value are lifted to the ptdf-sum-lower-bound, to avoid a bad conditionning of the problem where the value of relative margins are very high.
*Its impact on the accuracy of the problem is insignificant, as high relative margins do not usually define the min. relative margin.* |
## Defined optimization variables
diff --git a/docs/output-data/core-cne/java-api.md b/docs/output-data/core-cne/java-api.md
index a0482c931c..3f7a045cf8 100644
--- a/docs/output-data/core-cne/java-api.md
+++ b/docs/output-data/core-cne/java-api.md
@@ -58,10 +58,8 @@ properties.setProperty("rao-result.export.core-cne.receiver-id", "RECEIVER_ID");
properties.setProperty("rao-result.export.core-cne.receiver-role", "A36"); // CAPACITY_COORDINATOR
properties.setProperty("rao-result.export.core-cne.time-interval", "2021-10-30T22:00Z/2021-10-31T23:00Z");
switch (raoParameters.getObjectiveFunctionParameters().getType()) {
- case MAX_MIN_RELATIVE_MARGIN_IN_AMPERE -> properties.setProperty("rao-result.export.core-cne.relative-positive-margins", "true");
- case MAX_MIN_RELATIVE_MARGIN_IN_MEGAWATT -> properties.setProperty("rao-result.export.core-cne.relative-positive-margins", "true");
- case MAX_MIN_MARGIN_IN_AMPERE -> properties.setProperty("rao-result.export.core-cne.relative-positive-margins", "false");
- case MAX_MIN_MARGIN_IN_MEGAWATT -> properties.setProperty("rao-result.export.core-cne.relative-positive-margins", "false");
+ case MAX_MIN_RELATIVE_MARGIN -> properties.setProperty("rao-result.export.core-cne.relative-positive-margins", "true");
+ case MAX_MIN_MARGIN -> properties.setProperty("rao-result.export.core-cne.relative-positive-margins", "false");
}
if (raoParameters.hasExtension(LoopFlowParametersExtension.class)) {
properties.setProperty("rao-result.export.core-cne.with-loop-flows", "true");
diff --git a/docs/parameters.md b/docs/parameters.md
index b9cd8e0051..0d6b9f3125 100644
--- a/docs/parameters.md
+++ b/docs/parameters.md
@@ -21,24 +21,26 @@ These parameters should be always set in the RAO parameters file or object.
These parameters (objective-function) configure the remedial action optimisation's objective function.
#### type
-
- **Expected value**: one of the following:
- - "MAX_MIN_MARGIN_IN_MEGAWATT"
- - "MAX_MIN_MARGIN_IN_AMPERE"
- - "MAX_MIN_RELATIVE_MARGIN_IN_MEGAWATT"
- - "MAX_MIN_RELATIVE_MARGIN_IN_AMPERE"
-- **Default value**: "MAX_MIN_MARGIN_IN_MEGAWATT"
+ - "MAX_MIN_MARGIN"
+ - "MAX_MIN_RELATIVE_MARGIN"
+- **Default value**: "MAX_MIN_MARGIN"
- **Usage**: this parameter sets the objective function of the RAO. For now, the existing objective function are:
- - **MAX_MIN_MARGIN_IN_MEGAWATT**: maximization of the min(margin), where min(margin) is the smallest margin of all
- CNECs and the margins are considered in MW.
- - **MAX_MIN_MARGIN_IN_AMPERE**: maximization of the min(margin), where min(margin) is the smallest margin of all CNECs
- and the margins are considered in A. Note that this objective function is not just a homothety of the previous one,
- as CNECs from different voltage levels will not have the same weight in the objective function depending on the unit
- considered (MW or A). This objective function only works in AC-load-flow mode (see [sensitivity-parameters](#sensitivity-parameters)).
- - **MAX_MIN_RELATIVE_MARGIN_IN_MEGAWATT**: same as MAX_MIN_MARGIN_IN_MEGAWATT, but the margins will be relative
+ - **MAX_MIN_MARGIN**: maximization of the min(margin), where min(margin) is the smallest margin of all
+ CNECs.
+ - **MAX_MIN_RELATIVE_MARGIN**: same as MAX_MIN_MARGIN, but the margins will be relative
(divided by the absolute sum of PTDFs) when they are positive.
- - **MAX_MIN_RELATIVE_MARGIN_IN_AMPERE**: same as MAX_MIN_MARGIN_IN_AMPERE, but the margins will be relative (divided
- by the absolute sum of PTDFs) when they are positive.
+
+#### unit
+- **Expected value**: one of the following:
+ - "MEGAWATT"
+ - "AMPERE"
+- **Default value**: "MEGAWATT"
+- **Usage**: this parameter sets the objective function unit of the RAO. For now, the existing objective function units are:
+ - **MEGAWATT**: the margins to maximize are considered in MW.
+ - **AMPERE**: the margins to maximize are considered in A.
+ Note that CNECs from different voltage levels will not have the same weight in the objective function depending on the unit
+ considered (MW or A). Ampere unit only works in AC-load-flow mode (see [sensitivity-parameters](#sensitivity-parameters)).
#### preventive-stop-criterion
- **Expected value**: one of the following:
@@ -551,7 +553,8 @@ Zones are seperated by + or -.
{
"version" : "2.4",
"objective-function" : {
- "type" : "MAX_MIN_RELATIVE_MARGIN_IN_AMPERE",
+ "type" : "MAX_MIN_RELATIVE_MARGIN",
+ "unit" : "A",
"curative-min-obj-improvement" : 0.0,
"preventive-stop-criterion" : "SECURE",
"enforce-curative-security" : true
@@ -669,7 +672,8 @@ Zones are seperated by + or -.
Based on PowSyBl's [configuration mechanism](inv:powsyblcore:std:doc#user/configuration/index).
~~~yaml
rao-objective-function:
- type: MAX_MIN_MARGIN_IN_AMPERE
+ type: MAX_MIN_MARGIN
+ unit: AMPERE
preventive-stop-criterion: SECURE
rao-range-actions-optimization:
diff --git a/docs/tutorial.md b/docs/tutorial.md
index fe5822d206..4cdb1c3d0b 100644
--- a/docs/tutorial.md
+++ b/docs/tutorial.md
@@ -295,7 +295,8 @@ raoParameters.setLoadFlowAndSensitivityParameters(loadFlowAndSensitivityParamete
// Ask the RAO to maximize minimum margin in MW, and to stop when network is secure (i.e. when margins are positive)
ObjectiveFunctionParameters objectiveFunctionParameters = new ObjectiveFunctionParameters();
-objectiveFunctionParameters.setType(ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_MARGIN_IN_MEGAWATT);
+objectiveFunctionParameters.setType(ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_MARGIN);
+objectiveFunctionParameters.setUnit(Unit.MEGAWATT);
objectiveFunctionParameters.setPreventiveStopCriterion(ObjectiveFunctionParameters.PreventiveStopCriterion.SECURE);
objectiveFunctionParameters.setCurativeStopCriterion(ObjectiveFunctionParameters.CurativeStopCriterion.SECURE);
raoParameters.setObjectiveFunctionParameters(objectiveFunctionParameters);
@@ -577,7 +578,8 @@ public class Main {
// Ask the RAO to maximize minimum margin in MW, and to stop when network is secure (i.e. when margins are positive)
ObjectiveFunctionParameters objectiveFunctionParameters = new ObjectiveFunctionParameters();
- objectiveFunctionParameters.setType(ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_MARGIN_IN_MEGAWATT);
+ objectiveFunctionParameters.setType(ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_MARGIN);
+ objectiveFunctionParameters.setUnit(Unit.MEGAWATT);
objectiveFunctionParameters.setPreventiveStopCriterion(ObjectiveFunctionParameters.PreventiveStopCriterion.SECURE);
objectiveFunctionParameters.setCurativeStopCriterion(ObjectiveFunctionParameters.CurativeStopCriterion.SECURE);
raoParameters.setObjectiveFunctionParameters(objectiveFunctionParameters);
diff --git a/python-util/rao_parameter_modification.py b/python-util/rao_parameter_modification.py
index a7f709ab6d..ed23b9f9a9 100644
--- a/python-util/rao_parameter_modification.py
+++ b/python-util/rao_parameter_modification.py
@@ -15,6 +15,7 @@
tag_by_file_type = {"json": "objective-function", "yaml": "rao-objective-function"}
def rao_parameters_file(file_path):
+ # do not work with yaml yet
correct_version = False
score = 0
if "target" not in file_path and (file_path.endswith(".json") or file_path.endswith(".yml")):
@@ -25,7 +26,7 @@ def rao_parameters_file(file_path):
correct_version = True
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:
+ if "MAX_MIN_MARGIN" in line or "MAX_MIN_RELATIVE_MARGIN" in line:
score += 1
if correct_version and score >= 2:
return True
@@ -82,24 +83,21 @@ def obj_function_as_str_lines(new_data, file_type):
def new_rao_param(data: dict, file_path: str, file_type: str) -> dict:
try:
- old_obj_fun = data[tag_by_file_type[file_type]]
+ obj_fun = data[tag_by_file_type[file_type]]
+ # new_obj_fun to have type and unit on top of obj fun
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)
+ if "type" in obj_fun:
+ if "MAX_MIN_MARGIN" in obj_fun["type"]:
+ new_obj_fun["type"] = "MAX_MIN_MARGIN"
+ elif "MAX_MIN_RELATIVE_MARGIN" in obj_fun["type"]:
+ new_obj_fun["type"] = "MAX_MIN_RELATIVE_MARGIN"
+ if "MEGAWATT" in obj_fun["type"]:
+ new_obj_fun["unit"] = "MW"
+ elif "AMPERE" in obj_fun["type"]:
+ new_obj_fun["unit"] = "A"
+ for key in obj_fun:
+ if key not in new_obj_fun:
+ new_obj_fun[key] = obj_fun[key]
except KeyError as ke:
raise KeyError("in file " + file_path) from ke
data[tag_by_file_type[file_type]] = new_obj_fun
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 fa0bcae7af..76b2496971 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
@@ -25,6 +25,7 @@ private RaoParametersCommons() {
public static final String OBJECTIVE_FUNCTION = "objective-function";
public static final String OBJECTIVE_FUNCTION_SECTION = "rao-objective-function";
public static final String TYPE = "type";
+ public static final String UNIT = "unit";
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 ENFORCE_CURATIVE_SECURITY = "enforce-curative-security";
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 34f8a0809d..e1ef89f212 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
@@ -7,6 +7,7 @@
package com.powsybl.openrao.raoapi.json;
import com.powsybl.openrao.commons.OpenRaoException;
+import com.powsybl.openrao.commons.Unit;
import com.powsybl.openrao.raoapi.parameters.ObjectiveFunctionParameters;
import com.powsybl.openrao.raoapi.parameters.RaoParameters;
import com.fasterxml.jackson.core.JsonGenerator;
@@ -27,6 +28,7 @@ private JsonObjectiveFunctionParameters() {
static void serialize(RaoParameters parameters, JsonGenerator jsonGenerator) throws IOException {
jsonGenerator.writeObjectFieldStart(OBJECTIVE_FUNCTION);
jsonGenerator.writeObjectField(TYPE, parameters.getObjectiveFunctionParameters().getType());
+ jsonGenerator.writeObjectField(UNIT, parameters.getObjectiveFunctionParameters().getUnit());
jsonGenerator.writeObjectField(PREVENTIVE_STOP_CRITERION, parameters.getObjectiveFunctionParameters().getPreventiveStopCriterion());
jsonGenerator.writeNumberField(CURATIVE_MIN_OBJ_IMPROVEMENT, parameters.getObjectiveFunctionParameters().getCurativeMinObjImprovement());
jsonGenerator.writeBooleanField(ENFORCE_CURATIVE_SECURITY, parameters.getObjectiveFunctionParameters().getEnforceCurativeSecurity());
@@ -39,6 +41,9 @@ static void deserialize(JsonParser jsonParser, RaoParameters raoParameters) thro
case TYPE:
raoParameters.getObjectiveFunctionParameters().setType(stringToObjectiveFunction(jsonParser.nextTextValue()));
break;
+ case UNIT:
+ raoParameters.getObjectiveFunctionParameters().setUnit(stringToObjectiveFunctionUnit(jsonParser.nextTextValue()));
+ break;
case PREVENTIVE_STOP_CRITERION:
raoParameters.getObjectiveFunctionParameters().setPreventiveStopCriterion(stringToPreventiveStopCriterion(jsonParser.nextTextValue()));
break;
@@ -64,6 +69,19 @@ private static ObjectiveFunctionParameters.ObjectiveFunctionType stringToObjecti
}
}
+ private static Unit stringToObjectiveFunctionUnit(String string) {
+ Unit unit;
+ try {
+ unit = Unit.getEnum(string);
+ } catch (IllegalArgumentException e) {
+ throw new OpenRaoException(String.format("Unknown objective function unit value: %s", string));
+ }
+ if (unit != Unit.MEGAWATT && unit != Unit.AMPERE) {
+ throw new OpenRaoException(String.format("Unknown objective function unit value: %s", string));
+ }
+ return unit;
+ }
+
private static ObjectiveFunctionParameters.PreventiveStopCriterion stringToPreventiveStopCriterion(String string) {
try {
return ObjectiveFunctionParameters.PreventiveStopCriterion.valueOf(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 133d4217d6..634d2cb740 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
@@ -21,7 +21,8 @@
*/
public class ObjectiveFunctionParameters {
// Default values
- private static final ObjectiveFunctionType DEFAULT_OBJECTIVE_FUNCTION = ObjectiveFunctionType.MAX_MIN_MARGIN_IN_MEGAWATT;
+ private static final ObjectiveFunctionType DEFAULT_OBJECTIVE_FUNCTION = ObjectiveFunctionType.MAX_MIN_MARGIN;
+ private static final Unit DEFAULT_UNIT = Unit.MEGAWATT;
private static final double DEFAULT_CURATIVE_MIN_OBJ_IMPROVEMENT = 0;
private static final PreventiveStopCriterion DEFAULT_PREVENTIVE_STOP_CRITERION = PreventiveStopCriterion.SECURE;
private static final boolean DEFAULT_ENFORCE_CURATIVE_SECURITY = false;
@@ -30,26 +31,14 @@ public class ObjectiveFunctionParameters {
private double curativeMinObjImprovement = DEFAULT_CURATIVE_MIN_OBJ_IMPROVEMENT;
private PreventiveStopCriterion preventiveStopCriterion = DEFAULT_PREVENTIVE_STOP_CRITERION;
private boolean enforceCurativeSecurity = DEFAULT_ENFORCE_CURATIVE_SECURITY;
+ private Unit unit = DEFAULT_UNIT;
// Enum
public enum ObjectiveFunctionType {
- MAX_MIN_MARGIN_IN_MEGAWATT(Unit.MEGAWATT),
- MAX_MIN_MARGIN_IN_AMPERE(Unit.AMPERE),
- MAX_MIN_RELATIVE_MARGIN_IN_MEGAWATT(Unit.MEGAWATT),
- MAX_MIN_RELATIVE_MARGIN_IN_AMPERE(Unit.AMPERE);
-
- private final Unit unit;
-
- ObjectiveFunctionType(Unit unit) {
- this.unit = unit;
- }
-
- public Unit getUnit() {
- return unit;
- }
-
+ MAX_MIN_MARGIN,
+ MAX_MIN_RELATIVE_MARGIN;
public boolean relativePositiveMargins() {
- return this.equals(MAX_MIN_RELATIVE_MARGIN_IN_MEGAWATT) || this.equals(MAX_MIN_RELATIVE_MARGIN_IN_AMPERE);
+ return this.equals(MAX_MIN_RELATIVE_MARGIN);
}
}
@@ -67,6 +56,14 @@ public void setType(ObjectiveFunctionType type) {
this.type = type;
}
+ public Unit getUnit() {
+ return unit;
+ }
+
+ public void setUnit(Unit unit) {
+ this.unit = unit;
+ }
+
public void setPreventiveStopCriterion(PreventiveStopCriterion preventiveStopCriterion) {
this.preventiveStopCriterion = preventiveStopCriterion;
}
@@ -94,6 +91,7 @@ public static ObjectiveFunctionParameters load(PlatformConfig platformConfig) {
.ifPresent(config -> {
parameters.setType(config.getEnumProperty(TYPE, ObjectiveFunctionType.class,
DEFAULT_OBJECTIVE_FUNCTION));
+ parameters.setUnit(config.getEnumProperty(UNIT, Unit.class, DEFAULT_UNIT));
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));
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 1894204992..f008721fce 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
@@ -7,6 +7,7 @@
package com.powsybl.openrao.raoapi.json;
import com.powsybl.openrao.commons.OpenRaoException;
+import com.powsybl.openrao.commons.Unit;
import com.powsybl.openrao.raoapi.parameters.ObjectiveFunctionParameters;
import com.powsybl.openrao.raoapi.parameters.RangeActionsOptimizationParameters;
import com.powsybl.openrao.raoapi.parameters.RaoParameters;
@@ -52,7 +53,8 @@ void roundTripDefault() throws IOException {
void roundTrip() throws IOException {
RaoParameters parameters = new RaoParameters();
// Objective Function parameters
- parameters.getObjectiveFunctionParameters().setType(ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_MARGIN_IN_AMPERE);
+ parameters.getObjectiveFunctionParameters().setType(ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_MARGIN);
+ parameters.getObjectiveFunctionParameters().setUnit(Unit.AMPERE);
parameters.getObjectiveFunctionParameters().setPreventiveStopCriterion(ObjectiveFunctionParameters.PreventiveStopCriterion.MIN_OBJECTIVE);
parameters.getObjectiveFunctionParameters().setCurativeMinObjImprovement(983);
parameters.getObjectiveFunctionParameters().setEnforceCurativeSecurity(true);
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 6383571cc9..c2f0ed49d6 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
@@ -7,6 +7,7 @@
package com.powsybl.openrao.raoapi.parameters;
import com.powsybl.openrao.commons.OpenRaoException;
+import com.powsybl.openrao.commons.Unit;
import com.powsybl.openrao.raoapi.parameters.extensions.*;
import com.google.common.jimfs.Configuration;
import com.google.common.jimfs.Jimfs;
@@ -41,7 +42,8 @@ public void setUp() {
@Test
void checkObjectiveFunctionConfig() {
MapModuleConfig objectiveFunctionModuleConfig = platformCfg.createModuleConfig("rao-objective-function");
- objectiveFunctionModuleConfig.setStringProperty("type", "MAX_MIN_RELATIVE_MARGIN_IN_AMPERE");
+ objectiveFunctionModuleConfig.setStringProperty("type", "MAX_MIN_RELATIVE_MARGIN");
+ objectiveFunctionModuleConfig.setStringProperty("unit", "AMPERE");
objectiveFunctionModuleConfig.setStringProperty("curative-min-obj-improvement", Objects.toString(123.0));
objectiveFunctionModuleConfig.setStringProperty("preventive-stop-criterion", "MIN_OBJECTIVE");
objectiveFunctionModuleConfig.setStringProperty("enforce-curative-security", "false");
@@ -49,7 +51,8 @@ void checkObjectiveFunctionConfig() {
RaoParameters parameters = new RaoParameters();
RaoParameters.load(parameters, platformCfg);
ObjectiveFunctionParameters objectiveFunctionParameters = parameters.getObjectiveFunctionParameters();
- assertEquals(ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_RELATIVE_MARGIN_IN_AMPERE, objectiveFunctionParameters.getType());
+ assertEquals(ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_RELATIVE_MARGIN, objectiveFunctionParameters.getType());
+ assertEquals(Unit.AMPERE, objectiveFunctionParameters.getUnit());
assertEquals(123, objectiveFunctionParameters.getCurativeMinObjImprovement(), DOUBLE_TOLERANCE);
assertEquals(ObjectiveFunctionParameters.PreventiveStopCriterion.MIN_OBJECTIVE, objectiveFunctionParameters.getPreventiveStopCriterion());
assertFalse(objectiveFunctionParameters.getEnforceCurativeSecurity());
@@ -214,13 +217,15 @@ void checkRelativeMarginsConfig() {
@Test
void checkMultipleConfigs() {
MapModuleConfig objectiveFunctionModuleConfig = platformCfg.createModuleConfig("rao-objective-function");
- objectiveFunctionModuleConfig.setStringProperty("type", "MAX_MIN_RELATIVE_MARGIN_IN_AMPERE");
+ objectiveFunctionModuleConfig.setStringProperty("type", "MAX_MIN_RELATIVE_MARGIN");
+ objectiveFunctionModuleConfig.setStringProperty("unit", "AMPERE");
objectiveFunctionModuleConfig.setStringProperty("curative-min-obj-improvement", Objects.toString(123.0));
MapModuleConfig rangeActionsOptimizationModuleConfig = platformCfg.createModuleConfig("rao-range-actions-optimization");
rangeActionsOptimizationModuleConfig.setStringProperty("max-mip-iterations", Objects.toString(32));
RaoParameters parameters = new RaoParameters();
RaoParameters.load(parameters, platformCfg);
- assertEquals(ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_RELATIVE_MARGIN_IN_AMPERE, parameters.getObjectiveFunctionParameters().getType());
+ assertEquals(ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_RELATIVE_MARGIN, parameters.getObjectiveFunctionParameters().getType());
+ assertEquals(Unit.AMPERE, parameters.getObjectiveFunctionParameters().getUnit());
assertEquals(123, parameters.getObjectiveFunctionParameters().getCurativeMinObjImprovement(), 1e-6);
assertEquals(32, parameters.getRangeActionsOptimizationParameters().getMaxMipIterations(), 1e-6);
assertTrue(Objects.isNull(parameters.getExtension(LoopFlowParametersExtension.class)));
diff --git a/ra-optimisation/rao-api/src/test/java/com/powsybl/openrao/raoapi/parameters/RaoParametersConsistencyTest.java b/ra-optimisation/rao-api/src/test/java/com/powsybl/openrao/raoapi/parameters/RaoParametersConsistencyTest.java
index 7c8a149e91..99cf7ab6f8 100644
--- a/ra-optimisation/rao-api/src/test/java/com/powsybl/openrao/raoapi/parameters/RaoParametersConsistencyTest.java
+++ b/ra-optimisation/rao-api/src/test/java/com/powsybl/openrao/raoapi/parameters/RaoParametersConsistencyTest.java
@@ -60,10 +60,8 @@ void testSetBoundariesFromMixOfCodes() {
@Test
void testRelativePositiveMargins() {
- assertTrue(ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_RELATIVE_MARGIN_IN_AMPERE.relativePositiveMargins());
- assertTrue(ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_RELATIVE_MARGIN_IN_MEGAWATT.relativePositiveMargins());
- assertFalse(ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_MARGIN_IN_AMPERE.relativePositiveMargins());
- assertFalse(ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_MARGIN_IN_MEGAWATT.relativePositiveMargins());
+ assertTrue(ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_RELATIVE_MARGIN.relativePositiveMargins());
+ assertFalse(ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_MARGIN.relativePositiveMargins());
}
@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 776e9999e8..56932d6c68 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
@@ -6,6 +6,7 @@
*/
package com.powsybl.openrao.raoapi.parameters;
+import com.powsybl.openrao.commons.Unit;
import com.powsybl.openrao.raoapi.json.JsonRaoParameters;
import com.powsybl.openrao.raoapi.parameters.extensions.LoopFlowParametersExtension;
import com.powsybl.openrao.raoapi.parameters.extensions.MnecParametersExtension;
@@ -43,7 +44,8 @@ void testConfigWithExtensions() throws IOException {
RaoParameters parameters = loadRaoParameters("config_withExtensions");
ObjectiveFunctionParameters objectiveFunctionParameters = parameters.getObjectiveFunctionParameters();
- assertEquals(ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_MARGIN_IN_AMPERE, objectiveFunctionParameters.getType());
+ assertEquals(ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_MARGIN, objectiveFunctionParameters.getType());
+ assertEquals(Unit.AMPERE, objectiveFunctionParameters.getUnit());
assertEquals(3, objectiveFunctionParameters.getCurativeMinObjImprovement(), DOUBLE_TOLERANCE);
assertEquals(ObjectiveFunctionParameters.PreventiveStopCriterion.MIN_OBJECTIVE, objectiveFunctionParameters.getPreventiveStopCriterion());
assertFalse(objectiveFunctionParameters.getEnforceCurativeSecurity());
@@ -125,7 +127,8 @@ void testConfigWithoutExtensions() throws IOException {
RaoParameters parameters = loadRaoParameters("config_withoutExtensions");
ObjectiveFunctionParameters objectiveFunctionParameters = parameters.getObjectiveFunctionParameters();
- assertEquals(ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_MARGIN_IN_AMPERE, objectiveFunctionParameters.getType());
+ assertEquals(ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_MARGIN, objectiveFunctionParameters.getType());
+ assertEquals(Unit.AMPERE, objectiveFunctionParameters.getUnit());
assertEquals(3, objectiveFunctionParameters.getCurativeMinObjImprovement(), DOUBLE_TOLERANCE);
assertEquals(ObjectiveFunctionParameters.PreventiveStopCriterion.MIN_OBJECTIVE, objectiveFunctionParameters.getPreventiveStopCriterion());
assertFalse(objectiveFunctionParameters.getEnforceCurativeSecurity());
@@ -194,7 +197,8 @@ void testConfigWithPartialExtensions() throws IOException {
RaoParameters parameters = loadRaoParameters("config_withPartialExtensions");
ObjectiveFunctionParameters objectiveFunctionParameters = parameters.getObjectiveFunctionParameters();
- assertEquals(ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_MARGIN_IN_MEGAWATT, objectiveFunctionParameters.getType());
+ assertEquals(ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_MARGIN, objectiveFunctionParameters.getType());
+ assertEquals(Unit.MEGAWATT, objectiveFunctionParameters.getUnit());
assertEquals(3, objectiveFunctionParameters.getCurativeMinObjImprovement(), DOUBLE_TOLERANCE);
assertEquals(ObjectiveFunctionParameters.PreventiveStopCriterion.MIN_OBJECTIVE, objectiveFunctionParameters.getPreventiveStopCriterion());
assertFalse(objectiveFunctionParameters.getEnforceCurativeSecurity());
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 30c532ab6c..8a374c6d65 100644
--- a/ra-optimisation/rao-api/src/test/resources/RaoParametersSet_v2.json
+++ b/ra-optimisation/rao-api/src/test/resources/RaoParametersSet_v2.json
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_AMPERE",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "A",
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"curative-min-obj-improvement" : 983.0,
"enforce-curative-security" : true
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 800323d649..4d2f386c4d 100644
--- a/ra-optimisation/rao-api/src/test/resources/RaoParametersWithExtension_v2.json
+++ b/ra-optimisation/rao-api/src/test/resources/RaoParametersWithExtension_v2.json
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_MEGAWATT",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "MW",
"preventive-stop-criterion" : "SECURE",
"curative-min-obj-improvement" : 0.0,
"enforce-curative-security" : false
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 ebbbf7e5c8..724b0b2075 100644
--- a/ra-optimisation/rao-api/src/test/resources/RaoParametersWithLoopFlowError_v2.json
+++ b/ra-optimisation/rao-api/src/test/resources/RaoParametersWithLoopFlowError_v2.json
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_MEGAWATT",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "MW",
"preventive-stop-criterion" : "SECURE",
"curative-min-obj-improvement" : 0.0
},
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 d15bec1b7e..d2192b2b4a 100644
--- a/ra-optimisation/rao-api/src/test/resources/RaoParametersWithPrevStopCriterionError_v2.json
+++ b/ra-optimisation/rao-api/src/test/resources/RaoParametersWithPrevStopCriterionError_v2.json
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_MEGAWATT",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "MW",
"preventive-stop-criterion" : "WRONG",
"curative-min-obj-improvement" : 0.0
},
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 9f8e1a8dfb..9020d01ac6 100644
--- a/ra-optimisation/rao-api/src/test/resources/RaoParametersWithWrongField_v2.json
+++ b/ra-optimisation/rao-api/src/test/resources/RaoParametersWithWrongField_v2.json
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_MEGAWATT",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "MW",
"preventive-stop-criterion" : "SECURE",
"curative-min-obj-improvement" : 0.0
},
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 66b09077ba..04c9386a8f 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_AMPERE",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "A",
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"curative-min-obj-improvement" : 3.0,
"enforce-curative-security" : false
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 5bba5b5e63..e4c9643ae4 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_MEGAWATT",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "MW",
"preventive-stop-criterion" : "SECURE",
"curative-min-obj-improvement" : 0.0,
"enforce-curative-security" : false
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 e0c79ea5c8..0df864eebb 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_MEGAWATT",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "MW",
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"curative-min-obj-improvement" : 3.0,
"enforce-curative-security" : false
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 252c132c93..1b20d92434 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_AMPERE",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "A",
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"curative-min-obj-improvement" : 3.0,
"enforce-curative-security" : false
diff --git a/ra-optimisation/rao-api/src/test/resources/RaoParameters_default_v2.json b/ra-optimisation/rao-api/src/test/resources/RaoParameters_default_v2.json
index ab39cd98ff..e7735795dc 100644
--- a/ra-optimisation/rao-api/src/test/resources/RaoParameters_default_v2.json
+++ b/ra-optimisation/rao-api/src/test/resources/RaoParameters_default_v2.json
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_MEGAWATT",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "MW",
"preventive-stop-criterion" : "SECURE"
},
"range-actions-optimization" : {
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 071ce5977c..9decec5c10 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_MEGAWATT",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "MW",
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"enforce-curative-security" : false
},
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 b9782070b1..2705752085 100644
--- a/ra-optimisation/rao-api/src/test/resources/RaoParameters_v2.json
+++ b/ra-optimisation/rao-api/src/test/resources/RaoParameters_v2.json
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_MEGAWATT",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "MW",
"preventive-stop-criterion" : "SECURE",
"curative-min-obj-improvement" : 0.0,
"enforce-curative-security" : false
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 dda8abd801..fbe6897a5f 100644
--- a/ra-optimisation/rao-api/src/test/resources/config_withExtensions.yml
+++ b/ra-optimisation/rao-api/src/test/resources/config_withExtensions.yml
@@ -1,5 +1,6 @@
rao-objective-function:
- type: MAX_MIN_MARGIN_IN_AMPERE
+ type: MAX_MIN_MARGIN
+ unit: AMPERE
preventive-stop-criterion: MIN_OBJECTIVE
curative-min-obj-improvement: 3.0
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 e0d7d35028..a808ad8b02 100644
--- a/ra-optimisation/rao-api/src/test/resources/config_withoutExtensions.yml
+++ b/ra-optimisation/rao-api/src/test/resources/config_withoutExtensions.yml
@@ -1,5 +1,6 @@
rao-objective-function:
- type: MAX_MIN_MARGIN_IN_AMPERE
+ type: MAX_MIN_MARGIN
+ unit: AMPERE
preventive-stop-criterion: MIN_OBJECTIVE
curative-min-obj-improvement: 3.0
enforce-curative-security: false
diff --git a/ra-optimisation/search-tree-rao/src/main/java/com/powsybl/openrao/searchtreerao/castor/algorithm/AutomatonSimulator.java b/ra-optimisation/search-tree-rao/src/main/java/com/powsybl/openrao/searchtreerao/castor/algorithm/AutomatonSimulator.java
index 3e75182a67..4ef15fdcc1 100644
--- a/ra-optimisation/search-tree-rao/src/main/java/com/powsybl/openrao/searchtreerao/castor/algorithm/AutomatonSimulator.java
+++ b/ra-optimisation/search-tree-rao/src/main/java/com/powsybl/openrao/searchtreerao/castor/algorithm/AutomatonSimulator.java
@@ -78,7 +78,7 @@ public final class AutomatonSimulator {
public AutomatonSimulator(Crac crac, RaoParameters raoParameters, ToolProvider toolProvider, FlowResult initialFlowResult, PrePerimeterResult prePerimeterSensitivityOutput, Set operatorsNotSharingCras, int numberLoggedElementsDuringRao) {
this.crac = crac;
this.raoParameters = raoParameters;
- this.flowUnit = raoParameters.getObjectiveFunctionParameters().getType().getUnit();
+ this.flowUnit = raoParameters.getObjectiveFunctionParameters().getUnit();
this.toolProvider = toolProvider;
this.initialFlowResult = initialFlowResult;
this.prePerimeterSensitivityOutput = prePerimeterSensitivityOutput;
@@ -94,7 +94,7 @@ public AutomatonSimulator(Crac crac, RaoParameters raoParameters, ToolProvider t
AutomatonPerimeterResultImpl simulateAutomatonState(State automatonState, Set curativeStates, Network network, StateTree stateTree, TreeParameters automatonTreeParameters) {
TECHNICAL_LOGS.info("Optimizing automaton state {}.", automatonState.getId());
TECHNICAL_LOGS.info("Initial situation:");
- RaoLogger.logMostLimitingElementsResults(TECHNICAL_LOGS, prePerimeterSensitivityOutput, Set.of(automatonState), raoParameters.getObjectiveFunctionParameters().getType(), numberLoggedElementsDuringRao);
+ RaoLogger.logMostLimitingElementsResults(TECHNICAL_LOGS, prePerimeterSensitivityOutput, Set.of(automatonState), raoParameters.getObjectiveFunctionParameters().getType(), raoParameters.getObjectiveFunctionParameters().getUnit(), numberLoggedElementsDuringRao);
PrePerimeterSensitivityAnalysis preAutoPstOptimizationSensitivityAnalysis = getPreAutoPerimeterSensitivityAnalysis(automatonState, curativeStates);
@@ -262,7 +262,7 @@ TopoAutomatonSimulationResult simulateTopologicalAutomatons(State automatonState
if (automatonRangeActionOptimizationSensitivityAnalysisOutput.getSensitivityStatus(automatonState) == ComputationStatus.FAILURE) {
return new TopoAutomatonSimulationResult(automatonRangeActionOptimizationSensitivityAnalysisOutput, appliedNetworkActions);
}
- RaoLogger.logMostLimitingElementsResults(TECHNICAL_LOGS, automatonRangeActionOptimizationSensitivityAnalysisOutput, Set.of(automatonState), raoParameters.getObjectiveFunctionParameters().getType(), numberLoggedElementsDuringRao);
+ RaoLogger.logMostLimitingElementsResults(TECHNICAL_LOGS, automatonRangeActionOptimizationSensitivityAnalysisOutput, Set.of(automatonState), raoParameters.getObjectiveFunctionParameters().getType(), raoParameters.getObjectiveFunctionParameters().getUnit(), numberLoggedElementsDuringRao);
}
return new TopoAutomatonSimulationResult(automatonRangeActionOptimizationSensitivityAnalysisOutput, appliedNetworkActions);
@@ -316,7 +316,7 @@ RangeAutomatonSimulationResult simulateRangeAutomatons(State automatonState, Set
if (finalPostAutoResult.getSensitivityStatus(automatonState) == ComputationStatus.FAILURE) {
return new RangeAutomatonSimulationResult(finalPostAutoResult, activatedRangeActions, rangeActionsWithSetpoint);
}
- RaoLogger.logMostLimitingElementsResults(TECHNICAL_LOGS, finalPostAutoResult, Set.of(automatonState), raoParameters.getObjectiveFunctionParameters().getType(), numberLoggedElementsDuringRao);
+ RaoLogger.logMostLimitingElementsResults(TECHNICAL_LOGS, finalPostAutoResult, Set.of(automatonState), raoParameters.getObjectiveFunctionParameters().getType(), raoParameters.getObjectiveFunctionParameters().getUnit(), numberLoggedElementsDuringRao);
}
return new RangeAutomatonSimulationResult(finalPostAutoResult, activatedRangeActions, rangeActionsWithSetpoint);
}
@@ -490,7 +490,7 @@ Pair> disableHvdcAngleDroopActi
// Finally, run a sensitivity analysis to get sensitivity values in DC set-point mode if needed
TECHNICAL_LOGS.info("Running sensitivity analysis after disabling AngleDroopActivePowerControl on HVDC RAs.");
PrePerimeterResult result = preAutoPerimeterSensitivityAnalysis.runBasedOnInitialResults(network, crac, initialFlowResult, operatorsNotSharingCras, null);
- RaoLogger.logMostLimitingElementsResults(TECHNICAL_LOGS, result, Set.of(automatonState), raoParameters.getObjectiveFunctionParameters().getType(), numberLoggedElementsDuringRao);
+ RaoLogger.logMostLimitingElementsResults(TECHNICAL_LOGS, result, Set.of(automatonState), raoParameters.getObjectiveFunctionParameters().getType(), raoParameters.getObjectiveFunctionParameters().getUnit(), numberLoggedElementsDuringRao);
return Pair.of(result, activePowerSetpoints);
}
@@ -644,7 +644,7 @@ RangeAutomatonSimulationResult shiftRangeActionsUntilFlowCnecsSecure(List run() {
BUSINESS_LOGS.info("Preventive perimeter could not be secured; there is no point in optimizing post-contingency perimeters. The RAO will be interrupted here.");
mergedRaoResults = new PreventiveAndCurativesRaoResultImpl(crac.getPreventiveState(), initialOutput, preventiveResult, preCurativeSensitivityAnalysisOutput, crac);
// log results
- RaoLogger.logMostLimitingElementsResults(BUSINESS_LOGS, preCurativeSensitivityAnalysisOutput, raoParameters.getObjectiveFunctionParameters().getType(), NUMBER_LOGGED_ELEMENTS_END_RAO);
+ RaoLogger.logMostLimitingElementsResults(BUSINESS_LOGS, preCurativeSensitivityAnalysisOutput, raoParameters.getObjectiveFunctionParameters().getType(), raoParameters.getObjectiveFunctionParameters().getUnit(), NUMBER_LOGGED_ELEMENTS_END_RAO);
return postCheckResults(mergedRaoResults, initialOutput, raoParameters.getObjectiveFunctionParameters());
}
@@ -173,7 +173,7 @@ public CompletableFuture run() {
// Log final results
if (logFinalResultsOutsideOfSecondPreventive) {
BUSINESS_LOGS.info("Merging preventive and post-contingency RAO results:");
- RaoLogger.logMostLimitingElementsResults(BUSINESS_LOGS, stateTree.getBasecaseScenario(), preventiveResult, stateTree.getContingencyScenarios(), postContingencyResults, raoParameters.getObjectiveFunctionParameters().getType(), NUMBER_LOGGED_ELEMENTS_END_RAO);
+ RaoLogger.logMostLimitingElementsResults(BUSINESS_LOGS, stateTree.getBasecaseScenario(), preventiveResult, stateTree.getContingencyScenarios(), postContingencyResults, raoParameters.getObjectiveFunctionParameters().getType(), raoParameters.getObjectiveFunctionParameters().getUnit(), NUMBER_LOGGED_ELEMENTS_END_RAO);
}
return postCheckResults(mergedRaoResults, initialOutput, raoParameters.getObjectiveFunctionParameters());
@@ -228,7 +228,7 @@ private CompletableFuture postCheckResults(RaoResult raoResult, PrePe
formatDoubleBasedOnMargin(initialCost, -initialCost), formatDoubleBasedOnMargin(initialFunctionalCost, -initialCost), formatDoubleBasedOnMargin(initialVirtualCost, -initialCost),
formatDoubleBasedOnMargin(finalCost, -finalCost), formatDoubleBasedOnMargin(finalFunctionalCost, -finalCost), formatDoubleBasedOnMargin(finalVirtualCost, -finalCost));
// log results
- RaoLogger.logMostLimitingElementsResults(BUSINESS_LOGS, initialResult, objectiveFunctionParameters.getType(), NUMBER_LOGGED_ELEMENTS_END_RAO);
+ RaoLogger.logMostLimitingElementsResults(BUSINESS_LOGS, initialResult, objectiveFunctionParameters.getType(), objectiveFunctionParameters.getUnit(), NUMBER_LOGGED_ELEMENTS_END_RAO);
finalRaoResult = new UnoptimizedRaoResultImpl(initialResult);
finalCost = initialCost;
finalFunctionalCost = initialFunctionalCost;
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 97072ea6f5..ba4b564e38 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
@@ -193,7 +193,7 @@ RaoResult runSecondPreventiveAndAutoRao(CastorContingencyScenarios castorConting
newPostContingencyResults.put(state, new CurativeWithSecondPraoResult(state, entry.getValue(), secondPreventiveRaoResult.perimeterResult(), secondPreventiveRaoResult.remedialActionsExcluded(), postCraSensitivityAnalysisOutput));
}
}
- RaoLogger.logMostLimitingElementsResults(BUSINESS_LOGS, postCraSensitivityAnalysisOutput, raoParameters.getObjectiveFunctionParameters().getType(), NUMBER_LOGGED_ELEMENTS_END_RAO);
+ RaoLogger.logMostLimitingElementsResults(BUSINESS_LOGS, postCraSensitivityAnalysisOutput, raoParameters.getObjectiveFunctionParameters().getType(), raoParameters.getObjectiveFunctionParameters().getUnit(), NUMBER_LOGGED_ELEMENTS_END_RAO);
return new PreventiveAndCurativesRaoResultImpl(stateTree,
initialOutput,
diff --git a/ra-optimisation/search-tree-rao/src/main/java/com/powsybl/openrao/searchtreerao/commons/RaoLogger.java b/ra-optimisation/search-tree-rao/src/main/java/com/powsybl/openrao/searchtreerao/commons/RaoLogger.java
index 6985636af1..cd13a92817 100644
--- a/ra-optimisation/search-tree-rao/src/main/java/com/powsybl/openrao/searchtreerao/commons/RaoLogger.java
+++ b/ra-optimisation/search-tree-rao/src/main/java/com/powsybl/openrao/searchtreerao/commons/RaoLogger.java
@@ -62,6 +62,7 @@ public static void logSensitivityAnalysisResults(String prefix,
RaoLogger.logMostLimitingElementsResults(BUSINESS_LOGS,
sensitivityAnalysisResult,
raoParameters.getObjectiveFunctionParameters().getType(),
+ raoParameters.getObjectiveFunctionParameters().getUnit(),
numberOfLoggedLimitingElements);
}
@@ -88,16 +89,16 @@ public static void logRangeActions(OpenRaoLogger logger,
}
}
- public static void logMostLimitingElementsResults(OpenRaoLogger logger, OptimizationResult optimizationResult, ObjectiveFunctionParameters.ObjectiveFunctionType objectiveFunction, int numberOfLoggedElements) {
- logMostLimitingElementsResults(logger, optimizationResult, optimizationResult, null, objectiveFunction, numberOfLoggedElements);
+ public static void logMostLimitingElementsResults(OpenRaoLogger logger, OptimizationResult optimizationResult, ObjectiveFunctionParameters.ObjectiveFunctionType objectiveFunction, Unit unit, int numberOfLoggedElements) {
+ logMostLimitingElementsResults(logger, optimizationResult, optimizationResult, null, objectiveFunction, unit, numberOfLoggedElements);
}
- public static void logMostLimitingElementsResults(OpenRaoLogger logger, PrePerimeterResult prePerimeterResult, Set states, ObjectiveFunctionParameters.ObjectiveFunctionType objectiveFunction, int numberOfLoggedElements) {
- logMostLimitingElementsResults(logger, prePerimeterResult, prePerimeterResult, states, objectiveFunction, numberOfLoggedElements);
+ public static void logMostLimitingElementsResults(OpenRaoLogger logger, PrePerimeterResult prePerimeterResult, Set states, ObjectiveFunctionParameters.ObjectiveFunctionType objectiveFunction, Unit unit, int numberOfLoggedElements) {
+ logMostLimitingElementsResults(logger, prePerimeterResult, prePerimeterResult, states, objectiveFunction, unit, numberOfLoggedElements);
}
- public static void logMostLimitingElementsResults(OpenRaoLogger logger, PrePerimeterResult prePerimeterResult, ObjectiveFunctionParameters.ObjectiveFunctionType objectiveFunction, int numberOfLoggedElements) {
- logMostLimitingElementsResults(logger, prePerimeterResult, prePerimeterResult, null, objectiveFunction, numberOfLoggedElements);
+ public static void logMostLimitingElementsResults(OpenRaoLogger logger, PrePerimeterResult prePerimeterResult, ObjectiveFunctionParameters.ObjectiveFunctionType objectiveFunction, Unit unit, int numberOfLoggedElements) {
+ logMostLimitingElementsResults(logger, prePerimeterResult, prePerimeterResult, null, objectiveFunction, unit, numberOfLoggedElements);
}
private static void logMostLimitingElementsResults(OpenRaoLogger logger,
@@ -105,8 +106,9 @@ private static void logMostLimitingElementsResults(OpenRaoLogger logger,
FlowResult flowResult,
Set states,
ObjectiveFunctionParameters.ObjectiveFunctionType objectiveFunction,
+ Unit unit,
int numberOfLoggedElements) {
- getMostLimitingElementsResults(objectiveFunctionResult, flowResult, states, objectiveFunction, numberOfLoggedElements)
+ getMostLimitingElementsResults(objectiveFunctionResult, flowResult, states, objectiveFunction, unit, numberOfLoggedElements)
.forEach(logger::info);
}
@@ -114,9 +116,9 @@ static List getMostLimitingElementsResults(ObjectiveFunctionResult objec
FlowResult flowResult,
Set states,
ObjectiveFunctionParameters.ObjectiveFunctionType objectiveFunction,
+ Unit unit,
int numberOfLoggedElements) {
List summary = new ArrayList<>();
- Unit unit = objectiveFunction.getUnit();
boolean relativePositiveMargins = objectiveFunction.relativePositiveMargins();
List sortedCnecs = getMostLimitingElements(objectiveFunctionResult, states, numberOfLoggedElements);
@@ -128,7 +130,7 @@ static List getMostLimitingElementsResults(ObjectiveFunctionResult objec
double cnecMargin = relativePositiveMargins ? flowResult.getRelativeMargin(cnec, unit) : flowResult.getMargin(cnec, unit);
String isRelativeMargin = (relativePositiveMargins && cnecMargin > 0) ? " relative" : "";
- TwoSides mostConstrainedSide = getMostConstrainedSide(cnec, flowResult, objectiveFunction);
+ TwoSides mostConstrainedSide = getMostConstrainedSide(cnec, flowResult, objectiveFunction, unit);
String ptdfIfRelative = (relativePositiveMargins && cnecMargin > 0) ? format(" (PTDF %f)", flowResult.getPtdfZonalSum(cnec, mostConstrainedSide)) : "";
summary.add(String.format(Locale.ENGLISH, "Limiting element #%02d:%s margin = %s %s%s, element %s at state %s, CNEC ID = \"%s\"",
i + 1,
@@ -145,11 +147,11 @@ static List getMostLimitingElementsResults(ObjectiveFunctionResult objec
private static TwoSides getMostConstrainedSide(FlowCnec cnec,
FlowResult flowResult,
- ObjectiveFunctionParameters.ObjectiveFunctionType objectiveFunction) {
+ ObjectiveFunctionParameters.ObjectiveFunctionType objectiveFunction,
+ Unit unit) {
if (cnec.getMonitoredSides().size() == 1) {
return cnec.getMonitoredSides().iterator().next();
}
- Unit unit = objectiveFunction.getUnit();
boolean relativePositiveMargins = objectiveFunction.relativePositiveMargins();
double marginLeft = relativePositiveMargins ? flowResult.getRelativeMargin(cnec, TwoSides.ONE, unit) : flowResult.getMargin(cnec, TwoSides.ONE, unit);
double marginRight = relativePositiveMargins ? flowResult.getRelativeMargin(cnec, TwoSides.TWO, unit) : flowResult.getMargin(cnec, TwoSides.TWO, unit);
@@ -162,8 +164,9 @@ public static void logMostLimitingElementsResults(OpenRaoLogger logger,
Set contingencyScenarios,
Map contingencyOptimizationResults,
ObjectiveFunctionParameters.ObjectiveFunctionType objectiveFunction,
+ Unit unit,
int numberOfLoggedElements) {
- getMostLimitingElementsResults(preventivePerimeter, basecaseOptimResult, contingencyScenarios, contingencyOptimizationResults, objectiveFunction, numberOfLoggedElements)
+ getMostLimitingElementsResults(preventivePerimeter, basecaseOptimResult, contingencyScenarios, contingencyOptimizationResults, objectiveFunction, unit, numberOfLoggedElements)
.forEach(logger::info);
}
@@ -172,9 +175,9 @@ public static List getMostLimitingElementsResults(Perimeter preventivePe
Set contingencyScenarios,
Map contingencyOptimizationResults,
ObjectiveFunctionParameters.ObjectiveFunctionType objectiveFunction,
+ Unit unit,
int numberOfLoggedElements) {
List summary = new ArrayList<>();
- Unit unit = objectiveFunction.getUnit();
boolean relativePositiveMargins = objectiveFunction.relativePositiveMargins();
Map mostLimitingElementsAndMargins =
diff --git a/ra-optimisation/search-tree-rao/src/main/java/com/powsybl/openrao/searchtreerao/commons/RaoUtil.java b/ra-optimisation/search-tree-rao/src/main/java/com/powsybl/openrao/searchtreerao/commons/RaoUtil.java
index 7f9ad88987..11f6fb5527 100644
--- a/ra-optimisation/search-tree-rao/src/main/java/com/powsybl/openrao/searchtreerao/commons/RaoUtil.java
+++ b/ra-optimisation/search-tree-rao/src/main/java/com/powsybl/openrao/searchtreerao/commons/RaoUtil.java
@@ -52,9 +52,9 @@ public static void initNetwork(Network network, String networkVariantId) {
}
public static void checkParameters(RaoParameters raoParameters, RaoInput raoInput) {
- if (raoParameters.getObjectiveFunctionParameters().getType().getUnit().equals(Unit.AMPERE)
+ if (raoParameters.getObjectiveFunctionParameters().getUnit().equals(Unit.AMPERE)
&& raoParameters.getLoadFlowAndSensitivityParameters().getSensitivityWithLoadFlowParameters().getLoadFlowParameters().isDc()) {
- throw new OpenRaoException(format("Objective function %s cannot be calculated with a DC default sensitivity engine", raoParameters.getObjectiveFunctionParameters().getType().toString()));
+ throw new OpenRaoException(format("Objective function unit %s cannot be calculated with a DC default sensitivity engine", raoParameters.getObjectiveFunctionParameters().getUnit().toString()));
}
if (raoParameters.getObjectiveFunctionParameters().getType().relativePositiveMargins()) {
@@ -165,7 +165,7 @@ private static Set getAllUsageMethods(Set usageRules, Re
return usageRules.stream()
.filter(ur -> ur instanceof OnContingencyState || ur instanceof OnInstant
|| (ur instanceof OnFlowConstraintInCountry || ur instanceof OnConstraint> onConstraint && onConstraint.getCnec() instanceof FlowCnec)
- && isAnyMarginNegative(flowResult, remedialAction.getFlowCnecsConstrainingForOneUsageRule(ur, flowCnecs, network), raoParameters.getObjectiveFunctionParameters().getType().getUnit()))
+ && isAnyMarginNegative(flowResult, remedialAction.getFlowCnecsConstrainingForOneUsageRule(ur, flowCnecs, network), raoParameters.getObjectiveFunctionParameters().getUnit()))
.map(ur -> ur.getUsageMethod(state))
.collect(Collectors.toSet());
}
diff --git a/ra-optimisation/search-tree-rao/src/main/java/com/powsybl/openrao/searchtreerao/commons/objectivefunctionevaluator/ObjectiveFunction.java b/ra-optimisation/search-tree-rao/src/main/java/com/powsybl/openrao/searchtreerao/commons/objectivefunctionevaluator/ObjectiveFunction.java
index ce55040e9a..af7d034f10 100644
--- a/ra-optimisation/search-tree-rao/src/main/java/com/powsybl/openrao/searchtreerao/commons/objectivefunctionevaluator/ObjectiveFunction.java
+++ b/ra-optimisation/search-tree-rao/src/main/java/com/powsybl/openrao/searchtreerao/commons/objectivefunctionevaluator/ObjectiveFunction.java
@@ -78,7 +78,7 @@ public ObjectiveFunction buildForInitialSensitivityComputation(Set flo
marginEvaluator = new BasicMarginEvaluator();
}
- this.withFunctionalCostEvaluator(new MinMarginEvaluator(flowCnecs, raoParameters.getObjectiveFunctionParameters().getType().getUnit(), marginEvaluator));
+ this.withFunctionalCostEvaluator(new MinMarginEvaluator(flowCnecs, raoParameters.getObjectiveFunctionParameters().getUnit(), marginEvaluator));
// sensitivity failure over-cost should be computed on initial sensitivity result too
// (this allows the RAO to prefer RAs that can remove sensitivity failures)
@@ -108,17 +108,17 @@ public ObjectiveFunction build(Set flowCnecs,
if (raoParameters.getNotOptimizedCnecsParameters().getDoNotOptimizeCurativeCnecsForTsosWithoutCras()
&& !operatorsNotToOptimizeInCurative.isEmpty()) {
- this.withFunctionalCostEvaluator(new MinMarginEvaluator(flowCnecs, raoParameters.getObjectiveFunctionParameters().getType().getUnit(),
+ this.withFunctionalCostEvaluator(new MinMarginEvaluator(flowCnecs, raoParameters.getObjectiveFunctionParameters().getUnit(),
new MarginEvaluatorWithMarginDecreaseUnoptimizedCnecs(marginEvaluator, operatorsNotToOptimizeInCurative, prePerimeterFlowResult)));
} else {
- this.withFunctionalCostEvaluator(new MinMarginEvaluator(flowCnecs, raoParameters.getObjectiveFunctionParameters().getType().getUnit(), marginEvaluator));
+ this.withFunctionalCostEvaluator(new MinMarginEvaluator(flowCnecs, raoParameters.getObjectiveFunctionParameters().getUnit(), marginEvaluator));
}
// mnec virtual cost evaluator
if (raoParameters.hasExtension(MnecParametersExtension.class)) {
this.withVirtualCostEvaluator(new MnecViolationCostEvaluator(
flowCnecs.stream().filter(Cnec::isMonitored).collect(Collectors.toSet()),
- raoParameters.getObjectiveFunctionParameters().getType().getUnit(),
+ raoParameters.getObjectiveFunctionParameters().getUnit(),
initialFlowResult,
raoParameters.getExtension(MnecParametersExtension.class)
));
diff --git a/ra-optimisation/search-tree-rao/src/main/java/com/powsybl/openrao/searchtreerao/linearoptimisation/algorithms/linearproblem/LinearProblemBuilder.java b/ra-optimisation/search-tree-rao/src/main/java/com/powsybl/openrao/searchtreerao/linearoptimisation/algorithms/linearproblem/LinearProblemBuilder.java
index 9baf225217..b275d4bf42 100644
--- a/ra-optimisation/search-tree-rao/src/main/java/com/powsybl/openrao/searchtreerao/linearoptimisation/algorithms/linearproblem/LinearProblemBuilder.java
+++ b/ra-optimisation/search-tree-rao/src/main/java/com/powsybl/openrao/searchtreerao/linearoptimisation/algorithms/linearproblem/LinearProblemBuilder.java
@@ -132,7 +132,7 @@ private ProblemFiller buildMaxMinRelativeMarginFiller() {
return new MaxMinRelativeMarginFiller(
inputs.getOptimizationPerimeter().getOptimizedFlowCnecs(),
inputs.getPreOptimizationFlowResult(),
- parameters.getObjectiveFunction().getUnit(),
+ parameters.getObjectiveFunctionUnit(),
parameters.getMaxMinRelativeMarginParameters()
);
}
diff --git a/ra-optimisation/search-tree-rao/src/main/java/com/powsybl/openrao/searchtreerao/linearoptimisation/parameters/IteratingLinearOptimizerParameters.java b/ra-optimisation/search-tree-rao/src/main/java/com/powsybl/openrao/searchtreerao/linearoptimisation/parameters/IteratingLinearOptimizerParameters.java
index 61268601c3..7ca7afbef1 100644
--- a/ra-optimisation/search-tree-rao/src/main/java/com/powsybl/openrao/searchtreerao/linearoptimisation/parameters/IteratingLinearOptimizerParameters.java
+++ b/ra-optimisation/search-tree-rao/src/main/java/com/powsybl/openrao/searchtreerao/linearoptimisation/parameters/IteratingLinearOptimizerParameters.java
@@ -22,6 +22,7 @@
public final class IteratingLinearOptimizerParameters {
private final ObjectiveFunctionParameters.ObjectiveFunctionType objectiveFunction;
+ private final Unit objectiveFunctionUnit;
private final RangeActionsOptimizationParameters rangeActionParameters;
private final MnecParametersExtension mnecParameters;
@@ -35,6 +36,7 @@ public final class IteratingLinearOptimizerParameters {
private final boolean raRangeShrinking;
private IteratingLinearOptimizerParameters(ObjectiveFunctionParameters.ObjectiveFunctionType objectiveFunction,
+ Unit objectiveFunctionUnit,
RangeActionsOptimizationParameters rangeActionParameters,
MnecParametersExtension mnecParameters,
RelativeMarginsParametersExtension maxMinRelativeMarginParameters,
@@ -45,6 +47,7 @@ private IteratingLinearOptimizerParameters(ObjectiveFunctionParameters.Objective
int maxNumberOfIterations,
boolean raRangeShrinking) {
this.objectiveFunction = objectiveFunction;
+ this.objectiveFunctionUnit = objectiveFunctionUnit;
this.rangeActionParameters = rangeActionParameters;
this.mnecParameters = mnecParameters;
this.maxMinRelativeMarginParameters = maxMinRelativeMarginParameters;
@@ -61,7 +64,7 @@ public ObjectiveFunctionParameters.ObjectiveFunctionType getObjectiveFunction()
}
public Unit getObjectiveFunctionUnit() {
- return getObjectiveFunction().getUnit();
+ return objectiveFunctionUnit;
}
public boolean hasRelativeMargins() {
@@ -124,6 +127,7 @@ public static LinearOptimizerParametersBuilder create() {
public static class LinearOptimizerParametersBuilder {
private ObjectiveFunctionParameters.ObjectiveFunctionType objectiveFunction;
+ private Unit objectiveFunctionUnit;
private RangeActionsOptimizationParameters rangeActionParameters;
private MnecParametersExtension mnecParameters;
private RelativeMarginsParametersExtension maxMinRelativeMarginParameters;
@@ -139,6 +143,11 @@ public LinearOptimizerParametersBuilder withObjectiveFunction(ObjectiveFunctionP
return this;
}
+ public LinearOptimizerParametersBuilder withObjectiveFunctionUnit(Unit objectiveFunctionUnit) {
+ this.objectiveFunctionUnit = objectiveFunctionUnit;
+ return this;
+ }
+
public LinearOptimizerParametersBuilder withRangeActionParameters(RangeActionsOptimizationParameters rangeActionParameters) {
this.rangeActionParameters = rangeActionParameters;
return this;
@@ -191,6 +200,7 @@ public IteratingLinearOptimizerParameters build() {
return new IteratingLinearOptimizerParameters(
objectiveFunction,
+ objectiveFunctionUnit,
rangeActionParameters,
mnecParameters,
maxMinRelativeMarginParameters,
diff --git a/ra-optimisation/search-tree-rao/src/main/java/com/powsybl/openrao/searchtreerao/searchtree/algorithms/Leaf.java b/ra-optimisation/search-tree-rao/src/main/java/com/powsybl/openrao/searchtreerao/searchtree/algorithms/Leaf.java
index dda0db8077..60550b8bb8 100644
--- a/ra-optimisation/search-tree-rao/src/main/java/com/powsybl/openrao/searchtreerao/searchtree/algorithms/Leaf.java
+++ b/ra-optimisation/search-tree-rao/src/main/java/com/powsybl/openrao/searchtreerao/searchtree/algorithms/Leaf.java
@@ -209,6 +209,7 @@ void optimize(SearchTreeInput searchTreeInput, SearchTreeParameters parameters)
// build parameters
IteratingLinearOptimizerParameters linearOptimizerParameters = IteratingLinearOptimizerParameters.create()
.withObjectiveFunction(parameters.getObjectiveFunction())
+ .withObjectiveFunctionUnit(parameters.getObjectiveFunctionUnit())
.withRangeActionParameters(parameters.getRangeActionParameters())
.withMnecParameters(parameters.getMnecParameters())
.withMaxMinRelativeMarginParameters(parameters.getMaxMinRelativeMarginParameters())
diff --git a/ra-optimisation/search-tree-rao/src/main/java/com/powsybl/openrao/searchtreerao/searchtree/algorithms/SearchTree.java b/ra-optimisation/search-tree-rao/src/main/java/com/powsybl/openrao/searchtreerao/searchtree/algorithms/SearchTree.java
index 3031a3b816..e6ba4083ad 100644
--- a/ra-optimisation/search-tree-rao/src/main/java/com/powsybl/openrao/searchtreerao/searchtree/algorithms/SearchTree.java
+++ b/ra-optimisation/search-tree-rao/src/main/java/com/powsybl/openrao/searchtreerao/searchtree/algorithms/SearchTree.java
@@ -106,21 +106,21 @@ public CompletableFuture run() {
return CompletableFuture.completedFuture(rootLeaf);
} else if (stopCriterionReached(rootLeaf)) {
topLevelLogger.info("Stop criterion reached on {}", rootLeaf);
- RaoLogger.logMostLimitingElementsResults(topLevelLogger, rootLeaf, parameters.getObjectiveFunction(), NUMBER_LOGGED_ELEMENTS_END_TREE);
+ RaoLogger.logMostLimitingElementsResults(topLevelLogger, rootLeaf, parameters.getObjectiveFunction(), parameters.getObjectiveFunctionUnit(), NUMBER_LOGGED_ELEMENTS_END_TREE);
logOptimizationSummary(rootLeaf);
rootLeaf.finalizeOptimization();
return CompletableFuture.completedFuture(rootLeaf);
}
TECHNICAL_LOGS.info("{}", rootLeaf);
- RaoLogger.logMostLimitingElementsResults(TECHNICAL_LOGS, rootLeaf, parameters.getObjectiveFunction(), NUMBER_LOGGED_ELEMENTS_DURING_TREE);
+ RaoLogger.logMostLimitingElementsResults(TECHNICAL_LOGS, rootLeaf, parameters.getObjectiveFunction(), parameters.getObjectiveFunctionUnit(), NUMBER_LOGGED_ELEMENTS_DURING_TREE);
TECHNICAL_LOGS.info("Linear optimization on root leaf");
optimizeLeaf(rootLeaf);
topLevelLogger.info("{}", rootLeaf);
RaoLogger.logRangeActions(TECHNICAL_LOGS, optimalLeaf, input.getOptimizationPerimeter(), null);
- RaoLogger.logMostLimitingElementsResults(topLevelLogger, optimalLeaf, parameters.getObjectiveFunction(), NUMBER_LOGGED_ELEMENTS_DURING_TREE);
+ RaoLogger.logMostLimitingElementsResults(topLevelLogger, optimalLeaf, parameters.getObjectiveFunction(), parameters.getObjectiveFunctionUnit(), NUMBER_LOGGED_ELEMENTS_DURING_TREE);
logVirtualCostInformation(rootLeaf, "");
if (stopCriterionReached(rootLeaf)) {
@@ -135,7 +135,7 @@ public CompletableFuture run() {
TECHNICAL_LOGS.info("Best leaf: {}", optimalLeaf);
RaoLogger.logRangeActions(TECHNICAL_LOGS, optimalLeaf, input.getOptimizationPerimeter(), "Best leaf: ");
- RaoLogger.logMostLimitingElementsResults(TECHNICAL_LOGS, optimalLeaf, parameters.getObjectiveFunction(), NUMBER_LOGGED_ELEMENTS_END_TREE);
+ RaoLogger.logMostLimitingElementsResults(TECHNICAL_LOGS, optimalLeaf, parameters.getObjectiveFunction(), parameters.getObjectiveFunctionUnit(), NUMBER_LOGGED_ELEMENTS_END_TREE);
logOptimizationSummary(optimalLeaf);
optimalLeaf.finalizeOptimization();
@@ -179,7 +179,7 @@ private void iterateOnTree() {
topLevelLogger.info("Search depth {} best leaf: {}", depth + 1, optimalLeaf);
RaoLogger.logRangeActions(TECHNICAL_LOGS, optimalLeaf, input.getOptimizationPerimeter(), String.format("Search depth %s best leaf: ", depth + 1));
- RaoLogger.logMostLimitingElementsResults(topLevelLogger, optimalLeaf, parameters.getObjectiveFunction(), NUMBER_LOGGED_ELEMENTS_DURING_TREE);
+ RaoLogger.logMostLimitingElementsResults(topLevelLogger, optimalLeaf, parameters.getObjectiveFunction(), parameters.getObjectiveFunctionUnit(), NUMBER_LOGGED_ELEMENTS_DURING_TREE);
} else {
topLevelLogger.info("No better result found in search depth {}, exiting search tree", depth + 1);
}
@@ -506,7 +506,7 @@ && costSatisfiesStopCriterion(leaf.getCost() - leaf.getVirtualCost(virtualCostNa
}
List getVirtualCostlyElementsLogs(Leaf leaf, String virtualCostName, String prefix) {
- Unit unit = parameters.getObjectiveFunction().getUnit();
+ Unit unit = parameters.getObjectiveFunctionUnit();
List logs = new ArrayList<>();
int i = 1;
for (FlowCnec flowCnec : leaf.getCostlyElements(virtualCostName, NUMBER_LOGGED_VIRTUAL_COSTLY_ELEMENTS)) {
diff --git a/ra-optimisation/search-tree-rao/src/main/java/com/powsybl/openrao/searchtreerao/searchtree/parameters/SearchTreeParameters.java b/ra-optimisation/search-tree-rao/src/main/java/com/powsybl/openrao/searchtreerao/searchtree/parameters/SearchTreeParameters.java
index fd1ebef0b2..c74a1a925d 100644
--- a/ra-optimisation/search-tree-rao/src/main/java/com/powsybl/openrao/searchtreerao/searchtree/parameters/SearchTreeParameters.java
+++ b/ra-optimisation/search-tree-rao/src/main/java/com/powsybl/openrao/searchtreerao/searchtree/parameters/SearchTreeParameters.java
@@ -6,6 +6,7 @@
*/
package com.powsybl.openrao.searchtreerao.searchtree.parameters;
+import com.powsybl.openrao.commons.Unit;
import com.powsybl.openrao.data.cracapi.Crac;
import com.powsybl.openrao.data.cracapi.Instant;
import com.powsybl.openrao.data.cracapi.RaUsageLimits;
@@ -33,6 +34,7 @@
public class SearchTreeParameters {
private final ObjectiveFunctionParameters.ObjectiveFunctionType objectiveFunction;
+ private final Unit objectiveFunctionUnit;
// required for the search tree algorithm
private final TreeParameters treeParameters;
@@ -49,7 +51,7 @@ public class SearchTreeParameters {
private final int maxNumberOfIterations;
public SearchTreeParameters(ObjectiveFunctionParameters.ObjectiveFunctionType objectiveFunction,
- TreeParameters treeParameters,
+ Unit objectiveFunctionUnit, TreeParameters treeParameters,
NetworkActionParameters networkActionParameters,
Map raLimitationParameters,
RangeActionsOptimizationParameters rangeActionParameters,
@@ -60,6 +62,7 @@ public SearchTreeParameters(ObjectiveFunctionParameters.ObjectiveFunctionType ob
RangeActionsOptimizationParameters.LinearOptimizationSolver solverParameters,
int maxNumberOfIterations) {
this.objectiveFunction = objectiveFunction;
+ this.objectiveFunctionUnit = objectiveFunctionUnit;
this.treeParameters = treeParameters;
this.networkActionParameters = networkActionParameters;
this.raLimitationParameters = raLimitationParameters;
@@ -76,6 +79,10 @@ public ObjectiveFunctionParameters.ObjectiveFunctionType getObjectiveFunction()
return objectiveFunction;
}
+ public Unit getObjectiveFunctionUnit() {
+ return objectiveFunctionUnit;
+ }
+
public TreeParameters getTreeParameters() {
return treeParameters;
}
@@ -236,6 +243,7 @@ public static SearchTreeParametersBuilder create() {
public static class SearchTreeParametersBuilder {
private ObjectiveFunctionParameters.ObjectiveFunctionType objectiveFunction;
+ private Unit objectiveFunctionUnit;
private TreeParameters treeParameters;
private NetworkActionParameters networkActionParameters;
private Map raLimitationParameters;
@@ -249,6 +257,7 @@ public static class SearchTreeParametersBuilder {
public SearchTreeParametersBuilder withConstantParametersOverAllRao(RaoParameters raoParameters, Crac crac) {
this.objectiveFunction = raoParameters.getObjectiveFunctionParameters().getType();
+ this.objectiveFunctionUnit = raoParameters.getObjectiveFunctionParameters().getUnit();
this.networkActionParameters = NetworkActionParameters.buildFromRaoParameters(raoParameters.getTopoOptimizationParameters(), crac);
this.raLimitationParameters = new HashMap<>(crac.getRaUsageLimitsPerInstant());
this.rangeActionParameters = RangeActionsOptimizationParameters.buildFromRaoParameters(raoParameters);
@@ -265,6 +274,11 @@ public SearchTreeParametersBuilder with0bjectiveFunction(ObjectiveFunctionParame
return this;
}
+ public SearchTreeParametersBuilder with0bjectiveFunctionUnit(Unit objectiveFunctionUnit) {
+ this.objectiveFunctionUnit = objectiveFunctionUnit;
+ return this;
+ }
+
public SearchTreeParametersBuilder withTreeParameters(TreeParameters treeParameters) {
this.treeParameters = treeParameters;
return this;
@@ -316,7 +330,9 @@ public SearchTreeParametersBuilder withMaxNumberOfIterations(int maxNumberOfIter
}
public SearchTreeParameters build() {
- return new SearchTreeParameters(objectiveFunction,
+ return new SearchTreeParameters(
+ objectiveFunction,
+ objectiveFunctionUnit,
treeParameters,
networkActionParameters,
raLimitationParameters,
diff --git a/ra-optimisation/search-tree-rao/src/test/java/com/powsybl/openrao/searchtreerao/castor/algorithm/AutomatonSimulatorTest.java b/ra-optimisation/search-tree-rao/src/test/java/com/powsybl/openrao/searchtreerao/castor/algorithm/AutomatonSimulatorTest.java
index f08e302424..c6e7096bce 100644
--- a/ra-optimisation/search-tree-rao/src/test/java/com/powsybl/openrao/searchtreerao/castor/algorithm/AutomatonSimulatorTest.java
+++ b/ra-optimisation/search-tree-rao/src/test/java/com/powsybl/openrao/searchtreerao/castor/algorithm/AutomatonSimulatorTest.java
@@ -228,7 +228,8 @@ public void setup() {
autoState = crac.getState(contingency1, autoInstant);
RaoParameters raoParameters = new RaoParameters();
- raoParameters.getObjectiveFunctionParameters().setType(ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_RELATIVE_MARGIN_IN_MEGAWATT);
+ raoParameters.getObjectiveFunctionParameters().setType(ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_RELATIVE_MARGIN);
+ raoParameters.getObjectiveFunctionParameters().setUnit(Unit.MEGAWATT);
raoParameters.getLoadFlowAndSensitivityParameters().setSensitivityProvider("OpenLoadFlow");
mockedPreAutoPerimeterSensitivityAnalysis = mock(PrePerimeterSensitivityAnalysis.class);
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 135c15d3da..5459bc8b35 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
@@ -220,7 +220,8 @@ void testThreeCurativeInstantsWithSecondCurativeHavingNoCnecAndNoRa() {
RaoInput raoInput = RaoInput.build(network, crac).build();
RaoParameters raoParameters = JsonRaoParameters.read(getClass().getResourceAsStream("/parameters/RaoParameters_2P_v2.json"));
- raoParameters.getObjectiveFunctionParameters().setType(ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_MARGIN_IN_AMPERE);
+ raoParameters.getObjectiveFunctionParameters().setType(ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_MARGIN);
+ raoParameters.getObjectiveFunctionParameters().setUnit(Unit.AMPERE);
RaoResult raoResult = new CastorFullOptimization(raoInput, raoParameters, null).run().join();
@@ -314,7 +315,8 @@ void testThreeCurativeInstants() {
RaoInput raoInput = RaoInput.build(network, crac).build();
RaoParameters raoParameters = JsonRaoParameters.read(getClass().getResourceAsStream("/parameters/RaoParameters_2P_v2.json"));
- raoParameters.getObjectiveFunctionParameters().setType(ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_MARGIN_IN_AMPERE);
+ raoParameters.getObjectiveFunctionParameters().setType(ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_MARGIN);
+ raoParameters.getObjectiveFunctionParameters().setUnit(Unit.AMPERE);
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/PrePerimeterSensitivityAnalysisTest.java b/ra-optimisation/search-tree-rao/src/test/java/com/powsybl/openrao/searchtreerao/castor/algorithm/PrePerimeterSensitivityAnalysisTest.java
index da69d048ff..53d0194d0b 100644
--- a/ra-optimisation/search-tree-rao/src/test/java/com/powsybl/openrao/searchtreerao/castor/algorithm/PrePerimeterSensitivityAnalysisTest.java
+++ b/ra-optimisation/search-tree-rao/src/test/java/com/powsybl/openrao/searchtreerao/castor/algorithm/PrePerimeterSensitivityAnalysisTest.java
@@ -90,7 +90,8 @@ private void mockSystematicSensitivityInterface(boolean withPtdf, boolean withLf
@Test
void testRunNoPtdfNoLf() {
assertNotNull(prePerimeterSensitivityAnalysis);
- raoParameters.getObjectiveFunctionParameters().setType(ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_MARGIN_IN_AMPERE);
+ raoParameters.getObjectiveFunctionParameters().setType(ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_MARGIN);
+ raoParameters.getObjectiveFunctionParameters().setUnit(Unit.AMPERE);
mockSystematicSensitivityInterface(false, false);
PrePerimeterResult result = prePerimeterSensitivityAnalysis.runInitialSensitivityAnalysis(network, crac);
@@ -102,7 +103,8 @@ void testRunNoPtdfNoLf() {
@Test
void testRunWithPtdf() {
- raoParameters.getObjectiveFunctionParameters().setType(ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_RELATIVE_MARGIN_IN_AMPERE);
+ raoParameters.getObjectiveFunctionParameters().setType(ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_RELATIVE_MARGIN);
+ raoParameters.getObjectiveFunctionParameters().setUnit(Unit.AMPERE);
mockSystematicSensitivityInterface(true, false);
PrePerimeterResult result = prePerimeterSensitivityAnalysis.runInitialSensitivityAnalysis(network, crac);
assertNotNull(result.getSensitivityResult());
@@ -112,7 +114,8 @@ void testRunWithPtdf() {
void testRunWithLf() {
raoParameters.addExtension(LoopFlowParametersExtension.class, new LoopFlowParametersExtension());
raoParameters.getExtension(LoopFlowParametersExtension.class).setPtdfApproximation(PtdfApproximation.FIXED_PTDF);
- raoParameters.getObjectiveFunctionParameters().setType(ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_MARGIN_IN_AMPERE);
+ raoParameters.getObjectiveFunctionParameters().setType(ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_MARGIN);
+ raoParameters.getObjectiveFunctionParameters().setUnit(Unit.AMPERE);
mockSystematicSensitivityInterface(false, true);
PrePerimeterResult result = prePerimeterSensitivityAnalysis.runInitialSensitivityAnalysis(network, crac);
@@ -123,7 +126,8 @@ void testRunWithLf() {
void testRunWithPtdfAndLf() {
raoParameters.addExtension(LoopFlowParametersExtension.class, new LoopFlowParametersExtension());
raoParameters.getExtension(LoopFlowParametersExtension.class).setPtdfApproximation(PtdfApproximation.FIXED_PTDF);
- raoParameters.getObjectiveFunctionParameters().setType(ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_RELATIVE_MARGIN_IN_AMPERE);
+ raoParameters.getObjectiveFunctionParameters().setType(ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_RELATIVE_MARGIN);
+ raoParameters.getObjectiveFunctionParameters().setUnit(Unit.AMPERE);
mockSystematicSensitivityInterface(true, true);
PrePerimeterResult result = prePerimeterSensitivityAnalysis.runInitialSensitivityAnalysis(network, crac);
@@ -136,7 +140,8 @@ void testRunWithFixedPtdfAndLf() {
raoParameters.getExtension(LoopFlowParametersExtension.class).setPtdfApproximation(PtdfApproximation.FIXED_PTDF);
raoParameters.addExtension(RelativeMarginsParametersExtension.class, new RelativeMarginsParametersExtension());
raoParameters.getExtension(RelativeMarginsParametersExtension.class).setPtdfApproximation(PtdfApproximation.FIXED_PTDF);
- raoParameters.getObjectiveFunctionParameters().setType(ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_RELATIVE_MARGIN_IN_AMPERE);
+ raoParameters.getObjectiveFunctionParameters().setType(ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_RELATIVE_MARGIN);
+ raoParameters.getObjectiveFunctionParameters().setUnit(Unit.AMPERE);
mockSystematicSensitivityInterface(false, false);
PrePerimeterResult result = prePerimeterSensitivityAnalysis.runBasedOnInitialResults(network, crac, optimizationResult, Collections.emptySet(), new AppliedRemedialActions());
@@ -151,7 +156,8 @@ void testRunAndRecomputePtdf() {
raoParameters.getExtension(LoopFlowParametersExtension.class).setPtdfApproximation(PtdfApproximation.UPDATE_PTDF_WITH_TOPO);
raoParameters.addExtension(RelativeMarginsParametersExtension.class, new RelativeMarginsParametersExtension());
raoParameters.getExtension(RelativeMarginsParametersExtension.class).setPtdfApproximation(PtdfApproximation.UPDATE_PTDF_WITH_TOPO);
- raoParameters.getObjectiveFunctionParameters().setType(ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_RELATIVE_MARGIN_IN_AMPERE);
+ raoParameters.getObjectiveFunctionParameters().setType(ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_RELATIVE_MARGIN);
+ raoParameters.getObjectiveFunctionParameters().setUnit(Unit.AMPERE);
mockSystematicSensitivityInterface(true, true);
PrePerimeterResult result = prePerimeterSensitivityAnalysis.runBasedOnInitialResults(network, crac, optimizationResult, Collections.emptySet(), new AppliedRemedialActions());
diff --git a/ra-optimisation/search-tree-rao/src/test/java/com/powsybl/openrao/searchtreerao/commons/RaoLoggerTest.java b/ra-optimisation/search-tree-rao/src/test/java/com/powsybl/openrao/searchtreerao/commons/RaoLoggerTest.java
index 779b5edb7b..d8fe38d769 100644
--- a/ra-optimisation/search-tree-rao/src/test/java/com/powsybl/openrao/searchtreerao/commons/RaoLoggerTest.java
+++ b/ra-optimisation/search-tree-rao/src/test/java/com/powsybl/openrao/searchtreerao/commons/RaoLoggerTest.java
@@ -137,7 +137,7 @@ private String marginLog(int order, double margin, boolean relative, Double ptdf
void testGetSummaryFromObjFunctionResultOnAllStates() {
// Absolute MW
when(objectiveFunctionResult.getMostLimitingElements(anyInt())).thenReturn(List.of(cnec1, cnec2, cnec3, cnec4, cnec5));
- List summary = RaoLogger.getMostLimitingElementsResults(objectiveFunctionResult, flowResult, null, ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_MARGIN_IN_MEGAWATT, 5);
+ List summary = RaoLogger.getMostLimitingElementsResults(objectiveFunctionResult, flowResult, null, ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_MARGIN, Unit.MEGAWATT, 5);
assertEquals(5, summary.size());
assertEquals(absoluteMarginLog(1, -10, MEGAWATT, cnec1), summary.get(0));
assertEquals(absoluteMarginLog(2, 0, MEGAWATT, cnec2), summary.get(1));
@@ -147,7 +147,7 @@ void testGetSummaryFromObjFunctionResultOnAllStates() {
// Relative MW
when(objectiveFunctionResult.getMostLimitingElements(anyInt())).thenReturn(List.of(cnec1, cnec2, cnec3, cnec4, cnec5));
- summary = RaoLogger.getMostLimitingElementsResults(objectiveFunctionResult, flowResult, null, ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_RELATIVE_MARGIN_IN_MEGAWATT, 5);
+ summary = RaoLogger.getMostLimitingElementsResults(objectiveFunctionResult, flowResult, null, ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_RELATIVE_MARGIN, Unit.MEGAWATT, 5);
assertEquals(5, summary.size());
assertEquals(absoluteMarginLog(1, -10, MEGAWATT, cnec1), summary.get(0));
assertEquals(absoluteMarginLog(2, 0, MEGAWATT, cnec2), summary.get(1));
@@ -157,7 +157,7 @@ void testGetSummaryFromObjFunctionResultOnAllStates() {
// Absolute A
when(objectiveFunctionResult.getMostLimitingElements(anyInt())).thenReturn(List.of(cnec2, cnec4, cnec3, cnec5, cnec1));
- summary = RaoLogger.getMostLimitingElementsResults(objectiveFunctionResult, flowResult, null, ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_MARGIN_IN_AMPERE, 5);
+ summary = RaoLogger.getMostLimitingElementsResults(objectiveFunctionResult, flowResult, null, ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_MARGIN, Unit.AMPERE, 5);
assertEquals(5, summary.size());
assertEquals(absoluteMarginLog(1, -10, AMPERE, cnec2), summary.get(0));
assertEquals(absoluteMarginLog(2, 0, AMPERE, cnec4), summary.get(1));
@@ -167,7 +167,7 @@ void testGetSummaryFromObjFunctionResultOnAllStates() {
// Relative A
when(objectiveFunctionResult.getMostLimitingElements(anyInt())).thenReturn(List.of(cnec2, cnec4, cnec5, cnec3, cnec1));
- summary = RaoLogger.getMostLimitingElementsResults(objectiveFunctionResult, flowResult, Set.of(statePreventive, stateCo1Auto, stateCo1Curative, stateCo2Curative), ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_RELATIVE_MARGIN_IN_AMPERE, 5);
+ summary = RaoLogger.getMostLimitingElementsResults(objectiveFunctionResult, flowResult, Set.of(statePreventive, stateCo1Auto, stateCo1Curative, stateCo2Curative), ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_RELATIVE_MARGIN, Unit.AMPERE, 5);
assertEquals(5, summary.size());
assertEquals(absoluteMarginLog(1, -10, AMPERE, cnec2), summary.get(0));
assertEquals(absoluteMarginLog(2, 0, AMPERE, cnec4), summary.get(1));
@@ -180,25 +180,25 @@ void testGetSummaryFromObjFunctionResultOnAllStates() {
void testGetMostLimitingElementsForNarrowMargin() {
// Absolute MW
when(objectiveFunctionResult.getMostLimitingElements(anyInt())).thenReturn(List.of(cnec6));
- List summary = RaoLogger.getMostLimitingElementsResults(objectiveFunctionResult, flowResult, null, ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_MARGIN_IN_MEGAWATT, 1);
+ List summary = RaoLogger.getMostLimitingElementsResults(objectiveFunctionResult, flowResult, null, ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_MARGIN, Unit.MEGAWATT, 1);
assertEquals(1, summary.size());
assertEquals(absoluteMarginLog(1, -0.0003, MEGAWATT, cnec6), summary.get(0));
// Relative MW
when(objectiveFunctionResult.getMostLimitingElements(anyInt())).thenReturn(List.of(cnec6));
- summary = RaoLogger.getMostLimitingElementsResults(objectiveFunctionResult, flowResult, null, ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_RELATIVE_MARGIN_IN_MEGAWATT, 5);
+ summary = RaoLogger.getMostLimitingElementsResults(objectiveFunctionResult, flowResult, null, ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_RELATIVE_MARGIN, Unit.MEGAWATT, 5);
assertEquals(1, summary.size());
assertEquals(absoluteMarginLog(1, -0.0003, MEGAWATT, cnec6), summary.get(0));
// Absolute A
when(objectiveFunctionResult.getMostLimitingElements(anyInt())).thenReturn(List.of(cnec6));
- summary = RaoLogger.getMostLimitingElementsResults(objectiveFunctionResult, flowResult, null, ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_MARGIN_IN_AMPERE, 5);
+ summary = RaoLogger.getMostLimitingElementsResults(objectiveFunctionResult, flowResult, null, ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_MARGIN, Unit.AMPERE, 5);
assertEquals(1, summary.size());
assertEquals(absoluteMarginLog(1, -0.002, AMPERE, cnec6), summary.get(0));
// Relative A
when(objectiveFunctionResult.getMostLimitingElements(anyInt())).thenReturn(List.of(cnec6));
- summary = RaoLogger.getMostLimitingElementsResults(objectiveFunctionResult, flowResult, Set.of(statePreventive, stateCo1Auto, stateCo1Curative, stateCo2Curative), ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_RELATIVE_MARGIN_IN_AMPERE, 5);
+ summary = RaoLogger.getMostLimitingElementsResults(objectiveFunctionResult, flowResult, Set.of(statePreventive, stateCo1Auto, stateCo1Curative, stateCo2Curative), ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_RELATIVE_MARGIN, Unit.AMPERE, 5);
assertEquals(1, summary.size());
assertEquals(absoluteMarginLog(1, -0.002, AMPERE, cnec6), summary.get(0));
}
@@ -207,15 +207,15 @@ void testGetMostLimitingElementsForNarrowMargin() {
void testGetSummaryFromObjFunctionResultOnSomeStates() {
// Absolute MW
when(objectiveFunctionResult.getMostLimitingElements(anyInt())).thenReturn(List.of(cnec1, cnec2, cnec3, cnec4, cnec5));
- List summary = RaoLogger.getMostLimitingElementsResults(objectiveFunctionResult, flowResult, Set.of(), ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_MARGIN_IN_MEGAWATT, 5);
+ List summary = RaoLogger.getMostLimitingElementsResults(objectiveFunctionResult, flowResult, Set.of(), ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_MARGIN, Unit.MEGAWATT, 5);
assertEquals(0, summary.size());
- summary = RaoLogger.getMostLimitingElementsResults(objectiveFunctionResult, flowResult, Set.of(statePreventive), ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_MARGIN_IN_MEGAWATT, 5);
+ summary = RaoLogger.getMostLimitingElementsResults(objectiveFunctionResult, flowResult, Set.of(statePreventive), ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_MARGIN, Unit.MEGAWATT, 5);
assertEquals(1, summary.size());
assertEquals(absoluteMarginLog(1, 0, MEGAWATT, cnec2), summary.get(0));
// Relative MW
when(objectiveFunctionResult.getMostLimitingElements(anyInt())).thenReturn(List.of(cnec1, cnec2, cnec3, cnec4, cnec5));
- summary = RaoLogger.getMostLimitingElementsResults(objectiveFunctionResult, flowResult, Set.of(statePreventive, stateCo1Curative), ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_RELATIVE_MARGIN_IN_MEGAWATT, 5);
+ summary = RaoLogger.getMostLimitingElementsResults(objectiveFunctionResult, flowResult, Set.of(statePreventive, stateCo1Curative), ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_RELATIVE_MARGIN, Unit.MEGAWATT, 5);
assertEquals(3, summary.size());
assertEquals(absoluteMarginLog(1, -10, MEGAWATT, cnec1), summary.get(0));
assertEquals(absoluteMarginLog(2, 0, MEGAWATT, cnec2), summary.get(1));
@@ -223,13 +223,13 @@ void testGetSummaryFromObjFunctionResultOnSomeStates() {
// Absolute A
when(objectiveFunctionResult.getMostLimitingElements(anyInt())).thenReturn(List.of(cnec2, cnec4, cnec3, cnec5, cnec1));
- summary = RaoLogger.getMostLimitingElementsResults(objectiveFunctionResult, flowResult, Set.of(stateCo2Curative), ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_MARGIN_IN_AMPERE, 5);
+ summary = RaoLogger.getMostLimitingElementsResults(objectiveFunctionResult, flowResult, Set.of(stateCo2Curative), ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_MARGIN, Unit.AMPERE, 5);
assertEquals(1, summary.size());
assertEquals(absoluteMarginLog(1, 10, AMPERE, cnec3), summary.get(0));
// Relative A
when(objectiveFunctionResult.getMostLimitingElements(anyInt())).thenReturn(List.of(cnec2, cnec4, cnec5, cnec3, cnec1));
- summary = RaoLogger.getMostLimitingElementsResults(objectiveFunctionResult, flowResult, Set.of(stateCo2Curative, stateCo1Auto), ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_RELATIVE_MARGIN_IN_AMPERE, 5);
+ summary = RaoLogger.getMostLimitingElementsResults(objectiveFunctionResult, flowResult, Set.of(stateCo2Curative, stateCo1Auto), ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_RELATIVE_MARGIN, Unit.AMPERE, 5);
assertEquals(2, summary.size());
assertEquals(absoluteMarginLog(1, 0, AMPERE, cnec4), summary.get(0));
assertEquals(relativeMarginLog(2, 200, .3, AMPERE, cnec3), summary.get(1));
@@ -268,7 +268,7 @@ void testGetSummaryFromScenarios() {
when(basecaseOptimResult.getMostLimitingElements(anyInt())).thenReturn(List.of(cnec1, cnec2, cnec3, cnec4, cnec5));
when(co1AutoOptimResult.getMostLimitingElements(anyInt())).thenReturn(List.of(cnec5, cnec1, cnec4));
when(co1CurativeOptimResult.getMostLimitingElements(anyInt())).thenReturn(List.of(cnec5, cnec1));
- List summary = RaoLogger.getMostLimitingElementsResults(preventivePerimeter, basecaseOptimResult, contingencyScenarios, contingencyOptimizationResults, ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_MARGIN_IN_MEGAWATT, 5);
+ List summary = RaoLogger.getMostLimitingElementsResults(preventivePerimeter, basecaseOptimResult, contingencyScenarios, contingencyOptimizationResults, ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_MARGIN, Unit.MEGAWATT, 5);
assertEquals(5, summary.size());
assertEquals(absoluteMarginLog(1, -8, MEGAWATT, cnec5), summary.get(0));
assertEquals(absoluteMarginLog(2, 0, MEGAWATT, cnec2), summary.get(1));
@@ -280,7 +280,7 @@ void testGetSummaryFromScenarios() {
when(basecaseOptimResult.getMostLimitingElements(anyInt())).thenReturn(List.of(cnec5, cnec4, cnec3, cnec2, cnec1));
when(co1AutoOptimResult.getMostLimitingElements(anyInt())).thenReturn(List.of(cnec5, cnec1, cnec4));
when(co1CurativeOptimResult.getMostLimitingElements(anyInt())).thenReturn(List.of(cnec5, cnec1));
- summary = RaoLogger.getMostLimitingElementsResults(preventivePerimeter, basecaseOptimResult, contingencyScenarios, contingencyOptimizationResults, ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_RELATIVE_MARGIN_IN_MEGAWATT, 5);
+ summary = RaoLogger.getMostLimitingElementsResults(preventivePerimeter, basecaseOptimResult, contingencyScenarios, contingencyOptimizationResults, ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_RELATIVE_MARGIN, Unit.MEGAWATT, 5);
assertEquals(5, summary.size());
assertEquals(absoluteMarginLog(1, -8, MEGAWATT, cnec5), summary.get(0));
assertEquals(absoluteMarginLog(2, 0, MEGAWATT, cnec2), summary.get(1));
@@ -292,7 +292,7 @@ void testGetSummaryFromScenarios() {
when(basecaseOptimResult.getMostLimitingElements(anyInt())).thenReturn(List.of(cnec2, cnec5, cnec1, cnec3, cnec4));
when(co1AutoOptimResult.getMostLimitingElements(anyInt())).thenReturn(List.of(cnec4, cnec5, cnec1));
when(co1CurativeOptimResult.getMostLimitingElements(anyInt())).thenReturn(List.of(cnec1, cnec5));
- summary = RaoLogger.getMostLimitingElementsResults(preventivePerimeter, basecaseOptimResult, contingencyScenarios, contingencyOptimizationResults, ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_MARGIN_IN_AMPERE, 5);
+ summary = RaoLogger.getMostLimitingElementsResults(preventivePerimeter, basecaseOptimResult, contingencyScenarios, contingencyOptimizationResults, ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_MARGIN, Unit.AMPERE, 5);
assertEquals(5, summary.size());
assertEquals(absoluteMarginLog(1, -21, AMPERE, cnec4), summary.get(0));
assertEquals(absoluteMarginLog(2, -10, AMPERE, cnec2), summary.get(1));
@@ -304,7 +304,7 @@ void testGetSummaryFromScenarios() {
when(basecaseOptimResult.getMostLimitingElements(anyInt())).thenReturn(List.of(cnec4, cnec3, cnec5, cnec1, cnec2));
when(co1AutoOptimResult.getMostLimitingElements(anyInt())).thenReturn(List.of(cnec4, cnec1, cnec5));
when(co1CurativeOptimResult.getMostLimitingElements(anyInt())).thenReturn(List.of(cnec1, cnec5));
- summary = RaoLogger.getMostLimitingElementsResults(preventivePerimeter, basecaseOptimResult, contingencyScenarios, contingencyOptimizationResults, ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_RELATIVE_MARGIN_IN_AMPERE, 5);
+ summary = RaoLogger.getMostLimitingElementsResults(preventivePerimeter, basecaseOptimResult, contingencyScenarios, contingencyOptimizationResults, ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_RELATIVE_MARGIN, Unit.AMPERE, 5);
assertEquals(5, summary.size());
assertEquals(absoluteMarginLog(1, -21, AMPERE, cnec4), summary.get(0));
assertEquals(absoluteMarginLog(2, -10, AMPERE, cnec2), summary.get(1));
diff --git a/ra-optimisation/search-tree-rao/src/test/java/com/powsybl/openrao/searchtreerao/commons/RaoUtilTest.java b/ra-optimisation/search-tree-rao/src/test/java/com/powsybl/openrao/searchtreerao/commons/RaoUtilTest.java
index a5dfe58431..bc8d19014d 100644
--- a/ra-optimisation/search-tree-rao/src/test/java/com/powsybl/openrao/searchtreerao/commons/RaoUtilTest.java
+++ b/ra-optimisation/search-tree-rao/src/test/java/com/powsybl/openrao/searchtreerao/commons/RaoUtilTest.java
@@ -86,26 +86,26 @@ private void addGlskProvider() {
void testExceptionForGlskOnRelativeMargin() {
raoParameters.addExtension(RelativeMarginsParametersExtension.class, new RelativeMarginsParametersExtension());
raoParameters.getExtension(RelativeMarginsParametersExtension.class).setPtdfBoundariesFromString(new ArrayList<>(Arrays.asList("{FR}-{ES}", "{ES}-{PT}")));
- raoParameters.getObjectiveFunctionParameters().setType(ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_RELATIVE_MARGIN_IN_AMPERE);
+ raoParameters.getObjectiveFunctionParameters().setType(ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_RELATIVE_MARGIN);
OpenRaoException exception = assertThrows(OpenRaoException.class, () -> RaoUtil.checkParameters(raoParameters, raoInput));
- assertEquals("Objective function MAX_MIN_RELATIVE_MARGIN_IN_AMPERE requires glsks", exception.getMessage());
+ assertEquals("Objective function MAX_MIN_RELATIVE_MARGIN requires glsks", exception.getMessage());
}
@Test
void testExceptionForNoRelativeMarginParametersOnRelativeMargin() {
addGlskProvider();
- raoParameters.getObjectiveFunctionParameters().setType(ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_RELATIVE_MARGIN_IN_AMPERE);
+ raoParameters.getObjectiveFunctionParameters().setType(ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_RELATIVE_MARGIN);
OpenRaoException exception = assertThrows(OpenRaoException.class, () -> RaoUtil.checkParameters(raoParameters, raoInput));
- assertEquals("Objective function MAX_MIN_RELATIVE_MARGIN_IN_AMPERE requires a config with a non empty boundary set", exception.getMessage());
+ assertEquals("Objective function MAX_MIN_RELATIVE_MARGIN requires a config with a non empty boundary set", exception.getMessage());
}
@Test
void testExceptionForNullBoundariesOnRelativeMargin() {
addGlskProvider();
raoParameters.addExtension(RelativeMarginsParametersExtension.class, new RelativeMarginsParametersExtension());
- raoParameters.getObjectiveFunctionParameters().setType(ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_RELATIVE_MARGIN_IN_AMPERE);
+ raoParameters.getObjectiveFunctionParameters().setType(ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_RELATIVE_MARGIN);
OpenRaoException exception = assertThrows(OpenRaoException.class, () -> RaoUtil.checkParameters(raoParameters, raoInput));
- assertEquals("Objective function MAX_MIN_RELATIVE_MARGIN_IN_AMPERE requires a config with a non empty boundary set", exception.getMessage());
+ assertEquals("Objective function MAX_MIN_RELATIVE_MARGIN requires a config with a non empty boundary set", exception.getMessage());
}
@Test
@@ -113,17 +113,17 @@ void testExceptionForEmptyBoundariesOnRelativeMargin() {
addGlskProvider();
raoParameters.addExtension(RelativeMarginsParametersExtension.class, new RelativeMarginsParametersExtension());
raoParameters.getExtension(RelativeMarginsParametersExtension.class).setPtdfBoundariesFromString(new ArrayList<>());
- raoParameters.getObjectiveFunctionParameters().setType(ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_RELATIVE_MARGIN_IN_MEGAWATT);
+ raoParameters.getObjectiveFunctionParameters().setType(ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_RELATIVE_MARGIN);
OpenRaoException exception = assertThrows(OpenRaoException.class, () -> RaoUtil.checkParameters(raoParameters, raoInput));
- assertEquals("Objective function MAX_MIN_RELATIVE_MARGIN_IN_MEGAWATT requires a config with a non empty boundary set", exception.getMessage());
+ assertEquals("Objective function MAX_MIN_RELATIVE_MARGIN requires a config with a non empty boundary set", exception.getMessage());
}
@Test
void testAmpereWithDc() {
- raoParameters.getObjectiveFunctionParameters().setType(ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_RELATIVE_MARGIN_IN_AMPERE);
+ raoParameters.getObjectiveFunctionParameters().setUnit(Unit.AMPERE);
raoParameters.getLoadFlowAndSensitivityParameters().getSensitivityWithLoadFlowParameters().getLoadFlowParameters().setDc(true);
OpenRaoException exception = assertThrows(OpenRaoException.class, () -> RaoUtil.checkParameters(raoParameters, raoInput));
- assertEquals("Objective function MAX_MIN_RELATIVE_MARGIN_IN_AMPERE cannot be calculated with a DC default sensitivity engine", exception.getMessage());
+ assertEquals("Objective function unit A cannot be calculated with a DC default sensitivity engine", exception.getMessage());
}
@Test
diff --git a/ra-optimisation/search-tree-rao/src/test/java/com/powsybl/openrao/searchtreerao/linearoptimisation/algorithms/IteratingLinearOptimizerTest.java b/ra-optimisation/search-tree-rao/src/test/java/com/powsybl/openrao/searchtreerao/linearoptimisation/algorithms/IteratingLinearOptimizerTest.java
index 3adbbab69c..2d2f8b70b4 100644
--- a/ra-optimisation/search-tree-rao/src/test/java/com/powsybl/openrao/searchtreerao/linearoptimisation/algorithms/IteratingLinearOptimizerTest.java
+++ b/ra-optimisation/search-tree-rao/src/test/java/com/powsybl/openrao/searchtreerao/linearoptimisation/algorithms/IteratingLinearOptimizerTest.java
@@ -7,6 +7,7 @@
package com.powsybl.openrao.searchtreerao.linearoptimisation.algorithms;
+import com.powsybl.openrao.commons.Unit;
import com.powsybl.openrao.data.cracapi.*;
import com.powsybl.openrao.data.cracapi.rangeaction.RangeAction;
import com.powsybl.openrao.data.cracimpl.utils.NetworkImportsUtil;
@@ -102,7 +103,8 @@ public void setUp() {
RangeActionsOptimizationParameters rangeActionParameters = Mockito.mock(RangeActionsOptimizationParameters.class);
when(rangeActionParameters.getPstModel()).thenReturn(RangeActionsOptimizationParameters.PstModel.CONTINUOUS);
when(parameters.getRangeActionParameters()).thenReturn(rangeActionParameters);
- when(parameters.getObjectiveFunction()).thenReturn(ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_MARGIN_IN_MEGAWATT);
+ when(parameters.getObjectiveFunction()).thenReturn(ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_MARGIN);
+ when(parameters.getObjectiveFunctionUnit()).thenReturn(Unit.MEGAWATT);
when(parameters.getRaRangeShrinking()).thenReturn(false);
linearProblem = Mockito.mock(LinearProblem.class);
diff --git a/ra-optimisation/search-tree-rao/src/test/java/com/powsybl/openrao/searchtreerao/linearoptimisation/algorithms/LinearProblemBuilderTest.java b/ra-optimisation/search-tree-rao/src/test/java/com/powsybl/openrao/searchtreerao/linearoptimisation/algorithms/LinearProblemBuilderTest.java
index 4f7f7de41a..9977e71f80 100644
--- a/ra-optimisation/search-tree-rao/src/test/java/com/powsybl/openrao/searchtreerao/linearoptimisation/algorithms/LinearProblemBuilderTest.java
+++ b/ra-optimisation/search-tree-rao/src/test/java/com/powsybl/openrao/searchtreerao/linearoptimisation/algorithms/LinearProblemBuilderTest.java
@@ -7,6 +7,7 @@
package com.powsybl.openrao.searchtreerao.linearoptimisation.algorithms;
+import com.powsybl.openrao.commons.Unit;
import com.powsybl.openrao.data.cracapi.State;
import com.powsybl.openrao.raoapi.parameters.ObjectiveFunctionParameters;
import com.powsybl.openrao.raoapi.parameters.RangeActionsOptimizationParameters;
@@ -69,7 +70,8 @@ public void setup() {
@Test
void testBuildMaxMarginContinuous() {
when(rangeActionParameters.getPstModel()).thenReturn(RangeActionsOptimizationParameters.PstModel.CONTINUOUS);
- when(parameters.getObjectiveFunction()).thenReturn(ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_MARGIN_IN_MEGAWATT);
+ when(parameters.getObjectiveFunction()).thenReturn(ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_MARGIN);
+ when(parameters.getObjectiveFunctionUnit()).thenReturn(Unit.MEGAWATT);
LinearProblem linearProblem = linearProblemBuilder.buildFromInputsAndParameters(inputs, parameters);
assertNotNull(linearProblem);
@@ -83,7 +85,8 @@ void testBuildMaxMarginContinuous() {
@Test
void testBuildMaxMarginDiscrete() {
when(rangeActionParameters.getPstModel()).thenReturn(RangeActionsOptimizationParameters.PstModel.APPROXIMATED_INTEGERS);
- when(parameters.getObjectiveFunction()).thenReturn(ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_MARGIN_IN_MEGAWATT);
+ when(parameters.getObjectiveFunction()).thenReturn(ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_MARGIN);
+ when(parameters.getObjectiveFunctionUnit()).thenReturn(Unit.MEGAWATT);
LinearProblem linearProblem = linearProblemBuilder.buildFromInputsAndParameters(inputs, parameters);
assertNotNull(linearProblem);
@@ -99,7 +102,8 @@ void testBuildMaxMarginDiscrete() {
@Test
void testBuildMaxRelativeMarginContinuous() {
when(rangeActionParameters.getPstModel()).thenReturn(RangeActionsOptimizationParameters.PstModel.CONTINUOUS);
- when(parameters.getObjectiveFunction()).thenReturn(ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_RELATIVE_MARGIN_IN_MEGAWATT);
+ when(parameters.getObjectiveFunction()).thenReturn(ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_RELATIVE_MARGIN);
+ when(parameters.getObjectiveFunctionUnit()).thenReturn(Unit.MEGAWATT);
LinearProblem linearProblem = linearProblemBuilder.buildFromInputsAndParameters(inputs, parameters);
assertNotNull(linearProblem);
@@ -113,7 +117,10 @@ void testBuildMaxRelativeMarginContinuous() {
@Test
void testBuildMaxMarginContinuousMnecLoopflowUnoptimized() {
when(rangeActionParameters.getPstModel()).thenReturn(RangeActionsOptimizationParameters.PstModel.CONTINUOUS);
- when(parameters.getObjectiveFunction()).thenReturn(ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_MARGIN_IN_MEGAWATT);
+ when(parameters.getObjectiveFunction()).thenReturn(ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_MARGIN);
+ when(parameters.getObjectiveFunctionUnit()).thenReturn(Unit.MEGAWATT);
+ when(parameters.getObjectiveFunctionUnit()).thenReturn(Unit.MEGAWATT);
+
when(parameters.isRaoWithMnecLimitation()).thenReturn(true);
when(parameters.isRaoWithLoopFlowLimitation()).thenReturn(true);
when(parameters.getUnoptimizedCnecParameters()).thenReturn(Mockito.mock(UnoptimizedCnecParameters.class));
@@ -133,7 +140,8 @@ void testBuildMaxMarginContinuousMnecLoopflowUnoptimized() {
@Test
void testBuildMaxMarginContinuousRaLimitation() {
when(rangeActionParameters.getPstModel()).thenReturn(RangeActionsOptimizationParameters.PstModel.CONTINUOUS);
- when(parameters.getObjectiveFunction()).thenReturn(ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_MARGIN_IN_MEGAWATT);
+ when(parameters.getObjectiveFunction()).thenReturn(ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_MARGIN);
+ when(parameters.getObjectiveFunctionUnit()).thenReturn(Unit.MEGAWATT);
RangeActionLimitationParameters raLimitationParameters = Mockito.mock(RangeActionLimitationParameters.class);
when(parameters.getRaLimitationParameters()).thenReturn(raLimitationParameters);
when(optimizationPerimeter.getRangeActionOptimizationStates()).thenReturn(Set.of(Mockito.mock(State.class)));
diff --git a/ra-optimisation/search-tree-rao/src/test/java/com/powsybl/openrao/searchtreerao/linearoptimisation/algorithms/fillers/MaxMinRelativeMarginFillerTest.java b/ra-optimisation/search-tree-rao/src/test/java/com/powsybl/openrao/searchtreerao/linearoptimisation/algorithms/fillers/MaxMinRelativeMarginFillerTest.java
index 3efa8428a6..288494c4ef 100644
--- a/ra-optimisation/search-tree-rao/src/test/java/com/powsybl/openrao/searchtreerao/linearoptimisation/algorithms/fillers/MaxMinRelativeMarginFillerTest.java
+++ b/ra-optimisation/search-tree-rao/src/test/java/com/powsybl/openrao/searchtreerao/linearoptimisation/algorithms/fillers/MaxMinRelativeMarginFillerTest.java
@@ -73,7 +73,8 @@ public void setUp() throws IOException {
raoParameters.getRangeActionsOptimizationParameters().setInjectionRaPenaltyCost(0.01);
raoParameters.addExtension(RelativeMarginsParametersExtension.class, new RelativeMarginsParametersExtension());
raoParameters.getExtension(RelativeMarginsParametersExtension.class).setPtdfSumLowerBound(0.01);
- raoParameters.getObjectiveFunctionParameters().setType(ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_RELATIVE_MARGIN_IN_MEGAWATT);
+ raoParameters.getObjectiveFunctionParameters().setType(ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_RELATIVE_MARGIN);
+ raoParameters.getObjectiveFunctionParameters().setUnit(MEGAWATT);
RangeActionsOptimizationParameters rangeActionParameters = RangeActionsOptimizationParameters.buildFromRaoParameters(raoParameters);
parameters = raoParameters.getExtension(RelativeMarginsParametersExtension.class);
diff --git a/ra-optimisation/search-tree-rao/src/test/java/com/powsybl/openrao/searchtreerao/searchtree/algorithms/SearchTreeTest.java b/ra-optimisation/search-tree-rao/src/test/java/com/powsybl/openrao/searchtreerao/searchtree/algorithms/SearchTreeTest.java
index a13b54ce53..eb8f859e9d 100644
--- a/ra-optimisation/search-tree-rao/src/test/java/com/powsybl/openrao/searchtreerao/searchtree/algorithms/SearchTreeTest.java
+++ b/ra-optimisation/search-tree-rao/src/test/java/com/powsybl/openrao/searchtreerao/searchtree/algorithms/SearchTreeTest.java
@@ -90,7 +90,8 @@ void setUp() {
searchTreeParameters = Mockito.mock(SearchTreeParameters.class);
setSearchTreeParameters();
searchTree = Mockito.spy(new SearchTree(searchTreeInput, searchTreeParameters, true));
- when(searchTreeParameters.getObjectiveFunction()).thenReturn(ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_MARGIN_IN_MEGAWATT);
+ when(searchTreeParameters.getObjectiveFunction()).thenReturn(ObjectiveFunctionParameters.ObjectiveFunctionType.MAX_MIN_MARGIN);
+ when(searchTreeParameters.getObjectiveFunctionUnit()).thenReturn(Unit.MEGAWATT);
mockNetworkPool(network);
}
diff --git a/ra-optimisation/search-tree-rao/src/test/java/com/powsybl/openrao/searchtreerao/searchtree/parameters/SearchTreeParametersTest.java b/ra-optimisation/search-tree-rao/src/test/java/com/powsybl/openrao/searchtreerao/searchtree/parameters/SearchTreeParametersTest.java
index 307660e374..e8e54483fe 100644
--- a/ra-optimisation/search-tree-rao/src/test/java/com/powsybl/openrao/searchtreerao/searchtree/parameters/SearchTreeParametersTest.java
+++ b/ra-optimisation/search-tree-rao/src/test/java/com/powsybl/openrao/searchtreerao/searchtree/parameters/SearchTreeParametersTest.java
@@ -7,6 +7,7 @@
package com.powsybl.openrao.searchtreerao.searchtree.parameters;
import com.powsybl.iidm.network.Network;
+import com.powsybl.openrao.commons.Unit;
import com.powsybl.openrao.data.cracapi.Crac;
import com.powsybl.openrao.data.cracapi.Instant;
import com.powsybl.openrao.data.cracapi.RaUsageLimits;
@@ -68,6 +69,7 @@ void testWithConstantParametersOverAllRao() {
@Test
void testIndividualSetters() {
ObjectiveFunctionParameters.ObjectiveFunctionType objectiveFunction = Mockito.mock(ObjectiveFunctionParameters.ObjectiveFunctionType.class);
+ Unit objectiveFunctionUnit = Mockito.mock(Unit.class);
TreeParameters treeParameters = Mockito.mock(TreeParameters.class);
NetworkActionParameters networkActionParameters = Mockito.mock(NetworkActionParameters.class);
Map raLimitationParameters = new HashMap<>();
@@ -81,6 +83,7 @@ void testIndividualSetters() {
SearchTreeParameters searchTreeParameters = builder
.with0bjectiveFunction(objectiveFunction)
+ .with0bjectiveFunctionUnit(objectiveFunctionUnit)
.withTreeParameters(treeParameters)
.withNetworkActionParameters(networkActionParameters)
.withGlobalRemedialActionLimitationParameters(raLimitationParameters)
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 78ed0b746d..8c8b9f50c1 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_AMPERE",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "A",
"curative-min-obj-improvement" : 10000.0,
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"enforce-curative-security" : false
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 7d97a8c79b..2745366b2c 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_MEGAWATT",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "MW",
"curative-min-obj-improvement" : 10000.0,
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"enforce-curative-security" : false
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 9a228dae04..951039dd2e 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_AMPERE",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "A",
"curative-min-obj-improvement" : 10000.0,
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"enforce-curative-security" : false
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 90c796da81..4dcd2c1b78 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_MEGAWATT",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "MW",
"curative-min-obj-improvement" : 0.0,
"preventive-stop-criterion" : "SECURE"
},
diff --git a/tests/src/test/java/com/powsybl/openrao/tests/utils/CneHelper.java b/tests/src/test/java/com/powsybl/openrao/tests/utils/CneHelper.java
index 231ce26093..e9b2332b50 100644
--- a/tests/src/test/java/com/powsybl/openrao/tests/utils/CneHelper.java
+++ b/tests/src/test/java/com/powsybl/openrao/tests/utils/CneHelper.java
@@ -76,8 +76,8 @@ private static void fillPropertiesWithCoreCneExporterParameters(Properties prope
private static void fillPropertiesWithRaoParameters(Properties properties, RaoParameters raoParameters) {
switch (raoParameters.getObjectiveFunctionParameters().getType()) {
- case MAX_MIN_RELATIVE_MARGIN_IN_AMPERE, MAX_MIN_RELATIVE_MARGIN_IN_MEGAWATT -> properties.setProperty("rao-result.export.core-cne.relative-positive-margins", "true");
- case MAX_MIN_MARGIN_IN_AMPERE, MAX_MIN_MARGIN_IN_MEGAWATT -> properties.setProperty("rao-result.export.core-cne.relative-positive-margins", "false");
+ case MAX_MIN_RELATIVE_MARGIN -> properties.setProperty("rao-result.export.core-cne.relative-positive-margins", "true");
+ case MAX_MIN_MARGIN -> properties.setProperty("rao-result.export.core-cne.relative-positive-margins", "false");
}
if (raoParameters.hasExtension(LoopFlowParametersExtension.class)) {
properties.setProperty("rao-result.export.core-cne.with-loop-flows", "true");
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 54d5831edb..ecf8694beb 100644
--- a/tests/src/test/resources/files/configurations/common/RaoParameters_default.json
+++ b/tests/src/test/resources/files/configurations/common/RaoParameters_default.json
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_MEGAWATT",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "MW",
"curative-min-obj-improvement" : 0.0,
"preventive-stop-criterion" : "SECURE"
},
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 f946c1265c..e761046b8a 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_AMPERE",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "A",
"curative-min-obj-improvement" : 10000.0,
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"enforce-curative-security" : false
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 3a87baebe4..e4f8fb967d 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_AMPERE",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "A",
"curative-min-obj-improvement" : 10000.0,
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"enforce-curative-security" : false
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 909fefb026..80fb639005 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_AMPERE",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "A",
"curative-min-obj-improvement" : 10000.0,
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"enforce-curative-security" : false
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 2d2ea1f6d3..5786edecc7 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_MEGAWATT",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "MW",
"curative-min-obj-improvement" : 10000.0,
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"enforce-curative-security" : false
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 7a2b0d023f..a51ee4b242 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_MEGAWATT",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "MW",
"curative-min-obj-improvement" : 10000.0,
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"enforce-curative-security" : false
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 3bc0c4a84f..7a13ffa44c 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_MEGAWATT",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "MW",
"curative-min-obj-improvement" : 10000.0,
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"enforce-curative-security" : false
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 d5e1320257..97277c0e14 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_AMPERE",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "A",
"curative-min-obj-improvement" : 0.0,
"preventive-stop-criterion" : "SECURE"
},
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 70f96d7d9a..306fd4cddc 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_AMPERE",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "A",
"curative-min-obj-improvement" : 0.0,
"preventive-stop-criterion" : "SECURE"
},
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 72ceef349e..e7675a5e31 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_MEGAWATT",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "MW",
"curative-min-obj-improvement" : 0.0,
"preventive-stop-criterion" : "SECURE"
},
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 4f346521ea..2ab423fb5f 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_MEGAWATT",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "MW",
"curative-min-obj-improvement" : 0.0,
"preventive-stop-criterion" : "SECURE"
},
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 337acd27a4..65846b8f75 100644
--- a/tests/src/test/resources/files/configurations/common/RaoParameters_securityAnalysis.json
+++ b/tests/src/test/resources/files/configurations/common/RaoParameters_securityAnalysis.json
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_AMPERE",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "A",
"curative-min-obj-improvement" : 0.0,
"preventive-stop-criterion" : "SECURE"
},
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 923cbb912b..29edf0c2c3 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_MEGAWATT",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "MW",
"curative-min-obj-improvement" : 0.0,
"preventive-stop-criterion" : "SECURE"
},
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 1f87dddf6e..e284f40c1c 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_RELATIVE_MARGIN_IN_MEGAWATT",
+ "type" : "MAX_MIN_RELATIVE_MARGIN",
+ "unit" : "MW",
"curative-min-obj-improvement" : 10000.0,
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"enforce-curative-security" : false
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 ed8c046153..b15a8334e9 100644
--- a/tests/src/test/resources/files/configurations/epic10/conf_ep10us2case1.json
+++ b/tests/src/test/resources/files/configurations/epic10/conf_ep10us2case1.json
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_RELATIVE_MARGIN_IN_MEGAWATT",
+ "type" : "MAX_MIN_RELATIVE_MARGIN",
+ "unit" : "MW",
"curative-min-obj-improvement" : 10000.0,
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"enforce-curative-security" : false
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 7ad0f13faf..15f3444af0 100644
--- a/tests/src/test/resources/files/configurations/epic10/conf_ep10us2case2.json
+++ b/tests/src/test/resources/files/configurations/epic10/conf_ep10us2case2.json
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_RELATIVE_MARGIN_IN_MEGAWATT",
+ "type" : "MAX_MIN_RELATIVE_MARGIN",
+ "unit" : "MW",
"curative-min-obj-improvement" : 10000.0,
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"enforce-curative-security" : false
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 29c70396fa..f3502b1a1d 100644
--- a/tests/src/test/resources/files/configurations/epic10/conf_ep10us3case1.json
+++ b/tests/src/test/resources/files/configurations/epic10/conf_ep10us3case1.json
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_RELATIVE_MARGIN_IN_MEGAWATT",
+ "type" : "MAX_MIN_RELATIVE_MARGIN",
+ "unit" : "MW",
"curative-min-obj-improvement" : 10000.0,
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"enforce-curative-security" : false
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 565a41b6f1..887c038606 100644
--- a/tests/src/test/resources/files/configurations/epic10/conf_ep10us4case1.json
+++ b/tests/src/test/resources/files/configurations/epic10/conf_ep10us4case1.json
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_RELATIVE_MARGIN_IN_MEGAWATT",
+ "type" : "MAX_MIN_RELATIVE_MARGIN",
+ "unit" : "MW",
"curative-min-obj-improvement" : 10000.0,
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"enforce-curative-security" : false
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 9f439d027b..66d7cc7f1c 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_MEGAWATT",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "MW",
"curative-min-obj-improvement" : 10000.0,
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"enforce-curative-security" : false
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 e6760eb3dd..485eb1b763 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_MEGAWATT",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "MW",
"curative-min-obj-improvement" : 10000.0,
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"enforce-curative-security" : false
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 b4e04266be..97c039327a 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_AMPERE",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "A",
"curative-min-obj-improvement" : 0.0,
"preventive-stop-criterion" : "SECURE"
},
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 e4333c32cd..8797140e10 100644
--- a/tests/src/test/resources/files/configurations/epic12/raoParametersSweIDCC_minObjective.json
+++ b/tests/src/test/resources/files/configurations/epic12/raoParametersSweIDCC_minObjective.json
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_AMPERE",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "A",
"curative-min-obj-improvement" : 10000.0,
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"enforce-curative-security" : false
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 bcccd0a781..4bffab1bf7 100644
--- a/tests/src/test/resources/files/configurations/epic12/raoParametersSweIDCC_minObjectiveDisabled2P.json
+++ b/tests/src/test/resources/files/configurations/epic12/raoParametersSweIDCC_minObjectiveDisabled2P.json
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_AMPERE",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "A",
"curative-min-obj-improvement" : 10000.0,
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"enforce-curative-security" : false
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 0f497d4d3a..1ef7a0ce72 100644
--- a/tests/src/test/resources/files/configurations/epic12/raoParametersSweIDCC_minObjectiveWithGlobal2P.json
+++ b/tests/src/test/resources/files/configurations/epic12/raoParametersSweIDCC_minObjectiveWithGlobal2P.json
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_AMPERE",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "A",
"curative-min-obj-improvement" : 10000.0,
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"enforce-curative-security" : false
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 877618c0db..6e4fe7e751 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_MEGAWATT",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "MW",
"curative-min-obj-improvement" : 0.0,
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"enforce-curative-security" : false
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 7b05d9c7f2..328fa61b67 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_MEGAWATT",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "MW",
"curative-min-obj-improvement" : 10000.0,
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"enforce-curative-security" : false
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 835f554a88..f1cd61cfb7 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_AMPERE",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "A",
"curative-min-obj-improvement" : 300.0,
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"enforce-curative-security" : true
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 efee8f5ef1..4f541900e9 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_AMPERE",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "A",
"curative-min-obj-improvement" : 500.0,
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"enforce-curative-security" : false
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 f1e0b5f530..c2ee608a96 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_AMPERE",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "A",
"curative-min-obj-improvement" : 628.0,
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"enforce-curative-security" : false
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 ed6070a0a9..8a29589b75 100644
--- a/tests/src/test/resources/files/configurations/epic13/RaoParameters_ep13us6case8.json
+++ b/tests/src/test/resources/files/configurations/epic13/RaoParameters_ep13us6case8.json
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_MEGAWATT",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "MW",
"curative-min-obj-improvement" : 10000.0,
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"enforce-curative-security" : false
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 77c173b955..dc815dd60a 100644
--- a/tests/src/test/resources/files/configurations/epic13/RaoParameters_ep13us7case6.json
+++ b/tests/src/test/resources/files/configurations/epic13/RaoParameters_ep13us7case6.json
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_MEGAWATT",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "MW",
"curative-min-obj-improvement" : 10000.0,
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"enforce-curative-security" : false
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 dbbda62c30..3e713c64a8 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_AMPERE",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "A",
"curative-min-obj-improvement" : 10000.0,
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"enforce-curative-security" : false
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 e33afb2390..91a0112525 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_AMPERE",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "A",
"curative-min-obj-improvement" : 10000.0,
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"enforce-curative-security" : false
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 3175286422..6303de7630 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_AMPERE",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "A",
"curative-min-obj-improvement" : 10000.0,
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"enforce-curative-security" : false
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 792d71a696..0152799c2e 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_RELATIVE_MARGIN_IN_AMPERE",
+ "type" : "MAX_MIN_RELATIVE_MARGIN",
+ "unit" : "A",
"curative-min-obj-improvement" : 10000.0,
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"enforce-curative-security" : false
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 1dacc9d575..aef7e2fef4 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_AMPERE",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "A",
"curative-min-obj-improvement" : 0.0,
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"enforce-curative-security" : false
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 2c148ed2a9..ee1841f836 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_AMPERE",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "A",
"curative-min-obj-improvement" : 0.0,
"preventive-stop-criterion" : "SECURE"
},
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 ed7997dee5..3ea5df5766 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_MEGAWATT",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "MW",
"curative-min-obj-improvement" : 10000.0,
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"enforce-curative-security" : false
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 c7be9e5775..8806772b3f 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_MEGAWATT",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "MW",
"curative-min-obj-improvement" : 10000.0,
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"enforce-curative-security" : false
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 af8adfad33..0eb115e5d0 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_MEGAWATT",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "MW",
"curative-min-obj-improvement" : 0.0,
"preventive-stop-criterion" : "SECURE"
},
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 2280689477..2af2859925 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_MEGAWATT",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "MW",
"curative-min-obj-improvement" : 10000.0,
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"enforce-curative-security" : false
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 9b0111d9f4..21bc10d84f 100644
--- a/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us13case1.json
+++ b/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us13case1.json
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_AMPERE",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "A",
"curative-min-obj-improvement" : 10000.0,
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"enforce-curative-security" : false
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 60649946b0..64f813bd89 100644
--- a/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us13case10.json
+++ b/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us13case10.json
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_AMPERE",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "A",
"curative-min-obj-improvement" : 10000.0,
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"enforce-curative-security" : false
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 e36ff9693f..f4217fc6d2 100644
--- a/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us13case2.json
+++ b/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us13case2.json
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_AMPERE",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "A",
"curative-min-obj-improvement" : 10000.0,
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"enforce-curative-security" : false
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 ba086344c8..e7c95262a2 100644
--- a/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us13case5.json
+++ b/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us13case5.json
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_AMPERE",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "A",
"curative-min-obj-improvement" : 10000.0,
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"enforce-curative-security" : false
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 474ece869a..1103355328 100644
--- a/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us13case6.json
+++ b/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us13case6.json
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_AMPERE",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "A",
"curative-min-obj-improvement" : 10000.0,
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"enforce-curative-security" : false
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 1f98ae478c..e25dc00b74 100644
--- a/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us13case7.json
+++ b/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us13case7.json
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_AMPERE",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "A",
"curative-min-obj-improvement" : 10000.0,
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"enforce-curative-security" : false
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 5163474191..19cdd43d17 100644
--- a/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us13case8.json
+++ b/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us13case8.json
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_AMPERE",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "A",
"curative-min-obj-improvement" : 10000.0,
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"enforce-curative-security" : false
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 7475d2daf3..c343c37cd5 100644
--- a/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us17case10.json
+++ b/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us17case10.json
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_AMPERE",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "A",
"curative-min-obj-improvement" : 0.0,
"preventive-stop-criterion" : "SECURE"
},
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 7475d2daf3..c343c37cd5 100644
--- a/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us17case11.json
+++ b/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us17case11.json
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_AMPERE",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "A",
"curative-min-obj-improvement" : 0.0,
"preventive-stop-criterion" : "SECURE"
},
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 36a6c76481..2dc1b276d1 100644
--- a/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us17case12.json
+++ b/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us17case12.json
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_AMPERE",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "A",
"curative-min-obj-improvement" : 10000.0,
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"enforce-curative-security" : false
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 2c30a7029f..03b29a212e 100644
--- a/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us17case2.json
+++ b/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us17case2.json
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_AMPERE",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "A",
"curative-min-obj-improvement" : 0.0,
"preventive-stop-criterion" : "SECURE"
},
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 2c30a7029f..03b29a212e 100644
--- a/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us17case6.json
+++ b/tests/src/test/resources/files/configurations/epic15/RaoParameters_ep15us17case6.json
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_AMPERE",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "A",
"curative-min-obj-improvement" : 0.0,
"preventive-stop-criterion" : "SECURE"
},
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 fa17158d51..3f6ebc6ccb 100644
--- a/tests/src/test/resources/files/configurations/epic15/raoParametersSweIDCC_withoutPsts.json
+++ b/tests/src/test/resources/files/configurations/epic15/raoParametersSweIDCC_withoutPsts.json
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_AMPERE",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "A",
"curative-min-obj-improvement" : 0.0,
"preventive-stop-criterion" : "SECURE"
},
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 ee42664592..5ffc156971 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_MEGAWATT",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "MW",
"curative-min-obj-improvement" : 10000.0,
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"enforce-curative-security" : false
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 9e20f5043a..dcc42e6c30 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_AMPERE",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "A",
"curative-min-obj-improvement" : 10000.0,
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"enforce-curative-security" : false
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 bf6624a935..433460ae2f 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_AMPERE",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "A",
"curative-min-obj-improvement" : 10000.0,
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"enforce-curative-security" : false
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 c064eadbe8..f9aa265393 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_MEGAWATT",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "MW",
"curative-min-obj-improvement" : 10000.0,
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"enforce-curative-security" : false
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 c5bc1fd805..6c893618d3 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_AMPERE",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "A",
"curative-min-obj-improvement" : 10000.0,
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"enforce-curative-security" : false
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 12b99c7fef..c179c5144d 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_MEGAWATT",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "MW",
"curative-min-obj-improvement" : 10000.0,
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"enforce-curative-security" : false
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 bc712485b0..f31433e638 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_RELATIVE_MARGIN_IN_AMPERE",
+ "type" : "MAX_MIN_RELATIVE_MARGIN",
+ "unit" : "A",
"curative-min-obj-improvement" : 10000.0,
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"enforce-curative-security" : false
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 1948a0657f..5d2e227005 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_RELATIVE_MARGIN_IN_AMPERE",
+ "type" : "MAX_MIN_RELATIVE_MARGIN",
+ "unit" : "A",
"curative-min-obj-improvement" : 10000.0,
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"enforce-curative-security" : false
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 41e026fbf1..e714a3b9f5 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_RELATIVE_MARGIN_IN_MEGAWATT",
+ "type" : "MAX_MIN_RELATIVE_MARGIN",
+ "unit" : "MW",
"curative-min-obj-improvement" : 10000.0,
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"enforce-curative-security" : false
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 8d3e7ae83a..d5a7cebf6a 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_RELATIVE_MARGIN_IN_MEGAWATT",
+ "type" : "MAX_MIN_RELATIVE_MARGIN",
+ "unit" : "MW",
"curative-min-obj-improvement" : 10000.0,
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"enforce-curative-security" : false
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 81e4f73afc..b9069f90a1 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_MEGAWATT",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "MW",
"curative-min-obj-improvement" : 0.0,
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"enforce-curative-security" : false
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 80a40d6c57..1aa26415f6 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_MEGAWATT",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "MW",
"curative-min-obj-improvement" : 10000.0,
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"enforce-curative-security" : false
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 25e390318c..57cbb2248c 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_MEGAWATT",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "MW",
"curative-min-obj-improvement" : 10000.0,
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"enforce-curative-security" : false
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 c0042d30a5..49b38503f4 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_MEGAWATT",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "MW",
"curative-min-obj-improvement" : 50.0,
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"enforce-curative-security" : true
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 1821c2965e..75119f5011 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_AMPERE",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "A",
"curative-min-obj-improvement" : 10000.0,
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"enforce-curative-security" : false
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 f946c1265c..e761046b8a 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_AMPERE",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "A",
"curative-min-obj-improvement" : 10000.0,
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"enforce-curative-security" : false
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 febce2b3f2..a16b3a8433 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_AMPERE",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "A",
"curative-min-obj-improvement" : 10000.0,
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"enforce-curative-security" : false
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 bd40b180b6..faea05e52d 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_AMPERE",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "A",
"curative-min-obj-improvement" : 0.0,
"preventive-stop-criterion" : "SECURE"
},
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 a51e1fcc02..efc43f027f 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_AMPERE",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "A",
"curative-min-obj-improvement" : 10000.0,
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"enforce-curative-security" : false
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 c040661518..8f5c888bb2 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_AMPERE",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "A",
"curative-min-obj-improvement" : 0.0,
"preventive-stop-criterion" : "SECURE"
},
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 b3c2d3bf90..b95a079f64 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_MEGAWATT",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "MW",
"curative-min-obj-improvement" : 10000.0,
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"enforce-curative-security" : false
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 10077f3a4b..1f860a044b 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_MEGAWATT",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "MW",
"curative-min-obj-improvement" : 10000.0,
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"enforce-curative-security" : false
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 bd265fb42a..c523dd0c85 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_MEGAWATT",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "MW",
"curative-min-obj-improvement" : 10000.0,
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"enforce-curative-security" : false
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 931b553b76..a96550f533 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_MEGAWATT",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "MW",
"curative-min-obj-improvement" : 10000.0,
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"enforce-curative-security" : false
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 1758d7ad39..ad3dc0688f 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_MEGAWATT",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "MW",
"curative-min-obj-improvement" : 10000.0,
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"enforce-curative-security" : false
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 1ce7cf7d44..e607eb0b06 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_MEGAWATT",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "MW",
"curative-min-obj-improvement" : 10000.0,
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"enforce-curative-security" : false
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 1c3d36def3..7636ba3476 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_MEGAWATT",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "MW",
"curative-min-obj-improvement" : 10000.0,
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"enforce-curative-security" : false
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 8dfb7d47e7..2083b79eeb 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_MEGAWATT",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "MW",
"curative-min-obj-improvement" : 10000.0,
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"enforce-curative-security" : false
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 0d9d5ed929..b3fbe61aa1 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_MEGAWATT",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "MW",
"curative-min-obj-improvement" : 10000.0,
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"enforce-curative-security" : false
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 770854062b..b94e66ab03 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_MEGAWATT",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "MW",
"curative-min-obj-improvement" : 10000.0,
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"enforce-curative-security" : false
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 ca22728162..171b4d3543 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_MEGAWATT",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "MW",
"curative-min-obj-improvement" : 10000.0,
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"enforce-curative-security" : false
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 6aa35a76f7..e4ce16c5b2 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_MEGAWATT",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "MW",
"curative-min-obj-improvement" : 10000.0,
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"enforce-curative-security" : false
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 05688feda9..ff1f4262ed 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_MEGAWATT",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "MW",
"curative-min-obj-improvement" : 10000.0,
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"enforce-curative-security" : false
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 83a76ff7d8..5e65105fa0 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_MEGAWATT",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "MW",
"curative-min-obj-improvement" : 10000.0,
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"enforce-curative-security" : false
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 67cb497029..e930fec252 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_MEGAWATT",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "MW",
"curative-min-obj-improvement" : 10000.0,
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"enforce-curative-security" : false
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 e4bbaf265b..ec49e7e7d4 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_MEGAWATT",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "MW",
"curative-min-obj-improvement" : 0.0,
"preventive-stop-criterion" : "SECURE"
},
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 862f32bbc7..80a9072c65 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_MEGAWATT",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "MW",
"curative-min-obj-improvement" : 0.0,
"preventive-stop-criterion" : "SECURE"
},
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 8902463dda..b646ef9bed 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_MEGAWATT",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "MW",
"curative-min-obj-improvement" : 0.0,
"preventive-stop-criterion" : "SECURE"
},
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 6dbc8caf08..f75cb1611d 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_AMPERE",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "A",
"curative-min-obj-improvement" : 0.0,
"preventive-stop-criterion" : "SECURE"
},
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 af49829956..a51abdb704 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_AMPERE",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "A",
"curative-min-obj-improvement" : 10000.0,
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"enforce-curative-security" : false
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 766a206c5f..287d85b478 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_AMPERE",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "A",
"curative-min-obj-improvement" : 10000.0,
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"enforce-curative-security" : false
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 33168b4a28..bc8319b0a8 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_AMPERE",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "A",
"curative-min-obj-improvement" : 0.0,
"preventive-stop-criterion" : "SECURE"
},
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 ea5bbc7870..ae5cb5867a 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_AMPERE",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "A",
"curative-min-obj-improvement" : 0.0,
"preventive-stop-criterion" : "SECURE"
},
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 688bf1eeca..9e20f004df 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_MEGAWATT",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "MW",
"curative-min-obj-improvement" : 0.0,
"preventive-stop-criterion" : "SECURE"
},
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 ae6394a4a4..b8b0ae2f5d 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_MEGAWATT",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "MW",
"curative-min-obj-improvement" : 0.0,
"preventive-stop-criterion" : "SECURE"
},
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 949b331f5d..5a80eaf3ee 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_MEGAWATT",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "MW",
"curative-min-obj-improvement" : 10000.0,
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"enforce-curative-security" : false
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 37bec14dce..7ccdc38ec3 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_MEGAWATT",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "MW",
"curative-min-obj-improvement" : 10000.0,
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"enforce-curative-security" : false
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 3d157d4667..f8bccfc5fa 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
@@ -1,7 +1,8 @@
{
"version" : "2.5",
"objective-function" : {
- "type" : "MAX_MIN_MARGIN_IN_AMPERE",
+ "type" : "MAX_MIN_MARGIN",
+ "unit" : "A",
"curative-min-obj-improvement" : 10000.0,
"preventive-stop-criterion" : "MIN_OBJECTIVE",
"enforce-curative-security" : false