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

[Expert Filter] - Support for StaticVarCompensator equipment type #17

Merged
merged 16 commits into from
Jun 17, 2024

Conversation

thangqp
Copy link
Contributor

@thangqp thangqp commented Apr 24, 2024

@thangqp thangqp changed the title Dynamic Simulation - Add some filter criteria for Static Var Compensator [Expert filter] - Support for Static Var Compensator equipment type May 30, 2024
@thangqp thangqp changed the title [Expert filter] - Support for Static Var Compensator equipment type [Expert filter] - Support for StaticVarCompensator equipment type May 30, 2024
@thangqp thangqp changed the title [Expert filter] - Support for StaticVarCompensator equipment type [Expert Filter] - Support for StaticVarCompensator equipment type May 30, 2024
@thangqp thangqp requested a review from Mathieu-Deharbe June 10, 2024 15:37
@@ -1475,100 +1481,100 @@ private static Stream<Arguments> provideArgumentsForVoltageLevelTest() {
Mockito.when(voltageLevel1.getHighVoltageLimit()).thenReturn(Double.NaN);

return Stream.of(
// --- EQUALS --- //
Copy link
Contributor

@etiennehomer etiennehomer Jun 12, 2024

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

DONE in a38bac0

@thangqp thangqp requested a review from etiennehomer June 12, 2024 13:26
@thangqp thangqp requested a review from Mathieu-Deharbe June 14, 2024 13:06
Copy link
Contributor

@etiennehomer etiennehomer left a 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 ?

@thangqp
Copy link
Contributor Author

thangqp commented Jun 14, 2024

Sonar warnings are fake positives ?

YES!

Copy link
Contributor

@Mathieu-Deharbe Mathieu-Deharbe left a 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.

Comment on lines 197 to 213
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();
Copy link
Contributor

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 ?

Copy link
Contributor Author

@thangqp thangqp Jun 17, 2024

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

Copy link

@thangqp thangqp requested a review from Mathieu-Deharbe June 17, 2024 13:53
@thangqp thangqp merged commit 6c6c3a2 into main Jun 17, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants