-
Notifications
You must be signed in to change notification settings - Fork 0
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
[Expert Filter] - Support for StaticVarCompensator equipment type #17
Conversation
src/main/java/org/gridsuite/filter/utils/expertfilter/ExpertFilterUtils.java
Outdated
Show resolved
Hide resolved
src/main/java/org/gridsuite/filter/utils/expertfilter/ExpertFilterUtils.java
Outdated
Show resolved
Hide resolved
src/main/java/org/gridsuite/filter/utils/expertfilter/ExpertFilterUtils.java
Outdated
Show resolved
Hide resolved
src/test/java/org/gridsuite/filter/expertfilter/BooleanExpertRuleTest.java
Outdated
Show resolved
Hide resolved
src/test/java/org/gridsuite/filter/expertfilter/PropertiesExpertRuleTest.java
Outdated
Show resolved
Hide resolved
@@ -1475,100 +1481,100 @@ private static Stream<Arguments> provideArgumentsForVoltageLevelTest() { | |||
Mockito.when(voltageLevel1.getHighVoltageLimit()).thenReturn(Double.NaN); | |||
|
|||
return Stream.of( | |||
// --- EQUALS --- // |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revert all the tabs plz
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DONE in a38bac0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sonar warnings are fake positives ?
YES! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code & test ok. just a comment on the functional.
private static String getTerminalFieldValue(FieldType field, @Nullable Terminal terminal) { | ||
if (terminal == null) { | ||
return null; | ||
} | ||
return switch (field) { | ||
case CONNECTED, | ||
CONNECTED_1, | ||
CONNECTED_2 -> String.valueOf(terminal.isConnected()); | ||
case REGULATING_TERMINAL_VL_ID -> | ||
terminal.getVoltageLevel() != null ? | ||
terminal.getVoltageLevel().getId() : null; | ||
case REGULATING_TERMINAL_CONNECTABLE_ID -> | ||
terminal.getConnectable() != null ? | ||
terminal.getConnectable().getId() : null; | ||
case REGULATION_TYPE -> terminal.getConnectable() != null ? | ||
RegulationType.DISTANT.name() : | ||
RegulationType.LOCAL.name(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure but I think in the case of a null terminal REGULATION_TYPE should return RegulationType.LOCAL.name(). Isn't it the default mode when a static var compensator has no terminal ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DISTANT => the id of connectable equipment must be different to the svar id
LOCAL => otherwise
The correction is DONE in d80d627
Quality Gate passedIssues Measures |
Related PRs
gridsuite/filter-server#117
gridsuite/commons-ui#452
gridsuite/gridexplore-app#439