-
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
Fix/global var hydro modulable #1614
Fix/global var hydro modulable #1614
Conversation
…tudyRuntimeInfos (#1618)
SonarCloud Quality Gate failed. 3 Bugs 0.0% Coverage Catch issues before they fail your Quality Gate with our IDE extension SonarLint |
void makeVentilation(double* randomReservoirLevel, | ||
Solver::Variable::State& state, | ||
uint y, | ||
uint numSpace); |
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.
void makeVentilation(double* randomReservoirLevel, | |
Solver::Variable::State& state, | |
uint y, | |
uint numSpace); | |
ALL_HYDRO_VENTILATION_RESULTS makeVentilation(double* randomReservoirLevel, | |
Solver::Variable::State& state, | |
uint y, | |
uint numSpace); |
One single method instead of two.
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.
ok. So this means that we could simplify the caller too :
// solver.hxx
yearFailed[y] = !simulation_->year(...,
...,
simulation_->hydroManagement.makeVentilation(/* some args */));
As a consequence, we would skip calls the timer / add duration, unless we put these calls in the HydroManagement :: makeVentilation.
What do you recommend ?
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.
I think we should keep the timer, but have a single function.
// Timer ON
auto hydroVentilation = simulation_->hydroManagement.makeVentilation(/* args */);
// Timer OFF
yearFailed[y] = !simulation_->year(...,
...,
hydroVentilation);
* [skip ci] Remove global vars : a bit of cleaning * Remove global vars : valeursGenereesParPays's allocation moved in a constructor + simplifying runtime * Remove global vars : unnecessary initialization of HydrauliqueModulableQuotidien (already done in simulation) * Remove global vars : remove unnecessary function, as it only calls one other function * Remove global vars : back to previous state, before wrong correction * Remove global vars : a bit of clarification in ALEA_TirageAuSortChroniques * Remove global vars : renaming * Remove global vars : simplifying and clarifying a bit thermal noises * Remove global vars : moving thermal noises to where it belongs + removing the useless AleaCoutDeProductionParPalier * Remove global vars : forgot to update adequacy mode with the new way we add thermal noise * Remove global vars : regression fix * Remove global vars : extract thermal part of weekly problem building, because of adq patch * [skip ci] Remove global vars : just clarifying * Remove global vars : remove call to SIM_RenseignementProblemeHebdo in AdequacyPatchOptimization::solve * Remove global vars : after previous commit removal, simplifications come naturally * Remove global vars : some cleaning * Fix/global var hydro modulable (#1614) * Global vars - try remove HydrauliqueModulableQuotidien : simple renaming * Global vars - try remove HydrauliqueModulableQuotidien : cleaning n class HydroManagement * Global vars : rename and move down struct VALEURS_GENEREES_PAR_PAYS * [skip ci] Global vars : small simplification * remove TS number global var : we don't need timeseriesNumberYear in StudyRuntimeInfos (#1618) * [skip ci] remove TS number global var : correction after review * Update src/libs/antares/study/area/scratchpad.cpp Co-authored-by: abdoulbari zakir <[email protected]> * Apply a-zakir's remark * Remove unused argument from StudyRuntimeInfos's ctor (#1634) --------- Co-authored-by: Florian Omnès <[email protected]> Co-authored-by: abdoulbari zakir <[email protected]>
Before the current pull request, type VAL_GEN_PAR_PAYS contained only data members related to hydro, and even hydro made available by hydro ventilation.
VAL_GEN_PAR_PAYS valeursGenereesParPays
from class ISimulation into class HydroManagement, and renaming itALL_HYDRO_VENTILATION_RESULTS ventilationResults
.