-
Notifications
You must be signed in to change notification settings - Fork 43
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
Introduce ScalingParameters for Scalable #2461
Conversation
...ification/src/main/java/com/powsybl/iidm/modification/scalable/AbstractCompoundScalable.java
Show resolved
Hide resolved
Kudos, SonarCloud Quality Gate passed! |
@@ -109,7 +109,7 @@ public void filterInjections(Network n, List<Injection> injections, List<String> | |||
* If scalingConvention is GENERATOR, the load active power decreases for positive "asked" and increases inversely | |||
*/ | |||
@Override | |||
public double scale(Network n, double asked, Scalable.ScalingConvention scalingConvention) { | |||
public double scale(Network n, double asked, Scalable.ScalingConvention scalingConvention, boolean reconnect) { |
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.
We really should consider grouping all theses parameters in a ScalingContext object.
8012cdc
to
8e4c410
Compare
Signed-off-by: Coline PILOQUET <coline.piloquet@rte-france.com>
This reverts commit 8e4c410. Signed-off-by: Coline PILOQUET <coline.piloquet@rte-france.com>
Signed-off-by: Coline PILOQUET <coline.piloquet@rte-france.com>
defa7e5
to
bda3d70
Compare
Signed-off-by: Coline PILOQUET <coline.piloquet@rte-france.com>
*/ | ||
public static ScalingContext getDefault() { | ||
return new ScalingContext(Scalable.ScalingConvention.GENERATOR, false, false); | ||
} |
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 am not sure if it is the right design but it seems useful to have a default context
@@ -109,9 +109,9 @@ public void filterInjections(Network n, List<Injection> injections, List<String> | |||
* If scalingConvention is GENERATOR, the load active power decreases for positive "asked" and increases inversely | |||
*/ | |||
@Override | |||
public double scale(Network n, double asked, Scalable.ScalingConvention scalingConvention) { | |||
public double scale(Network n, double asked, ScalingContext context) { |
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.
If we just add read only data in ScalingContext
, it is not really a context. It is more a ScalingParameter
Signed-off-by: Coline PILOQUET <coline.piloquet@rte-france.com>
Signed-off-by: Anne Tilloy <anne.tilloy@rte-france.com>
Signed-off-by: Anne Tilloy <anne.tilloy@rte-france.com>
Kudos, SonarCloud Quality Gate passed! |
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.
Nice, just a tiny javadoc comment!
@@ -134,43 +134,10 @@ enum ScalingConvention { | |||
* @param asked value asked to adjust the scalable active power |
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.
You should add param annotation in the javadoc for the new parameter
Signed-off-by: Coline PILOQUET coline.piloquet@rte-france.com
Please check if the PR fulfills these requirements (please use
'[x]'
to check the checkboxes, or submit the PR and then click the checkboxes)Does this PR already have an issue describing the problem ? If so, link to this issue using
'#XXX'
and skip the restNo
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Bug fix: adds a boolean saying whether the terminal should be reconnected in case of scaling on a disconnected element.
What is the current behavior? (You can also link to an open issue here)
The terminal is always reconnected.