Class AbstractLimitsReducer<L>
- Direct Known Subclasses:
DefaultLimitsReducer
This class is responsible for generating an object (of generic type AbstractLimitsReducer
) containing the reduced limits
from the original limits and the reduction coefficients to apply for the permanent and each of the temporary limits.
- Author:
- Olivier Perrin <olivier.perrin at rte-france.com>
-
Field Summary
Modifier and TypeFieldDescription -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected static double
applyReduction
(double value, double reduction) double
double
getTemporaryLimitReduction
(int acceptableDuration) abstract IntStream
Return a stream of the temporary limits' acceptable durations.protected abstract LimitsContainer<L>
reduce()
Generate the reduced limits from the original limits and reductions stored in this object.void
setPermanentLimitReduction
(double permanentLimitReduction) void
setTemporaryLimitReduction
(int acceptableDuration, double limitReduction)
-
Field Details
-
temporaryLimitReductionByAcceptableDuration
-
-
Constructor Details
-
AbstractLimitsReducer
-
-
Method Details
-
reduce
Generate the reduced limits from the original limits and reductions stored in this object.
This method is called when at least one of the reductions store in
permanentLimitReduction
ortemporaryLimitReductionByAcceptableDuration
is different to 1. It must return aLimitsContainer
containing the result ofgetOriginalLimits()
as original limits and a copy of the original limits on which each limit value is obtained as the original value * the corresponding limit reduction (retrieved fromgetPermanentLimitReduction()
orgetTemporaryLimitReduction(int acceptableDuration)
(depending on the type of the limit).- Returns:
- the reduced limits
-
getTemporaryLimitsAcceptableDurationStream
Return a stream of the temporary limits' acceptable durations.
- Returns:
- the acceptable durations
-
getLimits
-
getOriginalLimits
-
setPermanentLimitReduction
public void setPermanentLimitReduction(double permanentLimitReduction) -
getPermanentLimitReduction
public double getPermanentLimitReduction() -
setTemporaryLimitReduction
public void setTemporaryLimitReduction(int acceptableDuration, double limitReduction) -
getTemporaryLimitReduction
public double getTemporaryLimitReduction(int acceptableDuration) -
applyReduction
protected static double applyReduction(double value, double reduction)
-