-
Notifications
You must be signed in to change notification settings - Fork 7
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
Discussion around intertemporal RAO POC #1208
Comments
Power Gradient ConstraintsFor power gradient constraints, I think that a simple record class can be used with the name
public record PowerGradientConstraint(String networkElementId, double powerGradient,
RangeAction.VariationDirection variationDirection,
Optional<OffsetDateTime> validFrom,
Optional<OffsetDateTime> validTo) {
} For a first implementation, I believe that a simple |
Linear Equation UpdateSet-point valueThe set-point and variation variables must now include a timestamp indexing alongside the range action and the state since the same remedial action can be used at different timestamps. The set-point variation equation is the same as previously, linking the new set-point (i.e. the set-point at the end of the state) to the previous one (i.e. the set-point at the beginning of the state) using the variation variables: where
The function For multi-timestamp RAO, the "last time the range action was used" is computed a bit differently. Indeed the time logic is now two-dimensional as it relies on both the state and the timestamp (whereas only states were used before). Thus for a given state
Gradient constraint
Given a range action The power gradient constraint indicates than the power of the generator unit cannot increase or decrease more than a given rate per unit of time. For preventive range actions, both upward and downward constraints can be written as follows:
The TemporalStateReuse single-timestamp RAO linear problem API
|
Handling different data for each timestampSome classes must be used for several timestamps (CRAC, network, RAO parameters, RAO result, ...) so it would make sense using a general interface for handling temporal data. For this purpose, we can take inspiration form PowSyBl's public interface TemporalData<T> {
Map<OffsetDateTime, T> getDataPerTimestamp();
default Optional<T> getData(OffsetDateTime timestamp) {
return Optional.ofNullable(getDataPerTimestamp().get(timestamp));
}
void add(OffsetDateTime timestamp, T data);
} That way, there will be a common handling of temporal data, no matter which class is being processed. |
OutputsFor the first implementation, the easiest is to simply return a public static TemporalData<RaoResult> run(TemporalData<RaoInput> raoInputs, TemporalData<RaoParameters> raoParameters, Set<PowerGradientConstraint> powerGradientConstraints) {
TemporalData<RaoResult> raoResults = ...;
// TODO
return raoResults;
} |
Multiple-timestamps sensitivity computationFor multiple-timestamps sensitivity computation, we have to keep in mind that a remedial action at a given timestamp can have a direct effect on a CNEC several timestamps later. Indeed, if a PST range action is only available at timestamp 1, some CNECs at timestamp 10 are directly impacted by the tap of the PST. Thus, for the sensitivity computation of timestamp
A simple code example is given below: public static TemporalData<SensitivityResult> runSensitivityComputation(TemporalData<Crac> cracs, TemporalData<Network> networks, ToolProvider toolProvider) {
TemporalData<SensitivityResult> sensitivityResults = new TemporalDataImpl<>();
List<OffsetDateTime> sortedTimestamps = cracs.getDataPerTimestamp().keySet().stream().sorted().toList();
Set<RangeAction<?>> previousRangeActions = new HashSet<>();
sortedTimestamps.forEach(
timestamp -> {
Network network = networks.getData(timestamp).orElseThrow();
Crac crac = cracs.getData(timestamp).orElseThrow();
previousRangeActions.addAll(crac.getRangeActions());
SensitivityComputer sensitivityComputer = SensitivityComputer.create()
.withToolProvider(toolProvider)
.withCnecs(crac.getFlowCnecs())
.withRangeActions(previousRangeActions)
.build();
sensitivityComputer.compute(network);
sensitivityResults.add(timestamp, sensitivityComputer.getSensitivityResult());
}
);
return sensitivityResults;
} |
Input data
|
Describe the current behavior
No response
Describe the expected behavior
WE WILL ONLY FOCUS ON LINEAR PREVENTIVE OPTIMIZATION AT FIRST, as this already represents a lot of work with numerous new features for the RAO.
Data Management
Load multiple cracs, multiple networks, make a multi timestamp unit object : RaoInputTS
add gradient information for now in RaoInput : map< network element, double>
Launch a multi timestamp sensitivity computation
document difference % SensitivityComputation
use LinearProblemBuilderMultiTS
document difference % LinearProblemBuilder
GradientFiller
puissance(timeindex3) - puissance(timeindex2) < gradient * (timeindex3 - timeindex2)
Multi TS Output
for now, list raoResults
For now, no topos
Tests :
FOCUS ON CREATED OBJECTS:
1)RaoInputTS : Map<cracs, ts>, networks. For now, no optimized state etc (used for CastorOneStateOnly)
TODO : list other attributes in RaoInput and why we don't need them
2)
Describe the motivation
No response
Extra Information
No response
The text was updated successfully, but these errors were encountered: