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

Remove TS links from solver #2155

Merged
merged 12 commits into from
Jun 28, 2024
Merged

Remove TS links from solver #2155

merged 12 commits into from
Jun 28, 2024

Conversation

guilpier-code
Copy link
Contributor

@guilpier-code guilpier-code commented Jun 11, 2024

The aim of this PR is removing from Antares solver the code related to TS generation associated to links capacity.
It follows PR #1986

Note that :

  • Loading the study is now no longer required to generate TS associated to links.
  • Handling errors related to each link's TS generation was simplified :
    For a link, if we meet a problem while loading data required to generated its TS, a warning is raised and the TS generation for this link will be skipped.

What was done :

  • Reading data for links TS generation :
    We now don't need the study to be loaded in order to generate TS.
    Some new code retrieves data from study
  • Generating TS associated to links :
    Code of base branch was adapted to use data having a different format.
  • Code related to link TS generation in solver was removed.
    An exception though : due to new data (related to links TS generation) next to data consumed by solver, we had to keep special skipping code for it, otherwise we get reading errors.

@guilpier-code guilpier-code changed the title Remove TS links from solver : extract link names from study. Remove TS links from solver Jun 11, 2024
@guilpier-code guilpier-code marked this pull request as ready for review June 13, 2024 13:55
@guilpier-code guilpier-code force-pushed the fix/remove-ts-link-from-solver branch from 0bb3a8b to 8a3e8f8 Compare June 13, 2024 15:21
src/libs/antares/study/area/links.cpp Outdated Show resolved Hide resolved
src/libs/antares/study/area/links.cpp Outdated Show resolved Hide resolved
src/libs/antares/study/area/links.cpp Outdated Show resolved Hide resolved
src/libs/antares/study/area/links.cpp Show resolved Hide resolved
src/libs/antares/study/area/links.cpp Outdated Show resolved Hide resolved
src/solver/ts-generator/availability.cpp Outdated Show resolved Hide resolved
@guilpier-code guilpier-code requested a review from flomnes June 14, 2024 09:48
@payetvin
Copy link
Contributor

A new file tools/ts-generator/links.cpp should be created to handle links

Copy link
Member

@flomnes flomnes left a comment

Choose a reason for hiding this comment

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

LGTM. One last suggestion to help

Base automatically changed from feature/thermal-interface to develop June 21, 2024 10:01
@guilpier-code guilpier-code requested a review from flomnes June 24, 2024 11:47
@guilpier-code guilpier-code force-pushed the fix/remove-ts-link-from-solver branch from 3aad079 to b671e22 Compare June 24, 2024 16:29
Copy link

@flomnes flomnes merged commit 8dc4f18 into develop Jun 28, 2024
7 checks passed
@flomnes flomnes deleted the fix/remove-ts-link-from-solver branch June 28, 2024 08:44
flomnes added a commit that referenced this pull request Jul 10, 2024
This PR aims at moving some code about link TS generation, from **main**
program to new source files.
It follows PR #2155 

To be done : 

- [x] move headers (*.h) to the right place
- [x] update this branch with its base branch (@flomnes made a change on
base branch)

We may also take advantage of this PR to : 
- [ ] Thermal TS generation :
- [ ] avoid loading the **whole study** when **no** thermal TS
generation is required (this is currently the case)
- [ ] move implementation details about thermal TS generation from
**main** program to new source files
- [ ] Separate loading / extracting data from study and generate the TS

---------

Co-authored-by: Florian OMNES <[email protected]>
Co-authored-by: Florian OMNES <[email protected]>
meslubi2021 added a commit to Unity-Energy-and-renewable-energy/Antares_Simulator that referenced this pull request Jul 17, 2024
* Collect hydro validation errors (AntaresSimulatorTeam#2204)

collect *n* hydro validation errors (10 per area ) before exiting

---------

Co-authored-by: Florian Omnès <[email protected]>

* Remove actions dependencies using node js 16 (AntaresSimulatorTeam#2215)

> Node.js 16 actions are deprecated. Please update the following actions
to use Node.js 20: notiz-dev/github-action-json-property@release. For
more information see:
https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.

---------

Co-authored-by: Florian OMNES <[email protected]>

* Move TS number print (AntaresSimulatorTeam#2228)

Purpose : moving the code that prints the TS numbers on disk : due to
recent changes it was moved after the loop through MC years. So, we have
to wait until simulation ends to know which TS numbers where drawn. So
we move that code back.

* Infeability analyzer : renaming (AntaresSimulatorTeam#2225)

Purpose : as the title says

This PR is attached to ticket [ticket
ANT-1825](https://gopro-tickets.rte-france.com/browse/ANT-1825).
Some improvements were made or tried by taking care of the ticket.
The result is this PR.

---------

Co-authored-by: Florian OMNES <[email protected]>

* Always run clang-format on PR (AntaresSimulatorTeam#2230)

* Add changelog for minor versions (AntaresSimulatorTeam#2229)

- v8.8.6
- v8.6.8

---------

Co-authored-by: Abdoulbari Zaher <[email protected]>
Co-authored-by: Jason Maréchal <[email protected]>

* Infeasibility analyzer : small simplifications (AntaresSimulatorTeam#2226)

Purpose : as the title says

This PR is attached to ticket [ticket
ANT-1825](https://gopro-tickets.rte-france.com/browse/ANT-1825).
Some improvements were made or tried by taking care of the ticket.
The result is this PR.

---------

Co-authored-by: Florian OMNES <[email protected]>

* Fix compile, add boost header in CMakelists (AntaresSimulatorTeam#2233)

* STS: Withdrawal efficiency [ANT-1862] (AntaresSimulatorTeam#2223)

Add a efficiencywithdrawal property to short term storage
This mimics the already existing efficiency for injection

* Infeasibility analyzer : HydroPower constraint (AntaresSimulatorTeam#2227) [ANT-1825]

Add constraint that can possibily lead to infeasibilities. HydroPower is the constraint on the sum of generated hydro energy over the week for a given area. The provided RHS in some cases makes the problem infeasible.

---------

Co-authored-by: Florian OMNES <[email protected]>

* Compilation warnings (AntaresSimulatorTeam#2237)

close  AntaresSimulatorTeam#2236

* Version 9.2 (AntaresSimulatorTeam#2240)

* Fix sonarcloud job (AntaresSimulatorTeam#2246)

* Adequacy Patch regression [ANT-1845] (AntaresSimulatorTeam#2235)

* 9.2 rc 1 (AntaresSimulatorTeam#2247)

* Keep using node js 16 on centos CI (AntaresSimulatorTeam#2248)

* Infeasibility more cleaning (AntaresSimulatorTeam#2231)

We're on the road to make **infeasibility analyzer** more changeable,
more precisely when adding a constraint type to the list of constraints
to be detected in case of infeasibity.
This PR is a step towards this purpose.  
It contains some heterogeneous simplifications and renaming.
In order to ease the review, some comments were added in this PR.

---------

Co-authored-by: Florian OMNES <[email protected]>

* Document clang-format (AntaresSimulatorTeam#2243)

Add version number to avoid confusion.

* Link TS generation : splitting into multiple files (AntaresSimulatorTeam#2171)

This PR aims at moving some code about link TS generation, from **main**
program to new source files.
It follows PR AntaresSimulatorTeam#2155 

To be done : 

- [x] move headers (*.h) to the right place
- [x] update this branch with its base branch (@flomnes made a change on
base branch)

We may also take advantage of this PR to : 
- [ ] Thermal TS generation :
- [ ] avoid loading the **whole study** when **no** thermal TS
generation is required (this is currently the case)
- [ ] move implementation details about thermal TS generation from
**main** program to new source files
- [ ] Separate loading / extracting data from study and generate the TS

---------

Co-authored-by: Florian OMNES <[email protected]>
Co-authored-by: Florian OMNES <[email protected]>

* Explain why MPS are named when the problem is infeasible (AntaresSimulatorTeam#2250)

* Add tests in CI for version 9.2 (AntaresSimulatorTeam#2241)

Co-authored-by: Florian OMNES <[email protected]>

* Rename test-platform to os for windows CI (AntaresSimulatorTeam#2253)

* Fix bug hydro heuristic with mingen (ANT-1825) (AntaresSimulatorTeam#2258)

Removing lines that create infeasibility and that are not necessary.

---------

Co-authored-by: Juliette-Gerbaux <[email protected]>
Co-authored-by: Florian OMNES <[email protected]>

* Remove useless fwd declaration

---------

Co-authored-by: Abdoulbari Zaher <[email protected]>
Co-authored-by: Florian Omnès <[email protected]>
Co-authored-by: payetvin <[email protected]>
Co-authored-by: guilpier-code <[email protected]>
Co-authored-by: Florian OMNES <[email protected]>
Co-authored-by: Jason Maréchal <[email protected]>
Co-authored-by: Juliette-Gerbaux <[email protected]>
Co-authored-by: Juliette-Gerbaux <[email protected]>
meslubi2021 added a commit to Unity-Energy-and-renewable-energy/Antares_Simulator that referenced this pull request Jul 17, 2024
* Collect hydro validation errors (AntaresSimulatorTeam#2204)

collect *n* hydro validation errors (10 per area ) before exiting

---------

Co-authored-by: Florian Omnès <[email protected]>

* Remove actions dependencies using node js 16 (AntaresSimulatorTeam#2215)

> Node.js 16 actions are deprecated. Please update the following actions
to use Node.js 20: notiz-dev/github-action-json-property@release. For
more information see:
https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.

---------

Co-authored-by: Florian OMNES <[email protected]>

* Move TS number print (AntaresSimulatorTeam#2228)

Purpose : moving the code that prints the TS numbers on disk : due to
recent changes it was moved after the loop through MC years. So, we have
to wait until simulation ends to know which TS numbers where drawn. So
we move that code back.

* Infeability analyzer : renaming (AntaresSimulatorTeam#2225)

Purpose : as the title says

This PR is attached to ticket [ticket
ANT-1825](https://gopro-tickets.rte-france.com/browse/ANT-1825).
Some improvements were made or tried by taking care of the ticket.
The result is this PR.

---------

Co-authored-by: Florian OMNES <[email protected]>

* Always run clang-format on PR (AntaresSimulatorTeam#2230)

* Add changelog for minor versions (AntaresSimulatorTeam#2229)

- v8.8.6
- v8.6.8

---------

Co-authored-by: Abdoulbari Zaher <[email protected]>
Co-authored-by: Jason Maréchal <[email protected]>

* Infeasibility analyzer : small simplifications (AntaresSimulatorTeam#2226)

Purpose : as the title says

This PR is attached to ticket [ticket
ANT-1825](https://gopro-tickets.rte-france.com/browse/ANT-1825).
Some improvements were made or tried by taking care of the ticket.
The result is this PR.

---------

Co-authored-by: Florian OMNES <[email protected]>

* Fix compile, add boost header in CMakelists (AntaresSimulatorTeam#2233)

* STS: Withdrawal efficiency [ANT-1862] (AntaresSimulatorTeam#2223)

Add a efficiencywithdrawal property to short term storage
This mimics the already existing efficiency for injection

* Infeasibility analyzer : HydroPower constraint (AntaresSimulatorTeam#2227) [ANT-1825]

Add constraint that can possibily lead to infeasibilities. HydroPower is the constraint on the sum of generated hydro energy over the week for a given area. The provided RHS in some cases makes the problem infeasible.

---------

Co-authored-by: Florian OMNES <[email protected]>

* Compilation warnings (AntaresSimulatorTeam#2237)

close  AntaresSimulatorTeam#2236

* Version 9.2 (AntaresSimulatorTeam#2240)

* Fix sonarcloud job (AntaresSimulatorTeam#2246)

* Adequacy Patch regression [ANT-1845] (AntaresSimulatorTeam#2235)

* 9.2 rc 1 (AntaresSimulatorTeam#2247)

* Keep using node js 16 on centos CI (AntaresSimulatorTeam#2248)

* Infeasibility more cleaning (AntaresSimulatorTeam#2231)

We're on the road to make **infeasibility analyzer** more changeable,
more precisely when adding a constraint type to the list of constraints
to be detected in case of infeasibity.
This PR is a step towards this purpose.  
It contains some heterogeneous simplifications and renaming.
In order to ease the review, some comments were added in this PR.

---------

Co-authored-by: Florian OMNES <[email protected]>

* Document clang-format (AntaresSimulatorTeam#2243)

Add version number to avoid confusion.

* Link TS generation : splitting into multiple files (AntaresSimulatorTeam#2171)

This PR aims at moving some code about link TS generation, from **main**
program to new source files.
It follows PR AntaresSimulatorTeam#2155 

To be done : 

- [x] move headers (*.h) to the right place
- [x] update this branch with its base branch (@flomnes made a change on
base branch)

We may also take advantage of this PR to : 
- [ ] Thermal TS generation :
- [ ] avoid loading the **whole study** when **no** thermal TS
generation is required (this is currently the case)
- [ ] move implementation details about thermal TS generation from
**main** program to new source files
- [ ] Separate loading / extracting data from study and generate the TS

---------

Co-authored-by: Florian OMNES <[email protected]>
Co-authored-by: Florian OMNES <[email protected]>

* Explain why MPS are named when the problem is infeasible (AntaresSimulatorTeam#2250)

* Add tests in CI for version 9.2 (AntaresSimulatorTeam#2241)

Co-authored-by: Florian OMNES <[email protected]>

* Rename test-platform to os for windows CI (AntaresSimulatorTeam#2253)

* Fix bug hydro heuristic with mingen (ANT-1825) (AntaresSimulatorTeam#2258)

Removing lines that create infeasibility and that are not necessary.

---------

Co-authored-by: Juliette-Gerbaux <[email protected]>
Co-authored-by: Florian OMNES <[email protected]>

* Infeasibility anaylsis : make it more changeable (AntaresSimulatorTeam#2232)

Create classes for each constraint type, with a common interface. Additional tests to come.

---------

Co-authored-by: Florian OMNES <[email protected]>
Co-authored-by: Florian Omnès <[email protected]>

* Remove manual dynamic memory usage (AntaresSimulatorTeam#2254)

Replaced new[] with vectors
Made RunTimeInfos static

---------

Co-authored-by: Abdoulbari Zaher <[email protected]>
Co-authored-by: Florian Omnès <[email protected]>
Co-authored-by: payetvin <[email protected]>
Co-authored-by: guilpier-code <[email protected]>
Co-authored-by: Florian OMNES <[email protected]>
Co-authored-by: Jason Maréchal <[email protected]>
Co-authored-by: Juliette-Gerbaux <[email protected]>
Co-authored-by: Juliette-Gerbaux <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants