-
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
Rao Parameters: separate business from implementation specific #1101
base: rao_parameters_merge_type_and_preventive_stop_criterion
Are you sure you want to change the base?
Conversation
23e045e
to
f307d78
Compare
27fdbce
to
06d212b
Compare
f7a70a8
to
01ec4ab
Compare
63fc61f
to
a24cff9
Compare
5bee729
to
9a19a7c
Compare
b84b8ce
to
66dc9dc
Compare
66dc9dc
to
c760e7a
Compare
8810fed
to
4e59f6b
Compare
c760e7a
to
65aabf0
Compare
4e59f6b
to
68f03a1
Compare
...owsybl/openrao/searchtreerao/linearoptimisation/algorithms/IteratingLinearOptimizerTest.java
Outdated
Show resolved
Hide resolved
jsonGenerator.writeEndObject(); | ||
} | ||
|
||
static void deserialize(JsonParser jsonParser, OpenRaoSearchTreeParameters searchTreeParameters) throws IOException { |
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.
A general comment for all serialization / deserialization. I think it would be better to fully use jackson and StdSerializer / StdDeserializer. Maybe some work for another PR.
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.
Indeed. It may also be worth discussing this at an organization level, since I noticed some discrepancies between at least OLF and powsybl core on how parameters are serialized / deserialized (using objectMapper vs explicitely defining the serializers / deserializers)
adbcbb2
to
8f911c7
Compare
68f03a1
to
448cd9e
Compare
8f911c7
to
f000bd9
Compare
448cd9e
to
f3fd6b2
Compare
…one extension (to have a flat yml for platform config) Signed-off-by: Pauline Jean-Marie <[email protected]>
Signed-off-by: Pauline Jean-Marie <[email protected]>
Signed-off-by: Pauline Jean-Marie <[email protected]>
f000bd9
to
b9b4fc3
Compare
- **Usage**: the pst-penalty-cost represents the cost of changing the PST set-points, it is used within the linear | ||
optimisation problem of the RAO, where, for each PST, the following term is added to the objective function: | ||
*pst-penalty-cost $$\times |\alpha - \alpha_{0}|$$*, where *$$\alpha$$* is the optimized angle of the PST, and | ||
*$$\alpha_{0}$$* the angle in its initial position. | ||
If several solutions are equivalent (e.g. with the same min margin), a strictly positive pst penalty cost will favour | ||
the ones with the PST taps the closest to the initial situation. |
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.
there are issues with the formatting on this part (you can check the readme in the docs folder to see how to build the page locally, or check the details of the github action on the pull request to see how the page is rendered)
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.
also the parameter is pst-ra-min-impact-threshold and in the description it is still pst-penalty-cost
#### hvdc-ra-min-impact-threshold | ||
- **Expected value**: numeric value, unit: unit of the objective function / MW | ||
- **Default value**: 0.001 | ||
- **Usage**: the hvdc-penalty-cost represents the cost of changing the HVDC set-points, it is used within the linear | ||
optimisation problem of the RAO, where, for each HVDC, the following term is added to the objective function: | ||
*hvdc-penalty-cost x |P - P0|*, where *P* is the optimized target power of the HVDC, and *P0* the initial target | ||
power. | ||
If several solutions are equivalent (e.g. with the same min margin), a strictly positive hvdc penalty cost will favour | ||
the ones with the HVDC set-points the closest to the initial situation. |
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.
same issue hvdc-ra-min-impact-threshold vs hvdc-penalty-cost
#### injection-ra-min-impact-threshold | ||
- **Expected value**: numeric value, unit: unit of the objective function / MW | ||
- **Default value**: 0.001 | ||
- **Usage**: the injection-ra-penalty-cost represents the cost of changing the injection set-points, it is used within the linear | ||
optimisation problem of the RAO, in the same way as the two types of RangeAction above. |
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.
same issue injection-ra-min-impact-threshold vs injection-ra-penalty-cost
- **Default value**: 0.0 | ||
- **Usage**: behaves like [absolute-minimum-impact-threshold](#absolute-minimum-impact-threshold), but the | ||
threshold here is defined as a coefficient of the objective function value of the previous depth. In depth (n+1), if a | ||
topological action improves the objective function by x, with x < solution(depth(n)) x relative-minimum-impact-threshold, |
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.
use " * " instead of " x " for the multiplication in the equation
- **Usage**: used as a minimum improvement of the preventive RAO objective value for the curative RAO stop criterion, | ||
when it is set to PREVENTIVE_OBJECTIVE or PREVENTIVE_OBJECTIVE_AND_SECURE. |
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.
the curative stop criterion no longer exists
import static com.powsybl.openrao.raoapi.RaoParametersCommons.*; | ||
|
||
/** | ||
* @author Godelaine de Montmorillon {@literal <godelaine.demontmorillon at rte-france.com>} |
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.
add yourself as author
import static com.powsybl.openrao.raoapi.RaoParametersCommons.*; | ||
|
||
/** | ||
* @author Godelaine de Montmorillon {@literal <godelaine.demontmorillon at rte-france.com>} |
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.
add yourself as author
@@ -87,14 +90,14 @@ public CastorSecondPreventive(Crac crac, | |||
*/ | |||
boolean shouldRunSecondPreventiveRao(OptimizationResult firstPreventiveResult, Collection<OptimizationResult> curativeRaoResults, RaoResult postFirstRaoResult, long estimatedPreventiveRaoTimeInSeconds) { | |||
Instant lastCurativeInstant = crac.getLastInstant(); | |||
if (raoParameters.getSecondPreventiveRaoParameters().getExecutionCondition().equals(SecondPreventiveRaoParameters.ExecutionCondition.DISABLED)) { | |||
if (getExecutionCondition(raoParameters).equals(SecondPreventiveRaoParameters.ExecutionCondition.DISABLED)) { |
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.
It would be clearer here to explicitly call SecondPreventiveRaoParameters.getExecutionCondition, or rename the method to getSecondPreventiveExecutionCondition
@@ -160,7 +163,7 @@ RaoResult runSecondPreventiveAndAutoRao(CastorContingencyScenarios castorConting | |||
// ------ appliedCras from secondPreventiveRaoResult | |||
AppliedRemedialActions appliedArasAndCras = secondPreventiveRaoResult.appliedArasAndCras().copyCurative(); | |||
// ------ + curative range actions optimized during second preventive with global optimization | |||
if (raoParameters.getSecondPreventiveRaoParameters().getReOptimizeCurativeRangeActions()) { | |||
if (getReOptimizeCurativeRangeActions(raoParameters)) { |
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.
Same remark here, it would be clearer if we knew this was relative to second preventive optimization
@@ -48,24 +51,28 @@ public class CoreProblemFiller implements ProblemFiller { | |||
private final Set<FlowCnec> flowCnecs; | |||
private final RangeActionSetpointResult prePerimeterRangeActionSetpoints; | |||
private final RangeActionsOptimizationParameters rangeActionParameters; | |||
private final com.powsybl.openrao.raoapi.parameters.extensions.RangeActionsOptimizationParameters rangeActionParametersExtension; |
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.
maybe we should rename the classes to have Extension or SearchTreeRao so it's easier to differentiate between them and avoid having to make the class path explicit every time
…' of https://github.com/powsybl/open-rao into rao_parameters_separate_business_and_implem_specific Signed-off-by: Philippe Edwards <[email protected]>
… acceptable)
Please check if the PR fulfills these requirements
Does this PR already have an issue describing the problem?
#1084
What kind of change does this PR introduce?
What is the current behavior?
What is the new behavior (if this is a feature change)?
Does this PR introduce a breaking change or deprecate an API?
If yes, please check if the following requirements are fulfilled
What changes might users need to make in their application due to this PR? (migration steps)
Other information: