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

Add reactive power control mode to ratio tap changers #2758

Merged
merged 24 commits into from
Jan 10, 2024

Conversation

p-arvy
Copy link
Member

@p-arvy p-arvy commented Oct 27, 2023

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?

Fixes #2769

What kind of change does this PR introduce?

Feature: Add a regulation mode "reactive power" to ratio tap changers

What is the current behavior?

Ratio tap changers can only regulate voltage

What is the new behavior (if this is a feature change)?
Ratio tap changers can regulate either voltage or reactive power

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

Partially backward compatible as follows:

  • RTC regulationMode is introduced, with possible values VOLTAGE or REACTIVE_POWER. getRegulationMode / setRegulationMode
  • targetV becomes regulationValue, getRegulationValue / setRegulationValue
  • backward compatibility ensured by keeping getTargetV and setTargetV, acting as shortcuts as follows:
    • setTargetV automatically switches mode to VOLTAGE (if new targetV is not NaN)
    • getTargetV returns NaN if mode is not VOLTAGE

But if you have defined your own IIDM implementation, you should implement the following methods:

  • in your RatioTapChanger implementations:
    • RegulationMode getRegulationMode()
    • RatioTapChanger setRegulationMode(RatioTapChanger.RegulationMode regulationMode)
    • double getRegulationValue()
    • RatioTapChanger setRegulationValue(double regulationValue)

Besides, ValidationUtil.checkRatioTapChangerRegulation methods take an additional parameter: regulationMode, the regulation mode (note that targetV parameter was also renamed in regulationValue).

Other information:

@annetill annetill added the IIDM label Nov 27, 2023
@p-arvy p-arvy changed the title [WIP] Add reactive power control to ratio tap changers Add reactive power control to ratio tap changers Nov 27, 2023
@@ -97,27 +101,63 @@ public RatioTapChangerImpl setLoadTapChangingCapabilities(boolean loadTapChangin

@Override
public double getTargetV() {
return targetV.get(network.get().getVariantIndex());
if (regulationMode != RegulationMode.VOLTAGE) {
throw new IllegalAccessError("Regulation mode must be in voltage to access to target V");
Copy link
Member

Choose a reason for hiding this comment

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

Use a constant for message.

Copy link
Member

Choose a reason for hiding this comment

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

message not needed anymore, changed to return Double.NaN if regulation mode is not voltage

@p-arvy p-arvy force-pushed the rtc_reactive_power_regulation branch from e445e33 to 1777df6 Compare December 18, 2023 14:10
@p-arvy p-arvy changed the title Add reactive power control to ratio tap changers [WIP] Add reactive power control to ratio tap changers Dec 18, 2023
@jeandemanged jeandemanged self-requested a review December 19, 2023 12:43
@annetill annetill changed the base branch from main to evolution_xiidm/1.12 December 19, 2023 13:44
Copy link
Member

@jeandemanged jeandemanged left a comment

Choose a reason for hiding this comment

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

mainly iIDM ser/deser-ialization to be fixed with backward compatibility support

some cleanup to do

@jeandemanged jeandemanged changed the title [WIP] Add reactive power control to ratio tap changers [WIP] Add reactive power control mode to ratio tap changers Jan 5, 2024
p-arvy and others added 22 commits January 10, 2024 14:27
Signed-off-by: parvy <pierre.arvy@artelys.com>
Signed-off-by: parvy <pierre.arvy@artelys.com>
Signed-off-by: parvy <pierre.arvy@artelys.com>
Signed-off-by: parvy <pierre.arvy@artelys.com>
Signed-off-by: parvy <pierre.arvy@artelys.com>
Signed-off-by: parvy <pierre.arvy@artelys.com>
Signed-off-by: parvy <pierre.arvy@artelys.com>
Signed-off-by: parvy <pierre.arvy@artelys.com>
Signed-off-by: parvy <pierre.arvy@artelys.com>
Signed-off-by: parvy <pierre.arvy@artelys.com>
Signed-off-by: parvy <pierre.arvy@artelys.com>
Signed-off-by: parvy <pierre.arvy@artelys.com>
Signed-off-by: parvy <pierre.arvy@artelys.com>
Signed-off-by: parvy <pierre.arvy@artelys.com>
Signed-off-by: parvy <pierre.arvy@artelys.com>
Signed-off-by: parvy <pierre.arvy@artelys.com>
Signed-off-by: parvy <pierre.arvy@artelys.com>
Signed-off-by: Damien Jeandemange <damien.jeandemange@artelys.com>
Signed-off-by: Damien Jeandemange <damien.jeandemange@artelys.com>
Signed-off-by: parvy <pierre.arvy@artelys.com>
Signed-off-by: parvy <pierre.arvy@artelys.com>
Signed-off-by: parvy <pierre.arvy@artelys.com>
@olperr1 olperr1 force-pushed the rtc_reactive_power_regulation branch from bfcbf77 to 3ffa7c5 Compare January 10, 2024 13:56
Copy link

sonarcloud bot commented Jan 10, 2024

Quality Gate Passed Quality Gate passed

The SonarCloud Quality Gate passed, but some issues were introduced.

1 New issue
0 Security Hotspots
100.0% Coverage on New Code
1.9% Duplication on New Code

See analysis details on SonarCloud

@olperr1 olperr1 merged commit d6a7932 into main Jan 10, 2024
6 checks passed
@olperr1 olperr1 deleted the rtc_reactive_power_regulation branch January 10, 2024 15:02
@olperr1 olperr1 added the Breaking Change API is broken label Jan 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add reactive power control to ratio tap changers
5 participants