Skip to content

Commit f5fb398

Browse files
authored
Renaming MAXIMUM_Q_AT_NOMINAL_VOLTAGE to MAX_Q_AT_NOMINAL_V (#11)
Signed-off-by: Thang PHAM <[email protected]>
1 parent eedbe03 commit f5fb398

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/main/java/org/gridsuite/modification/dto/byfilter/equipmentfield/ShuntCompensatorField.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public enum ShuntCompensatorField {
2626
MAXIMUM_SECTION_COUNT,
2727
SECTION_COUNT,
2828
MAXIMUM_SUSCEPTANCE,
29-
MAXIMUM_Q_AT_NOMINAL_VOLTAGE;
29+
MAX_Q_AT_NOMINAL_V;
3030

3131
public static String getReferenceValue(ShuntCompensator shuntCompensator, String shuntCompensatorField) {
3232
VoltageLevel voltageLevel = shuntCompensator.getTerminal().getVoltageLevel();
@@ -36,7 +36,7 @@ public static String getReferenceValue(ShuntCompensator shuntCompensator, String
3636
case MAXIMUM_SECTION_COUNT -> String.valueOf(shuntCompensator.getMaximumSectionCount());
3737
case SECTION_COUNT -> String.valueOf(shuntCompensator.getSectionCount());
3838
case MAXIMUM_SUSCEPTANCE -> String.valueOf(bPerSection * shuntCompensator.getMaximumSectionCount());
39-
case MAXIMUM_Q_AT_NOMINAL_VOLTAGE -> String.valueOf(Math.abs(Math.pow(voltageLevel.getNominalV(), 2) * bPerSection) * shuntCompensator.getMaximumSectionCount());
39+
case MAX_Q_AT_NOMINAL_V -> String.valueOf(Math.abs(Math.pow(voltageLevel.getNominalV(), 2) * bPerSection) * shuntCompensator.getMaximumSectionCount());
4040
};
4141
}
4242

@@ -58,7 +58,7 @@ public static void setNewValue(ShuntCompensator shuntCompensator, String shuntCo
5858
case SECTION_COUNT -> modifySectionCount(new AttributeModification<>((int) Double.parseDouble(newValue), OperationType.SET), null, shuntCompensator);
5959
case MAXIMUM_SUSCEPTANCE -> modifyMaxSusceptance(new AttributeModification<>(Double.parseDouble(newValue), OperationType.SET),
6060
shuntCompensator.getMaximumSectionCount(), null, model);
61-
case MAXIMUM_Q_AT_NOMINAL_VOLTAGE -> modifyMaximumQAtNominalVoltage(new AttributeModification<>(Double.parseDouble(newValue), OperationType.SET),
61+
case MAX_Q_AT_NOMINAL_V -> modifyMaximumQAtNominalVoltage(new AttributeModification<>(Double.parseDouble(newValue), OperationType.SET),
6262
voltageLevel, shuntCompensator.getMaximumSectionCount(), null, model, shuntCompensatorType);
6363
}
6464
}

src/test/java/org/gridsuite/modification/modifications/byfilter/assignment/ShuntCompensatorModificationByAssignmentTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ protected List<AssignmentInfos<?>> getAssignmentInfos() {
116116
.build();
117117

118118
DoubleAssignmentInfos assignmentInfos4 = DoubleAssignmentInfos.builder()
119-
.editedField(ShuntCompensatorField.MAXIMUM_Q_AT_NOMINAL_VOLTAGE.name())
119+
.editedField(ShuntCompensatorField.MAX_Q_AT_NOMINAL_V.name())
120120
.value(10.)
121121
.filters(List.of(filter5))
122122
.build();

src/test/java/org/gridsuite/modification/modifications/byfilter/formula/ShuntCompensatorByFormulaModificationTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,10 @@ protected List<FormulaInfos> getFormulaInfos() {
123123
ReferenceFieldOrValue.builder().equipmentField(ShuntCompensatorField.MAXIMUM_SUSCEPTANCE.name()).build(),
124124
ReferenceFieldOrValue.builder().value(5.).build());
125125

126-
FormulaInfos formulaInfos4 = getFormulaInfo(ShuntCompensatorField.MAXIMUM_Q_AT_NOMINAL_VOLTAGE.name(),
126+
FormulaInfos formulaInfos4 = getFormulaInfo(ShuntCompensatorField.MAX_Q_AT_NOMINAL_V.name(),
127127
List.of(filter5),
128128
Operator.DIVISION,
129-
ReferenceFieldOrValue.builder().equipmentField(ShuntCompensatorField.MAXIMUM_Q_AT_NOMINAL_VOLTAGE.name()).build(),
129+
ReferenceFieldOrValue.builder().equipmentField(ShuntCompensatorField.MAX_Q_AT_NOMINAL_V.name()).build(),
130130
ReferenceFieldOrValue.builder().value(2.).build());
131131

132132
return List.of(formulaInfos1, formulaInfos2, formulaInfos3, formulaInfos4);

0 commit comments

Comments
 (0)