Skip to content

Commit

Permalink
Small refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
nikolaredstork committed Sep 29, 2023
1 parent 069565f commit dbb2407
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,7 @@ bool HydroMaxTimeSeriesReader::SaveMaxGenerationEnergy(const AnyString& folder,
maxDailyGenEnergy.reset(1, DAYS_PER_YEAR, true);
maxDailyGenEnergy.fillColumn(0, 24.);

for (uint day = 0; day < DAYS_PER_YEAR; ++day)
maxDailyGenEnergy[0][day] = dailyMaxPumpAndGen[genMaxE][day];
maxDailyGenEnergy.pasteToColumn(0, dailyMaxPumpAndGen[genMaxE]);

filePath.clear() << folder << SEP << "common" << SEP << "capacity" << SEP
<< "maxDailyGenEnergy_" << area.id << ".txt";
Expand All @@ -124,8 +123,7 @@ bool HydroMaxTimeSeriesReader::SaveMaxPumpingEnergy(const AnyString& folder, Are
maxDailyPumpEnergy.reset(1, DAYS_PER_YEAR, true);
maxDailyPumpEnergy.fillColumn(0, 24.);

for (uint day = 0; day < DAYS_PER_YEAR; ++day)
maxDailyPumpEnergy[0][day] = dailyMaxPumpAndGen[pumpMaxE][day];
maxDailyPumpEnergy.pasteToColumn(0, dailyMaxPumpAndGen[pumpMaxE]);

filePath.clear() << folder << SEP << "common" << SEP << "capacity" << SEP
<< "maxDailyPumpEnergy_" << area.id << ".txt";
Expand Down
24 changes: 13 additions & 11 deletions src/libs/antares/study/parts/hydro/series.h
Original file line number Diff line number Diff line change
Expand Up @@ -154,17 +154,6 @@ class DataSeriesHydro
*/
uint count;

private:
/*!
** \brief The number of time-series for maxHourlyGenPower and maxHourlyPumpPower matrices
**
** This value must be the same as the width of the matrices `maxHourlyGenPower` and `maxHourlyPumpPower`.
** It is only provided for convenience to avoid same strange and ambiguous code
** (for example using `maxHourlyGenPower.width` and `maxHourlyPumpPower.width` in the same routine, it might
** indicate that the two values are not strictly equal)
*/
uint nbTimeSeriesSup = 0;

public:
/*!
** \brief Monte-Carlo
Expand Down Expand Up @@ -206,6 +195,19 @@ class DataSeriesHydro
*/
void setMaxPowerTSWhenDeratedMode(const Study& study);

private:
/*!
** \brief The number of time-series for maxHourlyGenPower and maxHourlyPumpPower matrices
**
** This value must be the same as the width of the matrices `maxHourlyGenPower` and
*`maxHourlyPumpPower`.
** It is only provided for convenience to avoid same strange and ambiguous code
** (for example using `maxHourlyGenPower.width` and `maxHourlyPumpPower.width` in the same
*routine, it might
** indicate that the two values are not strictly equal)
*/
uint nbTimeSeriesSup = 0;

/**
* This class provides comparing two integers
* that represents width of two corresponding matrices.
Expand Down

0 comments on commit dbb2407

Please sign in to comment.