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

Fix merge control order #341

Merged
merged 7 commits into from
Aug 23, 2021
Merged

Fix merge control order #341

merged 7 commits into from
Aug 23, 2021

Conversation

flo-dup
Copy link
Contributor

@flo-dup flo-dup commented Jul 29, 2021

Please check if the PR fulfills these requirements

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

Does this PR already have an issue describing the problem ?
No

What kind of change does this PR introduce?
Bug fix

What is the current behavior?
When several buses are controlled in the same non-impedant connected set, in the merged voltage control the controlled bus, the target voltage and the controllers order are not deterministic

What is the new behavior (if this is a feature change)?
In the merged voltage control the controlled bus, the target voltage and the controllers order are deterministic (voltage control kept is the one with the highest voltage control)

Does this PR introduce a breaking change or deprecate an API?
No

Other information:
Issue due to PR #321

flo-dup added 5 commits July 29, 2021 14:51
Signed-off-by: Florian Dupuy <florian.dupuy@rte-france.com>
Signed-off-by: Florian Dupuy <florian.dupuy@rte-france.com>
Signed-off-by: Florian Dupuy <florian.dupuy@rte-france.com>
Signed-off-by: Florian Dupuy <florian.dupuy@rte-france.com>
Signed-off-by: Florian Dupuy <florian.dupuy@rte-france.com>
@flo-dup flo-dup requested a review from geofjamg July 29, 2021 15:36
@flo-dup flo-dup requested a review from annetill August 19, 2021 15:41
LOGGER.error("Two controller buses are controlling buses {} and {} which are in the same non-impedant connected set, but with different target voltages ({} and {}): only target voltage {} is kept",
vc1.getControlledBus().getId(), vc2.getControlledBus().getId(), vc1.getTargetValue(), vc2.getTargetValue(), vc2.getTargetValue());
private static void checkVcUniqueTargetV(List<VoltageControl> voltageControls) {
VoltageControl vcRef = voltageControls.get(voltageControls.size() - 1);
Copy link
Member

Choose a reason for hiding this comment

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

Can you please leave a comment to explicit this choice?

Copy link
Member

@annetill annetill left a comment

Choose a reason for hiding this comment

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

Just a comment and then it is ready to be merged!

Signed-off-by: Florian Dupuy <florian.dupuy@rte-france.com>
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@annetill annetill merged commit 4af5cb0 into master Aug 23, 2021
@annetill annetill deleted the fix_merge_control_order branch August 23, 2021 07:24
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.

2 participants