-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Multiple Maximum Generation and Pumping for Hydro (Refactoring) (#1648)
* Power Credits comments and strings changed to Max Power * Changing name convention * Implicit conversion code smell * Files name modification * Renaming matrices from PartHydro and DataTransfer classes * Renaming matrices from DataSeriesHydro class * HydroMaxTSReader class * Refactoring * New LoadMaxPower function * bugfix * Excluding unnecessary data from tests and bugfix * Code smell * Daily mean maximum generation/pumping matrices * Check Power Bounds * Rewrite comment * Name convention * Code smells * Comments and function name changed * Lambda function refactor * Get and Set functions * Small refactoring * Name convention * Ternary operator check index excluded * Clang Format undone * Function argument names * Possible Bug? * Refactoring lambda function * Refactoring Unit tests * Refactoring unit tests * Unit tests * Typo and renaming * Unit test fix and renaming * hydro reader unit tests refactoring * Refactoring unit tests help functions * Excluding saving new files before upgrade * Renameing files * Get function instead of class data member * Refactor hydro max power TS consistency (#1707) * Refactor max power TS checks : several things (see commit message) This commit is large, it should be shorter, but the long compilation time forces to gather the devs in one piece. - Remove the exception raising, not necessary : the gotFatalError (set to true) will trigger an exception anyway. - class NbTsComparer : is generalized to any time series pair : + to isolate it from business context + to have a chance to re-use it in another context - Move both classes NbTsComparer and TsActions outside class DataSeriesHydro, for same reasons as above - Rename TsActions::handleBothGreaterThanOne (unclear) into something more meaningful - Consequences of previous changes in tests * Refactor max power TS checks : several things (see commit message) TsActions::areaToInvalidate : - Remove areaToInvalidate from class TsActions (it has nothing to do in here) and make it a free function - Extract areaToInvalidate calls from TsActions::resizeWhenOneTS, as calling it here not related to TsActions * Refactor max power TS checks : simplify TsActions::resizeWhenOneTS * Refactor max power TS checks : remove a useless argument to free function invalidateArea * Refactor max power TS checks : changing invalidateArea's signature and content In this context, pointer area (as argument) is necessarily not null, because it is used way before we come to this point. So : - We make area a reference - We stop testing the area address (we known it's not null) - We remove the dead code (when area address is null) * Refactor max power TS checks : several things (see commit message) - Move class NumberComparison to separate source files - Remove return type to function postProcessMaxPowerTS : no more boolean returned, but void. Returning boolean is for loading tasks, here we check and possibly change already loaded data. We adapt tests, as a consequence - Removing class TsActions, not useful - * Refactor max power TS checks : add forgotten files + renaming * Refactor max power TS checks : remove case where both TS matrices (pump + gen) have null width, impossible * Refactor max power TS checks : just removing useless comments * Refactor max power TS checks : a bot of cleaning * Refactor max power TS checks : internalize count of generation time series (ror, storage, mingen) We should not be able to change a TS count without resizing the TS. This was allowed when because this count was a public data member. So we make it a private data member, and change it only when resizing the associated data. * Refactor max power TS checks : renaming * Refactor max power TS checks : renaming * Refactor max power TS checks : adapt CI Window workflow to new runner (about python) * Refactor max power TS checks : define and use of function EqualizeTSsize(...) * Refactor max power TS checks : rearrange DataSeriesHydro::loadFromFolder, but no major change * Refactor max power TS checks : remove the case where TS (ror, storage, mingen) have a zero size. Impossible case. * Refactor max power TS checks : fix bugs on function EqualizeTSsize * Refactor max power TS checks : use maxPowerTScount() whenever possible * Refactor max power TS checks : removing the setter for max power TS number * Refactor max power TS checks : fix a bug due to removing the setter for max power TS number * Refactor max power TS checks : gather loading and equalizing hydro mingen TS * Refactor max power TS checks : split load of ROR, STORAGE and MINGEN * Refactor max power TS checks : loading Max Power TS : using a generic loading function * Refactor max power TS checks : fix a bug on loading inflows (height ont correct) * Refactor max power TS checks : correction after (small) merge * Refactor max power TS checks : fixing bug on loading inflows was wrong. Fixing it for real now. * Refactor max power TS checks : remove useless checkMinGenTsNumber * Refactor max power TS checks : cleaning on the very ugly setHydroModulability (too many args, body too big) * Refactor max power TS checks : correct derated mode for hydro * Refactor max power TS checks : some more corrections due to review * Refactor max power TS checks : some more corrections after review * Refactor max power TS checks : fixing errors introduced by earlier corrections * Refactor max power TS checks : more corrections after review * Refactor max power TS checks : more corrections due to tight review :-) * Fixing sonar bug * Code smells * Use init-statement inside the if statement for hydroSeries ptr * More code smells --------- Co-authored-by: NikolaIlic <[email protected]> * Bugfix * Code smells --------- Co-authored-by: guilpier-code <[email protected]>
- Loading branch information
1 parent
00b8592
commit cc82545
Showing
71 changed files
with
1,617 additions
and
1,450 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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 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 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 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 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 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.