diff --git a/src/main/java/org/gridsuite/modification/dto/byfilter/equipmentfield/ShuntCompensatorField.java b/src/main/java/org/gridsuite/modification/dto/byfilter/equipmentfield/ShuntCompensatorField.java index a0fbefa..50e99b0 100644 --- a/src/main/java/org/gridsuite/modification/dto/byfilter/equipmentfield/ShuntCompensatorField.java +++ b/src/main/java/org/gridsuite/modification/dto/byfilter/equipmentfield/ShuntCompensatorField.java @@ -25,7 +25,7 @@ public enum ShuntCompensatorField { MAXIMUM_SECTION_COUNT, SECTION_COUNT, - MAXIMUM_SUSCEPTANCE, + MAX_SUSCEPTANCE, MAX_Q_AT_NOMINAL_V; public static String getReferenceValue(ShuntCompensator shuntCompensator, String shuntCompensatorField) { @@ -35,7 +35,7 @@ public static String getReferenceValue(ShuntCompensator shuntCompensator, String return switch (field) { case MAXIMUM_SECTION_COUNT -> String.valueOf(shuntCompensator.getMaximumSectionCount()); case SECTION_COUNT -> String.valueOf(shuntCompensator.getSectionCount()); - case MAXIMUM_SUSCEPTANCE -> String.valueOf(bPerSection * shuntCompensator.getMaximumSectionCount()); + case MAX_SUSCEPTANCE -> String.valueOf(bPerSection * shuntCompensator.getMaximumSectionCount()); case MAX_Q_AT_NOMINAL_V -> String.valueOf(Math.abs(Math.pow(voltageLevel.getNominalV(), 2) * bPerSection) * shuntCompensator.getMaximumSectionCount()); }; } @@ -56,7 +56,7 @@ public static void setNewValue(ShuntCompensator shuntCompensator, String shuntCo case MAXIMUM_SECTION_COUNT -> modifyMaximumSectionCount(new AttributeModification<>((int) Double.parseDouble(newValue), OperationType.SET), null, null, null, shuntCompensator, model); case SECTION_COUNT -> modifySectionCount(new AttributeModification<>((int) Double.parseDouble(newValue), OperationType.SET), null, shuntCompensator); - case MAXIMUM_SUSCEPTANCE -> modifyMaxSusceptance(new AttributeModification<>(Double.parseDouble(newValue), OperationType.SET), + case MAX_SUSCEPTANCE -> modifyMaxSusceptance(new AttributeModification<>(Double.parseDouble(newValue), OperationType.SET), shuntCompensator.getMaximumSectionCount(), null, model); case MAX_Q_AT_NOMINAL_V -> modifyMaximumQAtNominalVoltage(new AttributeModification<>(Double.parseDouble(newValue), OperationType.SET), voltageLevel, shuntCompensator.getMaximumSectionCount(), null, model, shuntCompensatorType); diff --git a/src/test/java/org/gridsuite/modification/modifications/byfilter/assignment/ShuntCompensatorModificationByAssignmentTest.java b/src/test/java/org/gridsuite/modification/modifications/byfilter/assignment/ShuntCompensatorModificationByAssignmentTest.java index ef77623..955bd1f 100644 --- a/src/test/java/org/gridsuite/modification/modifications/byfilter/assignment/ShuntCompensatorModificationByAssignmentTest.java +++ b/src/test/java/org/gridsuite/modification/modifications/byfilter/assignment/ShuntCompensatorModificationByAssignmentTest.java @@ -110,7 +110,7 @@ protected List> getAssignmentInfos() { .build(); DoubleAssignmentInfos assignmentInfos3 = DoubleAssignmentInfos.builder() - .editedField(ShuntCompensatorField.MAXIMUM_SUSCEPTANCE.name()) + .editedField(ShuntCompensatorField.MAX_SUSCEPTANCE.name()) .value(5.) .filters(List.of(filter4)) .build(); diff --git a/src/test/java/org/gridsuite/modification/modifications/byfilter/formula/ShuntCompensatorByFormulaModificationTest.java b/src/test/java/org/gridsuite/modification/modifications/byfilter/formula/ShuntCompensatorByFormulaModificationTest.java index cb083fc..9c79d95 100644 --- a/src/test/java/org/gridsuite/modification/modifications/byfilter/formula/ShuntCompensatorByFormulaModificationTest.java +++ b/src/test/java/org/gridsuite/modification/modifications/byfilter/formula/ShuntCompensatorByFormulaModificationTest.java @@ -117,10 +117,10 @@ protected List getFormulaInfos() { ReferenceFieldOrValue.builder().equipmentField(ShuntCompensatorField.MAXIMUM_SECTION_COUNT.name()).build(), ReferenceFieldOrValue.builder().value(2.).build()); - FormulaInfos formulaInfos3 = getFormulaInfo(ShuntCompensatorField.MAXIMUM_SUSCEPTANCE.name(), + FormulaInfos formulaInfos3 = getFormulaInfo(ShuntCompensatorField.MAX_SUSCEPTANCE.name(), List.of(filter4), Operator.ADDITION, - ReferenceFieldOrValue.builder().equipmentField(ShuntCompensatorField.MAXIMUM_SUSCEPTANCE.name()).build(), + ReferenceFieldOrValue.builder().equipmentField(ShuntCompensatorField.MAX_SUSCEPTANCE.name()).build(), ReferenceFieldOrValue.builder().value(5.).build()); FormulaInfos formulaInfos4 = getFormulaInfo(ShuntCompensatorField.MAX_Q_AT_NOMINAL_V.name(),