Skip to content

Commit 60a82ed

Browse files
generation dispatch : allow out of active power limits generator to scale (#273)
* Use new scaling parameter to allow generator to scale even if their initial target P is out of the active power limits. Signed-off-by: Franck LECUYER <[email protected]>
1 parent 57bc52c commit 60a82ed

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/main/java/org/gridsuite/modification/server/modifications/GenerationDispatch.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import com.powsybl.commons.reporter.Reporter;
1313
import com.powsybl.commons.reporter.TypedValue;
1414
import com.powsybl.iidm.modification.scalable.Scalable;
15+
import com.powsybl.iidm.modification.scalable.ScalingParameters;
1516
import com.powsybl.iidm.network.Bus;
1617
import com.powsybl.iidm.network.Component;
1718
import com.powsybl.iidm.network.DefaultNetworkListener;
@@ -375,7 +376,7 @@ public void apply(Network network, Reporter subReporter, ApplicationContext cont
375376
network.addListener(listener);
376377

377378
Scalable scalable = Scalable.stack(generatorsScalable.toArray(Scalable[]::new));
378-
realized = scalable.scale(network, totalAmountSupplyToBeDispatched);
379+
realized = scalable.scale(network, totalAmountSupplyToBeDispatched, new ScalingParameters().setAllowsGeneratorOutOfActivePowerLimits(true));
379380

380381
network.removeListener(listener);
381382
}

src/test/java/org/gridsuite/modification/server/modifications/GenerationDispatchTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,7 @@ public void testGenerationDispatchWithFrequencyReserve() {
338338

339339
// network with 2 synchronous components, 2 hvdc lines between them, forcedOutageRate and plannedOutageRate defined for the generators
340340
setNetwork(Network.read("testGenerationDispatchReduceMaxP.xiidm", getClass().getResourceAsStream("/testGenerationDispatchReduceMaxP.xiidm")));
341+
getNetwork().getGenerator("GH1").setMinP(20.); // to test scaling parameter allowsGeneratorOutOfActivePowerLimits
341342

342343
List<FilterEquipments> filtersForPmaxReduction = List.of(getFilterEquipments(FILTER_ID_1, "filter1", List.of(getIdentifiableAttributes(GTH2_ID), getIdentifiableAttributes(GROUP1_ID)), List.of()),
343344
getFilterEquipments(FILTER_ID_2, "filter2", List.of(getIdentifiableAttributes(ABC_ID), getIdentifiableAttributes(GH3_ID)), List.of()),

0 commit comments

Comments
 (0)