-
Notifications
You must be signed in to change notification settings - Fork 24
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
Link TS generation : splitting into multiple files #2171
Conversation
{ | ||
for(auto& link : linkList) | ||
{ | ||
if (link.namesPair == link_to_find) |
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.
why don't you re-use pairs_match?
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.
Good point ! pairs_match
is a bit less strict than pair<>::operator==
, since it returns true
if a.first==b.second && a.second == b.first
(not the case with pair<>::operator==
)
bce0fa7
to
9f3b1ec
Compare
…d to link TS generation
…es.ini" for links chosen by user
…iteResultsToDisk which now does exactly what its name says it does
Quality Gate passedIssues Measures |
This PR addresses [this go-pro ticket](https://gopro-tickets.rte-france.com/browse/ANT-1852) What was done : - **Cause of the crash** : allocate (give a size to) the storage containers supposed to receive the thermal TS generation results - Remove the use of **result writer**, too complicated (for example, it forces us to use a duration collector we don't need). - Use of **std::filesystem** whenever possible See helping **gitHub** comments inserted in sources.
…ts-generation-into-files
{ | ||
for(auto& link : linkList) | ||
{ | ||
if (link.namesPair == link_to_find) |
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.
Good point ! pairs_match
is a bit less strict than pair<>::operator==
, since it returns true
if a.first==b.second && a.second == b.first
(not the case with pair<>::operator==
)
Aim of this PR : see the title. What was done (see helping **gitHub** comments in this PR) : - simplifications : - [x] Standardizing TS generation with link TS : remove a constructor in a class containing data for TS generation. - [x] Remove use of **RuntimeInfos** in **main.cpp** (many code lines used to be called there, just to get a random generator). - [x] Remove check on min stable power, useless. - [x] Function that actually generates the TS no longer takes the TS to be generated as argument, but returns it. - [x] **TS generator** code no longer contains code related to whether we should skip the TS writing on disk. It writes, that'all. This kind of code belongs to **solver**, not to **TS generator**. - [x] Use **std::filesystem** whenever possible instead of **Yuni** - Unwanted behavior correction : - [x] Execute links or thermal TS generation code only depending on user requirements : indeed, thermal TS generation still needs the whole study to be loaded, but link TS generation does not (it retrieves from study only the required data). Being forced to load the study if only link TS generation is required is a clear performance issue. We avoid that here. - [x] When data files required to generate TS (modulation files & prepro files) don't exist, we used to ignore it (this can lead to a crash). We now raise an error before TS generation time comes. - Moving code : _to be completed_ --------- Co-authored-by: Florian OMNES <florian.omnes@rte-france.com>
* Collect hydro validation errors (AntaresSimulatorTeam#2204) collect *n* hydro validation errors (10 per area ) before exiting --------- Co-authored-by: Florian Omnès <florian.omnes@rte-france.com> * 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 <florian.omnes@rte-france.com> * 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 <26088210+flomnes@users.noreply.github.com> * 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 <32519851+a-zakir@users.noreply.github.com> Co-authored-by: Jason Maréchal <45510813+JasonMarechal25@users.noreply.github.com> * 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 <26088210+flomnes@users.noreply.github.com> * 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 <26088210+flomnes@users.noreply.github.com> * 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 <26088210+flomnes@users.noreply.github.com> * 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 <26088210+flomnes@users.noreply.github.com> Co-authored-by: Florian OMNES <florian.omnes@rte-france.com> * 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 <florian.omnes@rte-france.com> * 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 <juliette.gerbaux_externe@rte-france.com> Co-authored-by: Florian OMNES <florian.omnes@rte-france.com> * Remove useless fwd declaration --------- Co-authored-by: Abdoulbari Zaher <32519851+a-zakir@users.noreply.github.com> Co-authored-by: Florian Omnès <florian.omnes@rte-france.com> Co-authored-by: payetvin <113102157+payetvin@users.noreply.github.com> Co-authored-by: guilpier-code <62292552+guilpier-code@users.noreply.github.com> Co-authored-by: Florian OMNES <26088210+flomnes@users.noreply.github.com> Co-authored-by: Jason Maréchal <45510813+JasonMarechal25@users.noreply.github.com> Co-authored-by: Juliette-Gerbaux <130555142+Juliette-Gerbaux@users.noreply.github.com> Co-authored-by: Juliette-Gerbaux <juliette.gerbaux_externe@rte-france.com>
* Collect hydro validation errors (AntaresSimulatorTeam#2204) collect *n* hydro validation errors (10 per area ) before exiting --------- Co-authored-by: Florian Omnès <florian.omnes@rte-france.com> * 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 <florian.omnes@rte-france.com> * 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 <26088210+flomnes@users.noreply.github.com> * 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 <32519851+a-zakir@users.noreply.github.com> Co-authored-by: Jason Maréchal <45510813+JasonMarechal25@users.noreply.github.com> * 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 <26088210+flomnes@users.noreply.github.com> * 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 <26088210+flomnes@users.noreply.github.com> * 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 <26088210+flomnes@users.noreply.github.com> * 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 <26088210+flomnes@users.noreply.github.com> Co-authored-by: Florian OMNES <florian.omnes@rte-france.com> * 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 <florian.omnes@rte-france.com> * 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 <juliette.gerbaux_externe@rte-france.com> Co-authored-by: Florian OMNES <florian.omnes@rte-france.com> * 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 <26088210+flomnes@users.noreply.github.com> Co-authored-by: Florian Omnès <florian.omnes@rte-france.com> * Remove manual dynamic memory usage (AntaresSimulatorTeam#2254) Replaced new[] with vectors Made RunTimeInfos static --------- Co-authored-by: Abdoulbari Zaher <32519851+a-zakir@users.noreply.github.com> Co-authored-by: Florian Omnès <florian.omnes@rte-france.com> Co-authored-by: payetvin <113102157+payetvin@users.noreply.github.com> Co-authored-by: guilpier-code <62292552+guilpier-code@users.noreply.github.com> Co-authored-by: Florian OMNES <26088210+flomnes@users.noreply.github.com> Co-authored-by: Jason Maréchal <45510813+JasonMarechal25@users.noreply.github.com> Co-authored-by: Juliette-Gerbaux <130555142+Juliette-Gerbaux@users.noreply.github.com> Co-authored-by: Juliette-Gerbaux <juliette.gerbaux_externe@rte-france.com>
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 :
We may also take advantage of this PR to :