-
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
include node id in loadflow result #147
Conversation
private LoadflowResultsUtils() { | ||
} | ||
|
||
public static String getIdFromViolation(LimitViolation limitViolation, Network network) { |
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.
getViolationLocationId ?
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
.filter(Objects::nonNull) | ||
.map(Bus::getId) | ||
.distinct() | ||
.toList(); |
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.
In nodebreaker we want busbar sections ids and not bus ids
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 powsybl-ws-commons
|
||
import static com.powsybl.security.ViolationLocation.Type.NODE_BREAKER; | ||
|
||
public final class LoadflowResultsUtils { |
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.
Why all methods are public
It's used only by LoadFlowWorkerService
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.
this code has been moved to powsybl-ws-commons , to avoid duplicating it for security-analysis-server
Signed-off-by: jamal-khey <myjamal89@gmail.com>
Signed-off-by: jamal-khey <myjamal89@gmail.com>
@@ -792,4 +790,53 @@ private static final class LimitViolationsMock { | |||
new LimitViolation("NHV1_NHV2_2", "lineName2", LimitViolationType.CURRENT, "limit2", 300, 900, 0.7F, 1000, TwoSides.ONE), | |||
new LimitViolation("NHV1_NHV2_2", "lineName2", LimitViolationType.CURRENT, "limit2", 300, 900, 0.7F, 1000, TwoSides.TWO)); | |||
} | |||
|
|||
private static final class VoltageLimitViolationsMock { |
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.
Why this static block ?
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.
i need results with ViolationLocation for the tests
}); | ||
assertEquals(2, limitViolations.size()); | ||
// check that the subject id is equal to the Bus Id | ||
assertEquals(limitViolations.get(0).getSubjectId(), "NHV1"); |
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.
VLHV1_0
Signed-off-by: jamal-khey <myjamal89@gmail.com>
d11c213
to
85f5c16
Compare
Signed-off-by: Slimane AMAR <amarsli@gm0winl104.bureau.si.interne>
85f5c16
to
2e14a23
Compare
Quality Gate passedIssues Measures |
this pull request depend on powsybl-ws-communs