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

Features/inter temporal sensitivity #1235

Open
wants to merge 33 commits into
base: main
Choose a base branch
from

Conversation

RoxaneChen02
Copy link
Contributor

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?

Fixes #1226

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)

Other information:

CHEN Roxane and others added 7 commits December 10, 2024 16:47
Signed-off-by: CHEN Roxane <roxane.chen@rte-france.com>
Signed-off-by: CHEN Roxane <roxane.chen@rte-france.com>
Signed-off-by: CHEN Roxane <roxane.chen@rte-france.com>
Signed-off-by: Thomas Bouquet <thomas.bouquet@rte-france.com>
Signed-off-by: CHEN Roxane <roxane.chen@rte-france.com>
Signed-off-by: CHEN Roxane <roxane.chen@rte-france.com>
@RoxaneChen02 RoxaneChen02 marked this pull request as draft December 12, 2024 14:50
bqth29 and others added 7 commits December 12, 2024 17:03
Signed-off-by: Thomas Bouquet <thomas.bouquet@rte-france.com>
Signed-off-by: CHEN Roxane <roxane.chen@rte-france.com>
Signed-off-by: CHEN Roxane <roxane.chen@rte-france.com>
Signed-off-by: CHEN Roxane <roxane.chen@rte-france.com>
Signed-off-by: CHEN Roxane <roxane.chen@rte-france.com>
Signed-off-by: Thomas Bouquet <thomas.bouquet@rte-france.com>
@bqth29 bqth29 added feature New feature or request intertemporality Encompasses the use of multi-time-steps optimization and intertemporal constraints labels Dec 13, 2024
@bqth29 bqth29 marked this pull request as ready for review December 13, 2024 09:45
@bqth29 bqth29 requested a review from Godelaine December 13, 2024 09:46
Signed-off-by: Thomas Bouquet <thomas.bouquet@rte-france.com>
Signed-off-by: Thomas Bouquet <thomas.bouquet@rte-france.com>
Signed-off-by: Thomas Bouquet <thomas.bouquet@rte-france.com>
Signed-off-by: Thomas Bouquet <thomas.bouquet@rte-france.com>
@bqth29 bqth29 added the PR: waiting-for-review This PR is waiting to be reviewed label Dec 13, 2024
/**
* @author Thomas Bouquet {@literal <thomas.bouquet at rte-france.com>}
*/
public class InterTemporalPool extends ForkJoinPool {
Copy link
Collaborator

Choose a reason for hiding this comment

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

May need to check what happens if each task has their own children subthreads. (This class might think the task is no longer being run while the task is waiting for its subthreads to finish, and start running new tasks. I'm not 100% sure how fork join pools work in details.)

Copy link
Collaborator

Choose a reason for hiding this comment

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

I checked using ForkJoinPool and got problems: for instance, when InterTemporalPools are nested - for instance a parent pool with 2 threads creates children pools with 3 threads each - tasks are run without paying attention to the number of threads of the parent pool.

Instead, I replaced the multi-threading system by ThreadPoolExecutor and it now works better.

bqth29 added 2 commits January 2, 2025 16:09
# Conflicts:
#	ra-optimisation/rao-api/src/main/java/com/powsybl/openrao/raoapi/InterTemporalRaoInput.java
Signed-off-by: Thomas Bouquet <thomas.bouquet@rte-france.com>
bqth29 and others added 5 commits January 2, 2025 17:37
Signed-off-by: Thomas Bouquet <thomas.bouquet@rte-france.com>
Signed-off-by: Thomas Bouquet <thomas.bouquet@rte-france.com>
Signed-off-by: Thomas Bouquet <thomas.bouquet@rte-france.com>
@Godelaine Godelaine added PR: waiting-for-correction This PR is waiting to be corrected by its author and removed PR: waiting-for-review This PR is waiting to be reviewed labels Jan 6, 2025
bqth29 added 2 commits January 6, 2025 17:16
Signed-off-by: Thomas Bouquet <thomas.bouquet@rte-france.com>
Signed-off-by: Thomas Bouquet <thomas.bouquet@rte-france.com>
Copy link
Collaborator

@Godelaine Godelaine left a comment

Choose a reason for hiding this comment

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

Add "UT" (logs only) validating that ThreadPoolExecutor works
In new PR, try substituting ThreadPoolExecutor by a specially configured ForkJoinPool

CHEN Roxane and others added 4 commits January 14, 2025 14:54
Signed-off-by: CHEN Roxane <roxane.chen@rte-france.com>
Signed-off-by: CHEN Roxane <roxane.chen@rte-france.com>
Signed-off-by: Thomas Bouquet <thomas.bouquet@rte-france.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request intertemporality Encompasses the use of multi-time-steps optimization and intertemporal constraints PR: waiting-for-correction This PR is waiting to be corrected by its author
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Intertemporal sensitivity computation
4 participants