Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 @@ -26,7 +26,7 @@ public enum ShuntCompensatorField {
MAXIMUM_SECTION_COUNT,
SECTION_COUNT,
MAXIMUM_SUSCEPTANCE,
MAXIMUM_Q_AT_NOMINAL_VOLTAGE;
MAX_Q_AT_NOMINAL_V;

public static String getReferenceValue(ShuntCompensator shuntCompensator, String shuntCompensatorField) {
VoltageLevel voltageLevel = shuntCompensator.getTerminal().getVoltageLevel();
Expand All @@ -36,7 +36,7 @@ public static String getReferenceValue(ShuntCompensator shuntCompensator, String
case MAXIMUM_SECTION_COUNT -> String.valueOf(shuntCompensator.getMaximumSectionCount());
case SECTION_COUNT -> String.valueOf(shuntCompensator.getSectionCount());
case MAXIMUM_SUSCEPTANCE -> String.valueOf(bPerSection * shuntCompensator.getMaximumSectionCount());
case MAXIMUM_Q_AT_NOMINAL_VOLTAGE -> String.valueOf(Math.abs(Math.pow(voltageLevel.getNominalV(), 2) * bPerSection) * shuntCompensator.getMaximumSectionCount());
case MAX_Q_AT_NOMINAL_V -> String.valueOf(Math.abs(Math.pow(voltageLevel.getNominalV(), 2) * bPerSection) * shuntCompensator.getMaximumSectionCount());
};
}

Expand All @@ -58,7 +58,7 @@ public static void setNewValue(ShuntCompensator shuntCompensator, String shuntCo
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),
shuntCompensator.getMaximumSectionCount(), null, model);
case MAXIMUM_Q_AT_NOMINAL_VOLTAGE -> modifyMaximumQAtNominalVoltage(new AttributeModification<>(Double.parseDouble(newValue), OperationType.SET),
case MAX_Q_AT_NOMINAL_V -> modifyMaximumQAtNominalVoltage(new AttributeModification<>(Double.parseDouble(newValue), OperationType.SET),
voltageLevel, shuntCompensator.getMaximumSectionCount(), null, model, shuntCompensatorType);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ protected List<AssignmentInfos<?>> getAssignmentInfos() {
.build();

DoubleAssignmentInfos assignmentInfos4 = DoubleAssignmentInfos.builder()
.editedField(ShuntCompensatorField.MAXIMUM_Q_AT_NOMINAL_VOLTAGE.name())
.editedField(ShuntCompensatorField.MAX_Q_AT_NOMINAL_V.name())
.value(10.)
.filters(List.of(filter5))
.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,10 @@ protected List<FormulaInfos> getFormulaInfos() {
ReferenceFieldOrValue.builder().equipmentField(ShuntCompensatorField.MAXIMUM_SUSCEPTANCE.name()).build(),
ReferenceFieldOrValue.builder().value(5.).build());

FormulaInfos formulaInfos4 = getFormulaInfo(ShuntCompensatorField.MAXIMUM_Q_AT_NOMINAL_VOLTAGE.name(),
FormulaInfos formulaInfos4 = getFormulaInfo(ShuntCompensatorField.MAX_Q_AT_NOMINAL_V.name(),
List.of(filter5),
Operator.DIVISION,
ReferenceFieldOrValue.builder().equipmentField(ShuntCompensatorField.MAXIMUM_Q_AT_NOMINAL_VOLTAGE.name()).build(),
ReferenceFieldOrValue.builder().equipmentField(ShuntCompensatorField.MAX_Q_AT_NOMINAL_V.name()).build(),
ReferenceFieldOrValue.builder().value(2.).build());

return List.of(formulaInfos1, formulaInfos2, formulaInfos3, formulaInfos4);
Expand Down
Loading