-
Notifications
You must be signed in to change notification settings - Fork 0
limits modification logs #124
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
Conversation
Signed-off-by: Mathieu DEHARBE <[email protected]>
Signed-off-by: Mathieu DEHARBE <[email protected]>
Signed-off-by: Mathieu DEHARBE <[email protected]>
Signed-off-by: Mathieu DEHARBE <[email protected]>
Signed-off-by: Mathieu DEHARBE <[email protected]>
Signed-off-by: Mathieu DEHARBE <[email protected]>
Signed-off-by: Mathieu DEHARBE <[email protected]>
Signed-off-by: Mathieu DEHARBE <[email protected]>
Signed-off-by: Mathieu DEHARBE <[email protected]>
Signed-off-by: Mathieu DEHARBE <[email protected]>
Signed-off-by: Mathieu DEHARBE <[email protected]>
Signed-off-by: Mathieu DEHARBE <[email protected]>
EtienneLt
left a comment
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.
some code suggestions
src/main/java/org/gridsuite/modification/modifications/AbstractBranchModification.java
Outdated
Show resolved
Hide resolved
src/main/java/org/gridsuite/modification/modifications/olg/OlgsModification.java
Outdated
Show resolved
Hide resolved
src/main/java/org/gridsuite/modification/modifications/olg/OlgModification.java
Outdated
Show resolved
Hide resolved
src/main/resources/org/gridsuite/modification/reports.properties
Outdated
Show resolved
Hide resolved
src/main/java/org/gridsuite/modification/modifications/olg/OlgModification.java
Outdated
Show resolved
Hide resolved
src/main/java/org/gridsuite/modification/modifications/olg/OlgModification.java
Outdated
Show resolved
Hide resolved
| if (applicableOnSide1() && modifiedBranch.getOperationalLimitsGroup1(olgId).isEmpty() || | ||
| applicableOnSide2() && modifiedBranch.getOperationalLimitsGroup2(olgId).isEmpty()) { | ||
| throw new PowsyblException( | ||
| "Cannot delete operational limit group " + olgId + " which has not been found in equipment on " + applicabilityToString(olgModifInfos.getApplicability())); |
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.
| "Cannot delete operational limit group " + olgId + " which has not been found in equipment on " + applicabilityToString(olgModifInfos.getApplicability())); | |
| "Cannot delete operational limit group " + olgId + " because it was not found in equipment on " + applicabilityToString(olgModifInfos.getApplicability())); |
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.
could add equipmentId to know which one is concerned ?
...in/java/org/gridsuite/modification/modifications/olg/OperationalLimitsGroupModification.java
Show resolved
Hide resolved
src/main/java/org/gridsuite/modification/modifications/olg/OlgModification.java
Outdated
Show resolved
Hide resolved
src/main/java/org/gridsuite/modification/modifications/olg/OlgModification.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Mathieu DEHARBE <[email protected]>
Co-authored-by: EtienneLt <[email protected]>
Signed-off-by: Mathieu DEHARBE <[email protected]>
…imits-modification-logs
Co-authored-by: EtienneLt <[email protected]>
Signed-off-by: Mathieu DEHARBE <[email protected]>
Signed-off-by: Mathieu DEHARBE <[email protected]>
|
missing detailed logs when creating |
Signed-off-by: Mathieu DEHARBE <[email protected]>
Signed-off-by: Mathieu DEHARBE <[email protected]>
Signed-off-by: Mathieu DEHARBE <[email protected]>
EtienneLt
left a comment
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 ok I need to test
| * @param side which side of the branch receives the limits | ||
| */ | ||
| public void setCurrentLimitsOnASide(ReportNode reportNode, List<OperationalLimitsGroupInfos> opLimitGroups, Branch<?> branch, TwoSides side) { | ||
| public void setCurrentLimitsOnASide(ReportNode reportNode, OperationalLimitsGroupInfos opLimitsGroup, Branch<?> branch, TwoSides side) { |
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.
| public void setCurrentLimitsOnASide(ReportNode reportNode, OperationalLimitsGroupInfos opLimitsGroup, Branch<?> branch, TwoSides side) { | |
| public void setCurrentLimits(ReportNode reportNode, OperationalLimitsGroupInfos opLimitsGroup, Branch<?> branch, TwoSides side) { |
Signed-off-by: Mathieu DEHARBE <[email protected]>
| protected void applyModificationToOperationalLimitsGroup() { | ||
| switch (olgModifInfos.getModificationType()) { | ||
| case OperationalLimitsGroupModificationType.MODIFY_OR_ADD: | ||
| switch (olgModifInfos.getApplicability()) { |
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 think you should extract the content of this switch in a function
| if (modifiedOperationalLimitsGroup2() == null) { | ||
| addOlg(SIDE2); | ||
| } else { | ||
| modifyOLG(SIDE2); | ||
| } |
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 almost duplicate with the one above you should make a function as it can also be useful below
| } else { | ||
| if (currentLimits != null) { |
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.
merge if with else
| OperationalLimitsGroup modifiedOlg = modifiedOperationalLimitsGroup1(); | ||
| if (modifiedOlg != null) { | ||
| modifiedOlg.removeCurrentLimits(); | ||
| removeAllProperties(modifiedOlg); | ||
| } | ||
| OperationalLimitsGroup newOperationalLimitsGroup = modifiedBranch.newOperationalLimitsGroup1(olgModifInfos.getId()); | ||
| modifyCurrentLimits(newOperationalLimitsGroup.newCurrentLimits(), null, SIDE1); | ||
| addProperties(newOperationalLimitsGroup, SIDE1); |
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 could be extracted into a function
|
EtienneLt
left a comment
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.
Test Ok code Ok



PR Summary