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 bug injection setpoint shunt compensator can be applied #1005

Merged

Conversation

pjeanmarie
Copy link
Member

@pjeanmarie pjeanmarie commented May 7, 2024

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?

Injection set point on shunt compensator cannot be applied (called by network action apply) if the setpoint is equal or below the max section count of the shunt compensator.

What is the new behavior (if this is a feature change)?
Injection set point on shunt compensator cannot be applied (called by network action apply) if the setpoint is strictly above the max section count of the shunt compensator.

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

  • Yes
  • No

@pjeanmarie pjeanmarie requested review from obrix and pet-mit May 7, 2024 09:10
@@ -163,6 +163,17 @@ void applyOnShuntCompensator() {
assertEquals(2., network.getShuntCompensator("SC1").getSectionCount(), 1e-3);
}

@Test
void canBeAppliedOnShuntCompensator() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

good catch. please add a test with setpoint = 2 (canBeApplied = true) and setpoint = 1 (canBeApplied = true)

Copy link
Member Author

Choose a reason for hiding this comment

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

done

@pet-mit
Copy link
Collaborator

pet-mit commented May 7, 2024

please fill PR description

@pet-mit pet-mit added the bug Something isn't working label May 7, 2024
@pjeanmarie
Copy link
Member Author

please fill PR description

It change the behavior but it is a bug fix, so is it a breaking change?

@pjeanmarie pjeanmarie force-pushed the fix_bug_injection_setpoint_shunt_compensator_can_be_applied branch from 90f5b02 to bd3ca0e Compare May 13, 2024 11:39
Pauline Jean-Marie added 2 commits May 13, 2024 13:45
Signed-off-by: Pauline Jean-Marie <pauline.jean-marie@artelys.com>
…be inferior to the max

Signed-off-by: Pauline Jean-Marie <pauline.jean-marie@artelys.com>
@pjeanmarie pjeanmarie force-pushed the fix_bug_injection_setpoint_shunt_compensator_can_be_applied branch from bd3ca0e to c11472a Compare May 13, 2024 11:45
@pet-mit
Copy link
Collaborator

pet-mit commented May 13, 2024

please fill PR description

It change the behavior but it is a bug fix, so is it a breaking change?

no, not a breaking change

@pet-mit pet-mit merged commit 2ed1c31 into main May 13, 2024
9 checks passed
@pet-mit pet-mit deleted the fix_bug_injection_setpoint_shunt_compensator_can_be_applied branch May 13, 2024 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants