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

Fast restart for active power target change #1085

Merged
merged 9 commits into from
Sep 13, 2024
Merged

Conversation

geofjamg
Copy link
Member

@geofjamg geofjamg commented Sep 6, 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?

Feature

What is the new behavior (if this is a feature change)?
We are able to change target p of generators and batteries with fast restart

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

  • Yes
  • No

If yes, please check if the following requirements are fulfilled

  • The Breaking Change or Deprecated label has been added
  • The migration steps are described in the following section

What changes might users need to make in their application due to this PR? (migration steps)

Other information:

Signed-off-by: Geoffroy Jamgotchian <geoffroy.jamgotchian@rte-france.com>
Signed-off-by: Geoffroy Jamgotchian <geoffroy.jamgotchian@rte-france.com>
@@ -335,6 +335,7 @@ private void applyGeneratorChange(LfNetworkParameters networkParameters) {
double newTargetP = generatorChange.isRelative() ? generator.getTargetP() + generatorChange.activePowerValue() : generatorChange.activePowerValue();
generator.setTargetP(newTargetP);
generator.setInitialTargetP(newTargetP);
// FIXME should be use generator.reApplyActivePowerControlChecks() instead ?
Copy link
Member Author

Choose a reason for hiding this comment

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

@annetill if we do that we break some unit test ?
Do this behaviour on purpose to not being able to get back the generator to active power control after contingency if target is now correct ?

Copy link
Member

Choose a reason for hiding this comment

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

It is an error of the code on main branch, your proposal is the right one and unit tests have to be fixed.

Signed-off-by: Geoffroy Jamgotchian <geoffroy.jamgotchian@rte-france.com>
Signed-off-by: Geoffroy Jamgotchian <geoffroy.jamgotchian@rte-france.com>
Signed-off-by: Geoffroy Jamgotchian <geoffroy.jamgotchian@rte-france.com>
Signed-off-by: Geoffroy Jamgotchian <geoffroy.jamgotchian@rte-france.com>
@geofjamg geofjamg requested a review from annetill September 10, 2024 15:25
@geofjamg geofjamg changed the title [WIP] Fast restart for active power target change Fast restart for active power target change Sep 10, 2024
Signed-off-by: Geoffroy Jamgotchian <geoffroy.jamgotchian@rte-france.com>
Signed-off-by: Geoffroy Jamgotchian <geoffroy.jamgotchian@rte-france.com>
Signed-off-by: Geoffroy Jamgotchian <geoffroy.jamgotchian@rte-france.com>
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
88.2% Coverage on New Code (required ≥ 90%)

See analysis details on SonarCloud

@@ -156,6 +157,16 @@ private CacheUpdateResult onInjectionUpdate(Injection<?> injection, BiFunction<A
return CacheUpdateResult.elementNotFound();
}

private static CacheUpdateResult updateLfGeneratorTargetP(String id, double oldValue, double newValue, AcLoadFlowContext context, LfBus lfBus) {
double valueShift = newValue - oldValue;
Copy link
Member

Choose a reason for hiding this comment

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

Just a question: why do you need this temporary "valueShift" ?

@geofjamg geofjamg merged commit c4393ca into main Sep 13, 2024
6 of 7 checks passed
@geofjamg geofjamg deleted the target_p_fast_restart branch September 13, 2024 12:33
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