-
Notifications
You must be signed in to change notification settings - Fork 28
feat: Multiple Hydro Rule Curves #2829
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
Merged
Merged
Changes from all commits
Commits
Show all changes
127 commits
Select commit
Hold shift + click to select a range
c5a62f3
Introduce new Time-Series that will represent maximum, minimum and av…
nikolaredstork 6bb1351
Intoduction to the new global parameter that will determine from whic…
nikolaredstork a4d744f
Introduce reservoir levels objects into constructor
nikolaredstork 555b4f0
Add comments
nikolaredstork 9d92b2e
Clang format and hydro reservoir level check
nikolaredstork 30043fb
Reservoir Levels load function
nikolaredstork 3bea9b2
Introduce new function for loading old reservoir levels files
nikolaredstork ba35f60
Add checks in solver
nikolaredstork 7377d61
Clang format
nikolaredstork c06853e
Clang format
nikolaredstork 7d04962
Implement new objects to solver
nikolaredstork ac6a6e2
Bug Fix
nikolaredstork 02a84ef
Refactoring and Unit tests
nikolaredstork ff11399
Clang format
nikolaredstork b1f9c24
Merge branch 'develop' into feature/multiple-rule-curve-cr24
nikolaredstork 8338a9b
Reservoir levels check revert
nikolaredstork 29a24d5
Hydro Levels Check Fix
nikolaredstork ebffd6c
Use getColum function
nikolaredstork 130ece3
Excluding unnecessary code
nikolaredstork e4fba4f
Refactoring
nikolaredstork be6c31a
Save useScenarizedReservoirLevels value
nikolaredstork baa68bd
Clang format
nikolaredstork 26068f7
Change function name
nikolaredstork 2b880c7
Additional check in reservoir levels check function
nikolaredstork 35aea9b
Modification of load function
nikolaredstork f013a51
Unit tests-Loading scenarized reservoir levels
nikolaredstork 62604fa
clang format
nikolaredstork 25da0ea
Refactor hydro reservoir check
nikolaredstork b21a8c0
Bug fix
nikolaredstork b8cd961
Unit tests for hydro inputs checker
nikolaredstork 7a3aae1
Clang format
nikolaredstork 9ceec7f
Exclud unnecessary code from unit tests
nikolaredstork 849020b
Merge branch 'develop' into feature/multiple-rule-curve-cr24
nikolaredstork 71d8786
Use Reservoir Levels enum
nikolaredstork 239bdc9
Save new files. Added for testing
nikolaredstork ea6b47c
Sonar cloud. To be removed on pushing this branch on RTE repo
nikolaredstork 0ad820c
Add reservoir levels to tsCount function
nikolaredstork 8fed28b
New class for hydro reservoir levels
nikolaredstork 052ae8a
Use new objects
nikolaredstork c8dc574
Fix unit tests
nikolaredstork 81fefd5
Excluding unnecessary code
nikolaredstork 83a0ca8
Refactoring
nikolaredstork 102d24a
Add comments
nikolaredstork 3f2a5ad
Add copy function
nikolaredstork 595d221
Unit test for load functions
nikolaredstork ed65b0d
Adding more checks to unit test
nikolaredstork ed7b02e
Fix folder creation in unit test
nikolaredstork cd3949c
Refactor loading functions
nikolaredstork 25a317b
Modify unit test
nikolaredstork 064786b
Clang format
nikolaredstork 1a15f3d
UI bugfix
nikolaredstork 0a7550f
Merge branch 'develop' into feature/multiple-rule-curve-cr-24
nikolaredstork ba385cc
Clang Format
nikolaredstork f619d10
Move flag to compatibility section
nikolaredstork cb3e3fb
Naming convention
nikolaredstork 1817c10
Update user-guide
nikolaredstork 3e86435
Clang format
nikolaredstork 099cd2c
Move flag to compatibility section
nikolaredstork b02aeec
Implement loader classes
nikolaredstork 7b05d79
Merge branch 'develop' into feature/multiple-rule-curve-cr-24
nikolaredstork 9899b72
Exclude depraceted code
nikolaredstork 544270e
Revert sonar workflow
nikolaredstork 754fb1c
Possible fix
nikolaredstork a16032b
Bugfix
nikolaredstork f52a1ba
Move flag to compatibility part
nikolaredstork 57c4236
Clang format
nikolaredstork 0396f76
Clang format
nikolaredstork b3dbcc5
Hydro rule curves compatibility
nikolaredstork 35a9d82
Clang format
nikolaredstork 3ea013b
Documentation update
nikolaredstork e409e5d
Merge branch 'develop' into feature/multiple-rule-curve-cr-24
nikolaredstork ee5bd18
Unit tests
nikolaredstork fa36c6d
Clang format
nikolaredstork 559ffc5
Add study version conversion
nikolaredstork 897a4ec
Change function name
nikolaredstork 9cb9428
Swithc places for initialization reasons
nikolaredstork c3b8ca4
Change name convention for object that communicate with GUI
nikolaredstork 99e6860
Clang Format
nikolaredstork 606d3bc
Name convetion modification
nikolaredstork ffc10cb
Naming convention second part
nikolaredstork 9beb916
Change name of files
nikolaredstork 3db5592
Move load from folder function to RuleCurvesLoader class
nikolaredstork e9c588c
Loader Service Class
nikolaredstork 5ba5657
Add createRuleCurvesLoader in Service class
nikolaredstork 9196bd6
Remove unnecessary code and modify unit tests
nikolaredstork c0c5944
Merge branch 'develop' into feature/multiple-rule-curve-cr-24
nikolaredstork acfe1c2
Code smells
nikolaredstork c1d5043
Use unsigned integer literal
nikolaredstork 7b60f65
Exclude unnecessary checks
nikolaredstork b750ca6
Additional unit tests
nikolaredstork a2e58d5
Merge branch 'develop' into feature/multiple-rule-curve-cr-24
nikolaredstork 672a027
Clang format
nikolaredstork c73cd2d
Post merging clean
nikolaredstork 8c06c28
Add test
nikolaredstork 1dbc48d
Reduce number of conditions
nikolaredstork 653ba36
Clang format
nikolaredstork e141f26
Add test for UI data loading
nikolaredstork e26f950
Revert change for legacy versioning
nikolaredstork 767f36a
Revert changes
nikolaredstork 8b8f1af
Monthly unit test as on develop
nikolaredstork 5ca2d18
Merge branch 'develop' into feature/multiple-rule-curve-cr-24 for cus…
nikolaredstork 983378e
Merge branch 'develop' into feature/multiple-rule-curve-cr-24
dusanparipovic 44ba40a
style(clang-format): add clang format to monthly.cpp
dusanparipovic 9b1fde8
Merge branch 'develop' into feature/multiple-rule-curve-cr-24
dusanparipovic bebd2b5
Synchronize new object into exsisting function
dusanparipovic b5e1dbc
initial refactor - UI excluded
nikolaredstork fb8cefd
Clang Format
nikolaredstork d40de72
Merge branch 'develop' into feature/multiple-rule-curve-cr-24
nikolaredstork 8f47ff4
Exclude unnecessary function arguments
nikolaredstork 457c700
Code smell
nikolaredstork 37874a9
CR 24 : trial for code improvements (#3310)
guilpier-code 5e53740
Merge branch 'develop' into feature/multiple-rule-curve-cr-24
flomnes ecae161
Merge branch 'develop' into feature/multiple-rule-curve-cr-24
flomnes 6c3887c
Merge branch 'develop' into feature/multiple-rule-curve-cr-24
nikolaredstork 21d4d80
fix tests
nikolaredstork 5421ebf
Merge branch 'develop' into feature/multiple-rule-curve-cr-24
nikolaredstork 68ee204
Clang Format
nikolaredstork 851c394
Merge branch 'develop' into feature/multiple-rule-curve-cr-24
flomnes 4902b2f
Apply hydro rule-curve review fixes
flomnes 237908c
format
flomnes 1c22a2c
Cleaning
flomnes 038362c
auto*
flomnes ca67eef
Move impl classes to .cpp
flomnes b7659d7
Merge branch 'develop' into feature/multiple-rule-curve-cr-24
JasonMarechal25 bb0f8bf
doc
3d2a7bf
Fix build
edad7da
Fix btest
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
78 changes: 78 additions & 0 deletions
78
src/libs/antares/study/include/antares/study/parts/hydro/hydrorulecurves.h
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,78 @@ | ||
| /* | ||
| ** Copyright 2007-2024, RTE (https://www.rte-france.com) | ||
| ** See AUTHORS.txt | ||
| ** SPDX-License-Identifier: MPL-2.0 | ||
| ** This file is part of Antares-Simulator, | ||
| ** Adequacy and Performance assessment for interconnected energy networks. | ||
| ** | ||
| ** Antares_Simulator is free software: you can redistribute it and/or modify | ||
| ** it under the terms of the Mozilla Public Licence 2.0 as published by | ||
| ** the Mozilla Foundation, either version 2 of the License, or | ||
| ** (at your option) any later version. | ||
| ** | ||
| ** Antares_Simulator is distributed in the hope that it will be useful, | ||
| ** but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| ** Mozilla Public Licence 2.0 for more details. | ||
| ** | ||
| ** You should have received a copy of the Mozilla Public Licence 2.0 | ||
| ** along with Antares_Simulator. If not, see <https://opensource.org/license/mpl-2-0/>. | ||
| */ | ||
| #pragma once | ||
|
|
||
| #include <antares/series/series.h> | ||
| #include <antares/study/parameters.h> | ||
|
|
||
| namespace Antares::Data | ||
| { | ||
|
|
||
| class RuleCurves | ||
| { | ||
| public: | ||
| enum | ||
|
Check warning on line 32 in src/libs/antares/study/include/antares/study/parts/hydro/hydrorulecurves.h
|
||
| { | ||
| minimum = 0, | ||
| average, | ||
| maximum, | ||
| }; | ||
|
|
||
| explicit RuleCurves(TimeSeriesNumbers& timeseriesNumbers); | ||
|
|
||
| void averageTimeSeries(); | ||
|
|
||
| TimeSeriesNumbers& timeseriesNumbers; | ||
|
|
||
| /*! | ||
| ** \brief max, min, average Reservoir Levels (%) | ||
| ** | ||
| ** Matrices of dimensions TimeSeriesCount * DAYS_PER_YEAR values | ||
| */ | ||
| TimeSeries max; | ||
| TimeSeries min; | ||
| TimeSeries avg; | ||
| }; | ||
|
|
||
| class RuleCurvesLoader; | ||
|
|
||
| class RuleCurvesLoaderService | ||
| { | ||
| private: | ||
| RuleCurves& ruleCurves_; | ||
|
|
||
| public: | ||
| explicit RuleCurvesLoaderService(RuleCurves& ruleCurves): | ||
| ruleCurves_(ruleCurves) | ||
| { | ||
| } | ||
|
|
||
| bool LoadFromFolder(const std::string& areaID, | ||
| const std::filesystem::path& folder, | ||
| Parameters::Compatibility::HydroRuleCurves hydroRuleCurves); | ||
|
|
||
| private: | ||
| std::unique_ptr<RuleCurvesLoader> createRuleCurvesLoader( | ||
| Parameters::Compatibility::HydroRuleCurves hydroRuleCurves, | ||
| const std::filesystem::path& filePath, | ||
| const std::string& areaID); | ||
| }; | ||
| } // namespace Antares::Data | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
planned for 10.1.0