From 219b810793583173bad84e78a4fb78d203db8ddd Mon Sep 17 00:00:00 2001 From: Guillaume PIERRE Date: Thu, 19 Oct 2023 15:05:43 +0200 Subject: [PATCH] Make hydro time series cont a private member --- src/libs/antares/study/parts/hydro/series.cpp | 23 +++---------------- src/libs/antares/study/parts/hydro/series.h | 12 ++++------ 2 files changed, 8 insertions(+), 27 deletions(-) diff --git a/src/libs/antares/study/parts/hydro/series.cpp b/src/libs/antares/study/parts/hydro/series.cpp index 46fb79736c..d3ec73d9ae 100644 --- a/src/libs/antares/study/parts/hydro/series.cpp +++ b/src/libs/antares/study/parts/hydro/series.cpp @@ -55,9 +55,9 @@ DataSeriesHydro::DataSeriesHydro() : void DataSeriesHydro::copyGenerationTS(DataSeriesHydro& source) { - ror = source.ror; - storage = source.storage; - mingen = source.mingen; + ror.timeSeries = source.ror.timeSeries; + storage.timeSeries = source.storage.timeSeries; + mingen.timeSeries = source.mingen.timeSeries; count = source.count; @@ -65,16 +65,6 @@ void DataSeriesHydro::copyGenerationTS(DataSeriesHydro& source) source.storage.unloadFromMemory(); source.mingen.unloadFromMemory(); } -void DataSeriesHydro::copyMaxPowerTS(DataSeriesHydro& source) -{ - maxHourlyGenPower = source.maxHourlyGenPower; - maxHourlyPumpPower = source.maxHourlyPumpPower; - - nbTimeSeriesSup_ = source.nbTimeSeriesSup_; - - source.maxHourlyGenPower.unloadFromMemory(); - source.maxHourlyPumpPower.unloadFromMemory(); -} bool DataSeriesHydro::saveToFolder(const AreaName& areaID, const AnyString& folder) const { @@ -258,13 +248,6 @@ void DataSeriesHydro::resizeGenerationTS(unsigned int w, unsigned int h) count = w; } -void DataSeriesHydro::resizeMaxPowerTS(unsigned int w, unsigned int h) -{ - maxHourlyGenPower.reset(w, h); - maxHourlyPumpPower.reset(w, h); - nbTimeSeriesSup_ = w; -} - uint64_t DataSeriesHydro::memoryUsage() const { return sizeof(double) + ror.memoryUsage() + storage.memoryUsage() + mingen.memoryUsage(); diff --git a/src/libs/antares/study/parts/hydro/series.h b/src/libs/antares/study/parts/hydro/series.h index d8401fafd3..f65ce1d001 100644 --- a/src/libs/antares/study/parts/hydro/series.h +++ b/src/libs/antares/study/parts/hydro/series.h @@ -50,7 +50,6 @@ class DataSeriesHydro //@} void copyGenerationTS(DataSeriesHydro& source); - void copyMaxPowerTS(DataSeriesHydro& source); //! \name Data //@{ @@ -61,7 +60,6 @@ class DataSeriesHydro void resizeRORandSTORAGE(unsigned int width); void resizeGenerationTS(unsigned int w, unsigned int h); - void resizeMaxPowerTS(unsigned int w, unsigned int h); /*! ** \brief Load all data not already loaded @@ -139,6 +137,11 @@ class DataSeriesHydro unsigned int TScount() const { return count; }; + /*! + ** \brief Monte-Carlo + */ + Matrix timeseriesNumbers; + /*! ** \brief The number of time-series ** @@ -150,11 +153,6 @@ class DataSeriesHydro private: uint count = 0; - /*! - ** \brief Monte-Carlo - */ - Matrix timeseriesNumbers; - }; // class DataSeriesHydro } // namespace Data