Skip to content
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

Open
wants to merge 3 commits into
base: rao_parameters_merge_type_and_preventive_stop_criterion
Choose a base branch
from

Conversation

pjeanmarie
Copy link
Member

@pjeanmarie pjeanmarie commented Jul 31, 2024

… acceptable)

Please check if the PR fulfills these requirements

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

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?

  • Yes
  • No

If yes, please check if the following requirements are fulfilled

  • The Breaking Change or Deprecated label has been added
  • The migration steps are described in the following section

What changes might users need to make in their application due to this PR? (migration steps)

    move_to_extension(data, "objective-function", ["curative-min-obj-improvement"])
    move_to_extension(data, "range-actions-optimization",
                      ["max-mip-iterations", "pst-sensitivity-threshold", "pst-model",
                       "hvdc-sensitivity-threshold", "injection-ra-sensitivity-threshold",
                       "ra-range-shrinking", "linear-optimization-solver"])
    move_to_extension(data, "topological-actions-optimization",
                      ["max-preventive-search-tree-depth", "max-auto-search-tree-depth",
                       "max-curative-search-tree-depth", "predefined-combinations",
                       "skip-actions-far-from-most-limiting-element",
                       "max-number-of-boundaries-for-skipping-actions"])
    move_to_extension(data, "second-preventive-rao")
    move_to_extension(data, "load-flow-and-sensitivity-computation")
    if "range-actions-optimization" in data:
        new_names = {"pst-penalty-cost": "pst-ra-min-impact-threshold",
                     "hvdc-penalty-cost": "hvdc-ra-min-impact-threshold",
                     "injection-ra-penalty-cost": "injection-ra-min-impact-threshold"}
        data["range-actions-optimization"] = {new_names[k] if k in new_names else k: v for k, v in
                                              data["range-actions-optimization"].items()}
    if "multi-threading" in data and any(data["multi-threading"]):
        data["multi-threading"] = {"available-cpus": max(v for k, v in data["multi-threading"].items() if k in ("contingency-scenarios-in-parallel", "preventive-leaves-in-parallel"))}
    move_to_extension(data, "multi-threading")

Other information:

@pjeanmarie pjeanmarie changed the title Rao Parameters: separate business from implementation specific WIP: Rao Parameters: separate business from implementation specific Jul 31, 2024
@pjeanmarie pjeanmarie linked an issue Aug 5, 2024 that may be closed by this pull request
@pjeanmarie pjeanmarie force-pushed the rao_parameters_separate_business_and_implem_specific branch from 23e045e to f307d78 Compare August 5, 2024 16:31
@pjeanmarie pjeanmarie marked this pull request as draft August 9, 2024 15:57
@pjeanmarie pjeanmarie changed the title WIP: Rao Parameters: separate business from implementation specific [WIP] Rao Parameters: separate business from implementation specific Aug 9, 2024
@pjeanmarie pjeanmarie linked an issue Sep 23, 2024 that may be closed by this pull request
@pjeanmarie pjeanmarie force-pushed the rao_parameters_separate_business_and_implem_specific branch 2 times, most recently from 27fdbce to 06d212b Compare September 25, 2024 13:29
@pjeanmarie pjeanmarie force-pushed the rao_parameters_separate_business_and_implem_specific branch 3 times, most recently from f7a70a8 to 01ec4ab Compare October 8, 2024 14:35
@pjeanmarie pjeanmarie force-pushed the rao_parameters_separate_business_and_implem_specific branch 4 times, most recently from 63fc61f to a24cff9 Compare October 15, 2024 13:27
@pjeanmarie pjeanmarie force-pushed the rao_parameters_separate_business_and_implem_specific branch 4 times, most recently from 5bee729 to 9a19a7c Compare October 23, 2024 16:26
@pjeanmarie pjeanmarie force-pushed the rao_parameters_separate_business_and_implem_specific branch 3 times, most recently from b84b8ce to 66dc9dc Compare October 28, 2024 16:10
@pjeanmarie pjeanmarie force-pushed the rao_parameters_separate_business_and_implem_specific branch from 66dc9dc to c760e7a Compare November 4, 2024 10:01
@pjeanmarie pjeanmarie changed the base branch from main to rao_parameters_merge_type_and_preventive_stop_criterion November 5, 2024 09:18
@pjeanmarie pjeanmarie changed the title [WIP] Rao Parameters: separate business from implementation specific Rao Parameters: separate business from implementation specific Nov 5, 2024
@pjeanmarie pjeanmarie added breaking-change Changes could break users' code PR : dont-merge-before-other PR mustn't be merged before another (referenced in the description or in the comments) labels Nov 5, 2024
@pjeanmarie pjeanmarie marked this pull request as ready for review November 5, 2024 09:19
@pjeanmarie pjeanmarie force-pushed the rao_parameters_merge_type_and_preventive_stop_criterion branch from 8810fed to 4e59f6b Compare November 19, 2024 11:20
@pjeanmarie pjeanmarie force-pushed the rao_parameters_separate_business_and_implem_specific branch from c760e7a to 65aabf0 Compare November 21, 2024 09:48
@pjeanmarie pjeanmarie requested a review from obrix November 21, 2024 11:26
@pjeanmarie pjeanmarie added the PR: waiting-for-review This PR is waiting to be reviewed label Nov 21, 2024
@pjeanmarie pjeanmarie force-pushed the rao_parameters_merge_type_and_preventive_stop_criterion branch from 4e59f6b to 68f03a1 Compare November 29, 2024 09:12
@@ -102,7 +102,7 @@ public void setUp() {
when(parameters.getMaxNumberOfIterations()).thenReturn(5);
RangeActionsOptimizationParameters rangeActionParameters = Mockito.mock(RangeActionsOptimizationParameters.class);
when(rangeActionParameters.getPstModel()).thenReturn(RangeActionsOptimizationParameters.PstModel.CONTINUOUS);
when(parameters.getRangeActionParameters()).thenReturn(rangeActionParameters);
//when(parameters.getRangeActionParameters()).thenReturn(rangeActionParameters);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To clean

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

jsonGenerator.writeEndObject();
}

static void deserialize(JsonParser jsonParser, OpenRaoSearchTreeParameters searchTreeParameters) throws IOException {
Copy link
Member

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.

@pjeanmarie pjeanmarie force-pushed the rao_parameters_separate_business_and_implem_specific branch from adbcbb2 to 8f911c7 Compare November 29, 2024 09:32
@pjeanmarie pjeanmarie force-pushed the rao_parameters_merge_type_and_preventive_stop_criterion branch from 68f03a1 to 448cd9e Compare November 29, 2024 10:19
@pjeanmarie pjeanmarie force-pushed the rao_parameters_separate_business_and_implem_specific branch from 8f911c7 to f000bd9 Compare November 29, 2024 10:20
@pjeanmarie pjeanmarie force-pushed the rao_parameters_merge_type_and_preventive_stop_criterion branch from 448cd9e to f3fd6b2 Compare December 9, 2024 10:48
Pauline Jean-Marie added 3 commits December 9, 2024 11:50
…one extension (to have a flat yml for platform config)

Signed-off-by: Pauline Jean-Marie <pauline.jean-marie@artelys.com>
Signed-off-by: Pauline Jean-Marie <pauline.jean-marie@artelys.com>
Signed-off-by: Pauline Jean-Marie <pauline.jean-marie@artelys.com>
@pjeanmarie pjeanmarie force-pushed the rao_parameters_separate_business_and_implem_specific branch from f000bd9 to b9b4fc3 Compare December 9, 2024 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change Changes could break users' code PR : dont-merge-before-other PR mustn't be merged before another (referenced in the description or in the comments) PR: waiting-for-review This PR is waiting to be reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make RaoParameters generic
2 participants