Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Share code for network modifications #524

Merged
merged 30 commits into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
ad6f6f3
draft
Mathieu-Deharbe Aug 28, 2024
3b27dfb
draft refacto check and apply functions
Mathieu-Deharbe Aug 29, 2024
1986a26
indent and correct TU
Mathieu-Deharbe Aug 29, 2024
dffe039
finish GeneratorField + correction in GeneratorModification
Mathieu-Deharbe Aug 29, 2024
3c1c0fa
shunt compensator MAXIMUM_SECTION_COUNT
Mathieu-Deharbe Sep 2, 2024
21cc44e
Merge branch 'main' into share-code-for-network-modifications
Mathieu-Deharbe Sep 2, 2024
f4a62eb
shunt compensator
Mathieu-Deharbe Sep 2, 2024
bccd1cb
Merge remote-tracking branch 'origin/share-code-for-network-modificat…
Mathieu-Deharbe Sep 2, 2024
52a7eeb
VoltageLevelFields
Mathieu-Deharbe Sep 2, 2024
4dcf358
reduce modifyVoltageLevelShortCircuit code complexity
Mathieu-Deharbe Sep 2, 2024
2ce33ed
always send formulaReports
Mathieu-Deharbe Sep 3, 2024
c3bbff8
refacto BatteryField
Mathieu-Deharbe Sep 3, 2024
fe01d83
refacto GeneratorField
Mathieu-Deharbe Sep 3, 2024
3337dd9
refacto VoltageLevelField
Mathieu-Deharbe Sep 3, 2024
c37e5a0
correct tests
Mathieu-Deharbe Sep 3, 2024
a8ae013
correct tests
Mathieu-Deharbe Sep 3, 2024
906613b
modifyBranchValues
Mathieu-Deharbe Sep 4, 2024
6f7a6ae
finish TwoWindingsTransformerField
Mathieu-Deharbe Sep 4, 2024
6e29fdc
reduce cognitive complexity
Mathieu-Deharbe Sep 4, 2024
d249d45
small refect on BatteryField
Mathieu-Deharbe Sep 4, 2024
90b6b5c
ultimate cleaning
Mathieu-Deharbe Sep 4, 2024
e758123
corections post review
Mathieu-Deharbe Sep 17, 2024
0a92daf
Merge branch 'main' of https://github.com/gridsuite/network-modificat…
Mathieu-Deharbe Sep 18, 2024
5c7f145
Merge branch 'main' into share-code-for-network-modifications
Mathieu-Deharbe Sep 18, 2024
68e970a
revert to correct unit tests
Mathieu-Deharbe Sep 18, 2024
04495ce
Merge remote-tracking branch 'origin/share-code-for-network-modificat…
Mathieu-Deharbe Sep 18, 2024
55de855
clean imports
Mathieu-Deharbe Sep 18, 2024
c9ce267
Merge branch 'main' into share-code-for-network-modifications
basseche Sep 18, 2024
6b35eec
Merge branch 'main' into share-code-for-network-modifications
Mathieu-Deharbe Sep 23, 2024
1bf83ed
post review
Mathieu-Deharbe Sep 25, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@
import com.powsybl.iidm.network.Battery;
import com.powsybl.iidm.network.extensions.ActivePowerControl;
import com.powsybl.iidm.network.extensions.ActivePowerControlAdder;
import org.gridsuite.modification.server.dto.AttributeModification;
import org.gridsuite.modification.server.dto.OperationType;
import org.gridsuite.modification.server.modifications.ModificationUtils;

import static org.gridsuite.modification.server.NetworkModificationException.Type.MODIFY_GENERATOR_ERROR;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Battery exception type !

import static org.gridsuite.modification.server.modifications.BatteryModification.modifyBatteryActiveLimitsAttributes;
import static org.gridsuite.modification.server.modifications.BatteryModification.modifyBatterySetpointsAttributes;

/**
* @author Seddik Yengui <Seddik.yengui at rte-france.com>
Expand All @@ -36,14 +43,28 @@ public static Double getReferenceValue(Battery battery, String batteryField) {

public static void setNewValue(Battery battery, String batteryField, Double newValue) {
BatteryField field = BatteryField.valueOf(batteryField);
final AttributeModification<Double> modif = new AttributeModification<>(newValue, OperationType.SET);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doubleAttributeModification ? or attributeModification
use variable name more descriptive

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is attributeModif enough ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok I renamed it to the whole attributeModification.

switch (field) {
case MINIMUM_ACTIVE_POWER -> battery.setMinP(newValue);
case MAXIMUM_ACTIVE_POWER -> battery.setMaxP(newValue);
case ACTIVE_POWER_SET_POINT -> battery.setTargetP(newValue);
case REACTIVE_POWER_SET_POINT -> battery.setTargetQ(newValue);
case DROOP -> battery.newExtension(ActivePowerControlAdder.class)
.withDroop(newValue)
.add();
case MINIMUM_ACTIVE_POWER ->
modifyBatteryActiveLimitsAttributes(null, modif, battery, null);
case MAXIMUM_ACTIVE_POWER ->
modifyBatteryActiveLimitsAttributes(modif, null, battery, null);
case ACTIVE_POWER_SET_POINT -> {
ModificationUtils.getInstance().checkActivePowerZeroOrBetweenMinAndMaxActivePower(
modif, null, null, battery.getMinP(),
battery.getMaxP(), battery.getTargetP(), MODIFY_GENERATOR_ERROR, "Battery '" + battery.getId() + "' : "
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MODIFY_BATTERY_ERROR

);
modifyBatterySetpointsAttributes(modif, null, null, null, battery, null);
}
case REACTIVE_POWER_SET_POINT -> modifyBatterySetpointsAttributes(
null, modif, null, null, battery, null);
case DROOP -> {
ActivePowerControl<Battery> activePowerControl = battery.getExtension(ActivePowerControl.class);
ActivePowerControlAdder<Battery> activePowerControlAdder = battery.newExtension(ActivePowerControlAdder.class);
ModificationUtils.getInstance().modifyActivePowerControlAttributes(
activePowerControl, activePowerControlAdder, null,
new AttributeModification<>(newValue.floatValue(), OperationType.SET), null, null);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check for null before converting it to a float
you can use optional to handle null safely like
Optional.ofNullable(newValue) .map(Double::floatValue) ...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added @NotNull to the Double newValue parameter.

}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,15 @@
import com.powsybl.iidm.network.extensions.ActivePowerControl;
import com.powsybl.iidm.network.extensions.ActivePowerControlAdder;
import com.powsybl.iidm.network.extensions.CoordinatedReactiveControl;
import com.powsybl.iidm.network.extensions.CoordinatedReactiveControlAdder;
import com.powsybl.iidm.network.extensions.GeneratorShortCircuit;
import com.powsybl.iidm.network.extensions.GeneratorShortCircuitAdder;
import com.powsybl.iidm.network.extensions.GeneratorStartup;
import com.powsybl.iidm.network.extensions.GeneratorStartupAdder;
import com.powsybl.network.store.iidm.impl.extensions.CoordinatedReactiveControlAdderImpl;
import org.gridsuite.modification.server.dto.AttributeModification;
import org.gridsuite.modification.server.dto.OperationType;
import org.gridsuite.modification.server.modifications.ModificationUtils;

import static org.gridsuite.modification.server.NetworkModificationException.Type.MODIFY_GENERATOR_ERROR;
import static org.gridsuite.modification.server.modifications.GeneratorModification.*;

/**
* @author Seddik Yengui <Seddik.yengui at rte-france.com>
Expand Down Expand Up @@ -63,84 +67,40 @@ public static Double getReferenceValue(Generator generator, String generatorFiel

public static void setNewValue(Generator generator, String generatorField, Double newValue) {
if (!Double.isNaN(newValue)) {
GeneratorStartup generatorStartup = generator.getExtension(GeneratorStartup.class);
GeneratorShortCircuit generatorShortCircuit = generator.getExtension(GeneratorShortCircuit.class);
GeneratorField field = GeneratorField.valueOf(generatorField);
final AttributeModification<Double> attrModif = new AttributeModification<>(newValue, OperationType.SET);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And same as well.

switch (field) {
case MAXIMUM_ACTIVE_POWER -> generator.setMaxP(newValue);
case MINIMUM_ACTIVE_POWER -> generator.setMinP(newValue);
case ACTIVE_POWER_SET_POINT -> generator.setTargetP(newValue);
case RATED_NOMINAL_POWER -> generator.setRatedS(newValue);
case REACTIVE_POWER_SET_POINT -> generator.setTargetQ(newValue);
case VOLTAGE_SET_POINT -> generator.setTargetV(newValue);
case PLANNED_ACTIVE_POWER_SET_POINT -> {
if (generatorStartup == null) {
generator.newExtension(GeneratorStartupAdder.class)
.withPlannedActivePowerSetpoint(newValue)
.add();
} else {
generator.newExtension(GeneratorStartupAdder.class)
.withMarginalCost(generatorStartup.getMarginalCost())
.withPlannedActivePowerSetpoint(newValue)
.withPlannedOutageRate(generatorStartup.getPlannedOutageRate())
.withForcedOutageRate(generatorStartup.getForcedOutageRate())
.add();
}
}
case MARGINAL_COST -> {
if (generatorStartup == null) {
generator.newExtension(GeneratorStartupAdder.class)
.withMarginalCost(newValue)
.add();
} else {
generator.newExtension(GeneratorStartupAdder.class)
.withMarginalCost(newValue)
.withPlannedActivePowerSetpoint(generatorStartup.getPlannedActivePowerSetpoint())
.withPlannedOutageRate(generatorStartup.getPlannedOutageRate())
.withForcedOutageRate(generatorStartup.getForcedOutageRate())
.add();
}
}
case PLANNED_OUTAGE_RATE -> {
if (generatorStartup == null) {
generator.newExtension(GeneratorStartupAdder.class)
.withPlannedOutageRate(newValue)
.add();
} else {
generator.newExtension(GeneratorStartupAdder.class)
.withMarginalCost(generatorStartup.getMarginalCost())
.withPlannedActivePowerSetpoint(generatorStartup.getPlannedActivePowerSetpoint())
.withPlannedOutageRate(newValue)
.withForcedOutageRate(generatorStartup.getForcedOutageRate())
.add();
}
case MAXIMUM_ACTIVE_POWER -> modifyGeneratorActiveLimitsAttributes(
attrModif, null, null, generator, null);
case MINIMUM_ACTIVE_POWER -> modifyGeneratorActiveLimitsAttributes(null, attrModif, null, generator, null);
case ACTIVE_POWER_SET_POINT -> {
ModificationUtils.getInstance().checkActivePowerZeroOrBetweenMinAndMaxActivePower(
attrModif, null, null,
generator.getMinP(), generator.getMaxP(), generator.getTargetP(),
MODIFY_GENERATOR_ERROR, "Generator '" + generator.getId() + "' : "
);
generator.setTargetP(newValue);
}
case FORCED_OUTAGE_RATE -> {
if (generatorStartup == null) {
generator.newExtension(GeneratorStartupAdder.class)
.withForcedOutageRate(newValue)
.add();
} else {
generator.newExtension(GeneratorStartupAdder.class)
.withMarginalCost(generatorStartup.getMarginalCost())
.withPlannedActivePowerSetpoint(generatorStartup.getPlannedActivePowerSetpoint())
.withPlannedOutageRate(generatorStartup.getForcedOutageRate())
.withForcedOutageRate(newValue)
.add();
}
case RATED_NOMINAL_POWER -> modifyGeneratorActiveLimitsAttributes(null, null, attrModif, generator, null);
case REACTIVE_POWER_SET_POINT -> modifyTargetQ(generator, attrModif);
case VOLTAGE_SET_POINT -> modifyTargetV(generator, attrModif);
case PLANNED_ACTIVE_POWER_SET_POINT ->
modifyGeneratorStartUpAttributes(attrModif, null, null, null, generator, null, null);
case MARGINAL_COST ->
modifyGeneratorStartUpAttributes(null, attrModif, null, null, generator, null, null);
case PLANNED_OUTAGE_RATE ->
modifyGeneratorStartUpAttributes(null, null, attrModif, null, generator, null, null);
case FORCED_OUTAGE_RATE ->
modifyGeneratorStartUpAttributes(null, null, null, attrModif, generator, null, null);
case DROOP -> {
ActivePowerControl<Generator> activePowerControl = generator.getExtension(ActivePowerControl.class);
ActivePowerControlAdder<Generator> activePowerControlAdder = generator.newExtension(ActivePowerControlAdder.class);
ModificationUtils.getInstance().modifyActivePowerControlAttributes(activePowerControl, activePowerControlAdder, null,
new AttributeModification<>(newValue.floatValue(), OperationType.SET), null, null);
}
case DROOP -> generator.newExtension(ActivePowerControlAdder.class)
.withDroop(newValue)
.add();
case TRANSIENT_REACTANCE -> generator.newExtension(GeneratorShortCircuitAdder.class)
.withDirectTransX(newValue)
.withStepUpTransformerX(generatorShortCircuit == null ? Double.NaN : generatorShortCircuit.getStepUpTransformerX())
.add();
case STEP_UP_TRANSFORMER_REACTANCE -> generator.newExtension(GeneratorShortCircuitAdder.class)
.withDirectTransX(generatorShortCircuit == null ? 0.0D : generatorShortCircuit.getDirectTransX())
.withStepUpTransformerX(newValue)
.add();
case Q_PERCENT -> generator.newExtension(CoordinatedReactiveControlAdder.class)
case TRANSIENT_REACTANCE -> modifyGeneratorShortCircuitAttributes(attrModif, null, generator, null);
case STEP_UP_TRANSFORMER_REACTANCE -> modifyGeneratorShortCircuitAttributes(null, attrModif, generator, null);
case Q_PERCENT -> generator.newExtension(CoordinatedReactiveControlAdderImpl.class)
.withQPercent(newValue)
.add();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
package org.gridsuite.modification.server.dto.formula.equipmentfield;

import com.powsybl.iidm.network.Load;
import org.gridsuite.modification.server.dto.AttributeModification;
import org.gridsuite.modification.server.dto.OperationType;

import static org.gridsuite.modification.server.modifications.LoadModification.modifyP0;
import static org.gridsuite.modification.server.modifications.LoadModification.modifyQ0;

/**
* @author Seddik Yengui <Seddik.yengui at rte-france.com>
Expand All @@ -28,8 +33,8 @@ public static Double getReferenceValue(Load load, String loadField) {
public static void setNewValue(Load load, String loadField, Double newValue) {
LoadField field = LoadField.valueOf(loadField);
switch (field) {
case ACTIVE_POWER -> load.setP0(newValue);
case REACTIVE_POWER -> load.setQ0(newValue);
case ACTIVE_POWER -> modifyP0(load, new AttributeModification<>(newValue, OperationType.SET), null);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

modifyAttributeP0 ?

Copy link
Contributor Author

@Mathieu-Deharbe Mathieu-Deharbe Sep 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But P0 is an attribute. Therefore attribute is implicit ?

case REACTIVE_POWER -> modifyQ0(load, new AttributeModification<>(newValue, OperationType.SET), null);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

modifyAttributeQ0

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same remark.

}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@
import com.powsybl.iidm.network.ShuntCompensatorModelType;
import com.powsybl.iidm.network.VoltageLevel;
import org.gridsuite.modification.server.NetworkModificationException;
import org.gridsuite.modification.server.dto.AttributeModification;
import org.gridsuite.modification.server.dto.OperationType;
import org.gridsuite.modification.server.dto.ShuntCompensatorType;

import static org.gridsuite.modification.server.modifications.ShuntCompensatorModification.*;

/**
* @author Seddik Yengui <Seddik.yengui at rte-france.com>
Expand Down Expand Up @@ -42,19 +47,15 @@ public static void setNewValue(ShuntCompensator shuntCompensator, String shuntCo
ShuntCompensatorLinearModel model = shuntCompensator.getModel(ShuntCompensatorLinearModel.class);
ShuntCompensatorField field = ShuntCompensatorField.valueOf(shuntCompensatorField);
VoltageLevel voltageLevel = shuntCompensator.getTerminal().getVoltageLevel();
var shuntCompensatorType = model.getBPerSection() > 0 ? ShuntCompensatorType.CAPACITOR : ShuntCompensatorType.REACTOR;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if (model != null) { double bPerSection = model.getBPerSection(); ShuntCompensatorType shuntCompensatorType = (bPerSection > 0) ? ShuntCompensatorType.CAPACITOR : ShuntCompensatorType.REACTOR; }

Copy link
Contributor Author

@Mathieu-Deharbe Mathieu-Deharbe Sep 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't do this, I need shuntCompensatorType out of the {}. But I can do :

Suggested change
var shuntCompensatorType = model.getBPerSection() > 0 ? ShuntCompensatorType.CAPACITOR : ShuntCompensatorType.REACTOR;
var shuntCompensatorType = ShuntCompensatorType.REACTOR;
if (model != null && model.getBPerSection() > 0) {
shuntCompensatorType = ShuntCompensatorType.CAPACITOR;
}

switch (field) {
case MAXIMUM_SECTION_COUNT -> {
int maximumSectionCount = newValue.intValue();
model.setBPerSection(model.getBPerSection() * shuntCompensator.getMaximumSectionCount() / maximumSectionCount);
model.setMaximumSectionCount(maximumSectionCount);
}
case SECTION_COUNT -> shuntCompensator.setSectionCount(newValue.intValue());
case MAXIMUM_SUSCEPTANCE -> model.setBPerSection(newValue / shuntCompensator.getMaximumSectionCount());
case MAXIMUM_Q_AT_NOMINAL_VOLTAGE -> {
double newQatNominalV = newValue / shuntCompensator.getMaximumSectionCount();
double newSusceptancePerSection = newQatNominalV / Math.pow(voltageLevel.getNominalV(), 2);
model.setBPerSection(newSusceptancePerSection);
}
case MAXIMUM_SECTION_COUNT -> modifyMaximumSectionCount(new AttributeModification<>(newValue.intValue(), OperationType.SET),
null, null, null, shuntCompensator, model);
case SECTION_COUNT -> modifySectionCount(new AttributeModification<>(newValue.intValue(), OperationType.SET), null, shuntCompensator);
case MAXIMUM_SUSCEPTANCE -> modifyMaxSusceptance(new AttributeModification<>(newValue, OperationType.SET),
shuntCompensator.getMaximumSectionCount(), null, model);
case MAXIMUM_Q_AT_NOMINAL_VOLTAGE -> modifyMaximumQAtNominalVoltage(new AttributeModification<>(newValue, OperationType.SET),
voltageLevel, shuntCompensator.getMaximumSectionCount(), null, model, shuntCompensatorType);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
import com.powsybl.iidm.network.PhaseTapChanger;
import com.powsybl.iidm.network.RatioTapChanger;
import com.powsybl.iidm.network.TwoWindingsTransformer;
import org.gridsuite.modification.server.dto.AttributeModification;
import org.gridsuite.modification.server.dto.OperationType;
import static org.gridsuite.modification.server.modifications.TwoWindingsTransformerModification.*;

public enum TwoWindingsTransformerField {
R,
Expand Down Expand Up @@ -48,23 +51,32 @@ public static void setNewValue(TwoWindingsTransformer transformer, String twoWin
TwoWindingsTransformerField field = TwoWindingsTransformerField.valueOf(twoWindingsTransformerField);
final PhaseTapChanger phaseTapChanger = transformer.getPhaseTapChanger();
final RatioTapChanger ratioTapChanger = transformer.getRatioTapChanger();
final AttributeModification<Double> attrModif = new AttributeModification<>(newValue, OperationType.SET);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

attrModification ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Funny. In your other similar demands I picked attributeModif. For me Modif has to be "modification" anyway. So I prefer to keep it smaller.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok I renamed it to the whole attributeModification.


switch (field) {
case R -> transformer.setR(newValue);
case X -> transformer.setX(newValue);
case G -> transformer.setG(newValue);
case B -> transformer.setB(newValue);
case RATED_U1 -> transformer.setRatedU1(newValue);
case RATED_U2 -> transformer.setRatedU2(newValue);
case RATED_S -> transformer.setRatedS(newValue);
case TARGET_V -> ratioTapChanger.setTargetV(newValue);
case RATIO_LOW_TAP_POSITION -> ratioTapChanger.setLowTapPosition(newValue.intValue());
case RATIO_TAP_POSITION -> ratioTapChanger.setTapPosition(newValue.intValue());
case RATIO_TARGET_DEADBAND -> ratioTapChanger.setTargetDeadband(newValue);
case REGULATION_VALUE -> phaseTapChanger.setRegulationValue(newValue);
case PHASE_LOW_TAP_POSITION -> phaseTapChanger.setLowTapPosition(newValue.intValue());
case PHASE_TAP_POSITION -> phaseTapChanger.setTapPosition(newValue.intValue());
case PHASE_TARGET_DEADBAND -> phaseTapChanger.setTargetDeadband(newValue);
case R -> modifyBranchFields(transformer, attrModif, null, null);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

modifyAttributeR ? or modifyR ?
same remarq for X attribute

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure why but those field got put together and called branch specific fields in the function modifyCharacteristics. They also have a BranchModificationInfos object joining them. So I kept them together.

But ok let's separate them. We'll see.

case X -> modifyBranchFields(transformer, null, attrModif, null);
case G -> modifyG(transformer, attrModif, null);
case B -> modifyB(transformer, attrModif, null);
case RATED_U1 -> modifyRatedU1(transformer, attrModif, null);
case RATED_U2 -> modifyRatedU2(transformer, attrModif, null);
case RATED_S -> modifyRatedS(transformer, attrModif, null);
case TARGET_V -> modifyTargets(ratioTapChanger, null, true, attrModif, null, null);
case RATIO_LOW_TAP_POSITION -> processTapChangerPositionsAndSteps(ratioTapChanger, null, true,
new AttributeModification<>(newValue.intValue(), OperationType.SET), null, null, null);
case RATIO_TAP_POSITION -> processTapChangerPositionsAndSteps(ratioTapChanger, null, true,
null, new AttributeModification<>(newValue.intValue(), OperationType.SET), null, null);
case RATIO_TARGET_DEADBAND -> modifyTargets(ratioTapChanger, null, true, null, attrModif, null);
case REGULATION_VALUE -> processPhaseTapRegulation(
phaseTapChanger, null, null, true, attrModif, null, null
);
case PHASE_LOW_TAP_POSITION -> processTapChangerPositionsAndSteps(phaseTapChanger, null, true,
new AttributeModification<>(newValue.intValue(), OperationType.SET), null, null, null);
case PHASE_TAP_POSITION -> processTapChangerPositionsAndSteps(phaseTapChanger, null, true,
null, new AttributeModification<>(newValue.intValue(), OperationType.SET), null, null);
case PHASE_TARGET_DEADBAND -> processPhaseTapRegulation(
phaseTapChanger, null, null, true, null, attrModif, null
);
}
}
}
Loading
Loading