Class ProportionalScalable
java.lang.Object
com.powsybl.iidm.modification.scalable.ProportionalScalable
- All Implemented Interfaces:
Scalable
Scalable that divides scale proportionally between multiple scalable.
- Author:
- Geoffroy Jamgotchian <geoffroy.jamgotchian at rte-france.com>, Sebastien Murgey <sebastien.murgey at rte-france.com>
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.powsybl.iidm.modification.scalable.Scalable
Scalable.ScalingConvention
-
Field Summary
-
Constructor Summary
ConstructorDescriptionProportionalScalable
(List<? extends Injection> injections, ProportionalScalable.DistributionMode distributionMode) ProportionalScalable
(List<? extends Injection> injections, ProportionalScalable.DistributionMode distributionMode, double minValue, double maxValue) -
Method Summary
Modifier and TypeMethodDescriptionfilterInjections
(Network network) Scans all the expected injections of the scalable.void
Scans all the expected injections of the scalable.filterInjections
(Network network, List<String> notFound) Scans all the expected injections of the scalable.protected double
getBoundedVariation
(double variationAsked, double currentGlobalPower, Scalable.ScalingConvention scalingConvention) Returns the value of scaling asked, bounded by the minValue and maxValue.double
getSteadyStatePower
(Network network, double asked, Scalable.ScalingConvention scalingConvention) Returns the current power value for the injections corresponding to this Scalabledouble
Get the constant active power in MW injected at the network.double
Get the maximal active power in MW.double
maximumValue
(Network n, Scalable.ScalingConvention powerConvention) Get the maximal active power in MW with scaling convention.double
Get the minimal active power in MW.double
minimumValue
(Network n, Scalable.ScalingConvention powerConvention) Get the minimal active power in MW with scaling convention.void
Set the constant active power to zero.double
scale
(Network n, double asked, ScalingParameters parameters) Scale the given network using Generator convention by default.
-
Field Details
-
minValue
protected double minValue -
maxValue
protected double maxValue
-
-
Constructor Details
-
ProportionalScalable
public ProportionalScalable(List<? extends Injection> injections, ProportionalScalable.DistributionMode distributionMode) -
ProportionalScalable
public ProportionalScalable(List<? extends Injection> injections, ProportionalScalable.DistributionMode distributionMode, double minValue, double maxValue)
-
-
Method Details
-
scale
Description copied from interface:Scalable
Scale the given network using Generator convention by default. The actual scaling value may be different to the one asked if the Scalable limit is reached. If the scalable is disconnected, the scaling value will be 0.- Parameters:
n
- networkasked
- value asked to adjust the scalable active powerparameters
- specific parameters used to scale- Returns:
- the actual value of the scalable active power adjustment
-
getSteadyStatePower
public double getSteadyStatePower(Network network, double asked, Scalable.ScalingConvention scalingConvention) Description copied from interface:Scalable
Returns the current power value for the injections corresponding to this Scalable- Parameters:
network
- Network in which the injections are definedasked
- value of scaling asked on the scalable. This is used to know in which direction we want to scale for UpDownScalables.scalingConvention
- The value is computed either with Generator or Load convention according to this parameter.- Returns:
- the current power value
-
initialValue
Description copied from interface:Scalable
Get the constant active power in MW injected at the network. -
reset
Description copied from interface:Scalable
Set the constant active power to zero. -
maximumValue
Description copied from interface:Scalable
Get the maximal active power in MW. Uses Generator convention by default- Specified by:
maximumValue
in interfaceScalable
-
maximumValue
Description copied from interface:Scalable
Get the maximal active power in MW with scaling convention.- See Also:
-
minimumValue
Description copied from interface:Scalable
Get the minimal active power in MW. Uses Generator convention by default- Specified by:
minimumValue
in interfaceScalable
-
minimumValue
Description copied from interface:Scalable
Get the minimal active power in MW with scaling convention.- See Also:
-
filterInjections
public void filterInjections(Network n, List<Injection> injections, List<String> notFoundInjections) Description copied from interface:Scalable
Scans all the expected injections of the scalable. If the injection can be found in given network, it is added the the injections list. Otherwise, its identifier is added to the "notFound" list.- Parameters:
n
- networkinjections
- network injections used in the scalablenotFoundInjections
- expected injections not found in the network
-
getBoundedVariation
protected double getBoundedVariation(double variationAsked, double currentGlobalPower, Scalable.ScalingConvention scalingConvention) Returns the value of scaling asked, bounded by the minValue and maxValue.- Parameters:
variationAsked
- unbounded value of scaling asked on the scalablecurrentGlobalPower
- current global power in the networkscalingConvention
- This is required because the minValue and maxValue are in GENERATOR convention, so we need to know wwhat convention we use for the scaling.- Returns:
- the value of scaling asked bounded by the minValue and maxValue, according to the scalingConvention.
-
filterInjections
Description copied from interface:Scalable
Scans all the expected injections of the scalable. If the injection can be found in given network, it is added the the injections list. Otherwise, its identifier is added to the "notFound" list.- Specified by:
filterInjections
in interfaceScalable
- Parameters:
network
- networknotFound
- expected injections not found in the network- Returns:
- network injections used in the scalable
-
filterInjections
Description copied from interface:Scalable
Scans all the expected injections of the scalable. If the injection can be found in given network, it is added to the injections list.- Specified by:
filterInjections
in interfaceScalable
- Parameters:
network
- network- Returns:
- network injections used in the scalable
-