@@ -24,9 +24,13 @@ public final class IcsImporter {
2424 private static final int OFFSET = 2 ;
2525 private static final double COST_UP = 10 ;
2626 private static final double COST_DOWN = 10 ;
27- private static final double ACTIVATION_COST = 50 ;
27+ private static final String MAX_GRADIENT = "1000" ;
2828
29- //TODO:QUALITY CHECK: do PO respect constraints?
29+ // TODO:QUALITY CHECK: do PO respect constraints?
30+ // TODO:QUALITY CHECK: consistency between gsks defined in static file + gsk file
31+
32+ // INFOS
33+ // Gradient constraints are defined for gsks à la maille parade, et pas par générateur : on applique donc le shift key au Pmax/Pmin
3034
3135 private IcsImporter () {
3236 //should only be used statically
@@ -127,9 +131,9 @@ private static void importGskRedispatchingAction(InterTemporalRaoInputWithNetwor
127131 PowerGradient powerGradient = PowerGradient .builder ()
128132 .withNetworkElementId (networkElementPerGskElement .get (nodeId ))
129133 .withMaxValue (shiftKey * Double .parseDouble (
130- staticRecord .get ("Maximum positive power gradient [MW/h]" ).isEmpty () ? "1000" : staticRecord .get ("Maximum positive power gradient [MW/h]" )
134+ staticRecord .get ("Maximum positive power gradient [MW/h]" ).isEmpty () ? MAX_GRADIENT : staticRecord .get ("Maximum positive power gradient [MW/h]" )
131135 )).withMinValue (-shiftKey * Double .parseDouble (
132- staticRecord .get ("Maximum negative power gradient [MW/h]" ).isEmpty () ? "1000" : staticRecord .get ("Maximum negative power gradient [MW/h]" )
136+ staticRecord .get ("Maximum negative power gradient [MW/h]" ).isEmpty () ? MAX_GRADIENT : staticRecord .get ("Maximum negative power gradient [MW/h]" )
133137 )).build ();
134138 interTemporalRaoInput .getPowerGradients ().add (powerGradient );
135139 });
@@ -174,9 +178,9 @@ private static void importNodeRedispatchingAction(InterTemporalRaoInputWithNetwo
174178 PowerGradient powerGradient = PowerGradient .builder ()
175179 .withNetworkElementId (networkElementId )
176180 .withMaxValue (Double .parseDouble (
177- staticRecord .get ("Maximum positive power gradient [MW/h]" ).isEmpty () ? "1000" : staticRecord .get ("Maximum positive power gradient [MW/h]" )
181+ staticRecord .get ("Maximum positive power gradient [MW/h]" ).isEmpty () ? MAX_GRADIENT : staticRecord .get ("Maximum positive power gradient [MW/h]" )
178182 )).withMinValue (-Double .parseDouble (
179- staticRecord .get ("Maximum negative power gradient [MW/h]" ).isEmpty () ? "1000" : staticRecord .get ("Maximum negative power gradient [MW/h]" )
183+ staticRecord .get ("Maximum negative power gradient [MW/h]" ).isEmpty () ? MAX_GRADIENT : staticRecord .get ("Maximum negative power gradient [MW/h]" )
180184 )).build ();
181185 interTemporalRaoInput .getPowerGradients ().add (powerGradient );
182186 }
@@ -225,9 +229,9 @@ private static boolean shouldBeImported(CSVRecord staticRecord, Map<String, Map<
225229
226230 private static boolean p0RespectsGradients (CSVRecord staticRecord , CSVRecord p0record , Set <OffsetDateTime > dateTimes ) {
227231 double maxGradient = Double .parseDouble (staticRecord .get ("Maximum positive power gradient [MW/h]" ).isEmpty () ?
228- "1000" : staticRecord .get ("Maximum positive power gradient [MW/h]" ));
232+ MAX_GRADIENT : staticRecord .get ("Maximum positive power gradient [MW/h]" ));
229233 double minGradient = -Double .parseDouble (staticRecord .get ("Maximum negative power gradient [MW/h]" ).isEmpty () ?
230- "1000" : staticRecord .get ("Maximum negative power gradient [MW/h]" ));
234+ MAX_GRADIENT : staticRecord .get ("Maximum negative power gradient [MW/h]" ));
231235
232236 Iterator <OffsetDateTime > dateTimeIterator = dateTimes .iterator ();
233237 OffsetDateTime currentDateTime = dateTimeIterator .next ();
0 commit comments