From 62f6abe51b1e7c357c9204cadea4cb7c921d8484 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20Omn=C3=A8s?= Date: Wed, 27 Sep 2023 11:53:10 +0200 Subject: [PATCH 01/17] Use 50% as a default value for ST-storage property initiallevel (#1632) * Use 0 as a default value for ST-storage property initiallevel * Use 50% for default values, add logs * Document default value --- docs/reference-guide/13-file-format.md | 5 ++++ .../parts/short-term-storage/properties.cpp | 27 ++++++------------- .../parts/short-term-storage/properties.h | 4 ++- .../opt_gestion_des_bornes_cas_lineaire.cpp | 4 +-- .../simulation/sim_calcul_economique.cpp | 1 + .../sim_structure_probleme_economique.h | 3 ++- 6 files changed, 21 insertions(+), 23 deletions(-) diff --git a/docs/reference-guide/13-file-format.md b/docs/reference-guide/13-file-format.md index 116ebfde11..24b4d64abb 100644 --- a/docs/reference-guide/13-file-format.md +++ b/docs/reference-guide/13-file-format.md @@ -1,5 +1,10 @@ # Study format changes This is a list of all recent changes that came with new Antares Simulator features. The main goal of this document is to lower the costs of changing existing interfaces, both GUI and scripts. +## v8.7.1 +### Input +### Short-term storage +If no value is specified for `initiallevel`, then a default value of 50% is used. Note that this value is used only if `initialleveloptim=false`, and that `false` is the default value for `initialleveloptim`. + ## v8.7.0 ### Input #### Scenarized RHS for binding constraints diff --git a/src/libs/antares/study/parts/short-term-storage/properties.cpp b/src/libs/antares/study/parts/short-term-storage/properties.cpp index 1c5e58bee3..058a8b5f3a 100644 --- a/src/libs/antares/study/parts/short-term-storage/properties.cpp +++ b/src/libs/antares/study/parts/short-term-storage/properties.cpp @@ -99,7 +99,7 @@ bool Properties::loadKey(const IniFile::Property* p) return p->value.to(this->name); if (p->key == "initiallevel") - return valueForOptional(this->initialLevel); + return p->value.to(this->initialLevel); if (p->key == "initialleveloptim") return p->value.to(this->initialLevelOptim); @@ -206,29 +206,18 @@ bool Properties::validate() efficiencyFactor = 1; } - // reset initialLevel value to show we're optimising it - if (initialLevelOptim) + if (initialLevel < 0) { - logs.info() << "Optimizing initial level"; - initialLevel.reset(); - } + initialLevel = initiallevelDefault; + logs.warning() << "initiallevel for cluster: " << name << " should be positive, value has been set to " << initialLevel; - if (!initialLevelOptim && !initialLevel.has_value()) - logs.error() << "Initial level not optimized and no value provided, aborting"; + } - if (initialLevel.has_value()) + if (initialLevel > 1) { - if (initialLevel < 0) - { - logs.warning() << "initiallevel for cluster: " << name << " should be positive"; - initialLevel = 0; - } + initialLevel = initiallevelDefault; + logs.warning() << "initiallevel for cluster: " << name << " should be inferior to 1, value has been set to " << initialLevel; - if (initialLevel > 1) - { - logs.warning() << "initiallevel for cluster: " << name << " should be inferior to 1"; - initialLevel = 1; - } } return true; diff --git a/src/libs/antares/study/parts/short-term-storage/properties.h b/src/libs/antares/study/parts/short-term-storage/properties.h index 73c81b0a4e..58e79b1241 100644 --- a/src/libs/antares/study/parts/short-term-storage/properties.h +++ b/src/libs/antares/study/parts/short-term-storage/properties.h @@ -63,7 +63,7 @@ class Properties // Not optional Reservoir capacity in MWh, >= 0 std::optional reservoirCapacity; // Initial level, <= 1 - std::optional initialLevel; + double initialLevel = initiallevelDefault; // Bool to optimise or not initial level bool initialLevelOptim = false; // Efficiency factor between 0 and 1 @@ -74,5 +74,7 @@ class Properties std::string name; static const std::map ST_STORAGE_PROPERTY_GROUP_ENUM; +private: + static constexpr double initiallevelDefault = .5; }; } // namespace Antares::Data::ShortTermStorage diff --git a/src/solver/optimisation/opt_gestion_des_bornes_cas_lineaire.cpp b/src/solver/optimisation/opt_gestion_des_bornes_cas_lineaire.cpp index c26a2fbdca..f0c8eff8fe 100644 --- a/src/solver/optimisation/opt_gestion_des_bornes_cas_lineaire.cpp +++ b/src/solver/optimisation/opt_gestion_des_bornes_cas_lineaire.cpp @@ -190,10 +190,10 @@ static void setBoundsForShortTermStorage(PROBLEME_HEBDO* problemeHebdo, // 3. Levels int varLevel = CorrespondanceVarNativesVarOptim.SIM_ShortTermStorage .LevelVariable[clusterGlobalIndex]; - if (pdtHebdo == DernierPdtDeLIntervalle - 1 && storage.initialLevel.has_value()) + if (pdtHebdo == DernierPdtDeLIntervalle - 1 && !storage.initialLevelOptim) { Xmin[varLevel] = Xmax[varLevel] - = storage.reservoirCapacity * storage.initialLevel.value(); + = storage.reservoirCapacity * storage.initialLevel; } else { diff --git a/src/solver/simulation/sim_calcul_economique.cpp b/src/solver/simulation/sim_calcul_economique.cpp index 75bba4aa43..29c5bb4005 100644 --- a/src/solver/simulation/sim_calcul_economique.cpp +++ b/src/solver/simulation/sim_calcul_economique.cpp @@ -62,6 +62,7 @@ static void importShortTermStorages( toInsert.injectionNominalCapacity = st->properties.injectionNominalCapacity.value(); toInsert.withdrawalNominalCapacity = st->properties.withdrawalNominalCapacity.value(); toInsert.initialLevel = st->properties.initialLevel; + toInsert.initialLevelOptim = st->properties.initialLevelOptim; toInsert.name = st->properties.name; toInsert.series = st->series; diff --git a/src/solver/simulation/sim_structure_probleme_economique.h b/src/solver/simulation/sim_structure_probleme_economique.h index 2721839f00..5a94273a9b 100644 --- a/src/solver/simulation/sim_structure_probleme_economique.h +++ b/src/solver/simulation/sim_structure_probleme_economique.h @@ -173,7 +173,8 @@ struct PROPERTIES double injectionNominalCapacity; double withdrawalNominalCapacity; double efficiency; - std::optional initialLevel; + double initialLevel; + bool initialLevelOptim; std::shared_ptr series; From f23b312bd3be06d29b3ff1ba9363f98bfc602084 Mon Sep 17 00:00:00 2001 From: guilpier-code <62292552+guilpier-code@users.noreply.github.com> Date: Thu, 28 Sep 2023 16:51:26 +0200 Subject: [PATCH 02/17] Add getValue for thermal clusters, remove State::timeSeriesIndex (#1644) * Ramove global NumeroChroniquesTireesParPays : removing from class State * Move DataSeriesMemoryUsage to series.cpp * Move DataSeriesMemoryUsage to class * Use DataSeriesCommon::getValue for thermal * Fix index * Remove some uses of ThermiqueParPalier * [DEV] Add arg year in prepareClustersInMustRunMode * [FIX] Segfault by using getValue() * [DEV] Renamed getValue by getAvailablePower * [DEV] Add getSeriesIndex * [FIX] segfault with getSeriesIndex * [FIX] getseriesindex * [DEV] getMarketBidCost now takes hour and year * [DEV] use correct size, remove numspace from args * [FIX] size * [DEV] private getSeriesIndex * [DEV] remove ThermiqueParPalier * [FIX] post_process --------- Co-authored-by: Florian OMNES Co-authored-by: Vincent Payet --- src/libs/antares/study/CMakeLists.txt | 1 - .../antares/study/parts/common/series.cpp | 16 +++++++ src/libs/antares/study/parts/common/series.h | 17 ++++---- .../antares/study/parts/common/series.hxx | 42 ------------------- .../antares/study/parts/renewable/cluster.cpp | 2 +- .../antares/study/parts/thermal/cluster.cpp | 6 ++- .../antares/study/parts/thermal/cluster.h | 2 +- .../alea_tirage_au_sort_chroniques.cpp | 24 ----------- .../optimisation/post_process_commands.cpp | 14 ++----- src/solver/simulation/adequacy.cpp | 6 +-- src/solver/simulation/adequacy.h | 2 +- src/solver/simulation/common-eco-adq.cpp | 39 ++++++----------- src/solver/simulation/common-eco-adq.h | 6 +-- src/solver/simulation/economy.cpp | 6 +-- src/solver/simulation/economy.h | 2 +- .../simulation/sim_allocation_tableaux.cpp | 2 - src/solver/simulation/sim_structure_donnees.h | 1 - src/solver/simulation/solver.hxx | 2 +- .../economy/avail-dispatchable-generation.h | 22 +++------- .../economy/productionByRenewablePlant.h | 2 +- src/solver/variable/economy/profitByPlant.h | 2 +- .../variable/economy/renewableGeneration.h | 2 +- src/solver/variable/state.cpp | 11 ++--- src/solver/variable/state.h | 2 - src/solver/variable/state.hxx | 1 - 25 files changed, 72 insertions(+), 160 deletions(-) delete mode 100644 src/libs/antares/study/parts/common/series.hxx diff --git a/src/libs/antares/study/CMakeLists.txt b/src/libs/antares/study/CMakeLists.txt index 700b6aff2e..b4db365a29 100644 --- a/src/libs/antares/study/CMakeLists.txt +++ b/src/libs/antares/study/CMakeLists.txt @@ -59,7 +59,6 @@ source_group("study\\area\\ui" FILES ${SRC_STUDY_AREA_UI}) set(SRC_STUDY_PART_COMMON parts/common/series.h - parts/common/series.hxx parts/common/series.cpp parts/common/cluster.cpp parts/common/cluster.h diff --git a/src/libs/antares/study/parts/common/series.cpp b/src/libs/antares/study/parts/common/series.cpp index 1d0022078c..214dd1ea21 100644 --- a/src/libs/antares/study/parts/common/series.cpp +++ b/src/libs/antares/study/parts/common/series.cpp @@ -48,6 +48,22 @@ void DataSeriesCommon::markAsModified() const timeSeries.markAsModified(); } +uint64_t DataSeriesCommon::memoryUsage() const +{ + return timeSeries.memoryUsage(); +} + +double DataSeriesCommon::getAvailablePower(unsigned int hour, unsigned int year) const +{ + return timeSeries[getSeriesIndex(year)][hour]; +} +uint DataSeriesCommon::getSeriesIndex(unsigned int year) const +{ + if (timeSeries.width == 1) + return 0; + else + return timeseriesNumbers[0][year]; +} } // namespace Antares::Data diff --git a/src/libs/antares/study/parts/common/series.h b/src/libs/antares/study/parts/common/series.h index c5ac2d52f4..808fb98e3c 100644 --- a/src/libs/antares/study/parts/common/series.h +++ b/src/libs/antares/study/parts/common/series.h @@ -30,9 +30,7 @@ #include #include "../../fwd.h" -namespace Antares -{ -namespace Data +namespace Antares::Data { /*! ** \brief Data series (Common) @@ -44,7 +42,10 @@ class DataSeriesCommon void markAsModified() const; -public: + uint64_t memoryUsage() const; + + double getAvailablePower(unsigned int hour, unsigned int year) const; + /*! ** \brief Series (MW) ** @@ -56,10 +57,10 @@ class DataSeriesCommon ** \brief Monte-Carlo */ Matrix timeseriesNumbers; -}; // class DataSeriesCommon -} // namespace Data -} // namespace Antares -#include "series.hxx" +private: + uint getSeriesIndex(unsigned int year) const; +}; // class DataSeriesCommon +} // namespace Antares::Data #endif /* __ANTARES_LIBS_STUDY_PARTS_COMMON_TIMESERIES_H__ */ diff --git a/src/libs/antares/study/parts/common/series.hxx b/src/libs/antares/study/parts/common/series.hxx deleted file mode 100644 index b589e56532..0000000000 --- a/src/libs/antares/study/parts/common/series.hxx +++ /dev/null @@ -1,42 +0,0 @@ -/* -** Copyright 2007-2023 RTE -** Authors: Antares_Simulator Team -** -** This file is part of Antares_Simulator. -** -** Antares_Simulator is free software: you can redistribute it and/or modify -** it under the terms of the GNU General Public License as published by -** the Free Software Foundation, either version 3 of the License, or -** (at your option) any later version. -** -** There are special exceptions to the terms and conditions of the -** license as they are applied to this software. View the full text of -** the exceptions in file COPYING.txt in the directory of this software -** distribution -** -** 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 -** GNU General Public License for more details. -** -** You should have received a copy of the GNU General Public License -** along with Antares_Simulator. If not, see . -** -** SPDX-License-Identifier: licenceRef-GPL3_WITH_RTE-Exceptions -*/ -#ifndef __ANTARES_LIBS_STUDY_PARTS_COMMON_TIMESERIES_HXX__ -#define __ANTARES_LIBS_STUDY_PARTS_COMMON_TIMESERIES_HXX__ - -namespace Antares -{ -namespace Data -{ -inline uint64_t DataSeriesMemoryUsage(DataSeriesCommon* t) -{ - return (t) ? t->timeSeries.memoryUsage() : 0; -} - -} // namespace Data -} // namespace Antares - -#endif // __ANTARES_LIBS_STUDY_PARTS_COMMON_TIMESERIES_HXX__ diff --git a/src/libs/antares/study/parts/renewable/cluster.cpp b/src/libs/antares/study/parts/renewable/cluster.cpp index 2a1f12b276..6dbfbdff48 100644 --- a/src/libs/antares/study/parts/renewable/cluster.cpp +++ b/src/libs/antares/study/parts/renewable/cluster.cpp @@ -222,7 +222,7 @@ uint64_t RenewableCluster::memoryUsage() const { uint64_t amount = sizeof(RenewableCluster); if (series) - amount += DataSeriesMemoryUsage(series); + amount += series->memoryUsage(); return amount; } diff --git a/src/libs/antares/study/parts/thermal/cluster.cpp b/src/libs/antares/study/parts/thermal/cluster.cpp index fb261e8bc7..a6c8c49d6d 100644 --- a/src/libs/antares/study/parts/thermal/cluster.cpp +++ b/src/libs/antares/study/parts/thermal/cluster.cpp @@ -648,7 +648,7 @@ uint64_t ThermalCluster::memoryUsage() const if (prepro) amount += prepro->memoryUsage(); if (series) - amount += DataSeriesMemoryUsage(series); + amount += series->memoryUsage(); amount += ecoInput.memoryUsage(); return amount; } @@ -770,8 +770,10 @@ double ThermalCluster::getMarginalCost(uint serieIndex, uint hourInTheYear) cons inside -> that is used for all (e.g.10) TS*/ } -double ThermalCluster::getMarketBidCost(uint serieIndex, uint hourInTheYear) const +double ThermalCluster::getMarketBidCost(uint hourInTheYear, uint year) const { + uint serieIndex = (series->timeSeries.width == 1) ? 0 : series->timeseriesNumbers[0][year]; + double mod = modulation[thermalModulationMarketBid][serieIndex]; if (costgeneration == Data::setManually) diff --git a/src/libs/antares/study/parts/thermal/cluster.h b/src/libs/antares/study/parts/thermal/cluster.h index 14120c906b..a75ce10a00 100644 --- a/src/libs/antares/study/parts/thermal/cluster.h +++ b/src/libs/antares/study/parts/thermal/cluster.h @@ -224,7 +224,7 @@ class ThermalCluster final : public Cluster, public std::enable_shared_from_this double getOperatingCost(uint tsIndex, uint hourInTheYear) const; double getMarginalCost(uint tsIndex, uint hourInTheYear) const; - double getMarketBidCost(uint tsIndex, uint hourInTheYear) const; + double getMarketBidCost(uint hourInTheYear, uint year) const; // Check & correct availability timeseries for thermal availability // Only applies if time-series are ready-made diff --git a/src/solver/aleatoire/alea_tirage_au_sort_chroniques.cpp b/src/solver/aleatoire/alea_tirage_au_sort_chroniques.cpp index b39a83fd76..a1c3c6a87e 100644 --- a/src/solver/aleatoire/alea_tirage_au_sort_chroniques.cpp +++ b/src/solver/aleatoire/alea_tirage_au_sort_chroniques.cpp @@ -93,30 +93,6 @@ void ApplyRandomTSnumbers(const Study& study, : 0; // zero-based } } - - // Thermal - { - auto end = area.thermal.list.mapping.end(); - for (auto it = area.thermal.list.mapping.begin(); it != end; ++it) - { - ThermalClusterList::SharedPtr cluster = it->second; - - if (!cluster->enabled) - { - continue; - } - - const auto& data = *cluster->series; - assert(year < data.timeseriesNumbers.height); - unsigned int clusterIndex = cluster->areaWideIndex; - - // the matrix data.series should be properly initialized at this stage - // because the ts-generator has already been launched - ptchro.ThermiqueParPalier[clusterIndex] = (data.timeSeries.width != 1) - ? (long)data.timeseriesNumbers[0][year] - : 0; // zero-based - } - } // thermal } // each area // ------------------------------ diff --git a/src/solver/optimisation/post_process_commands.cpp b/src/solver/optimisation/post_process_commands.cpp index 27c571288d..ecdc94b6ff 100644 --- a/src/solver/optimisation/post_process_commands.cpp +++ b/src/solver/optimisation/post_process_commands.cpp @@ -21,7 +21,7 @@ DispatchableMarginPostProcessCmd::DispatchableMarginPostProcessCmd(PROBLEME_HEBD void DispatchableMarginPostProcessCmd::execute(const optRuntimeData& opt_runtime_data) { unsigned int hourInYear = opt_runtime_data.hourInTheYear; - + unsigned int year = opt_runtime_data.year; area_list_.each([&](Data::Area& area) { double* dtgmrg = area.scratchpad[thread_number_].dispatchableGenerationMargin; for (uint h = 0; h != nbHoursInWeek; ++h) @@ -30,23 +30,17 @@ void DispatchableMarginPostProcessCmd::execute(const optRuntimeData& opt_runtime if (not area.thermal.list.empty()) { auto& hourlyResults = problemeHebdo_->ResultatsHoraires[area.index]; - auto end = area.thermal.list.end(); + auto end = area.thermal.list.end(); for (auto i = area.thermal.list.begin(); i != end; ++i) { auto& cluster = *(i->second); - uint chro = NumeroChroniquesTireesParPays[thread_number_][area.index] - .ThermiqueParPalier[cluster.areaWideIndex]; - auto& matrix = cluster.series->timeSeries; - assert(chro < matrix.width); - auto& column = matrix.entry[chro]; - assert(hourInYear + nbHoursInWeek <= matrix.height && "index out of bounds"); - for (uint h = 0; h != nbHoursInWeek; ++h) { double production = hourlyResults.ProductionThermique[h] .ProductionThermiqueDuPalier[cluster.index]; - dtgmrg[h] += column[h + hourInYear] - production; + double availability = cluster.series->getAvailablePower(h + hourInYear, year); + dtgmrg[h] += availability - production; } } } diff --git a/src/solver/simulation/adequacy.cpp b/src/solver/simulation/adequacy.cpp index bb2c6b9536..73e11c3ffa 100644 --- a/src/solver/simulation/adequacy.cpp +++ b/src/solver/simulation/adequacy.cpp @@ -152,7 +152,7 @@ bool Adequacy::year(Progression::Task& progression, numSpace, hourInTheYear, hydroVentilationResults); BuildThermalPartOfWeeklyProblem(study, pProblemesHebdo[numSpace], - numSpace, hourInTheYear, randomForYear.pThermalNoisesByArea); + hourInTheYear, randomForYear.pThermalNoisesByArea, state.year); // Reinit optimisation if needed pProblemesHebdo[numSpace].ReinitOptimisation = reinitOptim; @@ -386,9 +386,9 @@ void Adequacy::simulationEnd() } } -void Adequacy::prepareClustersInMustRunMode(uint numSpace) +void Adequacy::prepareClustersInMustRunMode(uint numSpace, uint year) { - PrepareDataFromClustersInMustrunMode(study, numSpace); + PrepareDataFromClustersInMustrunMode(study, numSpace, year); } } // namespace Antares::Solver::Simulation diff --git a/src/solver/simulation/adequacy.h b/src/solver/simulation/adequacy.h index 34c393393e..8832670f1a 100644 --- a/src/solver/simulation/adequacy.h +++ b/src/solver/simulation/adequacy.h @@ -92,7 +92,7 @@ class Adequacy /*! ** \brief Prepare clusters in 'must-run' mode */ - void prepareClustersInMustRunMode(uint numSpace); + void prepareClustersInMustRunMode(uint numSpace, uint year); void initializeState(Variable::State& state, uint numSpace); diff --git a/src/solver/simulation/common-eco-adq.cpp b/src/solver/simulation/common-eco-adq.cpp index 76b5d2545f..588cb748d2 100644 --- a/src/solver/simulation/common-eco-adq.cpp +++ b/src/solver/simulation/common-eco-adq.cpp @@ -117,7 +117,7 @@ static void RecalculDesEchangesMoyens(Data::Study& study, } } -void PrepareDataFromClustersInMustrunMode(Data::Study& study, uint numSpace) +void PrepareDataFromClustersInMustrunMode(Data::Study& study, uint numSpace, uint year) { bool inAdequacy = (study.parameters.mode == Data::stdmAdequacy); @@ -130,7 +130,6 @@ void PrepareDataFromClustersInMustrunMode(Data::Study& study, uint numSpace) if (inAdequacy) memset(scratchpad.originalMustrunSum, 0, sizeof(double) * HOURS_PER_YEAR); - auto& PtChro = NumeroChroniquesTireesParPays[numSpace][i]; double* mrs = scratchpad.mustrunSum; double* adq = scratchpad.originalMustrunSum; @@ -140,25 +139,19 @@ void PrepareDataFromClustersInMustrunMode(Data::Study& study, uint numSpace) for (auto i = area.thermal.mustrunList.begin(); i != end; ++i) { auto& cluster = *(i->second); - auto& series = cluster.series->timeSeries; - uint tsIndex = static_cast(PtChro.ThermiqueParPalier[cluster.areaWideIndex]); - if (tsIndex >= series.width) - tsIndex = 0; - - auto& column = series[tsIndex]; if (inAdequacy && cluster.mustrunOrigin) { - for (uint h = 0; h != series.height; ++h) + for (uint h = 0; h != cluster.series->timeSeries.height; ++h) { - mrs[h] += column[h]; - adq[h] += column[h]; + mrs[h] += cluster.series->getAvailablePower(h, year); + adq[h] += cluster.series->getAvailablePower(h, year); } } else { - for (uint h = 0; h != series.height; ++h) - mrs[h] += column[h]; + for (uint h = 0; h != cluster.series->timeSeries.height; ++h) + mrs[h] += cluster.series->getAvailablePower(h, year); } } } @@ -172,14 +165,8 @@ void PrepareDataFromClustersInMustrunMode(Data::Study& study, uint numSpace) if (!cluster.mustrunOrigin) continue; - auto& series = cluster.series->timeSeries; - uint tsIndex = static_cast(PtChro.ThermiqueParPalier[cluster.areaWideIndex]); - if (tsIndex >= series.width) - tsIndex = 0; - - auto& column = series[tsIndex]; - for (uint h = 0; h != series.height; ++h) - adq[h] += column[h]; + for (uint h = 0; h != cluster.series->timeSeries.height; ++h) + adq[h] += cluster.series->getAvailablePower(h, year); } } } @@ -385,9 +372,9 @@ void PrepareRandomNumbers(Data::Study& study, void BuildThermalPartOfWeeklyProblem(Data::Study& study, PROBLEME_HEBDO& problem, - uint numSpace, const int PasDeTempsDebut, - double** thermalNoises) + double** thermalNoises, + unsigned int year) { int hourInYear = PasDeTempsDebut; const uint nbPays = study.areas.size(); @@ -396,19 +383,17 @@ void BuildThermalPartOfWeeklyProblem(Data::Study& study, for (uint areaIdx = 0; areaIdx < nbPays; ++areaIdx) { auto& area = *study.areas.byIndex[areaIdx]; - auto& tsIndex = NumeroChroniquesTireesParPays[numSpace][areaIdx]; area.thermal.list.each([&](const Data::ThermalCluster& cluster) { auto& Pt = problem.PaliersThermiquesDuPays[areaIdx] .PuissanceDisponibleEtCout[cluster.index]; Pt.CoutHoraireDeProductionDuPalierThermique[hourInWeek] = - cluster.getMarketBidCost(tsIndex.ThermiqueParPalier[cluster.areaWideIndex], hourInYear) + cluster.getMarketBidCost(hourInYear, year) + thermalNoises[areaIdx][cluster.areaWideIndex]; Pt.PuissanceDisponibleDuPalierThermique[hourInWeek] - = cluster.series - ->timeSeries[tsIndex.ThermiqueParPalier[cluster.areaWideIndex]][hourInYear]; + = cluster.series->getAvailablePower(hourInYear, year); Pt.PuissanceMinDuPalierThermique[hourInWeek] = (Pt.PuissanceDisponibleDuPalierThermique[hourInWeek] < cluster.PthetaInf[hourInYear]) diff --git a/src/solver/simulation/common-eco-adq.h b/src/solver/simulation/common-eco-adq.h index 91b4a0b175..3d1f47c3b0 100644 --- a/src/solver/simulation/common-eco-adq.h +++ b/src/solver/simulation/common-eco-adq.h @@ -64,14 +64,14 @@ void PrepareRandomNumbers(Data::Study& study, void BuildThermalPartOfWeeklyProblem(Data::Study& study, PROBLEME_HEBDO& problem, - uint numSpace, const int PasDeTempsDebut, - double** thermalNoises); + double** thermalNoises, + unsigned int year); /*! ** \brief Prepare data from clusters in mustrun mode (eco+adq) */ -void PrepareDataFromClustersInMustrunMode(Data::Study& study, uint numSpace); +void PrepareDataFromClustersInMustrunMode(Data::Study& study, uint numSpace, uint year); /*! ** \brief Get if the quadratic optimization should be used according diff --git a/src/solver/simulation/economy.cpp b/src/solver/simulation/economy.cpp index 2f530b2f70..5caaf948fe 100644 --- a/src/solver/simulation/economy.cpp +++ b/src/solver/simulation/economy.cpp @@ -147,7 +147,7 @@ bool Economy::year(Progression::Task& progression, numSpace, hourInTheYear, hydroVentilationResults); BuildThermalPartOfWeeklyProblem(study, pProblemesHebdo[numSpace], - numSpace, hourInTheYear, randomForYear.pThermalNoisesByArea); + hourInTheYear, randomForYear.pThermalNoisesByArea, state.year); // Reinit optimisation if needed pProblemesHebdo[numSpace].ReinitOptimisation = reinitOptim; @@ -264,9 +264,9 @@ void Economy::simulationEnd() } } -void Economy::prepareClustersInMustRunMode(uint numSpace) +void Economy::prepareClustersInMustRunMode(uint numSpace, uint year) { - PrepareDataFromClustersInMustrunMode(study, numSpace); + PrepareDataFromClustersInMustrunMode(study, numSpace, year); } } // namespace Antares::Solver::Simulation diff --git a/src/solver/simulation/economy.h b/src/solver/simulation/economy.h index f9446a51a4..7eb8c174f5 100644 --- a/src/solver/simulation/economy.h +++ b/src/solver/simulation/economy.h @@ -93,7 +93,7 @@ class Economy /*! ** \brief Prepare clusters in 'must-run' mode */ - void prepareClustersInMustRunMode(uint numSpace); + void prepareClustersInMustRunMode(uint numSpace, uint year); void initializeState(Variable::State& state, uint numSpace); diff --git a/src/solver/simulation/sim_allocation_tableaux.cpp b/src/solver/simulation/sim_allocation_tableaux.cpp index ae4734862d..95003fc8f5 100644 --- a/src/solver/simulation/sim_allocation_tableaux.cpp +++ b/src/solver/simulation/sim_allocation_tableaux.cpp @@ -53,8 +53,6 @@ void SIM_AllocationTableaux(const Data::Study& study) { auto& area = *study.areas.byIndex[i]; - NumeroChroniquesTireesParPays[numSpace][i].ThermiqueParPalier - .assign(area.thermal.clusterCount(), 0); NumeroChroniquesTireesParPays[numSpace][i].RenouvelableParPalier .assign(area.renewable.clusterCount(), 0); } diff --git a/src/solver/simulation/sim_structure_donnees.h b/src/solver/simulation/sim_structure_donnees.h index 5356732f63..cdcdc9f0b1 100644 --- a/src/solver/simulation/sim_structure_donnees.h +++ b/src/solver/simulation/sim_structure_donnees.h @@ -31,7 +31,6 @@ typedef struct { - std::vector ThermiqueParPalier; std::vector RenouvelableParPalier; int Hydraulique; int Eolien; diff --git a/src/solver/simulation/solver.hxx b/src/solver/simulation/solver.hxx index 3e574aac15..177a2147fa 100644 --- a/src/solver/simulation/solver.hxx +++ b/src/solver/simulation/solver.hxx @@ -157,7 +157,7 @@ private: ApplyRandomTSnumbers(study, y, numSpace); // 3 - Preparing data related to Clusters in 'must-run' mode - simulation_->prepareClustersInMustRunMode(numSpace); + simulation_->prepareClustersInMustRunMode(numSpace, y); // 4 - Hydraulic ventilation { diff --git a/src/solver/variable/economy/avail-dispatchable-generation.h b/src/solver/variable/economy/avail-dispatchable-generation.h index 82c9ce5b86..8e118a77b8 100644 --- a/src/solver/variable/economy/avail-dispatchable-generation.h +++ b/src/solver/variable/economy/avail-dispatchable-generation.h @@ -192,22 +192,12 @@ class AvailableDispatchGen NextType::simulationEnd(); } - void addThermalClusterList(Data::ThermalClusterList& list, unsigned int numSpace) + void addThermalClusterList(Data::ThermalClusterList& list, unsigned int year, unsigned int numSpace) { - typedef Matrix MatrixType; - - const Data::ThermalClusterList::const_iterator end = list.end(); - for (Data::ThermalClusterList::const_iterator i = list.begin(); i != end; ++i) + for (auto& [name, cluster] : list) { - Data::ThermalCluster& cluster = *(i->second); - unsigned int chro = NumeroChroniquesTireesParPays[numSpace][pArea->index] - .ThermiqueParPalier[cluster.areaWideIndex]; - const MatrixType& matrix = cluster.series->timeSeries; - assert(chro < matrix.width); - const MatrixType::ColumnType& column = matrix.entry[chro]; - - for (unsigned int y = 0; y != matrix.height; ++y) - pValuesForTheCurrentYear[numSpace].hour[y] += column[y]; + for (unsigned int hour = 0; hour != cluster->series->timeSeries.height; ++hour) + pValuesForTheCurrentYear[numSpace].hour[hour] += cluster->series->getAvailablePower(hour, year); } } @@ -216,8 +206,8 @@ class AvailableDispatchGen // Somme de toutes les productions disponibles pour l'ensemble des // paliers thermiques (+must-run) pValuesForTheCurrentYear[numSpace].reset(); - addThermalClusterList(pArea->thermal.list, numSpace); - addThermalClusterList(pArea->thermal.mustrunList, numSpace); + addThermalClusterList(pArea->thermal.list, year, numSpace); + addThermalClusterList(pArea->thermal.mustrunList, year, numSpace); // Next variable NextType::yearBegin(year, numSpace); diff --git a/src/solver/variable/economy/productionByRenewablePlant.h b/src/solver/variable/economy/productionByRenewablePlant.h index 84589ea1f2..b2ce04306e 100644 --- a/src/solver/variable/economy/productionByRenewablePlant.h +++ b/src/solver/variable/economy/productionByRenewablePlant.h @@ -280,7 +280,7 @@ class ProductionByRenewablePlant : public Variable::IVariablerenewable.clusterCount(); ++clusterIndex) { const auto* renewableCluster = state.area->renewable.clusters[clusterIndex]; - uint serieIndex = state.timeseriesIndex->RenouvelableParPalier[clusterIndex]; + uint serieIndex = renewableCluster->series->timeseriesNumbers[0][state.year]; double renewableClusterProduction = renewableCluster->valueAtTimeStep(serieIndex, state.hourInTheYear); pValuesForTheCurrentYear[numSpace][renewableCluster->areaWideIndex].hour[state.hourInTheYear] diff --git a/src/solver/variable/economy/profitByPlant.h b/src/solver/variable/economy/profitByPlant.h index 2a8f79cde0..3438b8b387 100644 --- a/src/solver/variable/economy/profitByPlant.h +++ b/src/solver/variable/economy/profitByPlant.h @@ -277,7 +277,7 @@ class ProfitByPlant : public Variable::IVariable, NextT, VC auto* cluster = state.area->thermal.clusters[clusterIndex]; double hourlyClusterProduction = thermal[area->index].thermalClustersProductions[clusterIndex]; - uint tsIndex = state.timeseriesIndex->ThermiqueParPalier[cluster->areaWideIndex]; + uint tsIndex = cluster->series->timeseriesNumbers[0][state.year]; // Thermal cluster profit pValuesForTheCurrentYear[numSpace][cluster->areaWideIndex].hour[hourInTheYear] = (hourlyClusterProduction - cluster->PthetaInf[hourInTheYear]) diff --git a/src/solver/variable/economy/renewableGeneration.h b/src/solver/variable/economy/renewableGeneration.h index 30f5d1f959..a75421e365 100644 --- a/src/solver/variable/economy/renewableGeneration.h +++ b/src/solver/variable/economy/renewableGeneration.h @@ -271,7 +271,7 @@ class RenewableGeneration ++clusterIndex) { const auto* renewableCluster = state.area->renewable.clusters[clusterIndex]; - uint serieIndex = state.timeseriesIndex->RenouvelableParPalier[clusterIndex]; + uint serieIndex = renewableCluster->series->timeseriesNumbers[0][state.year]; double renewableClusterProduction = renewableCluster->valueAtTimeStep(serieIndex, state.hourInTheYear); diff --git a/src/solver/variable/state.cpp b/src/solver/variable/state.cpp index ba85ab103d..dab81cdd20 100644 --- a/src/solver/variable/state.cpp +++ b/src/solver/variable/state.cpp @@ -84,9 +84,8 @@ void State::initFromThermalClusterIndex(const uint clusterAreaWideIndex) // alias to the current thermal cluster thermalCluster = area->thermal.clusters[clusterAreaWideIndex]; - uint serieIndex = timeseriesIndex->ThermiqueParPalier[clusterAreaWideIndex]; double thermalClusterAvailableProduction - = thermalCluster->series->timeSeries[serieIndex][hourInTheYear]; + = thermalCluster->series->getAvailablePower(hourInTheYear, this->year); // Minimum power of a group of the cluster for the current hour in the year double thermalClusterPMinOfAGroup = 0.; @@ -97,7 +96,6 @@ void State::initFromThermalClusterIndex(const uint clusterAreaWideIndex) // directly comes from the time-series // it doen't exist from the solver perspective assert(thermalCluster->series); - assert(timeseriesIndex != NULL); assert(hourInTheYear < thermalCluster->series->timeSeries.height); thermal[area->index].thermalClustersProductions[clusterAreaWideIndex] @@ -157,7 +155,7 @@ void State::initFromThermalClusterIndex(const uint clusterAreaWideIndex) void State::initFromThermalClusterIndexProduction(const uint clusterAreaWideIndex) { - uint serieIndex = timeseriesIndex->ThermiqueParPalier[clusterAreaWideIndex]; + uint serieIndex = thermalCluster->series->timeseriesNumbers[0][this->year]; if (thermal[area->index].thermalClustersProductions[clusterAreaWideIndex] > 0.) { @@ -242,13 +240,11 @@ void State::yearEndBuildFromThermalClusterIndex(const uint clusterAreaWideIndex) // Get cluster properties Data::ThermalCluster* currentCluster = area->thermal.clusters[clusterAreaWideIndex]; - uint serieIndex = timeseriesIndex->ThermiqueParPalier[clusterAreaWideIndex]; assert(endHourForCurrentYear <= Variable::maxHoursInAYear); assert(endHourForCurrentYear <= currentCluster->series->timeSeries.height); assert(currentCluster); assert(currentCluster->series); - assert(timeseriesIndex != NULL); if (currentCluster->fixedCost > 0.) { @@ -268,7 +264,7 @@ void State::yearEndBuildFromThermalClusterIndex(const uint clusterAreaWideIndex) ON_max[h] = 0u; // Getting available production from cluster data - double thermalClusterAvailableProduction = currentCluster->series->timeSeries[serieIndex][h]; + double thermalClusterAvailableProduction = currentCluster->series->getAvailablePower(h, this->year); double thermalClusterProduction = 0.; if (currentCluster->mustrun) { @@ -287,6 +283,7 @@ void State::yearEndBuildFromThermalClusterIndex(const uint clusterAreaWideIndex) if (thermalClusterProduction <= 0.) continue; + uint serieIndex = currentCluster->series->timeseriesNumbers[0][this->year]; thermalClusterOperatingCostForYear[h] = thermalClusterProduction * currentCluster->getOperatingCost(serieIndex, h); diff --git a/src/solver/variable/state.h b/src/solver/variable/state.h index 1a66522607..7969a41906 100644 --- a/src/solver/variable/state.h +++ b/src/solver/variable/state.h @@ -206,8 +206,6 @@ class State //! Probleme Hebdo PROBLEME_HEBDO* problemeHebdo; - //! The timeseries indexes for the current area - NUMERO_CHRONIQUES_TIREES_PAR_PAYS* timeseriesIndex; //! Study mode: economy / adequacy Data::StudyMode studyMode; //! Study unit commitment mode: fast(ucHeuristic) / accurate(ucMILP) diff --git a/src/solver/variable/state.hxx b/src/solver/variable/state.hxx index 69645d0af5..dca9b0a9b5 100644 --- a/src/solver/variable/state.hxx +++ b/src/solver/variable/state.hxx @@ -73,7 +73,6 @@ inline void State::initFromAreaIndex(const unsigned int areaIndex, uint numSpace area = study.areas[areaIndex]; scratchpad = &area->scratchpad[numSpace]; thermalCluster = nullptr; - timeseriesIndex = &NumeroChroniquesTireesParPays[numSpace][areaIndex]; switch (studyMode) { From 1fa52a88e807457c1f8893fcb931108db294e3bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20Omn=C3=A8s?= Date: Fri, 29 Sep 2023 10:47:33 +0200 Subject: [PATCH 03/17] Introduce & use DataSeriesCommon::getAvailablePowerYearly (#1660) --- src/libs/antares/study/parts/common/series.cpp | 6 ++++++ src/libs/antares/study/parts/common/series.h | 6 +++++- src/solver/optimisation/post_process_commands.cpp | 4 ++-- src/solver/simulation/common-eco-adq.cpp | 11 ++++++----- src/solver/ts-generator/thermal.cpp | 6 +++--- .../variable/economy/avail-dispatchable-generation.h | 3 ++- src/solver/variable/state.cpp | 3 ++- 7 files changed, 26 insertions(+), 13 deletions(-) diff --git a/src/libs/antares/study/parts/common/series.cpp b/src/libs/antares/study/parts/common/series.cpp index 214dd1ea21..cfbf5e372a 100644 --- a/src/libs/antares/study/parts/common/series.cpp +++ b/src/libs/antares/study/parts/common/series.cpp @@ -57,6 +57,12 @@ double DataSeriesCommon::getAvailablePower(unsigned int hour, unsigned int year) { return timeSeries[getSeriesIndex(year)][hour]; } + +const DataSeriesCommon::SingleYear& DataSeriesCommon::getAvailablePowerYearly(unsigned int year) const +{ + return timeSeries[getSeriesIndex(year)]; +} + uint DataSeriesCommon::getSeriesIndex(unsigned int year) const { if (timeSeries.width == 1) diff --git a/src/libs/antares/study/parts/common/series.h b/src/libs/antares/study/parts/common/series.h index 808fb98e3c..1be27e94cb 100644 --- a/src/libs/antares/study/parts/common/series.h +++ b/src/libs/antares/study/parts/common/series.h @@ -38,6 +38,9 @@ namespace Antares::Data class DataSeriesCommon { public: + using AllYears = Matrix; + using SingleYear = AllYears::ColumnType; + bool forceReload(bool reload = false) const; void markAsModified() const; @@ -45,13 +48,14 @@ class DataSeriesCommon uint64_t memoryUsage() const; double getAvailablePower(unsigned int hour, unsigned int year) const; + const SingleYear& getAvailablePowerYearly(unsigned int year) const; /*! ** \brief Series (MW) ** ** Merely a matrix of TimeSeriesCount * 8760 values */ - Matrix timeSeries; + AllYears timeSeries; /*! ** \brief Monte-Carlo diff --git a/src/solver/optimisation/post_process_commands.cpp b/src/solver/optimisation/post_process_commands.cpp index ecdc94b6ff..a1206fe740 100644 --- a/src/solver/optimisation/post_process_commands.cpp +++ b/src/solver/optimisation/post_process_commands.cpp @@ -35,12 +35,12 @@ void DispatchableMarginPostProcessCmd::execute(const optRuntimeData& opt_runtime for (auto i = area.thermal.list.begin(); i != end; ++i) { auto& cluster = *(i->second); + const auto& availableProduction = cluster.series->getAvailablePowerYearly(year); for (uint h = 0; h != nbHoursInWeek; ++h) { double production = hourlyResults.ProductionThermique[h] .ProductionThermiqueDuPalier[cluster.index]; - double availability = cluster.series->getAvailablePower(h + hourInYear, year); - dtgmrg[h] += availability - production; + dtgmrg[h] += availableProduction[h + hourInYear] - production; } } } diff --git a/src/solver/simulation/common-eco-adq.cpp b/src/solver/simulation/common-eco-adq.cpp index 588cb748d2..a3f2099ce9 100644 --- a/src/solver/simulation/common-eco-adq.cpp +++ b/src/solver/simulation/common-eco-adq.cpp @@ -139,19 +139,19 @@ void PrepareDataFromClustersInMustrunMode(Data::Study& study, uint numSpace, uin for (auto i = area.thermal.mustrunList.begin(); i != end; ++i) { auto& cluster = *(i->second); - + const auto& availableProduction = cluster.series->getAvailablePowerYearly(year); if (inAdequacy && cluster.mustrunOrigin) { for (uint h = 0; h != cluster.series->timeSeries.height; ++h) { - mrs[h] += cluster.series->getAvailablePower(h, year); - adq[h] += cluster.series->getAvailablePower(h, year); + mrs[h] += availableProduction[h]; + adq[h] += availableProduction[h]; } } else { for (uint h = 0; h != cluster.series->timeSeries.height; ++h) - mrs[h] += cluster.series->getAvailablePower(h, year); + mrs[h] += availableProduction[h]; } } } @@ -165,8 +165,9 @@ void PrepareDataFromClustersInMustrunMode(Data::Study& study, uint numSpace, uin if (!cluster.mustrunOrigin) continue; + const auto& availableProduction = cluster.series->getAvailablePowerYearly(year); for (uint h = 0; h != cluster.series->timeSeries.height; ++h) - adq[h] += cluster.series->getAvailablePower(h, year); + adq[h] += availableProduction[h]; } } } diff --git a/src/solver/ts-generator/thermal.cpp b/src/solver/ts-generator/thermal.cpp index d7e49b0ac1..9196cfe489 100644 --- a/src/solver/ts-generator/thermal.cpp +++ b/src/solver/ts-generator/thermal.cpp @@ -356,7 +356,7 @@ void GeneratorTempData::operator()(Data::Area& area, Data::ThermalCluster& clust auto& modulation = cluster.modulation[Data::thermalModulationCapacity]; - Matrix<>::ColumnType* dstSeries = nullptr; + Antares::Data::DataSeriesCommon::SingleYear dstSeries = nullptr; const uint tsCount = nbThermalTimeseries + 2; for (uint tsIndex = 0; tsIndex != tsCount; ++tsIndex) @@ -364,7 +364,7 @@ void GeneratorTempData::operator()(Data::Area& area, Data::ThermalCluster& clust uint hour = 0; if (tsIndex > 1) - dstSeries = &cluster.series->timeSeries[tsIndex - 2]; + dstSeries = cluster.series->timeSeries[tsIndex - 2]; for (uint dayInTheYear = 0; dayInTheYear < daysPerYear; ++dayInTheYear) { @@ -596,7 +596,7 @@ void GeneratorTempData::operator()(Data::Area& area, Data::ThermalCluster& clust double AVPDayInTheYear = AVP[dayInTheYear]; for (uint h = 0; h != 24; ++h) { - (*dstSeries)[hour] = Math::Round(AVPDayInTheYear * modulation[hour]); + dstSeries[hour] = Math::Round(AVPDayInTheYear * modulation[hour]); ++hour; } } diff --git a/src/solver/variable/economy/avail-dispatchable-generation.h b/src/solver/variable/economy/avail-dispatchable-generation.h index 8e118a77b8..2df9c4fb60 100644 --- a/src/solver/variable/economy/avail-dispatchable-generation.h +++ b/src/solver/variable/economy/avail-dispatchable-generation.h @@ -196,8 +196,9 @@ class AvailableDispatchGen { for (auto& [name, cluster] : list) { + const auto& availableProduction = cluster->series->getAvailablePowerYearly(year); for (unsigned int hour = 0; hour != cluster->series->timeSeries.height; ++hour) - pValuesForTheCurrentYear[numSpace].hour[hour] += cluster->series->getAvailablePower(hour, year); + pValuesForTheCurrentYear[numSpace].hour[hour] += availableProduction[hour]; } } diff --git a/src/solver/variable/state.cpp b/src/solver/variable/state.cpp index dab81cdd20..726cb1b478 100644 --- a/src/solver/variable/state.cpp +++ b/src/solver/variable/state.cpp @@ -257,6 +257,7 @@ void State::yearEndBuildFromThermalClusterIndex(const uint clusterAreaWideIndex) maxDurationON = endHourForCurrentYear; // min, and max unit ON calculation + const auto& availableProduction = currentCluster->series->getAvailablePowerYearly(this->year); for (uint h = startHourForCurrentYear; h < endHourForCurrentYear; ++h) { maxUnitNeeded = 0u; @@ -264,7 +265,7 @@ void State::yearEndBuildFromThermalClusterIndex(const uint clusterAreaWideIndex) ON_max[h] = 0u; // Getting available production from cluster data - double thermalClusterAvailableProduction = currentCluster->series->getAvailablePower(h, this->year); + double thermalClusterAvailableProduction = availableProduction[h]; double thermalClusterProduction = 0.; if (currentCluster->mustrun) { From 81132124db213d2b7f418248b629e6520a92de48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20Omn=C3=A8s?= Date: Mon, 2 Oct 2023 16:51:33 +0200 Subject: [PATCH 04/17] Remove `StudyRuntimeInfos::parameters` (#1665) * Remove StudyRuntimeInfos::parameters * Fix build --- src/libs/antares/study/runtime/runtime.cpp | 4 +--- src/libs/antares/study/runtime/runtime.h | 3 --- src/solver/simulation/solver.hxx | 9 +++------ src/solver/ts-generator/hydro.cpp | 2 +- 4 files changed, 5 insertions(+), 13 deletions(-) diff --git a/src/libs/antares/study/runtime/runtime.cpp b/src/libs/antares/study/runtime/runtime.cpp index bb2fa4383c..0a8f349847 100644 --- a/src/libs/antares/study/runtime/runtime.cpp +++ b/src/libs/antares/study/runtime/runtime.cpp @@ -82,7 +82,7 @@ static void StudyRuntimeInfosInitializeAllAreas(Study& study, StudyRuntimeInfos& } // Spinning - Economic Only - If no prepro - if (!(timeSeriesThermal & r.parameters->timeSeriesToRefresh)) + if (!(timeSeriesThermal & study.parameters.timeSeriesToRefresh)) { // Calculation of the spinning area.thermal.list.calculationOfSpinning(); @@ -247,7 +247,6 @@ void StudyRuntimeInfos::initializeRangeLimits(const Study& study, StudyRangeLimi StudyRuntimeInfos::StudyRuntimeInfos() : nbYears(0), - parameters(nullptr), thermalPlantTotalCount(0), thermalPlantTotalCountMustRun(0), quadraticOptimizationHasFailed(false) @@ -274,7 +273,6 @@ bool StudyRuntimeInfos::loadFromStudy(Study& study) auto& gd = study.parameters; nbYears = gd.nbYears; - parameters = &study.parameters; mode = gd.mode; thermalPlantTotalCount = 0; thermalPlantTotalCountMustRun = 0; diff --git a/src/libs/antares/study/runtime/runtime.h b/src/libs/antares/study/runtime/runtime.h index 33e78f3c20..a499f47483 100644 --- a/src/libs/antares/study/runtime/runtime.h +++ b/src/libs/antares/study/runtime/runtime.h @@ -92,9 +92,6 @@ class StudyRuntimeInfos //! The number of years to process uint nbYears; - //! Alias for General data - Parameters* parameters; - //! Range limits StudyRangeLimits rangeLimits; diff --git a/src/solver/simulation/solver.hxx b/src/solver/simulation/solver.hxx index 177a2147fa..00e5bc9353 100644 --- a/src/solver/simulation/solver.hxx +++ b/src/solver/simulation/solver.hxx @@ -301,12 +301,9 @@ void ISimulation::run() ImplementationType::variables.template provideInformations(c); } - // The general data - auto& parameters = *(study.runtime->parameters); - // Preprocessors // Determine if we have to use the preprocessors at least one time. - pData.initialize(parameters); + pData.initialize(study.parameters); // Prepro only ? ImplementationType::preproOnly = settings.tsGeneratorsOnly; @@ -347,7 +344,7 @@ void ISimulation::run() throw FatalError("An unrecoverable error has occured. Can not continue."); } - if (parameters.useCustomScenario) + if (study.parameters.useCustomScenario) ApplyCustomScenario(study); // Launching the simulation for all years @@ -416,7 +413,7 @@ void ISimulation::writeResults(bool synthesis, uint year, uint numSpace) { if (synthesis) { - auto& parameters = *(study.runtime->parameters); + const auto& parameters = study.parameters; if (not parameters.synthesis) // disabled by parameters { logs.info() << "The simulation synthesis is disabled."; diff --git a/src/solver/ts-generator/hydro.cpp b/src/solver/ts-generator/hydro.cpp index e3db0ea742..c554de8852 100644 --- a/src/solver/ts-generator/hydro.cpp +++ b/src/solver/ts-generator/hydro.cpp @@ -158,7 +158,7 @@ bool GenerateHydroTimeSeries(Data::Study& study, uint currentYear, IResultWriter for (uint i = 0; i != DIM; ++i) NORM[i] = 0.; - uint nbTimeseries = studyRTI.parameters->nbTimeSeriesHydro; + uint nbTimeseries = study.parameters.nbTimeSeriesHydro; PreproHydroInitMatrices(study, nbTimeseries); From d45109f148e21f045623ec469772dee10ca31274 Mon Sep 17 00:00:00 2001 From: payetvin <113102157+payetvin@users.noreply.github.com> Date: Tue, 3 Oct 2023 11:18:10 +0200 Subject: [PATCH 05/17] Remove manual alloc and update code standards in hydro/daily2 (#1651) * [DEV] TurbineMax/min * [FIX] Use new to call constructor for vector * [DEV] niveauxbas apports * [DEV] DONNEES_MENSUELLES_ETENDUES * [DEV] CoutLineaire CoefficientsDeLaMatriceDesContraintes * [DEV] Sens * [FIX] Using new * [DEV] NombreDeTermesDesLignes IndicesDebutDeLigne * [DEV] IndicesColonnes * [DEV] Xmin Xmax SecondMembre * [DEV] X CoutsReduits CoutsMarginauxDesContraintes * [DEV] PositionDeLaVariable ComplementDeLaBase * [DEV] AdresseOuPlacerLaValeurDesVariablesOptimisees * [DEV] CORRESPONDANCE_DES_VARIABLES_PB_ETENDU * [DEV] NbJoursDUnProbleme * [DEV] ProblemeSpx * [DEV] TypeDeVariable * [DEV] CorrespondanceDesVariables * [DEV] ProblemeLineaireEtenduPartieFixe * [DEV] ProblemeLineaireEtenduPartieVariable * [DEV] Var scope * [DEV] ProblemeHydrauliqueEtendu * [DEV] Use unique_ptr for Probleme * [DEV] Remove probleme in struct * [DEV] Remove probleme in monthly * [DEV] Remove probleme in daily/ * [DEV] DONNEES_MENSUELLES_ETENDUES& * [FIX] code smells * [FIX] vois* for probspx * [DEV] std::vector ProblemeSpx for daily and monthly * [DEV] Remove error checking for unique_ptr * [FIX] Code smell --- .../hydro/daily/h2o_j_donnees_optimisation.h | 16 +- .../hydro/daily/h2o_j_instanciation.cpp | 2 - .../h2o_j_resoudre_le_probleme_lineaire.cpp | 22 +- .../hydro/daily2/h2o2_j_apply_costs.cpp | 36 +- .../h2o2_j_construire_les_contraintes.cpp | 72 ++-- .../h2o2_j_construire_les_variables.cpp | 59 ++-- .../hydro/daily2/h2o2_j_donnees_mensuelles.h | 22 +- .../daily2/h2o2_j_donnees_optimisation.h | 66 ++-- src/solver/hydro/daily2/h2o2_j_fonctions.h | 36 +- src/solver/hydro/daily2/h2o2_j_free.cpp | 75 +---- ...j_initialiser_les_bornes_des_variables.cpp | 40 +-- .../h2o2_j_initialiser_les_second_membre.cpp | 44 ++- .../hydro/daily2/h2o2_j_instanciation.cpp | 317 +++++------------- .../hydro/daily2/h2o2_j_optimiser_un_mois.cpp | 18 +- .../h2o2_j_resoudre_le_probleme_lineaire.cpp | 142 +++----- src/solver/hydro/management/daily.cpp | 6 +- .../monthly/h2o_m_donnees_optimisation.h | 15 +- .../hydro/monthly/h2o_m_instanciation.cpp | 1 - .../h2o_m_resoudre_le_probleme_lineaire.cpp | 22 +- 19 files changed, 357 insertions(+), 654 deletions(-) diff --git a/src/solver/hydro/daily/h2o_j_donnees_optimisation.h b/src/solver/hydro/daily/h2o_j_donnees_optimisation.h index 35875499e9..7038184313 100644 --- a/src/solver/hydro/daily/h2o_j_donnees_optimisation.h +++ b/src/solver/hydro/daily/h2o_j_donnees_optimisation.h @@ -27,6 +27,18 @@ #ifndef __SOLVER_H2O_J_STRUCTURE_INTERNE__ #define __SOLVER_H2O_J_STRUCTURE_INTERNE__ +#ifdef __CPLUSPLUS +extern "C" +{ +#endif + +#include "spx_definition_arguments.h" +#include "spx_fonctions.h" + +#ifdef __CPLUSPLUS +} +#endif + #define LINFINI 1.e+80 #define JOURS_28 28 @@ -127,9 +139,7 @@ struct PROBLEME_HYDRAULIQUE std::vector ProblemeLineairePartieFixe; std::vector ProblemeLineairePartieVariable; - std::vector ProblemeSpx; /* Il y en a 1 par reservoir. Un probleme couvre 1 mois */ - void* Probleme; /* Le probleme en cours passe au simplexe */ - + std::vector ProblemeSpx; /* Il y en a 1 par reservoir. Un probleme couvre 1 mois */ }; #endif diff --git a/src/solver/hydro/daily/h2o_j_instanciation.cpp b/src/solver/hydro/daily/h2o_j_instanciation.cpp index 7065756843..f9b6f06beb 100644 --- a/src/solver/hydro/daily/h2o_j_instanciation.cpp +++ b/src/solver/hydro/daily/h2o_j_instanciation.cpp @@ -61,8 +61,6 @@ DONNEES_MENSUELLES* H2O_J_Instanciation(void) ProblemeHydraulique.ProblemeSpx.assign(NombreDeProblemes, nullptr); - ProblemeHydraulique.Probleme = NULL; - std::vector& CorrespondanceDesVariables = ProblemeHydraulique.CorrespondanceDesVariables; diff --git a/src/solver/hydro/daily/h2o_j_resoudre_le_probleme_lineaire.cpp b/src/solver/hydro/daily/h2o_j_resoudre_le_probleme_lineaire.cpp index c81ce6d1b5..48a9be0802 100644 --- a/src/solver/hydro/daily/h2o_j_resoudre_le_probleme_lineaire.cpp +++ b/src/solver/hydro/daily/h2o_j_resoudre_le_probleme_lineaire.cpp @@ -25,18 +25,6 @@ ** SPDX-License-Identifier: licenceRef-GPL3_WITH_RTE-Exceptions */ -#ifdef __CPLUSPLUS -extern "C" -{ -#endif - -#include "spx_definition_arguments.h" -#include "spx_fonctions.h" - -#ifdef __CPLUSPLUS -} -#endif - #include "h2o_j_donnees_mensuelles.h" #include "h2o_j_fonctions.h" @@ -58,15 +46,9 @@ void H2O_J_ResoudreLeProblemeLineaire(DONNEES_MENSUELLES* DonneesMensuelles, int PROBLEME_LINEAIRE_PARTIE_FIXE& ProblemeLineairePartieFixe = ProblemeHydraulique.ProblemeLineairePartieFixe[NumeroDeProbleme]; - PROBLEME_SPX* ProbSpx = (PROBLEME_SPX*)ProblemeHydraulique.ProblemeSpx[NumeroDeProbleme]; + PROBLEME_SPX* ProbSpx = ProblemeHydraulique.ProblemeSpx[NumeroDeProbleme]; std::unique_ptr Probleme = std::make_unique(); - if (!Probleme) - { - DonneesMensuelles->ResultatsValides = EMERGENCY_SHUT_DOWN; - return; - } - bool PremierPassage = true; RESOLUTION: @@ -140,7 +122,7 @@ void H2O_J_ResoudreLeProblemeLineaire(DONNEES_MENSUELLES* DonneesMensuelles, int ProbSpx = SPX_Simplexe(Probleme.get(), ProbSpx); if (ProbSpx) - ProblemeHydraulique.ProblemeSpx[NumeroDeProbleme] = (void*)ProbSpx; + ProblemeHydraulique.ProblemeSpx[NumeroDeProbleme] = ProbSpx; ProblemeLineairePartieVariable.ExistenceDUneSolution = Probleme->ExistenceDUneSolution; diff --git a/src/solver/hydro/daily2/h2o2_j_apply_costs.cpp b/src/solver/hydro/daily2/h2o2_j_apply_costs.cpp index 47ff5eee01..fef95fe20b 100644 --- a/src/solver/hydro/daily2/h2o2_j_apply_costs.cpp +++ b/src/solver/hydro/daily2/h2o2_j_apply_costs.cpp @@ -31,55 +31,49 @@ void H2O2_J_apply_costs(const Hydro_problem_costs& h2o2_costs, DONNEES_MENSUELLES_ETENDUES& problem) { - int NombreDeProblemes; - PROBLEME_LINEAIRE_ETENDU_PARTIE_FIXE** ProblemeLineaireEtenduPartieFixe; - CORRESPONDANCE_DES_VARIABLES_PB_ETENDU** CorrespondanceDesVariables; - int NbPdt; - int* NbJoursDUnProbleme; - - NombreDeProblemes = problem.ProblemeHydrauliqueEtendu->NombreDeProblemes; - ProblemeLineaireEtenduPartieFixe - = problem.ProblemeHydrauliqueEtendu->ProblemeLineaireEtenduPartieFixe; - CorrespondanceDesVariables = problem.ProblemeHydrauliqueEtendu->CorrespondanceDesVariables; - NbJoursDUnProbleme = problem.ProblemeHydrauliqueEtendu->NbJoursDUnProbleme; + int NombreDeProblemes = problem.ProblemeHydrauliqueEtendu.NombreDeProblemes; + auto& ProblemeLineaireEtenduPartieFixe + = problem.ProblemeHydrauliqueEtendu.ProblemeLineaireEtenduPartieFixe; + auto& CorrespondanceDesVariables = problem.ProblemeHydrauliqueEtendu.CorrespondanceDesVariables; + const auto& NbJoursDUnProbleme = problem.ProblemeHydrauliqueEtendu.NbJoursDUnProbleme; for (int pb_num = 0; pb_num < NombreDeProblemes; pb_num++) { - NbPdt = NbJoursDUnProbleme[pb_num]; + int NbPdt = NbJoursDUnProbleme[pb_num]; - for (int var = 0; var < ProblemeLineaireEtenduPartieFixe[pb_num]->NombreDeVariables; var++) - ProblemeLineaireEtenduPartieFixe[pb_num]->CoutLineaire[var] = 0.0; + for (int var = 0; var < ProblemeLineaireEtenduPartieFixe[pb_num].NombreDeVariables; var++) + ProblemeLineaireEtenduPartieFixe[pb_num].CoutLineaire[var] = 0.0; for (int Pdt = 0; Pdt < NbPdt; Pdt++) ProblemeLineaireEtenduPartieFixe[pb_num] - ->CoutLineaire[CorrespondanceDesVariables[pb_num]->NumeroVar_niveauxFinJours[Pdt]] + .CoutLineaire[CorrespondanceDesVariables[pb_num].NumeroVar_niveauxFinJours[Pdt]] = h2o2_costs.get_end_days_levels_cost(); for (int Pdt = 0; Pdt < NbPdt; Pdt++) ProblemeLineaireEtenduPartieFixe[pb_num] - ->CoutLineaire[CorrespondanceDesVariables[pb_num]->NumeroVar_overflow[Pdt]] + .CoutLineaire[CorrespondanceDesVariables[pb_num].NumeroVar_overflow[Pdt]] = h2o2_costs.get_overflow_cost(); for (int Pdt = 0; Pdt < NbPdt; Pdt++) ProblemeLineaireEtenduPartieFixe[pb_num] - ->CoutLineaire[CorrespondanceDesVariables[pb_num]->NumeroVar_deviations[Pdt]] + .CoutLineaire[CorrespondanceDesVariables[pb_num].NumeroVar_deviations[Pdt]] = h2o2_costs.get_deviations_cost(); for (int Pdt = 0; Pdt < NbPdt; Pdt++) ProblemeLineaireEtenduPartieFixe[pb_num] - ->CoutLineaire[CorrespondanceDesVariables[pb_num]->NumeroVar_violations[Pdt]] + .CoutLineaire[CorrespondanceDesVariables[pb_num].NumeroVar_violations[Pdt]] = h2o2_costs.get_violations_cost(); ProblemeLineaireEtenduPartieFixe[pb_num] - ->CoutLineaire[CorrespondanceDesVariables[pb_num]->NumeroVar_waste] + .CoutLineaire[CorrespondanceDesVariables[pb_num].NumeroVar_waste] = h2o2_costs.get_waste_cost(); ProblemeLineaireEtenduPartieFixe[pb_num] - ->CoutLineaire[CorrespondanceDesVariables[pb_num]->NumeroVar_deviationMax] + .CoutLineaire[CorrespondanceDesVariables[pb_num].NumeroVar_deviationMax] = h2o2_costs.get_deviationMax_cost(); ProblemeLineaireEtenduPartieFixe[pb_num] - ->CoutLineaire[CorrespondanceDesVariables[pb_num]->NumeroVar_violationMax] + .CoutLineaire[CorrespondanceDesVariables[pb_num].NumeroVar_violationMax] = h2o2_costs.get_violationMax_cost(); } } diff --git a/src/solver/hydro/daily2/h2o2_j_construire_les_contraintes.cpp b/src/solver/hydro/daily2/h2o2_j_construire_les_contraintes.cpp index 2f97ba4ffb..57cdddd6af 100644 --- a/src/solver/hydro/daily2/h2o2_j_construire_les_contraintes.cpp +++ b/src/solver/hydro/daily2/h2o2_j_construire_les_contraintes.cpp @@ -30,30 +30,26 @@ void H2O2_J_ConstruireLesContraintes( int NbPdt, - int* IndicesDebutDeLigne, - char* Sens, - int* NombreDeTermesDesLignes, - double* CoefficientsDeLaMatriceDesContraintes, - int* IndicesColonnes, - CORRESPONDANCE_DES_VARIABLES_PB_ETENDU* CorrespondanceDesVariables) + std::vector& IndicesDebutDeLigne, + std::vector& Sens, + std::vector& NombreDeTermesDesLignes, + std::vector& CoefficientsDeLaMatriceDesContraintes, + std::vector& IndicesColonnes, + CORRESPONDANCE_DES_VARIABLES_PB_ETENDU& CorrespondanceDesVariables) { - int NombreDeContraintes; - int il; - int Pdt; - - NombreDeContraintes = 0; - il = 0; + int NombreDeContraintes = 0; + int il = 0; IndicesDebutDeLigne[NombreDeContraintes] = il; CoefficientsDeLaMatriceDesContraintes[il] = 1.0; - IndicesColonnes[il] = CorrespondanceDesVariables->NumeroVar_Turbine[0]; + IndicesColonnes[il] = CorrespondanceDesVariables.NumeroVar_Turbine[0]; il++; CoefficientsDeLaMatriceDesContraintes[il] = 1.0; - IndicesColonnes[il] = CorrespondanceDesVariables->NumeroVar_niveauxFinJours[0]; + IndicesColonnes[il] = CorrespondanceDesVariables.NumeroVar_niveauxFinJours[0]; il++; CoefficientsDeLaMatriceDesContraintes[il] = 1.0; - IndicesColonnes[il] = CorrespondanceDesVariables->NumeroVar_overflow[0]; + IndicesColonnes[il] = CorrespondanceDesVariables.NumeroVar_overflow[0]; il++; Sens[NombreDeContraintes] = '='; @@ -61,24 +57,24 @@ void H2O2_J_ConstruireLesContraintes( NombreDeContraintes++; - for (Pdt = 1; Pdt < NbPdt; Pdt++) + for (int Pdt = 1; Pdt < NbPdt; Pdt++) { IndicesDebutDeLigne[NombreDeContraintes] = il; CoefficientsDeLaMatriceDesContraintes[il] = 1.0; - IndicesColonnes[il] = CorrespondanceDesVariables->NumeroVar_Turbine[Pdt]; + IndicesColonnes[il] = CorrespondanceDesVariables.NumeroVar_Turbine[Pdt]; il++; CoefficientsDeLaMatriceDesContraintes[il] = 1.0; - IndicesColonnes[il] = CorrespondanceDesVariables->NumeroVar_niveauxFinJours[Pdt]; + IndicesColonnes[il] = CorrespondanceDesVariables.NumeroVar_niveauxFinJours[Pdt]; il++; CoefficientsDeLaMatriceDesContraintes[il] = -1.0; - IndicesColonnes[il] = CorrespondanceDesVariables->NumeroVar_niveauxFinJours[Pdt - 1]; + IndicesColonnes[il] = CorrespondanceDesVariables.NumeroVar_niveauxFinJours[Pdt - 1]; il++; CoefficientsDeLaMatriceDesContraintes[il] = 1.0; - IndicesColonnes[il] = CorrespondanceDesVariables->NumeroVar_overflow[Pdt]; + IndicesColonnes[il] = CorrespondanceDesVariables.NumeroVar_overflow[Pdt]; il++; Sens[NombreDeContraintes] = '='; @@ -88,31 +84,31 @@ void H2O2_J_ConstruireLesContraintes( IndicesDebutDeLigne[NombreDeContraintes] = il; - for (Pdt = 0; Pdt < NbPdt; Pdt++) + for (int Pdt = 0; Pdt < NbPdt; Pdt++) { CoefficientsDeLaMatriceDesContraintes[il] = 1.0; - IndicesColonnes[il] = CorrespondanceDesVariables->NumeroVar_Turbine[Pdt]; + IndicesColonnes[il] = CorrespondanceDesVariables.NumeroVar_Turbine[Pdt]; il++; } CoefficientsDeLaMatriceDesContraintes[il] = 1.0; - IndicesColonnes[il] = CorrespondanceDesVariables->NumeroVar_waste; + IndicesColonnes[il] = CorrespondanceDesVariables.NumeroVar_waste; il++; Sens[NombreDeContraintes] = '='; NombreDeTermesDesLignes[NombreDeContraintes] = NbPdt + 1; NombreDeContraintes++; - for (Pdt = 0; Pdt < NbPdt; Pdt++) + for (int Pdt = 0; Pdt < NbPdt; Pdt++) { IndicesDebutDeLigne[NombreDeContraintes] = il; CoefficientsDeLaMatriceDesContraintes[il] = 1.0; - IndicesColonnes[il] = CorrespondanceDesVariables->NumeroVar_Turbine[Pdt]; + IndicesColonnes[il] = CorrespondanceDesVariables.NumeroVar_Turbine[Pdt]; il++; CoefficientsDeLaMatriceDesContraintes[il] = -1.0; - IndicesColonnes[il] = CorrespondanceDesVariables->NumeroVar_deviations[Pdt]; + IndicesColonnes[il] = CorrespondanceDesVariables.NumeroVar_deviations[Pdt]; il++; Sens[NombreDeContraintes] = '<'; @@ -120,16 +116,16 @@ void H2O2_J_ConstruireLesContraintes( NombreDeContraintes++; } - for (Pdt = 0; Pdt < NbPdt; Pdt++) + for (int Pdt = 0; Pdt < NbPdt; Pdt++) { IndicesDebutDeLigne[NombreDeContraintes] = il; CoefficientsDeLaMatriceDesContraintes[il] = 1.0; - IndicesColonnes[il] = CorrespondanceDesVariables->NumeroVar_Turbine[Pdt]; + IndicesColonnes[il] = CorrespondanceDesVariables.NumeroVar_Turbine[Pdt]; il++; CoefficientsDeLaMatriceDesContraintes[il] = 1.0; - IndicesColonnes[il] = CorrespondanceDesVariables->NumeroVar_deviations[Pdt]; + IndicesColonnes[il] = CorrespondanceDesVariables.NumeroVar_deviations[Pdt]; il++; Sens[NombreDeContraintes] = '>'; @@ -137,16 +133,16 @@ void H2O2_J_ConstruireLesContraintes( NombreDeContraintes++; } - for (Pdt = 0; Pdt < NbPdt; Pdt++) + for (int Pdt = 0; Pdt < NbPdt; Pdt++) { IndicesDebutDeLigne[NombreDeContraintes] = il; CoefficientsDeLaMatriceDesContraintes[il] = 1.0; - IndicesColonnes[il] = CorrespondanceDesVariables->NumeroVar_deviations[Pdt]; + IndicesColonnes[il] = CorrespondanceDesVariables.NumeroVar_deviations[Pdt]; il++; CoefficientsDeLaMatriceDesContraintes[il] = -1.0; - IndicesColonnes[il] = CorrespondanceDesVariables->NumeroVar_deviationMax; + IndicesColonnes[il] = CorrespondanceDesVariables.NumeroVar_deviationMax; il++; Sens[NombreDeContraintes] = '<'; @@ -154,16 +150,16 @@ void H2O2_J_ConstruireLesContraintes( NombreDeContraintes++; } - for (Pdt = 0; Pdt < NbPdt; Pdt++) + for (int Pdt = 0; Pdt < NbPdt; Pdt++) { IndicesDebutDeLigne[NombreDeContraintes] = il; CoefficientsDeLaMatriceDesContraintes[il] = 1.0; - IndicesColonnes[il] = CorrespondanceDesVariables->NumeroVar_niveauxFinJours[Pdt]; + IndicesColonnes[il] = CorrespondanceDesVariables.NumeroVar_niveauxFinJours[Pdt]; il++; CoefficientsDeLaMatriceDesContraintes[il] = 1.0; - IndicesColonnes[il] = CorrespondanceDesVariables->NumeroVar_violations[Pdt]; + IndicesColonnes[il] = CorrespondanceDesVariables.NumeroVar_violations[Pdt]; il++; Sens[NombreDeContraintes] = '>'; @@ -171,16 +167,16 @@ void H2O2_J_ConstruireLesContraintes( NombreDeContraintes++; } - for (Pdt = 0; Pdt < NbPdt; Pdt++) + for (int Pdt = 0; Pdt < NbPdt; Pdt++) { IndicesDebutDeLigne[NombreDeContraintes] = il; CoefficientsDeLaMatriceDesContraintes[il] = 1.0; - IndicesColonnes[il] = CorrespondanceDesVariables->NumeroVar_violations[Pdt]; + IndicesColonnes[il] = CorrespondanceDesVariables.NumeroVar_violations[Pdt]; il++; CoefficientsDeLaMatriceDesContraintes[il] = -1.0; - IndicesColonnes[il] = CorrespondanceDesVariables->NumeroVar_violationMax; + IndicesColonnes[il] = CorrespondanceDesVariables.NumeroVar_violationMax; il++; Sens[NombreDeContraintes] = '<'; diff --git a/src/solver/hydro/daily2/h2o2_j_construire_les_variables.cpp b/src/solver/hydro/daily2/h2o2_j_construire_les_variables.cpp index a30d3cc489..3543e733e2 100644 --- a/src/solver/hydro/daily2/h2o2_j_construire_les_variables.cpp +++ b/src/solver/hydro/daily2/h2o2_j_construire_les_variables.cpp @@ -40,92 +40,89 @@ extern "C" void H2O2_j_ConstruireLesVariables( int NbPdt, - DONNEES_MENSUELLES_ETENDUES* DonneesMensuellesEtendues, - double* Xmin, - double* Xmax, - int* TypeDeVariable, - double** AdresseOuPlacerLaValeurDesVariablesOptimisees, - CORRESPONDANCE_DES_VARIABLES_PB_ETENDU* CorrespondanceDesVariables) + DONNEES_MENSUELLES_ETENDUES& DonneesMensuellesEtendues, + std::vector& Xmin, + std::vector& Xmax, + std::vector& TypeDeVariable, + std::vector& AdresseOuPlacerLaValeurDesVariablesOptimisees, + CORRESPONDANCE_DES_VARIABLES_PB_ETENDU& CorrespondanceDesVariables) { - int Var; - int Pdt; + int Var = 0; - Var = 0; - - for (Pdt = 0; Pdt < NbPdt; Pdt++) + for (int Pdt = 0; Pdt < NbPdt; Pdt++) { - CorrespondanceDesVariables->NumeroVar_Turbine[Pdt] = Var; + CorrespondanceDesVariables.NumeroVar_Turbine[Pdt] = Var; Xmin[Var] = 0.0; Xmax[Var] = 0.0; TypeDeVariable[Var] = VARIABLE_BORNEE_DES_DEUX_COTES; AdresseOuPlacerLaValeurDesVariablesOptimisees[Var] - = &(DonneesMensuellesEtendues->Turbine[Pdt]); + = &(DonneesMensuellesEtendues.Turbine[Pdt]); Var++; } - for (Pdt = 0; Pdt < NbPdt; Pdt++) + for (int Pdt = 0; Pdt < NbPdt; Pdt++) { - CorrespondanceDesVariables->NumeroVar_niveauxFinJours[Pdt] = Var; + CorrespondanceDesVariables.NumeroVar_niveauxFinJours[Pdt] = Var; Xmin[Var] = 0.0; Xmax[Var] = 1.0; TypeDeVariable[Var] = VARIABLE_BORNEE_DES_DEUX_COTES; AdresseOuPlacerLaValeurDesVariablesOptimisees[Var] - = &(DonneesMensuellesEtendues->niveauxFinJours[Pdt]); + = &(DonneesMensuellesEtendues.niveauxFinJours[Pdt]); Var++; } - CorrespondanceDesVariables->NumeroVar_waste = Var; + CorrespondanceDesVariables.NumeroVar_waste = Var; Xmin[Var] = 0.0; Xmax[Var] = LINFINI; TypeDeVariable[Var] = VARIABLE_BORNEE_INFERIEUREMENT; - AdresseOuPlacerLaValeurDesVariablesOptimisees[Var] = &(DonneesMensuellesEtendues->waste); + AdresseOuPlacerLaValeurDesVariablesOptimisees[Var] = &(DonneesMensuellesEtendues.waste); Var++; - for (Pdt = 0; Pdt < NbPdt; Pdt++) + for (int Pdt = 0; Pdt < NbPdt; Pdt++) { - CorrespondanceDesVariables->NumeroVar_overflow[Pdt] = Var; + CorrespondanceDesVariables.NumeroVar_overflow[Pdt] = Var; Xmin[Var] = 0.0; Xmax[Var] = LINFINI; TypeDeVariable[Var] = VARIABLE_BORNEE_INFERIEUREMENT; AdresseOuPlacerLaValeurDesVariablesOptimisees[Var] - = &(DonneesMensuellesEtendues->overflows[Pdt]); + = &(DonneesMensuellesEtendues.overflows[Pdt]); Var++; } - for (Pdt = 0; Pdt < NbPdt; Pdt++) + for (int Pdt = 0; Pdt < NbPdt; Pdt++) { - CorrespondanceDesVariables->NumeroVar_deviations[Pdt] = Var; + CorrespondanceDesVariables.NumeroVar_deviations[Pdt] = Var; Xmin[Var] = 0.0; Xmax[Var] = LINFINI; TypeDeVariable[Var] = VARIABLE_BORNEE_INFERIEUREMENT; AdresseOuPlacerLaValeurDesVariablesOptimisees[Var] - = &(DonneesMensuellesEtendues->deviations[Pdt]); + = &(DonneesMensuellesEtendues.deviations[Pdt]); Var++; } - for (Pdt = 0; Pdt < NbPdt; Pdt++) + for (int Pdt = 0; Pdt < NbPdt; Pdt++) { - CorrespondanceDesVariables->NumeroVar_violations[Pdt] = Var; + CorrespondanceDesVariables.NumeroVar_violations[Pdt] = Var; Xmin[Var] = 0.0; Xmax[Var] = LINFINI; TypeDeVariable[Var] = VARIABLE_BORNEE_INFERIEUREMENT; AdresseOuPlacerLaValeurDesVariablesOptimisees[Var] - = &(DonneesMensuellesEtendues->violations[Pdt]); + = &(DonneesMensuellesEtendues.violations[Pdt]); Var++; } - CorrespondanceDesVariables->NumeroVar_deviationMax = Var; + CorrespondanceDesVariables.NumeroVar_deviationMax = Var; Xmin[Var] = 0.0; Xmax[Var] = LINFINI; TypeDeVariable[Var] = VARIABLE_BORNEE_INFERIEUREMENT; - AdresseOuPlacerLaValeurDesVariablesOptimisees[Var] = &(DonneesMensuellesEtendues->deviationMax); + AdresseOuPlacerLaValeurDesVariablesOptimisees[Var] = &(DonneesMensuellesEtendues.deviationMax); Var++; - CorrespondanceDesVariables->NumeroVar_violationMax = Var; + CorrespondanceDesVariables.NumeroVar_violationMax = Var; Xmin[Var] = 0.0; Xmax[Var] = LINFINI; TypeDeVariable[Var] = VARIABLE_BORNEE_INFERIEUREMENT; - AdresseOuPlacerLaValeurDesVariablesOptimisees[Var] = &(DonneesMensuellesEtendues->violationMax); + AdresseOuPlacerLaValeurDesVariablesOptimisees[Var] = &(DonneesMensuellesEtendues.violationMax); Var++; return; diff --git a/src/solver/hydro/daily2/h2o2_j_donnees_mensuelles.h b/src/solver/hydro/daily2/h2o2_j_donnees_mensuelles.h index 4820bf9ee3..aae31e224e 100644 --- a/src/solver/hydro/daily2/h2o2_j_donnees_mensuelles.h +++ b/src/solver/hydro/daily2/h2o2_j_donnees_mensuelles.h @@ -44,13 +44,13 @@ typedef struct avoir appele H2O2_J_Instanciation */ int NombreDeJoursDuMois; /* A renseigner par l'appelant */ double TurbineDuMois; /* A renseigner par l'appelant (somme des turbines cibles du mois) */ - double* TurbineMax; /* A renseigner par l'appelant : 1 valeur par jour */ - double* TurbineMin; /*Minimum Hourly Hydro-Storage Generation*/ - double* TurbineCible; /* A renseigner par l'appelant : 1 valeur par jour */ + std::vector TurbineMax; /* A renseigner par l'appelant : 1 valeur par jour */ + std::vector TurbineMin; /*Minimum Hourly Hydro-Storage Generation*/ + std::vector TurbineCible; /* A renseigner par l'appelant : 1 valeur par jour */ double reservoirCapacity; double NiveauInitialDuMois; - double* niveauBas; - double* apports; + std::vector niveauBas; + std::vector apports; /* Les resultats */ char ResultatsValides; /* Vaut: @@ -59,11 +59,11 @@ typedef struct EMERGENCY_SHUT_DOWN si la resolution du probleme a donne lieu a une erreur interne */ - double* Turbine; /* Resultat a recuperer par l'appelant */ - double* niveauxFinJours; - double* overflows; - double* deviations; - double* violations; + std::vector Turbine; /* Resultat a recuperer par l'appelant */ + std::vector niveauxFinJours; + std::vector overflows; + std::vector deviations; + std::vector violations; double deviationMax; double violationMax; double waste; @@ -73,7 +73,7 @@ typedef struct /******************************************************************************************/ /* Problemes internes (utilise uniquement par l'optimisation) */ - PROBLEME_HYDRAULIQUE_ETENDU* ProblemeHydrauliqueEtendu; + PROBLEME_HYDRAULIQUE_ETENDU ProblemeHydrauliqueEtendu; } DONNEES_MENSUELLES_ETENDUES; #endif diff --git a/src/solver/hydro/daily2/h2o2_j_donnees_optimisation.h b/src/solver/hydro/daily2/h2o2_j_donnees_optimisation.h index ebe098de3a..b64abc1dd1 100644 --- a/src/solver/hydro/daily2/h2o2_j_donnees_optimisation.h +++ b/src/solver/hydro/daily2/h2o2_j_donnees_optimisation.h @@ -27,6 +27,18 @@ #ifndef __SOLVER_H2O2_J_STRUCTURE_INTERNE__ #define __SOLVER_H2O2_J_STRUCTURE_INTERNE__ +#ifdef __CPLUSPLUS +extern "C" +{ +#endif + +#include "spx_definition_arguments.h" +#include "spx_fonctions.h" + +#ifdef __CPLUSPLUS +} + +#endif #include "../daily/h2o_j_donnees_optimisation.h" #include #include @@ -46,8 +58,8 @@ typedef struct { int NombreDeVariables; - double* CoutLineaire; - int* TypeDeVariable; /* Indicateur du type de variable, il ne doit prendre que les suivantes + std::vector CoutLineaire; + std::vector TypeDeVariable; /* Indicateur du type de variable, il ne doit prendre que les suivantes (voir le fichier spx_constantes_externes.h mais ne jamais utiliser les valeurs explicites des constantes): VARIABLE_FIXE , @@ -58,11 +70,11 @@ typedef struct */ /* La matrice des contraintes */ int NombreDeContraintes; - char* Sens; - int* IndicesDebutDeLigne; - int* NombreDeTermesDesLignes; - double* CoefficientsDeLaMatriceDesContraintes; - int* IndicesColonnes; + std::vector Sens; + std::vector IndicesDebutDeLigne; + std::vector NombreDeTermesDesLignes; + std::vector CoefficientsDeLaMatriceDesContraintes; + std::vector IndicesColonnes; int NombreDeTermesAlloues; } PROBLEME_LINEAIRE_ETENDU_PARTIE_FIXE; @@ -72,15 +84,15 @@ typedef struct /* Donnees variables de la matrice des contraintes */ /* On met quand-meme les bornes dans la partie variable pour le cas ou on voudrait avoir un jour des bornes min et max variables dans le temps et en fonction des reservoirs */ - double* Xmin; - double* Xmax; - double* SecondMembre; + std::vector Xmin; + std::vector Xmax; + std::vector SecondMembre; /* Tableau de pointeur a des doubles. Ce tableau est parallele a X, il permet de renseigner directement les structures de description du reseau avec les resultats contenus dans X */ - double** AdresseOuPlacerLaValeurDesVariablesOptimisees; + std::vector AdresseOuPlacerLaValeurDesVariablesOptimisees; /* Resultat */ - double* X; + std::vector X; /* En Entree ou en Sortie */ int ExistenceDUneSolution; /* En sortie, vaut : OUI_SPX s'il y a une solution, @@ -92,25 +104,25 @@ typedef struct pas de solution */ - int* PositionDeLaVariable; /* Vecteur a passer au Simplexe pour recuperer la base optimale */ - int* ComplementDeLaBase; /* Vecteur a passer au Simplexe pour recuperer la base optimale */ - double* CoutsReduits; /* Vecteur a passer au Simplexe pour recuperer les couts reduits */ - double* CoutsMarginauxDesContraintes; /* Vecteur a passer au Simplexe pour recuperer les couts + std::vector PositionDeLaVariable; /* Vecteur a passer au Simplexe pour recuperer la base optimale */ + std::vector ComplementDeLaBase; /* Vecteur a passer au Simplexe pour recuperer la base optimale */ + std::vector CoutsReduits; /* Vecteur a passer au Simplexe pour recuperer les couts reduits */ + std::vector CoutsMarginauxDesContraintes; /* Vecteur a passer au Simplexe pour recuperer les couts marginaux */ } PROBLEME_LINEAIRE_ETENDU_PARTIE_VARIABLE; /* Les correspondances des variables */ typedef struct { - int* NumeroVar_Turbine; /* Turbines */ + std::vector NumeroVar_Turbine; /* Turbines */ - int* NumeroVar_niveauxFinJours; // Niveaux fin jours + std::vector NumeroVar_niveauxFinJours; // Niveaux fin jours int NumeroVar_waste; // Waste - int* NumeroVar_overflow; // Deversements (ecarts journaliers entre niveaux et les 100 % du + std::vector NumeroVar_overflow; // Deversements (ecarts journaliers entre niveaux et les 100 % du // reservoir) - int* NumeroVar_deviations; // Deviations (ecarts journaliers entre turbin?s et cr?dits cibles + std::vector NumeroVar_deviations; // Deviations (ecarts journaliers entre turbin?s et cr?dits cibles // brutes) - int* NumeroVar_violations; // Violations (ecarts journaliers entre niveaux et courbes guides sup + std::vector NumeroVar_violations; // Violations (ecarts journaliers entre niveaux et courbes guides sup // et inf) int NumeroVar_deviationMax; // Deviation max sur le mois int NumeroVar_violationMax; // Violation max sur le mois @@ -122,16 +134,14 @@ typedef struct char LesCoutsOntEteInitialises; /* Vaut OUI ou NON */ int NombreDeProblemes; - int* NbJoursDUnProbleme; - - CORRESPONDANCE_DES_VARIABLES_PB_ETENDU** CorrespondanceDesVariables; + std::vector NbJoursDUnProbleme; - PROBLEME_LINEAIRE_ETENDU_PARTIE_FIXE** ProblemeLineaireEtenduPartieFixe; - PROBLEME_LINEAIRE_ETENDU_PARTIE_VARIABLE** ProblemeLineaireEtenduPartieVariable; + std::vector CorrespondanceDesVariables; - void** ProblemeSpx; /* Il y en a 1 par reservoir. Un probleme couvre 1 mois */ - void* Probleme; /* Le probleme en cours passe au simplexe */ + std::vector ProblemeLineaireEtenduPartieFixe; + std::vector ProblemeLineaireEtenduPartieVariable; + std::vector ProblemeSpx; /* Il y en a 1 par reservoir. Un probleme couvre 1 mois */ } PROBLEME_HYDRAULIQUE_ETENDU; namespace Antares::Constants diff --git a/src/solver/hydro/daily2/h2o2_j_fonctions.h b/src/solver/hydro/daily2/h2o2_j_fonctions.h index ea30a56b5f..a96934ca41 100644 --- a/src/solver/hydro/daily2/h2o2_j_fonctions.h +++ b/src/solver/hydro/daily2/h2o2_j_fonctions.h @@ -28,26 +28,26 @@ #ifndef __SOLVER_H2O2_J_FONCTIONS__ #define __SOLVER_H2O2_J_FONCTIONS__ -DONNEES_MENSUELLES_ETENDUES* H2O2_J_Instanciation(); -void H2O2_J_OptimiserUnMois(DONNEES_MENSUELLES_ETENDUES*); -void H2O2_J_Free(DONNEES_MENSUELLES_ETENDUES*); +DONNEES_MENSUELLES_ETENDUES H2O2_J_Instanciation(); +void H2O2_J_OptimiserUnMois(DONNEES_MENSUELLES_ETENDUES&); +void H2O2_J_Free(DONNEES_MENSUELLES_ETENDUES&); void H2O2_J_ConstruireLesContraintes(int, - int*, - char*, - int*, - double*, - int*, - CORRESPONDANCE_DES_VARIABLES_PB_ETENDU*); + std::vector&, + std::vector&, + std::vector&, + std::vector&, + std::vector&, + CORRESPONDANCE_DES_VARIABLES_PB_ETENDU&); void H2O2_j_ConstruireLesVariables(int, - DONNEES_MENSUELLES_ETENDUES*, - double*, - double*, - int*, - double**, - CORRESPONDANCE_DES_VARIABLES_PB_ETENDU*); + DONNEES_MENSUELLES_ETENDUES&, + std::vector&, + std::vector&, + std::vector&, + std::vector&, + CORRESPONDANCE_DES_VARIABLES_PB_ETENDU&); void H2O2_J_apply_costs(const Hydro_problem_costs&, DONNEES_MENSUELLES_ETENDUES&); -void H2O2_J_InitialiserLesBornesdesVariables(DONNEES_MENSUELLES_ETENDUES*, int); -void H2O2_J_InitialiserLeSecondMembre(DONNEES_MENSUELLES_ETENDUES*, int); -void H2O2_J_ResoudreLeProblemeLineaire(DONNEES_MENSUELLES_ETENDUES*, int); +void H2O2_J_InitialiserLesBornesdesVariables(DONNEES_MENSUELLES_ETENDUES&, int); +void H2O2_J_InitialiserLeSecondMembre(DONNEES_MENSUELLES_ETENDUES&, int); +void H2O2_J_ResoudreLeProblemeLineaire(DONNEES_MENSUELLES_ETENDUES&, int); #endif /* __SOLVER_H2O2_J_FONCTIONS__ */ diff --git a/src/solver/hydro/daily2/h2o2_j_free.cpp b/src/solver/hydro/daily2/h2o2_j_free.cpp index 14ce65539c..39fd211fd0 100644 --- a/src/solver/hydro/daily2/h2o2_j_free.cpp +++ b/src/solver/hydro/daily2/h2o2_j_free.cpp @@ -40,80 +40,17 @@ extern "C" #include "h2o2_j_donnees_mensuelles.h" #include "h2o2_j_fonctions.h" -void H2O2_J_Free(DONNEES_MENSUELLES_ETENDUES* DonneesMensuelles) +void H2O2_J_Free(DONNEES_MENSUELLES_ETENDUES& DonneesMensuelles) { - int i; - int NombreDeProblemes; - PROBLEME_SPX* ProbSpx; + auto& ProblemeHydrauliqueEtendu = DonneesMensuelles.ProblemeHydrauliqueEtendu; + int NombreDeProblemes = ProblemeHydrauliqueEtendu.NombreDeProblemes; - PROBLEME_HYDRAULIQUE_ETENDU* ProblemeHydrauliqueEtendu; - - ProblemeHydrauliqueEtendu = DonneesMensuelles->ProblemeHydrauliqueEtendu; - NombreDeProblemes = ProblemeHydrauliqueEtendu->NombreDeProblemes; - - for (i = 0; i < NombreDeProblemes; i++) + for (int i = 0; i < NombreDeProblemes; i++) { - free(ProblemeHydrauliqueEtendu->CorrespondanceDesVariables[i]->NumeroVar_Turbine); - free(ProblemeHydrauliqueEtendu->CorrespondanceDesVariables[i]->NumeroVar_niveauxFinJours); - free(ProblemeHydrauliqueEtendu->CorrespondanceDesVariables[i]->NumeroVar_overflow); - free(ProblemeHydrauliqueEtendu->CorrespondanceDesVariables[i]->NumeroVar_deviations); - free(ProblemeHydrauliqueEtendu->CorrespondanceDesVariables[i]->NumeroVar_violations); - free(ProblemeHydrauliqueEtendu->CorrespondanceDesVariables[i]); - - free(ProblemeHydrauliqueEtendu->ProblemeLineaireEtenduPartieFixe[i]->CoutLineaire); - free(ProblemeHydrauliqueEtendu->ProblemeLineaireEtenduPartieFixe[i]->TypeDeVariable); - free(ProblemeHydrauliqueEtendu->ProblemeLineaireEtenduPartieFixe[i]->Sens); - free(ProblemeHydrauliqueEtendu->ProblemeLineaireEtenduPartieFixe[i]->IndicesDebutDeLigne); - free((ProblemeHydrauliqueEtendu->ProblemeLineaireEtenduPartieFixe[i]) - ->NombreDeTermesDesLignes); - free((ProblemeHydrauliqueEtendu->ProblemeLineaireEtenduPartieFixe[i]) - ->CoefficientsDeLaMatriceDesContraintes); - free(ProblemeHydrauliqueEtendu->ProblemeLineaireEtenduPartieFixe[i]->IndicesColonnes); - free(ProblemeHydrauliqueEtendu->ProblemeLineaireEtenduPartieFixe[i]); - - free(ProblemeHydrauliqueEtendu->ProblemeLineaireEtenduPartieVariable[i]->Xmin); - free(ProblemeHydrauliqueEtendu->ProblemeLineaireEtenduPartieVariable[i]->Xmax); - free(ProblemeHydrauliqueEtendu->ProblemeLineaireEtenduPartieVariable[i]->SecondMembre); - free((ProblemeHydrauliqueEtendu->ProblemeLineaireEtenduPartieVariable[i]) - ->AdresseOuPlacerLaValeurDesVariablesOptimisees); - free(ProblemeHydrauliqueEtendu->ProblemeLineaireEtenduPartieVariable[i]->X); - free((ProblemeHydrauliqueEtendu->ProblemeLineaireEtenduPartieVariable[i]) - ->PositionDeLaVariable); - free( - ProblemeHydrauliqueEtendu->ProblemeLineaireEtenduPartieVariable[i]->ComplementDeLaBase); - free(ProblemeHydrauliqueEtendu->ProblemeLineaireEtenduPartieVariable[i]->CoutsReduits); - free((ProblemeHydrauliqueEtendu->ProblemeLineaireEtenduPartieVariable[i]) - ->CoutsMarginauxDesContraintes); - free(ProblemeHydrauliqueEtendu->ProblemeLineaireEtenduPartieVariable[i]); - - ProbSpx = (PROBLEME_SPX*)ProblemeHydrauliqueEtendu->ProblemeSpx[i]; - if (ProbSpx != NULL) - { + auto ProbSpx = ProblemeHydrauliqueEtendu.ProblemeSpx[i]; + if (ProbSpx) SPX_LibererProbleme(ProbSpx); - } } - free(ProblemeHydrauliqueEtendu->NbJoursDUnProbleme); - free(ProblemeHydrauliqueEtendu->CorrespondanceDesVariables); - free(ProblemeHydrauliqueEtendu->ProblemeLineaireEtenduPartieFixe); - free(ProblemeHydrauliqueEtendu->ProblemeLineaireEtenduPartieVariable); - free(ProblemeHydrauliqueEtendu->ProblemeSpx); - free(ProblemeHydrauliqueEtendu->Probleme); - free(ProblemeHydrauliqueEtendu); - - free(DonneesMensuelles->TurbineMax); - free(DonneesMensuelles->TurbineMin); - free(DonneesMensuelles->TurbineCible); - free(DonneesMensuelles->Turbine); - - free(DonneesMensuelles->niveauBas); - free(DonneesMensuelles->niveauxFinJours); - free(DonneesMensuelles->apports); - free(DonneesMensuelles->overflows); - free(DonneesMensuelles->deviations); - free(DonneesMensuelles->violations); - - free(DonneesMensuelles); - return; } diff --git a/src/solver/hydro/daily2/h2o2_j_initialiser_les_bornes_des_variables.cpp b/src/solver/hydro/daily2/h2o2_j_initialiser_les_bornes_des_variables.cpp index cf4fe744a9..1419d54a2a 100644 --- a/src/solver/hydro/daily2/h2o2_j_initialiser_les_bornes_des_variables.cpp +++ b/src/solver/hydro/daily2/h2o2_j_initialiser_les_bornes_des_variables.cpp @@ -27,40 +27,28 @@ #include "h2o2_j_donnees_mensuelles.h" -void H2O2_J_InitialiserLesBornesdesVariables(DONNEES_MENSUELLES_ETENDUES* DonneesMensuelles, +void H2O2_J_InitialiserLesBornesdesVariables(DONNEES_MENSUELLES_ETENDUES& DonneesMensuelles, int NumeroDeProbleme) { - int Pdt; - int NbPdt; - int Var; - double* Xmax; - double* Xmin; + const auto& TurbineMax = DonneesMensuelles.TurbineMax; + const auto& TurbineMin = DonneesMensuelles.TurbineMin; - int* NumeroVar_Turbine; + auto& ProblemeHydrauliqueEtendu = DonneesMensuelles.ProblemeHydrauliqueEtendu; - double* TurbineMax = DonneesMensuelles->TurbineMax; - const double* TurbineMin = DonneesMensuelles->TurbineMin; + int NbPdt = ProblemeHydrauliqueEtendu.NbJoursDUnProbleme[NumeroDeProbleme]; - PROBLEME_HYDRAULIQUE_ETENDU* ProblemeHydrauliqueEtendu; - CORRESPONDANCE_DES_VARIABLES_PB_ETENDU* CorrespondanceDesVariables; - PROBLEME_LINEAIRE_ETENDU_PARTIE_VARIABLE* ProblemeLineaireEtenduPartieVariable; + auto& CorrespondanceDesVariables + = ProblemeHydrauliqueEtendu.CorrespondanceDesVariables[NumeroDeProbleme]; + auto& ProblemeLineaireEtenduPartieVariable + = ProblemeHydrauliqueEtendu.ProblemeLineaireEtenduPartieVariable[NumeroDeProbleme]; - ProblemeHydrauliqueEtendu = DonneesMensuelles->ProblemeHydrauliqueEtendu; + auto& NumeroVar_Turbine = CorrespondanceDesVariables.NumeroVar_Turbine; - NbPdt = ProblemeHydrauliqueEtendu->NbJoursDUnProbleme[NumeroDeProbleme]; - - CorrespondanceDesVariables - = ProblemeHydrauliqueEtendu->CorrespondanceDesVariables[NumeroDeProbleme]; - ProblemeLineaireEtenduPartieVariable - = ProblemeHydrauliqueEtendu->ProblemeLineaireEtenduPartieVariable[NumeroDeProbleme]; - - NumeroVar_Turbine = CorrespondanceDesVariables->NumeroVar_Turbine; - - Xmax = ProblemeLineaireEtenduPartieVariable->Xmax; - Xmin = ProblemeLineaireEtenduPartieVariable->Xmin; - for (Pdt = 0; Pdt < NbPdt; Pdt++) + auto& Xmax = ProblemeLineaireEtenduPartieVariable.Xmax; + auto& Xmin = ProblemeLineaireEtenduPartieVariable.Xmin; + for (int Pdt = 0; Pdt < NbPdt; Pdt++) { - Var = NumeroVar_Turbine[Pdt]; + int Var = NumeroVar_Turbine[Pdt]; Xmax[Var] = TurbineMax[Pdt]; Xmin[Var] = TurbineMin[Pdt]; } diff --git a/src/solver/hydro/daily2/h2o2_j_initialiser_les_second_membre.cpp b/src/solver/hydro/daily2/h2o2_j_initialiser_les_second_membre.cpp index 0a6f947f23..982136eb45 100644 --- a/src/solver/hydro/daily2/h2o2_j_initialiser_les_second_membre.cpp +++ b/src/solver/hydro/daily2/h2o2_j_initialiser_les_second_membre.cpp @@ -27,61 +27,55 @@ #include "h2o2_j_donnees_mensuelles.h" -void H2O2_J_InitialiserLeSecondMembre(DONNEES_MENSUELLES_ETENDUES* DonneesMensuelles, +void H2O2_J_InitialiserLeSecondMembre(DONNEES_MENSUELLES_ETENDUES& DonneesMensuelles, int NumeroDeProbleme) { - PROBLEME_HYDRAULIQUE_ETENDU* ProblemeHydrauliqueEtendu; - PROBLEME_LINEAIRE_ETENDU_PARTIE_VARIABLE* ProblemeLineairePartieVariable; - double* SecondMembre; + auto& ProblemeHydrauliqueEtendu = DonneesMensuelles.ProblemeHydrauliqueEtendu; - ProblemeHydrauliqueEtendu = DonneesMensuelles->ProblemeHydrauliqueEtendu; - ProblemeLineairePartieVariable - = ProblemeHydrauliqueEtendu->ProblemeLineaireEtenduPartieVariable[NumeroDeProbleme]; - SecondMembre = ProblemeLineairePartieVariable->SecondMembre; + auto& ProblemeLineairePartieVariable + = ProblemeHydrauliqueEtendu.ProblemeLineaireEtenduPartieVariable[NumeroDeProbleme]; + auto& SecondMembre = ProblemeLineairePartieVariable.SecondMembre; - int NbPdt, Pdt, Cnt; + int NbPdt = ProblemeHydrauliqueEtendu.NbJoursDUnProbleme[NumeroDeProbleme]; + int Cnt = 0; - NbPdt = ProblemeHydrauliqueEtendu->NbJoursDUnProbleme[NumeroDeProbleme]; - - Cnt = 0; - - SecondMembre[Cnt] = DonneesMensuelles->NiveauInitialDuMois + DonneesMensuelles->apports[0]; + SecondMembre[Cnt] = DonneesMensuelles.NiveauInitialDuMois + DonneesMensuelles.apports[0]; Cnt++; - for (Pdt = 1; Pdt < NbPdt; Pdt++) + for (int Pdt = 1; Pdt < NbPdt; Pdt++) { - SecondMembre[Cnt] = DonneesMensuelles->apports[Pdt]; + SecondMembre[Cnt] = DonneesMensuelles.apports[Pdt]; Cnt++; } - SecondMembre[Cnt] = DonneesMensuelles->TurbineDuMois; + SecondMembre[Cnt] = DonneesMensuelles.TurbineDuMois; Cnt++; - for (Pdt = 0; Pdt < NbPdt; Pdt++) + for (int Pdt = 0; Pdt < NbPdt; Pdt++) { - SecondMembre[Cnt] = DonneesMensuelles->TurbineCible[Pdt]; + SecondMembre[Cnt] = DonneesMensuelles.TurbineCible[Pdt]; Cnt++; } - for (Pdt = 0; Pdt < NbPdt; Pdt++) + for (int Pdt = 0; Pdt < NbPdt; Pdt++) { - SecondMembre[Cnt] = DonneesMensuelles->TurbineCible[Pdt]; + SecondMembre[Cnt] = DonneesMensuelles.TurbineCible[Pdt]; Cnt++; } - for (Pdt = 0; Pdt < NbPdt; Pdt++) + for (int Pdt = 0; Pdt < NbPdt; Pdt++) { SecondMembre[Cnt] = 0.; Cnt++; } - for (Pdt = 0; Pdt < NbPdt; Pdt++) + for (int Pdt = 0; Pdt < NbPdt; Pdt++) { - SecondMembre[Cnt] = DonneesMensuelles->niveauBas[Pdt]; + SecondMembre[Cnt] = DonneesMensuelles.niveauBas[Pdt]; Cnt++; } - for (Pdt = 0; Pdt < NbPdt; Pdt++) + for (int Pdt = 0; Pdt < NbPdt; Pdt++) { SecondMembre[Cnt] = 0.; Cnt++; diff --git a/src/solver/hydro/daily2/h2o2_j_instanciation.cpp b/src/solver/hydro/daily2/h2o2_j_instanciation.cpp index 6dc6300c18..89b5e22119 100644 --- a/src/solver/hydro/daily2/h2o2_j_instanciation.cpp +++ b/src/solver/hydro/daily2/h2o2_j_instanciation.cpp @@ -28,174 +28,64 @@ #include "h2o2_j_donnees_mensuelles.h" #include "h2o2_j_fonctions.h" -DONNEES_MENSUELLES_ETENDUES* H2O2_J_Instanciation() +DONNEES_MENSUELLES_ETENDUES H2O2_J_Instanciation() { - int i; - int* NbJoursDUnProbleme; - int NombreDeProblemes; - int NbPdt; - int j; - int NombreDeVariables; - int NombreDeContraintes; - int NombreDeTermesAlloues; - DONNEES_MENSUELLES_ETENDUES* DonneesMensuellesEtendues; - PROBLEME_HYDRAULIQUE_ETENDU* ProblemeHydrauliqueEtendu; - - CORRESPONDANCE_DES_VARIABLES_PB_ETENDU** CorrespondanceDesVariables; - PROBLEME_LINEAIRE_ETENDU_PARTIE_FIXE** ProblemeLineaireEtenduPartieFixe; - PROBLEME_LINEAIRE_ETENDU_PARTIE_VARIABLE** ProblemeLineaireEtenduPartieVariable; - CORRESPONDANCE_DES_VARIABLES_PB_ETENDU* CorrVar; - PROBLEME_LINEAIRE_ETENDU_PARTIE_FIXE* PlFixe; - PROBLEME_LINEAIRE_ETENDU_PARTIE_VARIABLE* PlVariable; - - DonneesMensuellesEtendues - = (DONNEES_MENSUELLES_ETENDUES*)malloc(sizeof(DONNEES_MENSUELLES_ETENDUES)); - if (DonneesMensuellesEtendues == NULL) - return (NULL); - - DonneesMensuellesEtendues->ProblemeHydrauliqueEtendu - = (PROBLEME_HYDRAULIQUE_ETENDU*)malloc(sizeof(PROBLEME_HYDRAULIQUE_ETENDU)); - if (DonneesMensuellesEtendues->ProblemeHydrauliqueEtendu == NULL) - return (NULL); - - ProblemeHydrauliqueEtendu = DonneesMensuellesEtendues->ProblemeHydrauliqueEtendu; - - ProblemeHydrauliqueEtendu->NombreDeProblemes = 4; - - ProblemeHydrauliqueEtendu->NbJoursDUnProbleme - = (int*)malloc(ProblemeHydrauliqueEtendu->NombreDeProblemes * sizeof(int)); - if (ProblemeHydrauliqueEtendu->NbJoursDUnProbleme == NULL) - return (0); - - NbJoursDUnProbleme = ProblemeHydrauliqueEtendu->NbJoursDUnProbleme; + DONNEES_MENSUELLES_ETENDUES DonneesMensuellesEtendues; + + auto& ProblemeHydrauliqueEtendu = DonneesMensuellesEtendues.ProblemeHydrauliqueEtendu; + + ProblemeHydrauliqueEtendu.NombreDeProblemes = 4; + + auto& NbJoursDUnProbleme = ProblemeHydrauliqueEtendu.NbJoursDUnProbleme; + NbJoursDUnProbleme.assign(ProblemeHydrauliqueEtendu.NombreDeProblemes, 0); + NbJoursDUnProbleme[0] = 28; NbJoursDUnProbleme[1] = 29; NbJoursDUnProbleme[2] = 30; NbJoursDUnProbleme[3] = 31; - DonneesMensuellesEtendues->TurbineMax = (double*)malloc(NbJoursDUnProbleme[3] * sizeof(double)); - if (DonneesMensuellesEtendues->TurbineMax == NULL) - return (NULL); - - DonneesMensuellesEtendues->TurbineMin = (double*)malloc(NbJoursDUnProbleme[3] * sizeof(double)); - if (DonneesMensuellesEtendues->TurbineMin == NULL) - return (NULL); - - DonneesMensuellesEtendues->TurbineCible - = (double*)malloc(NbJoursDUnProbleme[3] * sizeof(double)); - if (DonneesMensuellesEtendues->TurbineCible == NULL) - return (NULL); - - DonneesMensuellesEtendues->niveauBas = (double*)malloc(NbJoursDUnProbleme[3] * sizeof(double)); - if (DonneesMensuellesEtendues->niveauBas == NULL) - return (NULL); - - DonneesMensuellesEtendues->apports = (double*)malloc(NbJoursDUnProbleme[3] * sizeof(double)); - if (DonneesMensuellesEtendues->apports == NULL) - return (NULL); - - DonneesMensuellesEtendues->Turbine = (double*)malloc(NbJoursDUnProbleme[3] * sizeof(double)); - if (DonneesMensuellesEtendues->Turbine == NULL) - return (NULL); - - DonneesMensuellesEtendues->niveauxFinJours - = (double*)malloc(NbJoursDUnProbleme[3] * sizeof(double)); - if (DonneesMensuellesEtendues->niveauxFinJours == NULL) - return (NULL); - - DonneesMensuellesEtendues->overflows = (double*)malloc(NbJoursDUnProbleme[3] * sizeof(double)); - if (DonneesMensuellesEtendues->overflows == NULL) - return (NULL); - - DonneesMensuellesEtendues->deviations = (double*)malloc(NbJoursDUnProbleme[3] * sizeof(double)); - if (DonneesMensuellesEtendues->deviations == NULL) - return (NULL); - - DonneesMensuellesEtendues->violations = (double*)malloc(NbJoursDUnProbleme[3] * sizeof(double)); - if (DonneesMensuellesEtendues->violations == NULL) - return (NULL); - - NombreDeProblemes = ProblemeHydrauliqueEtendu->NombreDeProblemes; - - ProblemeHydrauliqueEtendu->CorrespondanceDesVariables - = (CORRESPONDANCE_DES_VARIABLES_PB_ETENDU**)malloc( - NombreDeProblemes * sizeof(CORRESPONDANCE_DES_VARIABLES_PB_ETENDU)); - if (ProblemeHydrauliqueEtendu->CorrespondanceDesVariables == NULL) - return (0); - - ProblemeHydrauliqueEtendu->ProblemeLineaireEtenduPartieFixe - = (PROBLEME_LINEAIRE_ETENDU_PARTIE_FIXE**)malloc( - NombreDeProblemes * sizeof(PROBLEME_LINEAIRE_ETENDU_PARTIE_FIXE)); - if (ProblemeHydrauliqueEtendu->ProblemeLineaireEtenduPartieFixe == NULL) - return (0); - - ProblemeHydrauliqueEtendu->ProblemeLineaireEtenduPartieVariable - = (PROBLEME_LINEAIRE_ETENDU_PARTIE_VARIABLE**)malloc( - NombreDeProblemes * sizeof(PROBLEME_LINEAIRE_ETENDU_PARTIE_VARIABLE)); - if (ProblemeHydrauliqueEtendu->ProblemeLineaireEtenduPartieVariable == NULL) - return (0); - - ProblemeHydrauliqueEtendu->ProblemeSpx = (void**)malloc(NombreDeProblemes * sizeof(void*)); - if (ProblemeHydrauliqueEtendu->ProblemeSpx == NULL) - return (0); - - for (i = 0; i < NombreDeProblemes; i++) - ProblemeHydrauliqueEtendu->ProblemeSpx[i] = NULL; - - ProblemeHydrauliqueEtendu->Probleme = NULL; - - CorrespondanceDesVariables = ProblemeHydrauliqueEtendu->CorrespondanceDesVariables; - ProblemeLineaireEtenduPartieFixe = ProblemeHydrauliqueEtendu->ProblemeLineaireEtenduPartieFixe; - ProblemeLineaireEtenduPartieVariable - = ProblemeHydrauliqueEtendu->ProblemeLineaireEtenduPartieVariable; - - for (i = 0; i < NombreDeProblemes; i++) - { - CorrespondanceDesVariables[i] = (CORRESPONDANCE_DES_VARIABLES_PB_ETENDU*)malloc( - sizeof(CORRESPONDANCE_DES_VARIABLES_PB_ETENDU)); - if (CorrespondanceDesVariables[i] == NULL) - return (0); - - ProblemeLineaireEtenduPartieFixe[i] = (PROBLEME_LINEAIRE_ETENDU_PARTIE_FIXE*)malloc( - sizeof(PROBLEME_LINEAIRE_ETENDU_PARTIE_FIXE)); - if (ProblemeLineaireEtenduPartieFixe[i] == NULL) - return (0); - - ProblemeLineaireEtenduPartieVariable[i] = (PROBLEME_LINEAIRE_ETENDU_PARTIE_VARIABLE*)malloc( - sizeof(PROBLEME_LINEAIRE_ETENDU_PARTIE_VARIABLE)); - if (ProblemeLineaireEtenduPartieVariable[i] == NULL) - return (0); - } + DonneesMensuellesEtendues.TurbineMax.assign(NbJoursDUnProbleme[3], 0.); + DonneesMensuellesEtendues.TurbineMin.assign(NbJoursDUnProbleme[3], 0.); + DonneesMensuellesEtendues.TurbineCible.assign(NbJoursDUnProbleme[3], 0.); - for (i = 0; i < NombreDeProblemes; i++) - { - NbPdt = NbJoursDUnProbleme[i]; + DonneesMensuellesEtendues.niveauBas.assign(NbJoursDUnProbleme[3], 0.); + DonneesMensuellesEtendues.apports.assign(NbJoursDUnProbleme[3], 0.); - CorrVar = CorrespondanceDesVariables[i]; + DonneesMensuellesEtendues.Turbine.assign(NbJoursDUnProbleme[3], 0.); + DonneesMensuellesEtendues.niveauxFinJours.assign(NbJoursDUnProbleme[3], 0.); + DonneesMensuellesEtendues.overflows.assign(NbJoursDUnProbleme[3], 0.); + DonneesMensuellesEtendues.deviations.assign(NbJoursDUnProbleme[3], 0.); + DonneesMensuellesEtendues.violations.assign(NbJoursDUnProbleme[3], 0.); - CorrVar->NumeroVar_Turbine = (int*)malloc(NbPdt * sizeof(int)); - if (CorrVar->NumeroVar_Turbine == NULL) - return (0); + int NombreDeProblemes = ProblemeHydrauliqueEtendu.NombreDeProblemes; - CorrVar->NumeroVar_niveauxFinJours = (int*)malloc(NbPdt * sizeof(int)); - if (CorrVar->NumeroVar_niveauxFinJours == NULL) - return (0); + ProblemeHydrauliqueEtendu.CorrespondanceDesVariables.resize(NombreDeProblemes); + ProblemeHydrauliqueEtendu.ProblemeLineaireEtenduPartieFixe.resize(NombreDeProblemes); + ProblemeHydrauliqueEtendu.ProblemeLineaireEtenduPartieVariable.resize(NombreDeProblemes); - CorrVar->NumeroVar_overflow = (int*)malloc(NbPdt * sizeof(int)); - if (CorrVar->NumeroVar_overflow == NULL) - return (0); + ProblemeHydrauliqueEtendu.ProblemeSpx.assign(NombreDeProblemes, nullptr); - CorrVar->NumeroVar_deviations = (int*)malloc(NbPdt * sizeof(int)); - if (CorrVar->NumeroVar_deviations == NULL) - return (0); + auto& CorrespondanceDesVariables = ProblemeHydrauliqueEtendu.CorrespondanceDesVariables; + auto& ProblemeLineaireEtenduPartieFixe + = ProblemeHydrauliqueEtendu.ProblemeLineaireEtenduPartieFixe; + auto& ProblemeLineaireEtenduPartieVariable + = ProblemeHydrauliqueEtendu.ProblemeLineaireEtenduPartieVariable; + + for (int i = 0; i < NombreDeProblemes; i++) + { + int NbPdt = NbJoursDUnProbleme[i]; - CorrVar->NumeroVar_violations = (int*)malloc(NbPdt * sizeof(int)); - if (CorrVar->NumeroVar_violations == NULL) - return (0); + auto& CorrVar = CorrespondanceDesVariables[i]; - PlFixe = ProblemeLineaireEtenduPartieFixe[i]; + CorrVar.NumeroVar_Turbine.assign(NbPdt, 0); + CorrVar.NumeroVar_niveauxFinJours.assign(NbPdt, 0); + CorrVar.NumeroVar_overflow.assign(NbPdt, 0); + CorrVar.NumeroVar_deviations.assign(NbPdt, 0); + CorrVar.NumeroVar_violations.assign(NbPdt, 0); - NombreDeVariables = 0; + auto& PlFixe = ProblemeLineaireEtenduPartieFixe[i]; + + int NombreDeVariables = 0; NombreDeVariables += NbPdt; NombreDeVariables += NbPdt; @@ -207,16 +97,12 @@ DONNEES_MENSUELLES_ETENDUES* H2O2_J_Instanciation() NombreDeVariables += 1; NombreDeVariables += 1; - PlFixe->NombreDeVariables = NombreDeVariables; - PlFixe->CoutLineaire = (double*)malloc(NombreDeVariables * sizeof(double)); - if (PlFixe->CoutLineaire == NULL) - return (0); + PlFixe.NombreDeVariables = NombreDeVariables; + PlFixe.CoutLineaire.assign(NombreDeVariables, 0); - PlFixe->TypeDeVariable = (int*)malloc(NombreDeVariables * sizeof(int)); - if (PlFixe->TypeDeVariable == NULL) - return (0); + PlFixe.TypeDeVariable.assign(NombreDeVariables, 0); - NombreDeContraintes = 0; + int NombreDeContraintes = 0; NombreDeContraintes += NbPdt; NombreDeContraintes += 1; @@ -226,20 +112,13 @@ DONNEES_MENSUELLES_ETENDUES* H2O2_J_Instanciation() NombreDeContraintes += NbPdt; NombreDeContraintes += NbPdt; - PlFixe->NombreDeContraintes = NombreDeContraintes; - PlFixe->Sens = (char*)malloc(NombreDeContraintes * sizeof(char)); - if (PlFixe->Sens == NULL) - return (0); - - PlFixe->IndicesDebutDeLigne = (int*)malloc(NombreDeContraintes * sizeof(int)); - if (PlFixe->IndicesDebutDeLigne == NULL) - return (0); + PlFixe.NombreDeContraintes = NombreDeContraintes; + PlFixe.Sens.assign(NombreDeContraintes, 0); - PlFixe->NombreDeTermesDesLignes = (int*)malloc(NombreDeContraintes * sizeof(int)); - if (PlFixe->NombreDeTermesDesLignes == NULL) - return (0); + PlFixe.IndicesDebutDeLigne.assign(NombreDeContraintes, 0.); + PlFixe.NombreDeTermesDesLignes.assign(NombreDeContraintes, 0.); - NombreDeTermesAlloues = 0; + int NombreDeTermesAlloues = 0; NombreDeTermesAlloues += 3; NombreDeTermesAlloues += 4 * (NbPdt - 1); NombreDeTermesAlloues += 1; @@ -250,79 +129,47 @@ DONNEES_MENSUELLES_ETENDUES* H2O2_J_Instanciation() NombreDeTermesAlloues += 2 * NbPdt; NombreDeTermesAlloues += 2 * NbPdt; - PlFixe->NombreDeTermesAlloues = NombreDeTermesAlloues; - PlFixe->CoefficientsDeLaMatriceDesContraintes - = (double*)malloc(NombreDeTermesAlloues * sizeof(double)); - if (PlFixe->CoefficientsDeLaMatriceDesContraintes == NULL) - return (0); - - PlFixe->IndicesColonnes = (int*)malloc(NombreDeTermesAlloues * sizeof(int)); - if (PlFixe->IndicesColonnes == NULL) - return (0); - - PlVariable = ProblemeLineaireEtenduPartieVariable[i]; - PlVariable->Xmin = (double*)malloc(NombreDeVariables * sizeof(double)); - if (PlVariable->Xmin == NULL) - return (0); - - PlVariable->Xmax = (double*)malloc(NombreDeVariables * sizeof(double)); - if (PlVariable->Xmax == NULL) - return (0); - - PlVariable->SecondMembre = (double*)malloc(NombreDeContraintes * sizeof(double)); - if (PlVariable->SecondMembre == NULL) - return (0); - - PlVariable->AdresseOuPlacerLaValeurDesVariablesOptimisees - = (double**)malloc(NombreDeVariables * sizeof(double*)); - if (PlVariable->AdresseOuPlacerLaValeurDesVariablesOptimisees == NULL) - return (0); - - PlVariable->X = (double*)malloc(NombreDeVariables * sizeof(double)); - if (PlVariable->X == NULL) - return (0); - - for (j = 0; j < NombreDeVariables; j++) - PlVariable->AdresseOuPlacerLaValeurDesVariablesOptimisees[j] = NULL; - - PlVariable->PositionDeLaVariable = (int*)malloc(NombreDeVariables * sizeof(int)); - if (PlVariable->PositionDeLaVariable == NULL) - return (0); - - PlVariable->ComplementDeLaBase = (int*)malloc(NombreDeContraintes * sizeof(int)); - if (PlVariable->ComplementDeLaBase == NULL) - return (0); - - PlVariable->CoutsReduits = (double*)malloc(NombreDeVariables * sizeof(double)); - if (PlVariable->CoutsReduits == NULL) - return (0); - - PlVariable->CoutsMarginauxDesContraintes - = (double*)malloc(NombreDeContraintes * sizeof(double)); - if (PlVariable->CoutsMarginauxDesContraintes == NULL) - return (0); + PlFixe.NombreDeTermesAlloues = NombreDeTermesAlloues; + PlFixe.CoefficientsDeLaMatriceDesContraintes.assign(NombreDeTermesAlloues, 0.); + + PlFixe.IndicesColonnes.assign(NombreDeTermesAlloues, 0); + + auto& PlVariable = ProblemeLineaireEtenduPartieVariable[i]; + + PlVariable.X.assign(NombreDeVariables, 0.); + PlVariable.Xmin.assign(NombreDeVariables, 0.); + PlVariable.Xmax.assign(NombreDeVariables, 0.); + PlVariable.SecondMembre.assign(NombreDeContraintes, 0.); + + PlVariable.AdresseOuPlacerLaValeurDesVariablesOptimisees.assign(NombreDeVariables, nullptr); + + PlVariable.PositionDeLaVariable.assign(NombreDeVariables, 0); + PlVariable.ComplementDeLaBase.assign(NombreDeContraintes, 0); + + PlVariable.CoutsReduits.assign(NombreDeVariables, 0.); + PlVariable.CoutsMarginauxDesContraintes.assign(NombreDeContraintes, 0.); } - for (i = 0; i < NombreDeProblemes; i++) + for (int i = 0; i < NombreDeProblemes; i++) { H2O2_j_ConstruireLesVariables( NbJoursDUnProbleme[i], DonneesMensuellesEtendues, - ProblemeLineaireEtenduPartieVariable[i]->Xmin, - ProblemeLineaireEtenduPartieVariable[i]->Xmax, - ProblemeLineaireEtenduPartieFixe[i]->TypeDeVariable, - ProblemeLineaireEtenduPartieVariable[i]->AdresseOuPlacerLaValeurDesVariablesOptimisees, + ProblemeLineaireEtenduPartieVariable[i].Xmin, + ProblemeLineaireEtenduPartieVariable[i].Xmax, + ProblemeLineaireEtenduPartieFixe[i].TypeDeVariable, + ProblemeLineaireEtenduPartieVariable[i].AdresseOuPlacerLaValeurDesVariablesOptimisees, CorrespondanceDesVariables[i]); H2O2_J_ConstruireLesContraintes( NbJoursDUnProbleme[i], - ProblemeLineaireEtenduPartieFixe[i]->IndicesDebutDeLigne, - ProblemeLineaireEtenduPartieFixe[i]->Sens, - ProblemeLineaireEtenduPartieFixe[i]->NombreDeTermesDesLignes, - ProblemeLineaireEtenduPartieFixe[i]->CoefficientsDeLaMatriceDesContraintes, - ProblemeLineaireEtenduPartieFixe[i]->IndicesColonnes, + ProblemeLineaireEtenduPartieFixe[i].IndicesDebutDeLigne, + ProblemeLineaireEtenduPartieFixe[i].Sens, + ProblemeLineaireEtenduPartieFixe[i].NombreDeTermesDesLignes, + ProblemeLineaireEtenduPartieFixe[i].CoefficientsDeLaMatriceDesContraintes, + ProblemeLineaireEtenduPartieFixe[i].IndicesColonnes, CorrespondanceDesVariables[i]); } - return (DonneesMensuellesEtendues); + return DonneesMensuellesEtendues; } diff --git a/src/solver/hydro/daily2/h2o2_j_optimiser_un_mois.cpp b/src/solver/hydro/daily2/h2o2_j_optimiser_un_mois.cpp index e41a0ff52f..c791b2d8ae 100644 --- a/src/solver/hydro/daily2/h2o2_j_optimiser_un_mois.cpp +++ b/src/solver/hydro/daily2/h2o2_j_optimiser_un_mois.cpp @@ -28,17 +28,15 @@ #include "h2o2_j_donnees_mensuelles.h" #include "h2o2_j_fonctions.h" -void H2O2_J_OptimiserUnMois(DONNEES_MENSUELLES_ETENDUES* DonneesMensuelles) +void H2O2_J_OptimiserUnMois(DONNEES_MENSUELLES_ETENDUES& DonneesMensuelles) { - PROBLEME_HYDRAULIQUE_ETENDU* ProblemeHydrauliqueEtendu; - - ProblemeHydrauliqueEtendu = DonneesMensuelles->ProblemeHydrauliqueEtendu; + auto& ProblemeHydrauliqueEtendu = DonneesMensuelles.ProblemeHydrauliqueEtendu; int NumeroDeProbleme = -1; - for (int i = 0; i < ProblemeHydrauliqueEtendu->NombreDeProblemes; i++) + for (int i = 0; i < ProblemeHydrauliqueEtendu.NombreDeProblemes; i++) { - if (DonneesMensuelles->NombreDeJoursDuMois - == ProblemeHydrauliqueEtendu->NbJoursDUnProbleme[i]) + if (DonneesMensuelles.NombreDeJoursDuMois + == ProblemeHydrauliqueEtendu.NbJoursDUnProbleme[i]) { NumeroDeProbleme = i; break; @@ -47,16 +45,14 @@ void H2O2_J_OptimiserUnMois(DONNEES_MENSUELLES_ETENDUES* DonneesMensuelles) if (NumeroDeProbleme < 0) { - DonneesMensuelles->ResultatsValides = EMERGENCY_SHUT_DOWN; + DonneesMensuelles.ResultatsValides = EMERGENCY_SHUT_DOWN; return; } - DonneesMensuelles->ResultatsValides = NON; + DonneesMensuelles.ResultatsValides = NON; H2O2_J_InitialiserLeSecondMembre(DonneesMensuelles, NumeroDeProbleme); - H2O2_J_InitialiserLesBornesdesVariables(DonneesMensuelles, NumeroDeProbleme); - H2O2_J_ResoudreLeProblemeLineaire(DonneesMensuelles, NumeroDeProbleme); return; diff --git a/src/solver/hydro/daily2/h2o2_j_resoudre_le_probleme_lineaire.cpp b/src/solver/hydro/daily2/h2o2_j_resoudre_le_probleme_lineaire.cpp index bd4ab20a2a..75a5741d8d 100644 --- a/src/solver/hydro/daily2/h2o2_j_resoudre_le_probleme_lineaire.cpp +++ b/src/solver/hydro/daily2/h2o2_j_resoudre_le_probleme_lineaire.cpp @@ -25,18 +25,6 @@ ** SPDX-License-Identifier: licenceRef-GPL3_WITH_RTE-Exceptions */ -#ifdef __CPLUSPLUS -extern "C" -{ -#endif - -#include "spx_definition_arguments.h" -#include "spx_fonctions.h" - -#ifdef __CPLUSPLUS -} -#endif - #include "h2o2_j_donnees_mensuelles.h" #include "h2o2_j_fonctions.h" @@ -46,46 +34,24 @@ extern "C" #define SNPRINTF snprintf #endif -void H2O2_J_ResoudreLeProblemeLineaire(DONNEES_MENSUELLES_ETENDUES* DonneesMensuelles, +void H2O2_J_ResoudreLeProblemeLineaire(DONNEES_MENSUELLES_ETENDUES& DonneesMensuelles, int NumeroDeProbleme) { - int Var; - double* pt; - char PremierPassage; - - PROBLEME_HYDRAULIQUE_ETENDU* ProblemeHydrauliqueEtendu; - PROBLEME_LINEAIRE_ETENDU_PARTIE_VARIABLE* ProblemeLineaireEtenduPartieVariable; - PROBLEME_LINEAIRE_ETENDU_PARTIE_FIXE* ProblemeLineaireEtenduPartieFixe; - - PROBLEME_SIMPLEXE* Probleme; - PROBLEME_SPX* ProbSpx; + auto& ProblemeHydrauliqueEtendu = DonneesMensuelles.ProblemeHydrauliqueEtendu; - PremierPassage = OUI; + auto& ProblemeLineaireEtenduPartieVariable + = ProblemeHydrauliqueEtendu.ProblemeLineaireEtenduPartieVariable[NumeroDeProbleme]; + auto& ProblemeLineaireEtenduPartieFixe + = ProblemeHydrauliqueEtendu.ProblemeLineaireEtenduPartieFixe[NumeroDeProbleme]; - ProblemeHydrauliqueEtendu = DonneesMensuelles->ProblemeHydrauliqueEtendu; + PROBLEME_SPX* ProbSpx = ProblemeHydrauliqueEtendu.ProblemeSpx[NumeroDeProbleme]; + auto Probleme = std::make_unique(); - ProblemeLineaireEtenduPartieVariable - = ProblemeHydrauliqueEtendu->ProblemeLineaireEtenduPartieVariable[NumeroDeProbleme]; - ProblemeLineaireEtenduPartieFixe - = ProblemeHydrauliqueEtendu->ProblemeLineaireEtenduPartieFixe[NumeroDeProbleme]; - - ProbSpx = (PROBLEME_SPX*)ProblemeHydrauliqueEtendu->ProblemeSpx[NumeroDeProbleme]; - - Probleme = (PROBLEME_SIMPLEXE*)ProblemeHydrauliqueEtendu->Probleme; - if (Probleme == NULL) - { - Probleme = (PROBLEME_SIMPLEXE*)malloc(sizeof(PROBLEME_SIMPLEXE)); - if (Probleme == NULL) - { - DonneesMensuelles->ResultatsValides = EMERGENCY_SHUT_DOWN; - return; - } - ProblemeHydrauliqueEtendu->Probleme = (void*)Probleme; - } + bool premierPassage = true; RESOLUTION: - if (ProbSpx == NULL) + if (!ProbSpx) { Probleme->Contexte = SIMPLEXE_SEUL; Probleme->BaseDeDepartFournie = NON_SPX; @@ -97,29 +63,29 @@ void H2O2_J_ResoudreLeProblemeLineaire(DONNEES_MENSUELLES_ETENDUES* DonneesMensu Probleme->BaseDeDepartFournie = UTILISER_LA_BASE_DU_PROBLEME_SPX; SPX_ModifierLeVecteurSecondMembre(ProbSpx, - ProblemeLineaireEtenduPartieVariable->SecondMembre, - ProblemeLineaireEtenduPartieFixe->Sens, - ProblemeLineaireEtenduPartieFixe->NombreDeContraintes); + ProblemeLineaireEtenduPartieVariable.SecondMembre.data(), + ProblemeLineaireEtenduPartieFixe.Sens.data(), + ProblemeLineaireEtenduPartieFixe.NombreDeContraintes); } Probleme->NombreMaxDIterations = -1; Probleme->DureeMaxDuCalcul = -1.; - Probleme->CoutLineaire = ProblemeLineaireEtenduPartieFixe->CoutLineaire; - Probleme->X = ProblemeLineaireEtenduPartieVariable->X; - Probleme->Xmin = ProblemeLineaireEtenduPartieVariable->Xmin; - Probleme->Xmax = ProblemeLineaireEtenduPartieVariable->Xmax; - Probleme->NombreDeVariables = ProblemeLineaireEtenduPartieFixe->NombreDeVariables; - Probleme->TypeDeVariable = ProblemeLineaireEtenduPartieFixe->TypeDeVariable; - - Probleme->NombreDeContraintes = ProblemeLineaireEtenduPartieFixe->NombreDeContraintes; - Probleme->IndicesDebutDeLigne = ProblemeLineaireEtenduPartieFixe->IndicesDebutDeLigne; - Probleme->NombreDeTermesDesLignes = ProblemeLineaireEtenduPartieFixe->NombreDeTermesDesLignes; - Probleme->IndicesColonnes = ProblemeLineaireEtenduPartieFixe->IndicesColonnes; + Probleme->CoutLineaire = ProblemeLineaireEtenduPartieFixe.CoutLineaire.data(); + Probleme->X = ProblemeLineaireEtenduPartieVariable.X.data(); + Probleme->Xmin = ProblemeLineaireEtenduPartieVariable.Xmin.data(); + Probleme->Xmax = ProblemeLineaireEtenduPartieVariable.Xmax.data(); + Probleme->NombreDeVariables = ProblemeLineaireEtenduPartieFixe.NombreDeVariables; + Probleme->TypeDeVariable = ProblemeLineaireEtenduPartieFixe.TypeDeVariable.data(); + + Probleme->NombreDeContraintes = ProblemeLineaireEtenduPartieFixe.NombreDeContraintes; + Probleme->IndicesDebutDeLigne = ProblemeLineaireEtenduPartieFixe.IndicesDebutDeLigne.data(); + Probleme->NombreDeTermesDesLignes = ProblemeLineaireEtenduPartieFixe.NombreDeTermesDesLignes.data(); + Probleme->IndicesColonnes = ProblemeLineaireEtenduPartieFixe.IndicesColonnes.data(); Probleme->CoefficientsDeLaMatriceDesContraintes - = ProblemeLineaireEtenduPartieFixe->CoefficientsDeLaMatriceDesContraintes; - Probleme->Sens = ProblemeLineaireEtenduPartieFixe->Sens; - Probleme->SecondMembre = ProblemeLineaireEtenduPartieVariable->SecondMembre; + = ProblemeLineaireEtenduPartieFixe.CoefficientsDeLaMatriceDesContraintes.data(); + Probleme->Sens = ProblemeLineaireEtenduPartieFixe.Sens.data(); + Probleme->SecondMembre = ProblemeLineaireEtenduPartieVariable.SecondMembre.data(); Probleme->ChoixDeLAlgorithme = SPX_DUAL; @@ -127,9 +93,9 @@ void H2O2_J_ResoudreLeProblemeLineaire(DONNEES_MENSUELLES_ETENDUES* DonneesMensu Probleme->FaireDuScaling = OUI_SPX; Probleme->StrategieAntiDegenerescence = AGRESSIF; - Probleme->PositionDeLaVariable = ProblemeLineaireEtenduPartieVariable->PositionDeLaVariable; + Probleme->PositionDeLaVariable = ProblemeLineaireEtenduPartieVariable.PositionDeLaVariable.data(); Probleme->NbVarDeBaseComplementaires = 0; - Probleme->ComplementDeLaBase = ProblemeLineaireEtenduPartieVariable->ComplementDeLaBase; + Probleme->ComplementDeLaBase = ProblemeLineaireEtenduPartieVariable.ComplementDeLaBase.data(); Probleme->LibererMemoireALaFin = NON_SPX; @@ -137,11 +103,11 @@ void H2O2_J_ResoudreLeProblemeLineaire(DONNEES_MENSUELLES_ETENDUES* DonneesMensu Probleme->CoutMax = 0.0; Probleme->CoutsMarginauxDesContraintes - = ProblemeLineaireEtenduPartieVariable->CoutsMarginauxDesContraintes; - Probleme->CoutsReduits = ProblemeLineaireEtenduPartieVariable->CoutsReduits; + = ProblemeLineaireEtenduPartieVariable.CoutsMarginauxDesContraintes.data(); + Probleme->CoutsReduits = ProblemeLineaireEtenduPartieVariable.CoutsReduits.data(); #ifndef NDEBUG - if (PremierPassage == OUI) + if (premierPassage) Probleme->AffichageDesTraces = NON_SPX; else Probleme->AffichageDesTraces = OUI_SPX; @@ -151,54 +117,50 @@ void H2O2_J_ResoudreLeProblemeLineaire(DONNEES_MENSUELLES_ETENDUES* DonneesMensu Probleme->NombreDeContraintesCoupes = 0; - ProbSpx = SPX_Simplexe(Probleme, ProbSpx); + ProbSpx = SPX_Simplexe(Probleme.get(), ProbSpx); - if (ProbSpx != NULL) - { - ProblemeHydrauliqueEtendu->ProblemeSpx[NumeroDeProbleme] = (void*)ProbSpx; - } + if (ProbSpx) + ProblemeHydrauliqueEtendu.ProblemeSpx[NumeroDeProbleme] = ProbSpx; - ProblemeLineaireEtenduPartieVariable->ExistenceDUneSolution = Probleme->ExistenceDUneSolution; + ProblemeLineaireEtenduPartieVariable.ExistenceDUneSolution = Probleme->ExistenceDUneSolution; - if (ProblemeLineaireEtenduPartieVariable->ExistenceDUneSolution != OUI_SPX - && PremierPassage == OUI && ProbSpx != NULL) + if (ProblemeLineaireEtenduPartieVariable.ExistenceDUneSolution != OUI_SPX + && premierPassage && ProbSpx) { - if (ProblemeLineaireEtenduPartieVariable->ExistenceDUneSolution != SPX_ERREUR_INTERNE) + if (ProblemeLineaireEtenduPartieVariable.ExistenceDUneSolution != SPX_ERREUR_INTERNE) { SPX_LibererProbleme(ProbSpx); ProbSpx = NULL; - PremierPassage = NON; + premierPassage = false; goto RESOLUTION; } else { - DonneesMensuelles->ResultatsValides = EMERGENCY_SHUT_DOWN; + DonneesMensuelles.ResultatsValides = EMERGENCY_SHUT_DOWN; return; } } - if (ProblemeLineaireEtenduPartieVariable->ExistenceDUneSolution == OUI_SPX) + if (ProblemeLineaireEtenduPartieVariable.ExistenceDUneSolution == OUI_SPX) { - DonneesMensuelles->CoutSolution = 0.0; - for (Var = 0; Var < Probleme->NombreDeVariables; Var++) - DonneesMensuelles->CoutSolution += Probleme->CoutLineaire[Var] * Probleme->X[Var]; + DonneesMensuelles.CoutSolution = 0.0; + for (int Var = 0; Var < Probleme->NombreDeVariables; Var++) + DonneesMensuelles.CoutSolution += Probleme->CoutLineaire[Var] * Probleme->X[Var]; - DonneesMensuelles->ResultatsValides = OUI; + DonneesMensuelles.ResultatsValides = OUI; - for (Var = 0; Var < ProblemeLineaireEtenduPartieFixe->NombreDeVariables; Var++) + for (int Var = 0; Var < ProblemeLineaireEtenduPartieFixe.NombreDeVariables; Var++) { - pt = ProblemeLineaireEtenduPartieVariable - ->AdresseOuPlacerLaValeurDesVariablesOptimisees[Var]; - if (pt != NULL) - { - *pt = ProblemeLineaireEtenduPartieVariable->X[Var]; - } + double* pt = ProblemeLineaireEtenduPartieVariable + .AdresseOuPlacerLaValeurDesVariablesOptimisees[Var]; + if (pt) + *pt = ProblemeLineaireEtenduPartieVariable.X[Var]; } } else { - DonneesMensuelles->ResultatsValides = NON; + DonneesMensuelles.ResultatsValides = NON; return; } diff --git a/src/solver/hydro/management/daily.cpp b/src/solver/hydro/management/daily.cpp index abe4f9fab4..d97a0934c6 100644 --- a/src/solver/hydro/management/daily.cpp +++ b/src/solver/hydro/management/daily.cpp @@ -457,7 +457,7 @@ inline void HydroManagement::prepareDailyOptimalGenerations(Solver::Variable::St uint firstDay = calendar_.months[simulationMonth].daysYear.first; uint endDay = firstDay + daysPerMonth; - DONNEES_MENSUELLES_ETENDUES& problem = *H2O2_J_Instanciation(); + DONNEES_MENSUELLES_ETENDUES problem = H2O2_J_Instanciation(); H2O2_J_apply_costs(h2o2_optim_costs, problem); if (debugData) @@ -487,7 +487,7 @@ inline void HydroManagement::prepareDailyOptimalGenerations(Solver::Variable::St dayMonth++; } - H2O2_J_OptimiserUnMois(&problem); + H2O2_J_OptimiserUnMois(problem); switch (problem.ResultatsValides) { @@ -537,7 +537,7 @@ inline void HydroManagement::prepareDailyOptimalGenerations(Solver::Variable::St break; } - H2O2_J_Free(&problem); + H2O2_J_Free(problem); } uint firstDaySimu = parameters_.simulationDays.first; diff --git a/src/solver/hydro/monthly/h2o_m_donnees_optimisation.h b/src/solver/hydro/monthly/h2o_m_donnees_optimisation.h index 0ff290ac78..7395dfa915 100644 --- a/src/solver/hydro/monthly/h2o_m_donnees_optimisation.h +++ b/src/solver/hydro/monthly/h2o_m_donnees_optimisation.h @@ -27,6 +27,18 @@ #ifndef __SOLVER_H2O_M_STRUCTURE_INTERNE__ #define __SOLVER_H2O_M_STRUCTURE_INTERNE__ +#ifdef __CPLUSPLUS +extern "C" +{ +#endif + +#include "spx_definition_arguments.h" +#include "spx_fonctions.h" + +#ifdef __CPLUSPLUS +} +#endif + #include #define LINFINI 1.e+80 @@ -115,8 +127,7 @@ typedef struct PROBLEME_LINEAIRE_PARTIE_FIXE ProblemeLineairePartieFixe; PROBLEME_LINEAIRE_PARTIE_VARIABLE ProblemeLineairePartieVariable; - std::vector ProblemeSpx; /* Il y en a 1 par reservoir */ - void* Probleme; /* Le probleme en cours passe au simplexe */ + std::vector ProblemeSpx; /* Il y en a 1 par reservoir */ double CoutDeLaSolution; double CoutDeLaSolutionBruite; diff --git a/src/solver/hydro/monthly/h2o_m_instanciation.cpp b/src/solver/hydro/monthly/h2o_m_instanciation.cpp index e91df7a7be..f6166a3a94 100644 --- a/src/solver/hydro/monthly/h2o_m_instanciation.cpp +++ b/src/solver/hydro/monthly/h2o_m_instanciation.cpp @@ -51,7 +51,6 @@ DONNEES_ANNUELLES H2O_M_Instanciation(int NombreDeReservoirs) ProblemeHydraulique.NombreDeReservoirs = NombreDeReservoirs; ProblemeHydraulique.ProblemeSpx.assign(NombreDeReservoirs, nullptr); - ProblemeHydraulique.Probleme = nullptr; CORRESPONDANCE_DES_VARIABLES& CorrespondanceDesVariables = ProblemeHydraulique.CorrespondanceDesVariables; diff --git a/src/solver/hydro/monthly/h2o_m_resoudre_le_probleme_lineaire.cpp b/src/solver/hydro/monthly/h2o_m_resoudre_le_probleme_lineaire.cpp index 56a69881ed..8b61cc3ee3 100644 --- a/src/solver/hydro/monthly/h2o_m_resoudre_le_probleme_lineaire.cpp +++ b/src/solver/hydro/monthly/h2o_m_resoudre_le_probleme_lineaire.cpp @@ -25,18 +25,6 @@ ** SPDX-License-Identifier: licenceRef-GPL3_WITH_RTE-Exceptions */ -#ifdef __CPLUSPLUS -extern "C" -{ -#endif - -#include "spx_definition_arguments.h" -#include "spx_fonctions.h" - -#ifdef __CPLUSPLUS -} -#endif - #include "h2o_m_donnees_annuelles.h" #include "h2o_m_fonctions.h" @@ -57,15 +45,9 @@ void H2O_M_ResoudreLeProblemeLineaire(DONNEES_ANNUELLES& DonneesAnnuelles, int N = ProblemeHydraulique.ProblemeLineairePartieFixe; - PROBLEME_SPX* ProbSpx = (PROBLEME_SPX*)ProblemeHydraulique.ProblemeSpx[NumeroDeReservoir]; + PROBLEME_SPX* ProbSpx = ProblemeHydraulique.ProblemeSpx[NumeroDeReservoir]; std::unique_ptr Probleme = std::make_unique(); - if (!Probleme) - { - DonneesAnnuelles.ResultatsValides = EMERGENCY_SHUT_DOWN; - return; - } - bool PremierPassage = true; RESOLUTION: @@ -139,7 +121,7 @@ void H2O_M_ResoudreLeProblemeLineaire(DONNEES_ANNUELLES& DonneesAnnuelles, int N ProbSpx = SPX_Simplexe(Probleme.get(), ProbSpx); if (ProbSpx) - ProblemeHydraulique.ProblemeSpx[NumeroDeReservoir] = (void*)ProbSpx; + ProblemeHydraulique.ProblemeSpx[NumeroDeReservoir] = ProbSpx; ProblemeLineairePartieVariable.ExistenceDUneSolution = Probleme->ExistenceDUneSolution; From f22064cafde661759f8b74666a3ea664d74f4fa2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20Omn=C3=A8s?= Date: Tue, 3 Oct 2023 16:18:18 +0200 Subject: [PATCH 06/17] Remove code duplication in src/libs/antares/study/parameters.cpp (#1667) --- src/libs/antares/study/parameters.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/libs/antares/study/parameters.cpp b/src/libs/antares/study/parameters.cpp index 6126e94e7e..04f3749109 100644 --- a/src/libs/antares/study/parameters.cpp +++ b/src/libs/antares/study/parameters.cpp @@ -1350,12 +1350,6 @@ void Parameters::prepareForSimulation(const StudyLoadOptions& options) switch (mode) { case stdmEconomy: - { - // The year-by-year mode might have been requested from the command line - if (options.forceYearByYear) - yearByYear = true; - break; - } case stdmAdequacy: { // The year-by-year mode might have been requested from the command line From 715d884d7cdb4429d82fe5a615df42cf90ade2fe Mon Sep 17 00:00:00 2001 From: payetvin <113102157+payetvin@users.noreply.github.com> Date: Wed, 4 Oct 2023 13:04:38 +0200 Subject: [PATCH 07/17] Remove RenouvelableParPalier from global variable (#1659) * [DEV] Remove RenouvelableParPalier from alea * [DEV] Changed arg of valueAtTimeStep * [DEV] use year for valueAtTimeStep calls * [DEV] Removed RenouvelableParPalier from struct * [FIX] warning * [FIX] args hour, year for valueAtTimeStep * [FIX] Remove unused var * [DEV] Try Eolien for output var * [FIX] Arg name for hourInYear * [FIX] Compile * [DEV] Add getIndex * [DEV] Remove Eolien * [DEV] Consommation * [DEV] Remove Consommation from struct * [DEV] Remove Hydraulique * [DEV] Remove (long) conversion for getIndex * [FIX] Replace wind with load * [DEV] Guillaume comments * [DEV] Solar * [DEV] Remove NumeroChroniquesTireesParPays, struct NUMERO_CHRONIQUES_TIREES_PAR_PAYS * [DEV] Rename getAvailablePower with getCoefficient * [DEV] Use getCoefficient instead of scratchpad for wind * [DEV] Use getCoefficient instead of scratchpad for solar and load * [DEV] remove ts from scratchpad * [DEV] problem.year as year * [DEV] Code smell * [DEV] Code smell 2 * [DEV] Code smell const lambda * [DEV] Code smell const * [DEV] getColumn * [FIX] Results * [FIX] windSeries * [FIX] Use double* * [FIX] const --- src/libs/antares/study/area/scratchpad.cpp | 6 +- src/libs/antares/study/area/scratchpad.h | 15 ----- src/libs/antares/study/parts/hydro/series.cpp | 5 ++ src/libs/antares/study/parts/hydro/series.h | 2 + src/libs/antares/study/parts/load/series.cpp | 15 +++++ src/libs/antares/study/parts/load/series.h | 4 ++ .../antares/study/parts/renewable/cluster.cpp | 7 ++- .../antares/study/parts/renewable/cluster.h | 2 +- src/libs/antares/study/parts/solar/series.cpp | 15 +++++ src/libs/antares/study/parts/solar/series.h | 5 +- src/libs/antares/study/parts/wind/series.cpp | 15 +++++ src/libs/antares/study/parts/wind/series.h | 4 ++ .../alea_tirage_au_sort_chroniques.cpp | 60 +------------------ src/solver/hydro/management/daily.cpp | 4 +- src/solver/hydro/management/management.cpp | 53 ++++++++-------- src/solver/hydro/management/management.h | 10 ++-- src/solver/simulation/common-hydro-remix.cpp | 2 +- .../simulation/sim_allocation_tableaux.cpp | 13 ---- .../simulation/sim_calcul_economique.cpp | 34 +++++------ .../sim_extern_variables_globales.h | 1 - src/solver/simulation/sim_structure_donnees.h | 9 --- .../simulation/sim_variables_globales.cpp | 1 - src/solver/variable/commons/hydro.h | 2 +- src/solver/variable/commons/load.h | 3 +- src/solver/variable/commons/solar.h | 3 +- src/solver/variable/commons/wind.h | 3 +- .../economy/productionByRenewablePlant.h | 3 +- .../variable/economy/renewableGeneration.h | 3 +- 28 files changed, 123 insertions(+), 176 deletions(-) diff --git a/src/libs/antares/study/area/scratchpad.cpp b/src/libs/antares/study/area/scratchpad.cpp index 36aba7b633..6c63ebf9ac 100644 --- a/src/libs/antares/study/area/scratchpad.cpp +++ b/src/libs/antares/study/area/scratchpad.cpp @@ -36,12 +36,8 @@ namespace Antares { namespace Data { -AreaScratchpad::TimeseriesData::TimeseriesData(Area& area) : - load(area.load.series->timeSeries), solar(area.solar.series->timeSeries), wind(area.wind.series->timeSeries) -{ -} -AreaScratchpad::AreaScratchpad(const StudyRuntimeInfos& rinfos, Area& area) : ts(area) +AreaScratchpad::AreaScratchpad(const StudyRuntimeInfos& rinfos, Area& area) { // alias to the simulation mode auto mode = rinfos.mode; diff --git a/src/libs/antares/study/area/scratchpad.h b/src/libs/antares/study/area/scratchpad.h index 01199a7cf8..a41733ba8e 100644 --- a/src/libs/antares/study/area/scratchpad.h +++ b/src/libs/antares/study/area/scratchpad.h @@ -61,21 +61,6 @@ class AreaScratchpad final //! Sum of all fatal hors hydro double miscGenSum[HOURS_PER_YEAR]; - //! Timeseries - struct TimeseriesData - { - TimeseriesData(Area& area); - //! Alias to the load time-series - const TSMatrix& load; - //! Alias to the solar time-series - const TSMatrix& solar; - //! Alias to the wind time-series - const TSMatrix& wind; - }; - - //! Timeseries - TimeseriesData ts; - bool hydroHasMod; //! if sum(365)[pumpMaxP * pumpMaxE] > 0. then pumpHasMod = true diff --git a/src/libs/antares/study/parts/hydro/series.cpp b/src/libs/antares/study/parts/hydro/series.cpp index 3cb60ba865..d9b1c488b8 100644 --- a/src/libs/antares/study/parts/hydro/series.cpp +++ b/src/libs/antares/study/parts/hydro/series.cpp @@ -222,5 +222,10 @@ uint64_t DataSeriesHydro::memoryUsage() const return sizeof(double) + ror.memoryUsage() + storage.memoryUsage() + mingen.memoryUsage(); } +unsigned int DataSeriesHydro::getIndex(unsigned int year) const +{ + return (count != 1) ? timeseriesNumbers[0][year] : 0; +} + } // namespace Data } // namespace Antares diff --git a/src/libs/antares/study/parts/hydro/series.h b/src/libs/antares/study/parts/hydro/series.h index 5a50ce7d5c..d0e4c768eb 100644 --- a/src/libs/antares/study/parts/hydro/series.h +++ b/src/libs/antares/study/parts/hydro/series.h @@ -105,6 +105,8 @@ class DataSeriesHydro */ void checkMinGenTsNumber(Study& s, const AreaName& areaID); + unsigned int getIndex(unsigned int year) const; + public: /*! ** \brief Run-of-the-river - ROR (MW) diff --git a/src/libs/antares/study/parts/load/series.cpp b/src/libs/antares/study/parts/load/series.cpp index 65c7c07359..35d70cd3a2 100644 --- a/src/libs/antares/study/parts/load/series.cpp +++ b/src/libs/antares/study/parts/load/series.cpp @@ -86,6 +86,21 @@ int DataSeriesLoadSaveToFolder(DataSeriesLoad* s, const AreaName& areaID, const return 0; } +double* DataSeriesLoad::getColumn(unsigned int year) const +{ + return timeSeries[getIndex(year)]; +} + +double DataSeriesLoad::getCoefficient(const unsigned int year, const unsigned int hour) const +{ + return timeSeries[getIndex(year)][hour]; +} + +unsigned int DataSeriesLoad::getIndex(unsigned int year) const +{ + return (timeSeries.width != 1) ? timeseriesNumbers[0][year] : 0; +} + bool DataSeriesLoad::forceReload(bool reload) const { return timeSeries.forceReload(reload); diff --git a/src/libs/antares/study/parts/load/series.h b/src/libs/antares/study/parts/load/series.h index 478a51485c..477ee71fcc 100644 --- a/src/libs/antares/study/parts/load/series.h +++ b/src/libs/antares/study/parts/load/series.h @@ -49,6 +49,10 @@ class DataSeriesLoad */ void markAsModified() const; + double* getColumn(unsigned int year) const; + double getCoefficient(const unsigned int year, const unsigned int hour) const; + unsigned int getIndex(unsigned int year) const; + public: /*! ** \brief Time series (MW) diff --git a/src/libs/antares/study/parts/renewable/cluster.cpp b/src/libs/antares/study/parts/renewable/cluster.cpp index 6dbfbdff48..8a229d6d65 100644 --- a/src/libs/antares/study/parts/renewable/cluster.cpp +++ b/src/libs/antares/study/parts/renewable/cluster.cpp @@ -200,14 +200,15 @@ YString Data::RenewableCluster::getTimeSeriesModeAsString() const return "unknown"; } -double RenewableCluster::valueAtTimeStep(uint timeSeriesIndex, uint timeStepIndex) const +double RenewableCluster::valueAtTimeStep(uint hourInYear, uint year) const { if (!enabled) return 0.; + uint timeSeriesIndex = (series->timeSeries.width == 1) ? 0 : series->timeseriesNumbers[0][year]; - assert(timeStepIndex < series->timeSeries.height); + assert(hourInYear < series->timeSeries.height); assert(timeSeriesIndex < series->timeSeries.width); - const double tsValue = series->timeSeries[timeSeriesIndex][timeStepIndex]; + const double tsValue = series->timeSeries[timeSeriesIndex][hourInYear]; switch (tsMode) { case powerGeneration: diff --git a/src/libs/antares/study/parts/renewable/cluster.h b/src/libs/antares/study/parts/renewable/cluster.h index 7fa60ca7fe..61e6df2a8e 100644 --- a/src/libs/antares/study/parts/renewable/cluster.h +++ b/src/libs/antares/study/parts/renewable/cluster.h @@ -155,7 +155,7 @@ class RenewableCluster final : public Cluster /* ! ** Get production value at time-step ts */ - double valueAtTimeStep(uint timeSeriesIndex, uint timeStepIndex) const; + double valueAtTimeStep(uint hourInYear, uint year) const; public: /*! diff --git a/src/libs/antares/study/parts/solar/series.cpp b/src/libs/antares/study/parts/solar/series.cpp index 0715721a23..2a4b8de360 100644 --- a/src/libs/antares/study/parts/solar/series.cpp +++ b/src/libs/antares/study/parts/solar/series.cpp @@ -86,6 +86,21 @@ int DataSeriesSolarSaveToFolder(DataSeriesSolar* s, const AreaName& areaID, cons return 0; } +double* DataSeriesSolar::getColumn(unsigned int year) const +{ + return timeSeries[getIndex(year)]; +} + +double DataSeriesSolar::getCoefficient(const unsigned int year, const unsigned int hour) const +{ + return timeSeries[getIndex(year)][hour]; +} + +unsigned int DataSeriesSolar::getIndex(unsigned int year) const +{ + return (timeSeries.width != 1) ? timeseriesNumbers[0][year] : 0; +} + bool DataSeriesSolar::forceReload(bool reload) const { return timeSeries.forceReload(reload); diff --git a/src/libs/antares/study/parts/solar/series.h b/src/libs/antares/study/parts/solar/series.h index 4cc59ecfd2..1f94c24117 100644 --- a/src/libs/antares/study/parts/solar/series.h +++ b/src/libs/antares/study/parts/solar/series.h @@ -41,11 +41,14 @@ class DataSeriesSolar { public: - bool forceReload(bool reload = false) const; void markAsModified() const; + double* getColumn(unsigned int year) const; + double getCoefficient(const unsigned int year, const unsigned int hour) const; + unsigned int getIndex(unsigned int year) const; + public: /*! ** \brief Time series (MW) diff --git a/src/libs/antares/study/parts/wind/series.cpp b/src/libs/antares/study/parts/wind/series.cpp index 77042f2489..cf47110941 100644 --- a/src/libs/antares/study/parts/wind/series.cpp +++ b/src/libs/antares/study/parts/wind/series.cpp @@ -72,6 +72,21 @@ int DataSeriesWindSaveToFolder(DataSeriesWind* d, const AreaName& areaID, const return ret; } +double* DataSeriesWind::getColumn(unsigned int year) const +{ + return timeSeries[getIndex(year)]; +} + +double DataSeriesWind::getCoefficient(const unsigned int year, const unsigned int hour) const +{ + return timeSeries[getIndex(year)][hour]; +} + +unsigned int DataSeriesWind::getIndex(unsigned int year) const +{ + return (timeSeries.width != 1) ? timeseriesNumbers[0][year] : 0; +} + bool DataSeriesWind::forceReload(bool reload) const { return timeSeries.forceReload(reload); diff --git a/src/libs/antares/study/parts/wind/series.h b/src/libs/antares/study/parts/wind/series.h index a144c9b46b..c7f77fc350 100644 --- a/src/libs/antares/study/parts/wind/series.h +++ b/src/libs/antares/study/parts/wind/series.h @@ -46,6 +46,10 @@ class DataSeriesWind void markAsModified() const; + double* getColumn(unsigned int year) const; + double getCoefficient(const unsigned int year, const unsigned int hour) const; + unsigned int getIndex(unsigned int year) const; + public: /*! ** \brief Time series (MW) diff --git a/src/solver/aleatoire/alea_tirage_au_sort_chroniques.cpp b/src/solver/aleatoire/alea_tirage_au_sort_chroniques.cpp index a1c3c6a87e..3739933de0 100644 --- a/src/solver/aleatoire/alea_tirage_au_sort_chroniques.cpp +++ b/src/solver/aleatoire/alea_tirage_au_sort_chroniques.cpp @@ -37,64 +37,6 @@ void ApplyRandomTSnumbers(const Study& study, unsigned int year, uint numSpace) { - // each area - const unsigned int count = study.areas.size(); - for (unsigned int areaIndex = 0; areaIndex != count; ++areaIndex) - { - // Variables - the current area - NUMERO_CHRONIQUES_TIREES_PAR_PAYS& ptchro = NumeroChroniquesTireesParPays[numSpace][areaIndex]; - auto& area = *(study.areas.byIndex[areaIndex]); - - // Load - { - const Data::DataSeriesLoad& data = *area.load.series; - assert(year < data.timeseriesNumbers.height); - ptchro.Consommation - = (data.timeSeries.width != 1) ? (long)data.timeseriesNumbers[0][year] : 0; // zero-based - } - // Solar - { - const Data::DataSeriesSolar& data = *area.solar.series; - assert(year < data.timeseriesNumbers.height); - ptchro.Solar - = (data.timeSeries.width != 1) ? (long)data.timeseriesNumbers[0][year] : 0; // zero-based - } - // Hydro - { - const Data::DataSeriesHydro& data = *area.hydro.series; - assert(year < data.timeseriesNumbers.height); - ptchro.Hydraulique - = (data.count != 1) ? (long)data.timeseriesNumbers[0][year] : 0; // zero-based - } - // Wind - { - const Data::DataSeriesWind& data = *area.wind.series; - assert(year < data.timeseriesNumbers.height); - ptchro.Eolien - = (data.timeSeries.width != 1) ? (long)data.timeseriesNumbers[0][year] : 0; // zero-based - } - // Renewable - { - auto end = area.renewable.list.cluster.end(); - for (auto it = area.renewable.list.cluster.begin(); it != end; ++it) - { - RenewableClusterList::SharedPtr cluster = it->second; - if (!cluster->enabled) - { - continue; - } - - const auto& data = *cluster->series; - assert(year < data.timeseriesNumbers.height); - unsigned int clusterIndex = cluster->areaWideIndex; - - ptchro.RenouvelableParPalier[clusterIndex] = (data.timeSeries.width != 1) - ? (long)data.timeseriesNumbers[0][year] - : 0; // zero-based - } - } - } // each area - // ------------------------------ // Transmission capacities // ------------------------------ @@ -111,7 +53,7 @@ void ApplyRandomTSnumbers(const Study& study, ptchro.TransmissionCapacities = (directWidth != 1) ? link->timeseriesNumbers[0][year] : 0; // zero-based } - + // ------------------------------ //Binding constraints // ------------------------------ diff --git a/src/solver/hydro/management/daily.cpp b/src/solver/hydro/management/daily.cpp index d97a0934c6..e2648e37b7 100644 --- a/src/solver/hydro/management/daily.cpp +++ b/src/solver/hydro/management/daily.cpp @@ -230,11 +230,9 @@ inline void HydroManagement::prepareDailyOptimalGenerations(Solver::Variable::St uint z = area.index; assert(z < areas_.size()); - auto& ptchro = NumeroChroniquesTireesParPays[numSpace][z]; - auto& inflowsmatrix = area.hydro.series->storage; - auto tsIndex = (uint)ptchro.Hydraulique; + auto tsIndex = area.hydro.series->getIndex(y); auto const& srcinflows = inflowsmatrix[tsIndex < inflowsmatrix.width ? tsIndex : 0]; auto& data = tmpDataByArea_[numSpace][z]; diff --git a/src/solver/hydro/management/management.cpp b/src/solver/hydro/management/management.cpp index 4f6e06e869..a0869b5055 100644 --- a/src/solver/hydro/management/management.cpp +++ b/src/solver/hydro/management/management.cpp @@ -124,17 +124,15 @@ HydroManagement::~HydroManagement() delete[] tmpDataByArea_; } -void HydroManagement::prepareInflowsScaling(uint numSpace) +void HydroManagement::prepareInflowsScaling(uint numSpace, uint year) { areas_.each([&](Data::Area& area) { uint z = area.index; - auto& ptchro = NumeroChroniquesTireesParPays[numSpace][z]; - auto& inflowsmatrix = area.hydro.series->storage; assert(inflowsmatrix.width && inflowsmatrix.height); - auto tsIndex = (uint)ptchro.Hydraulique; + auto tsIndex = area.hydro.series->getIndex(year); auto const& srcinflows = inflowsmatrix[tsIndex < inflowsmatrix.width ? tsIndex : 0]; auto& data = tmpDataByArea_[numSpace][z]; @@ -177,15 +175,14 @@ void HydroManagement::prepareInflowsScaling(uint numSpace) }); } -void HydroManagement::minGenerationScaling(uint numSpace) +void HydroManagement::minGenerationScaling(uint numSpace, uint year) const { - areas_.each([this, &numSpace](Data::Area& area) + areas_.each([this, &numSpace, &year](Data::Area& area) { uint z = area.index; - const auto& ptchro = NumeroChroniquesTireesParPays[numSpace][z]; auto& mingenmatrix = area.hydro.series->mingen; - auto tsIndex = (uint)ptchro.Hydraulique; + auto tsIndex = area.hydro.series->getIndex(year); auto const& srcmingen = mingenmatrix[tsIndex < mingenmatrix.width ? tsIndex : 0]; auto& data = tmpDataByArea_[numSpace][z]; @@ -342,14 +339,12 @@ bool HydroManagement::checkHourlyMinGeneration(uint tsIndex, Data::Area& area) c return true; } -bool HydroManagement::checkMinGeneration(uint numSpace) +bool HydroManagement::checkMinGeneration(uint numSpace, uint year) const { bool ret = true; - areas_.each([this, &numSpace, &ret](Data::Area& area) + areas_.each([this, &numSpace, &ret, &year](Data::Area& area) { - uint z = area.index; - const auto& ptchro = NumeroChroniquesTireesParPays[numSpace][z]; - auto tsIndex = (uint)ptchro.Hydraulique; + auto tsIndex = area.hydro.series->getIndex(year); bool useHeuristicTarget = area.hydro.useHeuristicTarget; bool followLoadModulations = area.hydro.followLoadModulations; @@ -366,7 +361,7 @@ bool HydroManagement::checkMinGeneration(uint numSpace) ret = checkWeeklyMinGeneration(tsIndex, area) && ret; return; } - + if (reservoirManagement) ret = checkYearlyMinGeneration(numSpace, tsIndex, area) && ret; else @@ -376,20 +371,21 @@ bool HydroManagement::checkMinGeneration(uint numSpace) } template -void HydroManagement::prepareNetDemand(uint numSpace) +void HydroManagement::prepareNetDemand(uint numSpace, uint year) { areas_.each([&](Data::Area& area) { uint z = area.index; auto& scratchpad = area.scratchpad[numSpace]; - auto& ptchro = NumeroChroniquesTireesParPays[numSpace][z]; - auto& rormatrix = area.hydro.series->ror; - auto tsIndex = (uint)ptchro.Hydraulique; + auto tsIndex = area.hydro.series->getIndex(year); auto& ror = rormatrix[tsIndex < rormatrix.width ? tsIndex : 0]; auto& data = tmpDataByArea_[numSpace][z]; + const double* loadSeries = area.load.series->getColumn(year); + const double* windSeries = area.wind.series->getColumn(year); + const double* solarSeries = area.solar.series->getColumn(year); for (uint hour = 0; hour != HOURS_PER_YEAR; ++hour) { @@ -400,9 +396,9 @@ void HydroManagement::prepareNetDemand(uint numSpace) // Aggregated renewable production: wind & solar if (parameters_.renewableGeneration.isAggregated()) { - netdemand = +scratchpad.ts.load[ptchro.Consommation][hour] - - scratchpad.ts.wind[ptchro.Eolien][hour] - scratchpad.miscGenSum[hour] - - scratchpad.ts.solar[ptchro.Solar][hour] - ror[hour] + netdemand = + loadSeries[hour] + - windSeries[hour] - scratchpad.miscGenSum[hour] + - solarSeries[hour] - ror[hour] - ((ModeT != Data::stdmAdequacy) ? scratchpad.mustrunSum[hour] : scratchpad.originalMustrunSum[hour]); } @@ -410,15 +406,14 @@ void HydroManagement::prepareNetDemand(uint numSpace) // Renewable clusters, if enabled else if (parameters_.renewableGeneration.isClusters()) { - netdemand = scratchpad.ts.load[ptchro.Consommation][hour] + netdemand = loadSeries[hour] - scratchpad.miscGenSum[hour] - ror[hour] - ((ModeT != Data::stdmAdequacy) ? scratchpad.mustrunSum[hour] : scratchpad.originalMustrunSum[hour]); area.renewable.list.each([&](const Antares::Data::RenewableCluster& cluster) { assert(cluster.series->timeSeries.jit == NULL && "No JIT data from the solver"); - netdemand -= cluster.valueAtTimeStep( - ptchro.RenouvelableParPalier[cluster.areaWideIndex], hour); + netdemand -= cluster.valueAtTimeStep(hour, year); }); } @@ -524,17 +519,17 @@ void HydroManagement::makeVentilation(double* randomReservoirLevel, { memset(tmpDataByArea_[numSpace], 0, sizeof(TmpDataByArea) * areas_.size()); - prepareInflowsScaling(numSpace); - minGenerationScaling(numSpace); - if (!checkMinGeneration(numSpace)) + prepareInflowsScaling(numSpace, y); + minGenerationScaling(numSpace, y); + if (!checkMinGeneration(numSpace, y)) { throw FatalError("hydro management: invalid minimum generation"); } if (parameters_.adequacy()) - prepareNetDemand(numSpace); + prepareNetDemand(numSpace, y); else - prepareNetDemand(numSpace); + prepareNetDemand(numSpace, y); prepareEffectiveDemand(numSpace); diff --git a/src/solver/hydro/management/management.h b/src/solver/hydro/management/management.h index 7ff8569c94..67d52f57ad 100644 --- a/src/solver/hydro/management/management.h +++ b/src/solver/hydro/management/management.h @@ -88,7 +88,7 @@ struct TmpDataByArea typedef struct { std::vector HydrauliqueModulableQuotidien; /* indice par jour */ - std::vector NiveauxReservoirsDebutJours; //Niveaux (quotidiens) du reservoir de début + std::vector NiveauxReservoirsDebutJours; //Niveaux (quotidiens) du reservoir de début //de jour (en cas de gestion des reservoirs). std::vector NiveauxReservoirsFinJours; //Niveaux (quotidiens) du reservoir de fin //de jour (en cas de gestion des reservoirs). @@ -121,9 +121,9 @@ class HydroManagement final private: //! Prepare inflows scaling for each area - void prepareInflowsScaling(uint numSpace); + void prepareInflowsScaling(uint numSpace, uint year); //! Prepare minimum generation scaling for each area - void minGenerationScaling(uint numSpace); + void minGenerationScaling(uint numSpace, uint year) const; //! check Monthly minimum generation is lower than available inflows bool checkMonthlyMinGeneration(uint numSpace, uint tsIndex, const Data::Area& area) const; //! check Yearly minimum generation is lower than available inflows @@ -133,10 +133,10 @@ class HydroManagement final //! check Hourly minimum generation is lower than available inflows bool checkHourlyMinGeneration(uint tsIndex, Data::Area& area) const; //! check minimum generation is lower than available inflows - bool checkMinGeneration(uint numSpace); + bool checkMinGeneration(uint numSpace, uint year) const; //! Prepare the net demand for each area template - void prepareNetDemand(uint numSpace); + void prepareNetDemand(uint numSpace, uint year); //! Prepare the effective demand for each area void prepareEffectiveDemand(uint numSpace); //! Monthly Optimal generations diff --git a/src/solver/simulation/common-hydro-remix.cpp b/src/solver/simulation/common-hydro-remix.cpp index f2909ad178..e2de5f9517 100644 --- a/src/solver/simulation/common-hydro-remix.cpp +++ b/src/solver/simulation/common-hydro-remix.cpp @@ -96,7 +96,7 @@ static bool Remix(const Data::AreaList& areas, PROBLEME_HEBDO& problem, uint num double bottom = std::numeric_limits::max(); double top = 0; - uint loadTS = NumeroChroniquesTireesParPays[numSpace][index].Consommation; + uint loadTS = area.load.series->getIndex(problem.year); auto& load = area.load.series->timeSeries; assert(load.width > 0); diff --git a/src/solver/simulation/sim_allocation_tableaux.cpp b/src/solver/simulation/sim_allocation_tableaux.cpp index 95003fc8f5..3967b0fbd5 100644 --- a/src/solver/simulation/sim_allocation_tableaux.cpp +++ b/src/solver/simulation/sim_allocation_tableaux.cpp @@ -44,19 +44,6 @@ static void AllocateResultsForEconomicMode(const Data::Study& study) void SIM_AllocationTableaux(const Data::Study& study) { - NumeroChroniquesTireesParPays.resize(study.maxNbYearsInParallel); - - for (uint numSpace = 0; numSpace < study.maxNbYearsInParallel; numSpace++) - { - NumeroChroniquesTireesParPays[numSpace].resize(study.areas.size()); - for (uint i = 0; i < study.areas.size(); ++i) - { - auto& area = *study.areas.byIndex[i]; - - NumeroChroniquesTireesParPays[numSpace][i].RenouvelableParPalier - .assign(area.renewable.clusterCount(), 0); - } - } NumeroChroniquesTireesParInterconnexion.resize(study.maxNbYearsInParallel); const uint intercoCount = study.areas.areaLinkCount(); diff --git a/src/solver/simulation/sim_calcul_economique.cpp b/src/solver/simulation/sim_calcul_economique.cpp index 29c5bb4005..60fe4aa9cd 100644 --- a/src/solver/simulation/sim_calcul_economique.cpp +++ b/src/solver/simulation/sim_calcul_economique.cpp @@ -539,6 +539,7 @@ void SIM_RenseignementProblemeHebdo(const Study& study, } int hourInYear = PasDeTempsDebut; + unsigned int year = problem.year; for (unsigned hourInWeek = 0; hourInWeek < problem.NombreDePasDeTemps; ++hourInWeek, ++hourInYear) { @@ -566,28 +567,22 @@ void SIM_RenseignementProblemeHebdo(const Study& study, for (uint k = 0; k < nbPays; ++k) { - auto& tsIndex = NumeroChroniquesTireesParPays[numSpace][k]; auto& area = *(study.areas.byIndex[k]); auto& scratchpad = area.scratchpad[numSpace]; auto& ror = area.hydro.series->ror; + auto loadSeries = area.load.series->getCoefficient(year, hourInYear); + auto windSeries = area.wind.series->getCoefficient(year, hourInYear); + auto solarSeries = area.solar.series->getCoefficient(year, hourInYear); + auto hydroSeriesIndex = area.hydro.series->getIndex(year); assert(&scratchpad); - assert((uint)hourInYear < scratchpad.ts.load.height); - assert((uint)tsIndex.Consommation < scratchpad.ts.load.width); - if (parameters.renewableGeneration.isAggregated()) - { - assert((uint)hourInYear < scratchpad.ts.solar.height); - assert((uint)hourInYear < scratchpad.ts.wind.height); - assert((uint)tsIndex.Eolien < scratchpad.ts.wind.width); - assert((uint)tsIndex.Solar < scratchpad.ts.solar.width); - } - uint tsFatalIndex = (uint)tsIndex.Hydraulique < ror.width ? tsIndex.Hydraulique : 0; + uint tsFatalIndex = hydroSeriesIndex < ror.width ? hydroSeriesIndex : 0; double& mustRunGen = problem.AllMustRunGeneration[hourInWeek].AllMustRunGenerationOfArea[k]; if (parameters.renewableGeneration.isAggregated()) { - mustRunGen = scratchpad.ts.wind[tsIndex.Eolien][hourInYear] - + scratchpad.ts.solar[tsIndex.Solar][hourInYear] + mustRunGen = windSeries + + solarSeries + scratchpad.miscGenSum[hourInYear] + ror[tsFatalIndex][hourInYear] + scratchpad.mustrunSum[hourInYear]; } @@ -600,8 +595,7 @@ void SIM_RenseignementProblemeHebdo(const Study& study, area.renewable.list.each([&](const RenewableCluster& cluster) { assert(cluster.series->timeSeries.jit == NULL && "No JIT data from the solver"); - mustRunGen += cluster.valueAtTimeStep( - tsIndex.RenouvelableParPalier[cluster.areaWideIndex], (uint)hourInYear); + mustRunGen += cluster.valueAtTimeStep((uint)hourInYear, year); }); } @@ -610,7 +604,7 @@ void SIM_RenseignementProblemeHebdo(const Study& study, && "NaN detected for 'AllMustRunGeneration', probably from miscGenSum/mustrunSum"); problem.ConsommationsAbattues[hourInWeek].ConsommationAbattueDuPays[k] - = +scratchpad.ts.load[tsIndex.Consommation][hourInYear] + = +loadSeries - problem.AllMustRunGeneration[hourInWeek].AllMustRunGenerationOfArea[k]; if (problem.CaracteristiquesHydrauliques[k].PresenceDHydrauliqueModulable > 0) @@ -638,10 +632,12 @@ void SIM_RenseignementProblemeHebdo(const Study& study, if (problem.CaracteristiquesHydrauliques[k].PresenceDHydrauliqueModulable > 0) { auto& area = *study.areas.byIndex[k]; - uint tsIndex = (NumeroChroniquesTireesParPays[numSpace][k]).Hydraulique; - auto& inflowsmatrix = area.hydro.series->storage; + auto& hydroSeries = area.hydro.series; + uint tsIndex = hydroSeries->getIndex(year); + + auto& inflowsmatrix = hydroSeries->storage; auto const& srcinflows = inflowsmatrix[tsIndex < inflowsmatrix.width ? tsIndex : 0]; - auto& mingenmatrix = area.hydro.series->mingen; + auto& mingenmatrix = hydroSeries->mingen; auto const& srcmingen = mingenmatrix[tsIndex < mingenmatrix.width ? tsIndex : 0]; for (uint j = 0; j < problem.NombreDePasDeTemps; ++j) { diff --git a/src/solver/simulation/sim_extern_variables_globales.h b/src/solver/simulation/sim_extern_variables_globales.h index f3561da2bb..421e8db76e 100644 --- a/src/solver/simulation/sim_extern_variables_globales.h +++ b/src/solver/simulation/sim_extern_variables_globales.h @@ -31,7 +31,6 @@ #include "sim_structure_probleme_economique.h" /* Valeurs generees de maniere aleatoire */ -extern std::vector> NumeroChroniquesTireesParPays; extern std::vector> NumeroChroniquesTireesParInterconnexion; extern std::vector> NumeroChroniquesTireesParGroup; diff --git a/src/solver/simulation/sim_structure_donnees.h b/src/solver/simulation/sim_structure_donnees.h index cdcdc9f0b1..6b3431a735 100644 --- a/src/solver/simulation/sim_structure_donnees.h +++ b/src/solver/simulation/sim_structure_donnees.h @@ -29,15 +29,6 @@ #include -typedef struct -{ - std::vector RenouvelableParPalier; - int Hydraulique; - int Eolien; - int Consommation; - int Solar; -} NUMERO_CHRONIQUES_TIREES_PAR_PAYS; - typedef struct { int TransmissionCapacities; diff --git a/src/solver/simulation/sim_variables_globales.cpp b/src/solver/simulation/sim_variables_globales.cpp index 2fcb42cdd2..e5fe936dc6 100644 --- a/src/solver/simulation/sim_variables_globales.cpp +++ b/src/solver/simulation/sim_variables_globales.cpp @@ -28,7 +28,6 @@ #include "sim_structure_donnees.h" #include "sim_structure_probleme_economique.h" -std::vector> NumeroChroniquesTireesParPays; std::vector> NumeroChroniquesTireesParInterconnexion; std::vector> transitMoyenInterconnexionsRecalculQuadratique; diff --git a/src/solver/variable/commons/hydro.h b/src/solver/variable/commons/hydro.h index dd09e69b6d..c1b446b8a3 100644 --- a/src/solver/variable/commons/hydro.h +++ b/src/solver/variable/commons/hydro.h @@ -200,7 +200,7 @@ class TimeSeriesValuesHydro // The current time-series auto& ror = pArea->hydro.series->ror; const unsigned int nbchro - = NumeroChroniquesTireesParPays[numSpace][pArea->index].Hydraulique; + = pArea->hydro.series->getIndex(year); pFatalValues[numSpace] = &(ror.entry[(nbchro < ror.width ? nbchro : 0)]); // Next variable diff --git a/src/solver/variable/commons/load.h b/src/solver/variable/commons/load.h index e4f5edee1e..174e94624a 100644 --- a/src/solver/variable/commons/load.h +++ b/src/solver/variable/commons/load.h @@ -201,8 +201,7 @@ class TimeSeriesValuesLoad // (void)::memcpy( pValuesForTheCurrentYear[numSpace].hour, - pArea->load.series - ->timeSeries[NumeroChroniquesTireesParPays[numSpace][pArea->index].Consommation], + pArea->load.series->getColumn(year), sizeof(double) * pArea->load.series->timeSeries.height); // Next variable diff --git a/src/solver/variable/commons/solar.h b/src/solver/variable/commons/solar.h index 01cd4227b2..0887f9f7f9 100644 --- a/src/solver/variable/commons/solar.h +++ b/src/solver/variable/commons/solar.h @@ -199,8 +199,7 @@ class TimeSeriesValuesSolar { // The current solar time-series (void)::memcpy(pValuesForTheCurrentYear[numSpace].hour, - pArea->solar.series->timeSeries - .entry[NumeroChroniquesTireesParPays[numSpace][pArea->index].Solar], + pArea->solar.series->getColumn(year), sizeof(double) * pArea->solar.series->timeSeries.height); } diff --git a/src/solver/variable/commons/wind.h b/src/solver/variable/commons/wind.h index 256ce65e63..369086aeee 100644 --- a/src/solver/variable/commons/wind.h +++ b/src/solver/variable/commons/wind.h @@ -198,8 +198,7 @@ class TimeSeriesValuesWind { // The current wind time-series (void)::memcpy(pValuesForTheCurrentYear[numSpace].hour, - pArea->wind.series->timeSeries - .entry[NumeroChroniquesTireesParPays[numSpace][pArea->index].Eolien], + pArea->wind.series->getColumn(year), sizeof(double) * pArea->wind.series->timeSeries.height); } diff --git a/src/solver/variable/economy/productionByRenewablePlant.h b/src/solver/variable/economy/productionByRenewablePlant.h index b2ce04306e..f0ab02e886 100644 --- a/src/solver/variable/economy/productionByRenewablePlant.h +++ b/src/solver/variable/economy/productionByRenewablePlant.h @@ -280,8 +280,7 @@ class ProductionByRenewablePlant : public Variable::IVariablerenewable.clusterCount(); ++clusterIndex) { const auto* renewableCluster = state.area->renewable.clusters[clusterIndex]; - uint serieIndex = renewableCluster->series->timeseriesNumbers[0][state.year]; - double renewableClusterProduction = renewableCluster->valueAtTimeStep(serieIndex, state.hourInTheYear); + double renewableClusterProduction = renewableCluster->valueAtTimeStep(state.hourInTheYear, state.year); pValuesForTheCurrentYear[numSpace][renewableCluster->areaWideIndex].hour[state.hourInTheYear] += renewableClusterProduction; diff --git a/src/solver/variable/economy/renewableGeneration.h b/src/solver/variable/economy/renewableGeneration.h index a75421e365..631a85c038 100644 --- a/src/solver/variable/economy/renewableGeneration.h +++ b/src/solver/variable/economy/renewableGeneration.h @@ -271,9 +271,8 @@ class RenewableGeneration ++clusterIndex) { const auto* renewableCluster = state.area->renewable.clusters[clusterIndex]; - uint serieIndex = renewableCluster->series->timeseriesNumbers[0][state.year]; double renewableClusterProduction - = renewableCluster->valueAtTimeStep(serieIndex, state.hourInTheYear); + = renewableCluster->valueAtTimeStep(state.hourInTheYear, state.year); pValuesForTheCurrentYear[numSpace][renewableCluster->groupID][state.hourInTheYear] += renewableClusterProduction; From ab96d2961096dc3f44b7337928b01b8a71aff5e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20Omn=C3=A8s?= Date: Wed, 4 Oct 2023 13:11:49 +0200 Subject: [PATCH 08/17] Fix wrong year number in logs upon failed year (#1672) --- src/solver/simulation/solver.hxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/solver/simulation/solver.hxx b/src/solver/simulation/solver.hxx index 00e5bc9353..a46781556f 100644 --- a/src/solver/simulation/solver.hxx +++ b/src/solver/simulation/solver.hxx @@ -1018,7 +1018,7 @@ void ISimulation::loopThroughYears(uint firstYear, if (failed) { std::ostringstream msg; - msg << "Year " << year << " has failed in the previous set of parallel year."; + msg << "Year " << year + 1 << " has failed in the previous set of parallel year."; throw FatalError(msg.str()); } } From 0d3b34269d423eeed9e37aa1a066199a84ef9076 Mon Sep 17 00:00:00 2001 From: payetvin <113102157+payetvin@users.noreply.github.com> Date: Wed, 4 Oct 2023 15:30:51 +0200 Subject: [PATCH 09/17] Renamed timeSeries into timeSeriesEnum (#1675) * [DEV] Renamed timeSeries into timeSeriesEnum * [DEV] Renamed timeSeriesEnum in timeSeriesType --- src/libs/antares/study/area/area.h | 4 +-- src/libs/antares/study/area/area.hxx | 6 ++-- src/libs/antares/study/fwd.h | 2 +- src/libs/antares/study/parameters.cpp | 4 +-- src/libs/antares/study/parameters.h | 2 +- src/libs/antares/study/parts/common/series.h | 2 ++ src/libs/antares/study/study.cpp | 2 +- src/libs/antares/study/study.h | 2 +- src/libs/antares/study/study.hxx | 14 ++++----- src/libs/antares/study/xcast/xcast.cpp | 2 +- src/libs/antares/study/xcast/xcast.h | 4 +-- src/solver/application.cpp | 2 +- src/solver/simulation/timeseries-numbers.cpp | 26 ++++++++-------- src/solver/ts-generator/generator.h | 4 +-- src/solver/ts-generator/generator.hxx | 4 +-- src/solver/ts-generator/xcast/xcast.cpp | 2 +- src/solver/ts-generator/xcast/xcast.h | 4 +-- .../antares-study/area/correlation-post.cpp | 2 +- .../antares-study/area/correlation-post.h | 4 +-- .../antares-study/area/correlation.cpp | 2 +- .../handler/antares-study/area/correlation.h | 4 +-- .../handler/antares-study/area/timeseries.cpp | 4 +-- .../handler/antares-study/area/timeseries.h | 6 ++-- .../antares-study/area/ts-generator.cpp | 4 +-- .../handler/antares-study/area/ts-generator.h | 6 ++-- .../handler/antares-study/area/ts-node.cpp | 2 +- .../handler/antares-study/area/ts-node.h | 4 +-- .../datagrid/renderer/analyzer/areas.cpp | 2 +- .../datagrid/renderer/analyzer/areas.h | 2 +- .../datagrid/renderer/area/xcast-allareas.h | 2 +- .../datagrid/renderer/area/xcast-allareas.hxx | 26 ++++++++-------- .../renderer/area/xcast-coefficients.h | 2 +- .../renderer/area/xcast-coefficients.hxx | 24 +++++++-------- .../datagrid/renderer/area/xcast-conversion.h | 2 +- .../renderer/area/xcast-conversion.hxx | 26 ++++++++-------- .../datagrid/renderer/area/xcast-k.h | 2 +- .../datagrid/renderer/area/xcast-k.hxx | 30 +++++++++---------- .../renderer/area/xcast-translation.h | 2 +- .../renderer/area/xcast-translation.hxx | 24 +++++++-------- .../components/datagrid/renderer/cell.cpp | 22 +++++++------- .../components/datagrid/renderer/cell.h | 30 +++++++++---------- .../components/datagrid/renderer/column.cpp | 4 +-- .../components/datagrid/renderer/column.h | 6 ++-- src/ui/simulator/windows/analyzer/analyzer.h | 4 +-- .../windows/options/advanced/advanced.cpp | 2 +- .../windows/options/advanced/advanced.h | 4 +-- src/ui/simulator/windows/xcast/xcast.h | 2 +- src/ui/simulator/windows/xcast/xcast.hxx | 18 +++++------ 48 files changed, 181 insertions(+), 179 deletions(-) diff --git a/src/libs/antares/study/area/area.h b/src/libs/antares/study/area/area.h index d49e3e0309..d65d840625 100644 --- a/src/libs/antares/study/area/area.h +++ b/src/libs/antares/study/area/area.h @@ -209,9 +209,9 @@ class Area final : private Yuni::NonCopyable /*! ** \brief Get the XCast data according a given time-series type */ - template + template XCast* xcastData(); - template + template const XCast* xcastData() const; public: diff --git a/src/libs/antares/study/area/area.hxx b/src/libs/antares/study/area/area.hxx index fc6bd885a5..e4e1655125 100644 --- a/src/libs/antares/study/area/area.hxx +++ b/src/libs/antares/study/area/area.hxx @@ -52,7 +52,7 @@ inline const Area* AreaList::operator[](uint i) const return byIndex[i]; } -template +template inline XCast* Area::xcastData() { switch (T) @@ -71,7 +71,7 @@ inline XCast* Area::xcastData() return nullptr; } -template +template inline const XCast* Area::xcastData() const { switch (T) @@ -167,4 +167,4 @@ inline AreaList::const_reverse_iterator AreaList::rend() const return areas.rend(); } -} // namespace Antares \ No newline at end of file +} // namespace Antares diff --git a/src/libs/antares/study/fwd.h b/src/libs/antares/study/fwd.h index 5c02e62655..6db7c2ee57 100644 --- a/src/libs/antares/study/fwd.h +++ b/src/libs/antares/study/fwd.h @@ -205,7 +205,7 @@ std::string styleToString(const StyleType& style); ** ** These values are mainly used for mask bits */ -enum TimeSeries : unsigned int +enum TimeSeriesType : unsigned int { //! TimeSeries : Load timeSeriesLoad = 1, diff --git a/src/libs/antares/study/parameters.cpp b/src/libs/antares/study/parameters.cpp index 04f3749109..c10519942f 100644 --- a/src/libs/antares/study/parameters.cpp +++ b/src/libs/antares/study/parameters.cpp @@ -345,7 +345,7 @@ void Parameters::reset() resetSeeds(); } -bool Parameters::isTSGeneratedByPrepro(const TimeSeries ts) const +bool Parameters::isTSGeneratedByPrepro(const TimeSeriesType ts) const { return (timeSeriesToGenerate & ts); } @@ -1090,7 +1090,7 @@ bool Parameters::loadFromINI(const IniFile& ini, uint version, const StudyLoadOp void Parameters::fixRefreshIntervals() { using T = std:: - tuple; + tuple; const std::list timeSeriesToCheck = {{refreshIntervalLoad, timeSeriesLoad, "load"}, {refreshIntervalSolar, timeSeriesSolar, "solar"}, {refreshIntervalHydro, timeSeriesHydro, "hydro"}, diff --git a/src/libs/antares/study/parameters.h b/src/libs/antares/study/parameters.h index 952d534764..ffb5f1d643 100644 --- a/src/libs/antares/study/parameters.h +++ b/src/libs/antares/study/parameters.h @@ -124,7 +124,7 @@ class Parameters final ** \param mask The time-serie to test ** \return True if the time-series must be generated by the preprocessor, false otherwise */ - bool isTSGeneratedByPrepro(const TimeSeries ts) const; + bool isTSGeneratedByPrepro(const TimeSeriesType ts) const; /*! ** \brief Reset to default all values in a structure for general data diff --git a/src/libs/antares/study/parts/common/series.h b/src/libs/antares/study/parts/common/series.h index 1be27e94cb..94ca55db35 100644 --- a/src/libs/antares/study/parts/common/series.h +++ b/src/libs/antares/study/parts/common/series.h @@ -28,6 +28,7 @@ #define __ANTARES_LIBS_STUDY_PARTS_COMMON_TIMESERIES_H__ #include +#include #include "../../fwd.h" namespace Antares::Data @@ -66,5 +67,6 @@ class DataSeriesCommon uint getSeriesIndex(unsigned int year) const; }; // class DataSeriesCommon + } // namespace Antares::Data #endif /* __ANTARES_LIBS_STUDY_PARTS_COMMON_TIMESERIES_H__ */ diff --git a/src/libs/antares/study/study.cpp b/src/libs/antares/study/study.cpp index 4069206dff..d46123f8dd 100644 --- a/src/libs/antares/study/study.cpp +++ b/src/libs/antares/study/study.cpp @@ -1148,7 +1148,7 @@ void Study::ensureDataAreLoadedForAllBindingConstraints() namespace // anonymous { -template +template struct TS final { static bool IsNeeded(const Study& s, const uint y) diff --git a/src/libs/antares/study/study.h b/src/libs/antares/study/study.h index fe12467e88..73698e6b1a 100644 --- a/src/libs/antares/study/study.h +++ b/src/libs/antares/study/study.h @@ -357,7 +357,7 @@ class Study: public Yuni::NonCopyable, public IObject, public LayerData /*! ** \brief Destroy all data of the TS generator '@TS' */ - template + template void destroyTSGeneratorData(); //! Destroy all data of the load TS generator diff --git a/src/libs/antares/study/study.hxx b/src/libs/antares/study/study.hxx index da25cfa808..0af64811b4 100644 --- a/src/libs/antares/study/study.hxx +++ b/src/libs/antares/study/study.hxx @@ -42,27 +42,27 @@ inline void Study::storeTimeSeriesNumbers(Solver::IResultWriter& resultWriter) c storeTimeseriesNumbers(resultWriter, areas); } -template +template inline void Study::destroyTSGeneratorData() { switch (TS) { - case TimeSeries::timeSeriesLoad: + case TimeSeriesType::timeSeriesLoad: destroyAllLoadTSGeneratorData(); break; - case TimeSeries::timeSeriesSolar: + case TimeSeriesType::timeSeriesSolar: destroyAllSolarTSGeneratorData(); break; - case TimeSeries::timeSeriesWind: + case TimeSeriesType::timeSeriesWind: destroyAllWindTSGeneratorData(); break; - case TimeSeries::timeSeriesHydro: + case TimeSeriesType::timeSeriesHydro: destroyAllHydroTSGeneratorData(); break; - case TimeSeries::timeSeriesThermal: + case TimeSeriesType::timeSeriesThermal: destroyAllThermalTSGeneratorData(); break; - case TimeSeries::timeSeriesCount: + case TimeSeriesType::timeSeriesCount: break; } } diff --git a/src/libs/antares/study/xcast/xcast.cpp b/src/libs/antares/study/xcast/xcast.cpp index c1bd7e0fb8..99978abe41 100644 --- a/src/libs/antares/study/xcast/xcast.cpp +++ b/src/libs/antares/study/xcast/xcast.cpp @@ -129,7 +129,7 @@ XCast::Distribution XCast::StringToDistribution(AnyString text) return dtNone; } -XCast::XCast(TimeSeries ts) : +XCast::XCast(TimeSeriesType ts) : useTranslation(tsTranslationNone), distribution(dtBeta), capacity(0), diff --git a/src/libs/antares/study/xcast/xcast.h b/src/libs/antares/study/xcast/xcast.h index 4124f06798..32abeeba46 100644 --- a/src/libs/antares/study/xcast/xcast.h +++ b/src/libs/antares/study/xcast/xcast.h @@ -123,7 +123,7 @@ class XCast final : private Yuni::NonCopyable /*! ** \brief Constructor */ - XCast(TimeSeries ts); + XCast(TimeSeriesType ts); /*! ** \brief Destructor */ @@ -208,7 +208,7 @@ class XCast final : private Yuni::NonCopyable Matrix conversion; //! The related time-series - const TimeSeries timeSeries; + const TimeSeriesType timeSeries; protected: void resetTransferFunction(); diff --git a/src/solver/application.cpp b/src/solver/application.cpp index f2a9d1028a..143d0fe240 100644 --- a/src/solver/application.cpp +++ b/src/solver/application.cpp @@ -154,7 +154,7 @@ void Application::prepare(int argc, char* argv[]) pParameters->include.hurdleCosts); bool tsGenThermal - = (0 != (pParameters->timeSeriesToGenerate & Antares::Data::TimeSeries::timeSeriesThermal)); + = (0 != (pParameters->timeSeriesToGenerate & Antares::Data::TimeSeriesType::timeSeriesThermal)); checkMinStablePower(tsGenThermal, pStudy->areas); diff --git a/src/solver/simulation/timeseries-numbers.cpp b/src/solver/simulation/timeseries-numbers.cpp index cd98ccfc75..ba8b00e5b5 100644 --- a/src/solver/simulation/timeseries-numbers.cpp +++ b/src/solver/simulation/timeseries-numbers.cpp @@ -43,7 +43,7 @@ using namespace Yuni; using namespace Antares::Data; using namespace std; -const map ts_to_tsIndex = {{timeSeriesLoad, 0}, +const map ts_to_tsIndex = {{timeSeriesLoad, 0}, {timeSeriesHydro, 1}, {timeSeriesWind, 2}, {timeSeriesThermal, 3}, @@ -51,7 +51,7 @@ const map ts_to_tsIndex = {{timeSeriesLoad, 0}, {timeSeriesRenewable, 5}, {timeSeriesTransmissionCapacities, 6}}; -const map ts_to_tsTitle +const map ts_to_tsTitle = {{timeSeriesLoad, "load"}, {timeSeriesHydro, "hydro"}, {timeSeriesWind, "wind"}, @@ -65,7 +65,7 @@ void addInterModalTimeSeriesToMessage(const array& isTSin { bool isFirstLogged = true; - map::const_iterator it = ts_to_tsIndex.begin(); + map::const_iterator it = ts_to_tsIndex.begin(); for (; it != ts_to_tsIndex.end(); ++it) { if (isTSintermodal[it->second]) @@ -263,7 +263,7 @@ class areaLinksTransCapaNumberOfTSretriever : public areaNumberOfTSretriever class IntraModalConsistencyChecker { public: - IntraModalConsistencyChecker(const TimeSeries ts, + IntraModalConsistencyChecker(const TimeSeriesType ts, const array& isTSintramodal, const array& isTSgenerated, areaNumberOfTSretriever* tsCounter, @@ -344,7 +344,7 @@ bool checkIntraModalConsistency(array& nbTimeseriesByMode { // Initialization of a map associating a time-series to an object that retrieves // the number of time series inside an area - using mapTStoRetriever = map>; + using mapTStoRetriever = map>; mapTStoRetriever ts_to_numberOfTSretrievers; ts_to_numberOfTSretrievers[timeSeriesLoad] = make_shared(study); ts_to_numberOfTSretrievers[timeSeriesHydro] = make_shared(study); @@ -361,7 +361,7 @@ bool checkIntraModalConsistency(array& nbTimeseriesByMode mapTStoRetriever::iterator it = ts_to_numberOfTSretrievers.begin(); for (; it != ts_to_numberOfTSretrievers.end(); ++it) { - const TimeSeries tsKind = it->first; + const TimeSeriesType tsKind = it->first; areaNumberOfTSretriever* tsRetriever = (it->second).get(); int indexTS = ts_to_tsIndex.at(it->first); IntraModalConsistencyChecker intraModalchecker( @@ -976,13 +976,13 @@ void TimeSeriesNumbers::StoreTimeSeriesNumbersIntoOuput(Data::Study& study, IRes if (study.parameters.storeTimeseriesNumbers) { fixTSNumbersWhenWidthIsOne(study); - study.storeTimeSeriesNumbers(resultWriter); - study.storeTimeSeriesNumbers(resultWriter); - study.storeTimeSeriesNumbers(resultWriter); - study.storeTimeSeriesNumbers(resultWriter); - study.storeTimeSeriesNumbers(resultWriter); - study.storeTimeSeriesNumbers(resultWriter); - study.storeTimeSeriesNumbers(resultWriter); + study.storeTimeSeriesNumbers(resultWriter); + study.storeTimeSeriesNumbers(resultWriter); + study.storeTimeSeriesNumbers(resultWriter); + study.storeTimeSeriesNumbers(resultWriter); + study.storeTimeSeriesNumbers(resultWriter); + study.storeTimeSeriesNumbers(resultWriter); + study.storeTimeSeriesNumbers(resultWriter); Simulation::BindingConstraintsTimeSeriesNumbersWriter ts_writer(resultWriter); ts_writer.write(study.bindingConstraintsGroups); diff --git a/src/solver/ts-generator/generator.h b/src/solver/ts-generator/generator.h index 26314c4ae4..1f3582fb2c 100644 --- a/src/solver/ts-generator/generator.h +++ b/src/solver/ts-generator/generator.h @@ -43,7 +43,7 @@ namespace TSGenerator /*! ** \brief Regenerate the time-series */ -template +template bool GenerateTimeSeries(Data::Study& study, uint year, IResultWriter& writer); bool GenerateThermalTimeSeries(Data::Study& study, @@ -60,7 +60,7 @@ void DestroyAll(Data::Study& study); /*! ** \brief Destroy a TS generator if it exists and no longer needed */ -template +template void Destroy(Data::Study& study, uint year); } // namespace TSGenerator diff --git a/src/solver/ts-generator/generator.hxx b/src/solver/ts-generator/generator.hxx index 4fa18562d3..acf699e4b7 100644 --- a/src/solver/ts-generator/generator.hxx +++ b/src/solver/ts-generator/generator.hxx @@ -49,7 +49,7 @@ inline bool GenerateTimeSeries(Data::Study& study, } // --- TS Generators using XCast --- -template +template bool GenerateTimeSeries(Data::Study& study, uint year, IResultWriter& writer) { auto* xcast = reinterpret_cast( @@ -91,7 +91,7 @@ bool GenerateTimeSeries(Data::Study& study, uint year, IResultWriter& writer) return r; } -template +template void Destroy(Data::Study& study, uint year) { auto* xcast = reinterpret_cast( diff --git a/src/solver/ts-generator/xcast/xcast.cpp b/src/solver/ts-generator/xcast/xcast.cpp index 2f3175d871..2cffb5235e 100644 --- a/src/solver/ts-generator/xcast/xcast.cpp +++ b/src/solver/ts-generator/xcast/xcast.cpp @@ -59,7 +59,7 @@ enum mu = Data::XCast::dataCoeffMu, }; -XCast::XCast(Data::Study& study, Data::TimeSeries ts, IResultWriter& writer) : +XCast::XCast(Data::Study& study, Data::TimeSeriesType ts, IResultWriter& writer) : study(study), timeSeriesType(ts), pNeverInitialized(true), diff --git a/src/solver/ts-generator/xcast/xcast.h b/src/solver/ts-generator/xcast/xcast.h index 0cf1bf0729..7c6efb6d25 100644 --- a/src/solver/ts-generator/xcast/xcast.h +++ b/src/solver/ts-generator/xcast/xcast.h @@ -74,7 +74,7 @@ class XCast final : private Yuni::NonCopyable /*! ** \brief Default constructor */ - XCast(Data::Study& study, Data::TimeSeries ts, IResultWriter& writer); + XCast(Data::Study& study, Data::TimeSeriesType ts, IResultWriter& writer); /*! ** \brief Destructor */ @@ -104,7 +104,7 @@ class XCast final : private Yuni::NonCopyable //! The current year uint year; //! The time-series type - const Data::TimeSeries timeSeriesType; + const Data::TimeSeriesType timeSeriesType; //! The random generator to use MersenneTwister* random; diff --git a/src/ui/action/handler/antares-study/area/correlation-post.cpp b/src/ui/action/handler/antares-study/area/correlation-post.cpp index 0f64d656b7..727a9c7a5f 100644 --- a/src/ui/action/handler/antares-study/area/correlation-post.cpp +++ b/src/ui/action/handler/antares-study/area/correlation-post.cpp @@ -35,7 +35,7 @@ namespace AntaresStudy { namespace Area { -CorrelationPost::CorrelationPost(IAction* parent, Data::TimeSeries ts, const AnyString& areaname) : +CorrelationPost::CorrelationPost(IAction* parent, Data::TimeSeriesType ts, const AnyString& areaname) : pAction(parent), pType(ts), pOriginalAreaName(areaname) { pInfos.caption << "Correlation for " << areaname << " (deferred)"; diff --git a/src/ui/action/handler/antares-study/area/correlation-post.h b/src/ui/action/handler/antares-study/area/correlation-post.h index f08965031d..ef832eade9 100644 --- a/src/ui/action/handler/antares-study/area/correlation-post.h +++ b/src/ui/action/handler/antares-study/area/correlation-post.h @@ -52,7 +52,7 @@ class CorrelationPost : public IAction /*! ** \brief Default constructor */ - explicit CorrelationPost(IAction* parent, Data::TimeSeries ts, const AnyString& areaname); + explicit CorrelationPost(IAction* parent, Data::TimeSeriesType ts, const AnyString& areaname); //! Destructor virtual ~CorrelationPost(); //@} @@ -66,7 +66,7 @@ class CorrelationPost : public IAction private: //! The attached action IAction::Ptr pAction; - Data::TimeSeries pType; + Data::TimeSeriesType pType; Data::AreaName pOriginalAreaName; }; // class IAction diff --git a/src/ui/action/handler/antares-study/area/correlation.cpp b/src/ui/action/handler/antares-study/area/correlation.cpp index 912f089be7..c6c685c81f 100644 --- a/src/ui/action/handler/antares-study/area/correlation.cpp +++ b/src/ui/action/handler/antares-study/area/correlation.cpp @@ -36,7 +36,7 @@ namespace AntaresStudy { namespace Area { -Correlation::Correlation(Data::TimeSeries ts, const AnyString& areaname) : +Correlation::Correlation(Data::TimeSeriesType ts, const AnyString& areaname) : pType(ts), pOriginalAreaName(areaname) { switch (ts) diff --git a/src/ui/action/handler/antares-study/area/correlation.h b/src/ui/action/handler/antares-study/area/correlation.h index 2ee15083fe..08a6b77caa 100644 --- a/src/ui/action/handler/antares-study/area/correlation.h +++ b/src/ui/action/handler/antares-study/area/correlation.h @@ -52,7 +52,7 @@ class Correlation : public IAction /*! ** \brief Default constructor */ - explicit Correlation(Data::TimeSeries ts, const AnyString& areaname); + explicit Correlation(Data::TimeSeriesType ts, const AnyString& areaname); //! Destructor virtual ~Correlation(); //@} @@ -63,7 +63,7 @@ class Correlation : public IAction virtual void createPostActionsWL(const IAction::Ptr& node); private: - Data::TimeSeries pType; + Data::TimeSeriesType pType; Data::AreaName pOriginalAreaName; }; // class IAction diff --git a/src/ui/action/handler/antares-study/area/timeseries.cpp b/src/ui/action/handler/antares-study/area/timeseries.cpp index 754d3ed737..a1070c0d4c 100644 --- a/src/ui/action/handler/antares-study/area/timeseries.cpp +++ b/src/ui/action/handler/antares-study/area/timeseries.cpp @@ -37,7 +37,7 @@ namespace AntaresStudy { namespace Area { -DataTimeseries::DataTimeseries(Data::TimeSeries ts, const AnyString& areaname) : +DataTimeseries::DataTimeseries(Data::TimeSeriesType ts, const AnyString& areaname) : pType(ts), pOriginalAreaName(areaname) { switch (ts) @@ -62,7 +62,7 @@ DataTimeseries::DataTimeseries(Data::TimeSeries ts, const AnyString& areaname) : } } -DataTimeseries::DataTimeseries(Data::TimeSeries ts, +DataTimeseries::DataTimeseries(Data::TimeSeriesType ts, const AnyString& areaname, const AnyString& clustername) : pType(ts), pOriginalAreaName(areaname), pOriginalPlantName(clustername) diff --git a/src/ui/action/handler/antares-study/area/timeseries.h b/src/ui/action/handler/antares-study/area/timeseries.h index e086bfc9df..0100e95986 100644 --- a/src/ui/action/handler/antares-study/area/timeseries.h +++ b/src/ui/action/handler/antares-study/area/timeseries.h @@ -53,12 +53,12 @@ class DataTimeseries : public IAction /*! ** \brief Default constructor */ - DataTimeseries(Data::TimeSeries ts, const AnyString& areaname); + DataTimeseries(Data::TimeSeriesType ts, const AnyString& areaname); /*! ** \brief Default constructor */ - DataTimeseries(Data::TimeSeries ts, const AnyString& areaname, const AnyString& clustername); + DataTimeseries(Data::TimeSeriesType ts, const AnyString& areaname, const AnyString& clustername); //! Destructor virtual ~DataTimeseries(); @@ -74,7 +74,7 @@ class DataTimeseries : public IAction virtual void registerViewsWL(Context& ctx); private: - Data::TimeSeries pType; + Data::TimeSeriesType pType; Data::AreaName pOriginalAreaName; Data::ClusterName pOriginalPlantName; diff --git a/src/ui/action/handler/antares-study/area/ts-generator.cpp b/src/ui/action/handler/antares-study/area/ts-generator.cpp index 8adf150624..95c8e02482 100644 --- a/src/ui/action/handler/antares-study/area/ts-generator.cpp +++ b/src/ui/action/handler/antares-study/area/ts-generator.cpp @@ -38,7 +38,7 @@ namespace AntaresStudy { namespace Area { -DataTSGenerator::DataTSGenerator(Data::TimeSeries ts, const AnyString& areaname) : +DataTSGenerator::DataTSGenerator(Data::TimeSeriesType ts, const AnyString& areaname) : pType(ts), pOriginalAreaName(areaname) { switch (ts) @@ -63,7 +63,7 @@ DataTSGenerator::DataTSGenerator(Data::TimeSeries ts, const AnyString& areaname) } } -DataTSGenerator::DataTSGenerator(Data::TimeSeries ts, +DataTSGenerator::DataTSGenerator(Data::TimeSeriesType ts, const AnyString& areaname, const AnyString& clustername) : pType(ts), pOriginalAreaName(areaname), pOriginalPlantName(clustername) diff --git a/src/ui/action/handler/antares-study/area/ts-generator.h b/src/ui/action/handler/antares-study/area/ts-generator.h index 371a29f463..a761128fe8 100644 --- a/src/ui/action/handler/antares-study/area/ts-generator.h +++ b/src/ui/action/handler/antares-study/area/ts-generator.h @@ -53,12 +53,12 @@ class DataTSGenerator : public IAction /*! ** \brief Default constructor */ - DataTSGenerator(Data::TimeSeries ts, const AnyString& areaname); + DataTSGenerator(Data::TimeSeriesType ts, const AnyString& areaname); /*! ** \brief Default constructor */ - DataTSGenerator(Data::TimeSeries ts, const AnyString& areaname, const AnyString& clustername); + DataTSGenerator(Data::TimeSeriesType ts, const AnyString& areaname, const AnyString& clustername); //! Destructor virtual ~DataTSGenerator(); @@ -74,7 +74,7 @@ class DataTSGenerator : public IAction virtual void registerViewsWL(Context& ctx); private: - Data::TimeSeries pType; + Data::TimeSeriesType pType; Data::AreaName pOriginalAreaName; Data::ClusterName pOriginalPlantName; diff --git a/src/ui/action/handler/antares-study/area/ts-node.cpp b/src/ui/action/handler/antares-study/area/ts-node.cpp index 4479a95e0c..b9d3d81dfb 100644 --- a/src/ui/action/handler/antares-study/area/ts-node.cpp +++ b/src/ui/action/handler/antares-study/area/ts-node.cpp @@ -38,7 +38,7 @@ namespace AntaresStudy { namespace Area { -NodeTimeseries::NodeTimeseries(Data::TimeSeries ts) : pType(ts) +NodeTimeseries::NodeTimeseries(Data::TimeSeriesType ts) : pType(ts) { // behavior pInfos.behavior = bhOverwrite; diff --git a/src/ui/action/handler/antares-study/area/ts-node.h b/src/ui/action/handler/antares-study/area/ts-node.h index 3e407aed56..94d332e5aa 100644 --- a/src/ui/action/handler/antares-study/area/ts-node.h +++ b/src/ui/action/handler/antares-study/area/ts-node.h @@ -53,7 +53,7 @@ class NodeTimeseries : public IAction /*! ** \brief Default constructor */ - NodeTimeseries(Data::TimeSeries ts); + NodeTimeseries(Data::TimeSeriesType ts); //! Destructor virtual ~NodeTimeseries(); //@} @@ -66,7 +66,7 @@ class NodeTimeseries : public IAction private: //! Type of the timeseries - const Data::TimeSeries pType; + const Data::TimeSeriesType pType; }; // class IAction diff --git a/src/ui/simulator/toolbox/components/datagrid/renderer/analyzer/areas.cpp b/src/ui/simulator/toolbox/components/datagrid/renderer/analyzer/areas.cpp index 702766467d..b4930b90c8 100644 --- a/src/ui/simulator/toolbox/components/datagrid/renderer/analyzer/areas.cpp +++ b/src/ui/simulator/toolbox/components/datagrid/renderer/analyzer/areas.cpp @@ -79,7 +79,7 @@ void Areas::initializeFromStudy() } } -void Areas::reloadDistributionLawsFromStudy(Data::TimeSeries ts) +void Areas::reloadDistributionLawsFromStudy(Data::TimeSeriesType ts) { if (!(!study)) { diff --git a/src/ui/simulator/toolbox/components/datagrid/renderer/analyzer/areas.h b/src/ui/simulator/toolbox/components/datagrid/renderer/analyzer/areas.h index c09c04de9d..9b305202ec 100644 --- a/src/ui/simulator/toolbox/components/datagrid/renderer/analyzer/areas.h +++ b/src/ui/simulator/toolbox/components/datagrid/renderer/analyzer/areas.h @@ -163,7 +163,7 @@ class Areas final : public virtual Renderer::IRenderer virtual bool valid() const; - void reloadDistributionLawsFromStudy(Data::TimeSeries ts); + void reloadDistributionLawsFromStudy(Data::TimeSeriesType ts); /*! ** \brief Reset internal variables according the current study diff --git a/src/ui/simulator/toolbox/components/datagrid/renderer/area/xcast-allareas.h b/src/ui/simulator/toolbox/components/datagrid/renderer/area/xcast-allareas.h index 2ad82aaae7..722d108f37 100644 --- a/src/ui/simulator/toolbox/components/datagrid/renderer/area/xcast-allareas.h +++ b/src/ui/simulator/toolbox/components/datagrid/renderer/area/xcast-allareas.h @@ -39,7 +39,7 @@ namespace Datagrid { namespace Renderer { -template +template class XCastAllAreas final : public Renderer::IRenderer { public: diff --git a/src/ui/simulator/toolbox/components/datagrid/renderer/area/xcast-allareas.hxx b/src/ui/simulator/toolbox/components/datagrid/renderer/area/xcast-allareas.hxx index bc4f20e47a..c5632070e0 100644 --- a/src/ui/simulator/toolbox/components/datagrid/renderer/area/xcast-allareas.hxx +++ b/src/ui/simulator/toolbox/components/datagrid/renderer/area/xcast-allareas.hxx @@ -39,40 +39,40 @@ namespace Datagrid { namespace Renderer { -template +template inline XCastAllAreas::XCastAllAreas(wxWindow* parent, Toolbox::InputSelector::Area* notifier) : pControl(parent), pNotifier(notifier) { OnStudyAreaRename.connect(this, &XCastAllAreas::onAreaRenamed); } -template +template inline XCastAllAreas::~XCastAllAreas() { destroyBoundEvents(); } -template +template inline int XCastAllAreas::width() const { return 4; } -template +template inline int XCastAllAreas::height() const { auto study = GetCurrentStudy(); return !study ? 0 : study->areas.size(); } -template +template inline bool XCastAllAreas::valid() const { auto study = GetCurrentStudy(); return !(!study) and study->areas.size() != 0; } -template +template wxString XCastAllAreas::columnCaption(int colIndx) const { switch (colIndx) @@ -89,7 +89,7 @@ wxString XCastAllAreas::columnCaption(int colIndx) const return wxEmptyString; } -template +template wxString XCastAllAreas::rowCaption(int rowIndx) const { auto study = GetCurrentStudy(); @@ -98,7 +98,7 @@ wxString XCastAllAreas::rowCaption(int rowIndx) const return wxStringFromUTF8(study->areas.byIndex[rowIndx]->name); } -template +template IRenderer::CellStyle XCastAllAreas::cellStyle(int x, int y) const { auto study = GetCurrentStudy(); @@ -132,7 +132,7 @@ IRenderer::CellStyle XCastAllAreas::cellStyle(int x, int y) const return IRenderer::cellStyleDefaultCenter; } -template +template wxColour XCastAllAreas::cellBackgroundColor(int, int y) const { auto study = GetCurrentStudy(); @@ -142,7 +142,7 @@ wxColour XCastAllAreas::cellBackgroundColor(int, int y) const return wxColor(area.ui->color[0], area.ui->color[1], area.ui->color[2]); } -template +template wxString XCastAllAreas::cellValue(int x, int y) const { auto study = GetCurrentStudy(); @@ -176,7 +176,7 @@ wxString XCastAllAreas::cellValue(int x, int y) const return wxEmptyString; } -template +template double XCastAllAreas::cellNumericValue(int x, int y) const { auto study = GetCurrentStudy(); @@ -209,7 +209,7 @@ double XCastAllAreas::cellNumericValue(int x, int y) const return 0.; } -template +template bool XCastAllAreas::cellValue(int x, int y, const Yuni::String& value) { auto study = GetCurrentStudy(); @@ -274,7 +274,7 @@ bool XCastAllAreas::cellValue(int x, int y, const Yuni::String& value) return false; } -template +template void XCastAllAreas::onAreaRenamed(Data::Area*) { if (pControl) diff --git a/src/ui/simulator/toolbox/components/datagrid/renderer/area/xcast-coefficients.h b/src/ui/simulator/toolbox/components/datagrid/renderer/area/xcast-coefficients.h index 1ec31c6a15..3e532cea30 100644 --- a/src/ui/simulator/toolbox/components/datagrid/renderer/area/xcast-coefficients.h +++ b/src/ui/simulator/toolbox/components/datagrid/renderer/area/xcast-coefficients.h @@ -38,7 +38,7 @@ namespace Datagrid { namespace Renderer { -template +template class XCastCoefficients final : public Renderer::Matrix, public Renderer::ARendererArea { public: diff --git a/src/ui/simulator/toolbox/components/datagrid/renderer/area/xcast-coefficients.hxx b/src/ui/simulator/toolbox/components/datagrid/renderer/area/xcast-coefficients.hxx index 84fddf276c..193a069c5a 100644 --- a/src/ui/simulator/toolbox/components/datagrid/renderer/area/xcast-coefficients.hxx +++ b/src/ui/simulator/toolbox/components/datagrid/renderer/area/xcast-coefficients.hxx @@ -36,20 +36,20 @@ namespace Datagrid { namespace Renderer { -template +template inline XCastCoefficients::XCastCoefficients(wxWindow* control, Toolbox::InputSelector::Area* notifier) : MatrixAncestorType(control), Renderer::ARendererArea(control, notifier) { } -template +template inline XCastCoefficients::~XCastCoefficients() { destroyBoundEvents(); } -template +template wxString XCastCoefficients::columnCaption(int colIndx) const { static const wxString captions[Data::XCast::dataMax] = {wxT(" alpha "), @@ -61,19 +61,19 @@ wxString XCastCoefficients::columnCaption(int colIndx) const return colIndx < Data::XCast::dataMax ? captions[colIndx] : wxString(); } -template +template wxString XCastCoefficients::cellValue(int x, int y) const { return MatrixAncestorType::cellValue(x, y); } -template +template double XCastCoefficients::cellNumericValue(int x, int y) const { return MatrixAncestorType::cellNumericValue(x, y); } -template +template inline bool XCastCoefficients::cellValue(int x, int y, const Yuni::String& value) { using namespace Antares::Data; @@ -191,7 +191,7 @@ inline bool XCastCoefficients::cellValue(int x, int y, const Yuni::String& va return MatrixAncestorType::cellValue(x, y, value); } -template +template void XCastCoefficients::internalAreaChanged(Data::Area* area) { if (area) @@ -204,7 +204,7 @@ void XCastCoefficients::internalAreaChanged(Data::Area* area) Renderer::ARendererArea::internalAreaChanged(area); } -template +template IRenderer::CellStyle XCastCoefficients::cellStyle(int col, int row) const { // law \ coeff alpha beta gamma delta @@ -336,7 +336,7 @@ IRenderer::CellStyle XCastCoefficients::cellStyle(int col, int row) const return Yuni::Math::Zero(d) ? IRenderer::cellStyleDefaultDisabled : IRenderer::cellStyleDefault; } -template +template wxString XCastCoefficients::rowCaption(int rowIndx) const { return ((uint)rowIndx < 12) ? wxString() << (1 + rowIndx) << wxT(" - ") @@ -344,20 +344,20 @@ wxString XCastCoefficients::rowCaption(int rowIndx) const : wxString(); } -template +template inline Date::Precision XCastCoefficients::precision() { return Date::monthly; } -template +template void XCastCoefficients::onStudyClosed() { Renderer::Matrix::onStudyClosed(); Renderer::ARendererArea::onStudyClosed(); } -template +template void XCastCoefficients::onStudyLoaded() { Renderer::Matrix::onStudyLoaded(); diff --git a/src/ui/simulator/toolbox/components/datagrid/renderer/area/xcast-conversion.h b/src/ui/simulator/toolbox/components/datagrid/renderer/area/xcast-conversion.h index 123663ee1e..1088d1235a 100644 --- a/src/ui/simulator/toolbox/components/datagrid/renderer/area/xcast-conversion.h +++ b/src/ui/simulator/toolbox/components/datagrid/renderer/area/xcast-conversion.h @@ -38,7 +38,7 @@ namespace Datagrid { namespace Renderer { -template +template class XCastConversion : public Renderer::Matrix, public Renderer::ARendererArea { public: diff --git a/src/ui/simulator/toolbox/components/datagrid/renderer/area/xcast-conversion.hxx b/src/ui/simulator/toolbox/components/datagrid/renderer/area/xcast-conversion.hxx index 2b3720c6bb..0b3a4b7f4d 100644 --- a/src/ui/simulator/toolbox/components/datagrid/renderer/area/xcast-conversion.hxx +++ b/src/ui/simulator/toolbox/components/datagrid/renderer/area/xcast-conversion.hxx @@ -37,43 +37,43 @@ namespace Datagrid { namespace Renderer { -template +template XCastConversion::XCastConversion(wxWindow* control, Toolbox::InputSelector::Area* notifier) : MatrixAncestorType(control), Renderer::ARendererArea(control, notifier) { } -template +template XCastConversion::~XCastConversion() { destroyBoundEvents(); } -template +template inline wxString XCastConversion::columnCaption(int colIndx) const { return wxString() << wxT(" point ") << (colIndx + 1) << wxT(' '); } -template +template inline wxString XCastConversion::cellValue(int x, int y) const { return MatrixAncestorType::cellValue(x + 1, y); } -template +template double XCastConversion::cellNumericValue(int x, int y) const { return MatrixAncestorType::cellNumericValue(x + 1, y); } -template +template inline bool XCastConversion::cellValue(int x, int y, const Yuni::String& value) { return MatrixAncestorType::cellValue(x + 1, y, value); } -template +template void XCastConversion::internalAreaChanged(Data::Area* area) { if (area) @@ -86,7 +86,7 @@ void XCastConversion::internalAreaChanged(Data::Area* area) Renderer::ARendererArea::internalAreaChanged(area); } -template +template IRenderer::CellStyle XCastConversion::cellStyle(int col, int row) const { double b = MatrixAncestorType::cellNumericValue(col + 1, 0); @@ -96,13 +96,13 @@ IRenderer::CellStyle XCastConversion::cellStyle(int col, int row) const : MatrixAncestorType::cellStyle(col, row); } -template +template wxString XCastConversion::rowCaption(int rowIndx) const { return (rowIndx == 0) ? wxT("IN") : wxT("OUT"); } -template +template bool XCastConversion::onMatrixResize(uint, uint, uint& newX, uint&) { if (newX > Data::XCast::conversionMaxPoints) @@ -117,7 +117,7 @@ bool XCastConversion::onMatrixResize(uint, uint, uint& newX, uint&) return false; } -template +template void XCastConversion::onMatrixLoad() { auto& matrix = *pMatrix; @@ -147,14 +147,14 @@ void XCastConversion::onMatrixLoad() } } -template +template void XCastConversion::onStudyClosed() { Renderer::Matrix::onStudyClosed(); Renderer::ARendererArea::onStudyClosed(); } -template +template void XCastConversion::onStudyLoaded() { Renderer::Matrix::onStudyLoaded(); diff --git a/src/ui/simulator/toolbox/components/datagrid/renderer/area/xcast-k.h b/src/ui/simulator/toolbox/components/datagrid/renderer/area/xcast-k.h index 89b2ce486a..2890ed1296 100644 --- a/src/ui/simulator/toolbox/components/datagrid/renderer/area/xcast-k.h +++ b/src/ui/simulator/toolbox/components/datagrid/renderer/area/xcast-k.h @@ -38,7 +38,7 @@ namespace Datagrid { namespace Renderer { -template +template class XCastK : public Renderer::Matrix, public Renderer::ARendererArea { public: diff --git a/src/ui/simulator/toolbox/components/datagrid/renderer/area/xcast-k.hxx b/src/ui/simulator/toolbox/components/datagrid/renderer/area/xcast-k.hxx index 9a2561386f..30e9f27972 100644 --- a/src/ui/simulator/toolbox/components/datagrid/renderer/area/xcast-k.hxx +++ b/src/ui/simulator/toolbox/components/datagrid/renderer/area/xcast-k.hxx @@ -35,44 +35,44 @@ namespace Datagrid { namespace Renderer { -template +template XCastK::XCastK(wxWindow* control, Toolbox::InputSelector::Area* notifier) : MatrixAncestorType(control), Renderer::ARendererArea(control, notifier) { } -template +template XCastK::~XCastK() { destroyBoundEvents(); } -template +template wxString XCastK::columnCaption(int colIndx) const { return (colIndx < 12) ? wxStringFromUTF8(Date::MonthToString(colIndx)) << wxT(" ") : wxString(); } -template +template wxString XCastK::cellValue(int x, int y) const { return MatrixAncestorType::cellValue(x, y); } -template +template double XCastK::cellNumericValue(int x, int y) const { return MatrixAncestorType::cellNumericValue(x, y); } -template +template bool XCastK::cellValue(int x, int y, const Yuni::String& value) { return MatrixAncestorType::cellValue(x, y, value); } -template +template void XCastK::internalAreaChanged(Data::Area* area) { if (area) @@ -86,50 +86,50 @@ void XCastK::internalAreaChanged(Data::Area* area) Renderer::ARendererArea::internalAreaChanged(area); } -template +template inline IRenderer::CellStyle XCastK::cellStyle(int col, int row) const { return MatrixAncestorType::cellStyle(col, row); } -template +template inline wxString XCastK::rowCaption(int rowIndx) const { return wxString() << rowIndx; } -template +template inline int XCastK::width() const { return MatrixAncestorType::width(); } -template +template inline int XCastK::height() const { return MatrixAncestorType::height(); } -template +template inline uint XCastK::maxWidthResize() const { return 0; } -template +template inline bool XCastK::valid() const { return MatrixAncestorType::valid(); } -template +template void XCastK::onStudyClosed() { Renderer::Matrix::onStudyClosed(); Renderer::ARendererArea::onStudyClosed(); } -template +template void XCastK::onStudyLoaded() { Renderer::Matrix::onStudyLoaded(); diff --git a/src/ui/simulator/toolbox/components/datagrid/renderer/area/xcast-translation.h b/src/ui/simulator/toolbox/components/datagrid/renderer/area/xcast-translation.h index 1def9fa485..4f1373490b 100644 --- a/src/ui/simulator/toolbox/components/datagrid/renderer/area/xcast-translation.h +++ b/src/ui/simulator/toolbox/components/datagrid/renderer/area/xcast-translation.h @@ -38,7 +38,7 @@ namespace Datagrid { namespace Renderer { -template +template class XCastTranslation final : public Renderer::Matrix, public Renderer::ARendererArea { public: diff --git a/src/ui/simulator/toolbox/components/datagrid/renderer/area/xcast-translation.hxx b/src/ui/simulator/toolbox/components/datagrid/renderer/area/xcast-translation.hxx index c9f9210a27..d59bd47042 100644 --- a/src/ui/simulator/toolbox/components/datagrid/renderer/area/xcast-translation.hxx +++ b/src/ui/simulator/toolbox/components/datagrid/renderer/area/xcast-translation.hxx @@ -38,43 +38,43 @@ namespace Datagrid { namespace Renderer { -template +template XCastTranslation::XCastTranslation(wxWindow* control, Toolbox::InputSelector::Area* notifier) : MatrixAncestorType(control), Renderer::ARendererArea(control, notifier) { } -template +template XCastTranslation::~XCastTranslation() { destroyBoundEvents(); } -template +template inline wxString XCastTranslation::columnCaption(int colIndx) const { return MatrixAncestorType::columnCaption(colIndx); } -template +template wxString XCastTranslation::cellValue(int x, int y) const { return MatrixAncestorType::cellValue(x, y); } -template +template inline double XCastTranslation::cellNumericValue(int x, int y) const { return MatrixAncestorType::cellNumericValue(x, y); } -template +template inline bool XCastTranslation::cellValue(int x, int y, const Yuni::String& value) { return MatrixAncestorType::cellValue(x, y, value); } -template +template void XCastTranslation::internalAreaChanged(Data::Area* area) { if (area) @@ -88,19 +88,19 @@ void XCastTranslation::internalAreaChanged(Data::Area* area) Renderer::ARendererArea::internalAreaChanged(area); } -template +template inline IRenderer::CellStyle XCastTranslation::cellStyle(int col, int row) const { return MatrixAncestorType::cellStyle(col, row); } -template +template inline wxString XCastTranslation::rowCaption(int rowIndx) const { return MatrixAncestorType::rowCaption(rowIndx); } -template +template wxColour XCastTranslation::horizontalBorderColor(int x, int y) const { // Getting informations about the next hour @@ -118,14 +118,14 @@ wxColour XCastTranslation::horizontalBorderColor(int x, int y) const return IRenderer::verticalBorderColor(x, y); } -template +template void XCastTranslation::onStudyClosed() { Renderer::Matrix::onStudyClosed(); Renderer::ARendererArea::onStudyClosed(); } -template +template void XCastTranslation::onStudyLoaded() { Renderer::Matrix::onStudyLoaded(); diff --git a/src/ui/simulator/toolbox/components/datagrid/renderer/cell.cpp b/src/ui/simulator/toolbox/components/datagrid/renderer/cell.cpp index 981922a2be..bb2e40ce76 100644 --- a/src/ui/simulator/toolbox/components/datagrid/renderer/cell.cpp +++ b/src/ui/simulator/toolbox/components/datagrid/renderer/cell.cpp @@ -30,7 +30,7 @@ static bool convertToDouble(const String& value, double& valueDouble) // ------------------- // Base Cell class // ------------------- -Cell::Cell(TimeSeries ts) : tsKind_(ts) +Cell::Cell(TimeSeriesType ts) : tsKind_(ts) { // We have to wait for the study to be loaded before initializing data members from study. // That's why constructor delegates to member function onStudyLoaded. @@ -104,7 +104,7 @@ IRenderer::CellStyle inactiveCell::cellStyle() const // =================== // Status cell // =================== -readyMadeTSstatus::readyMadeTSstatus(TimeSeries ts) : Cell(ts) +readyMadeTSstatus::readyMadeTSstatus(TimeSeriesType ts) : Cell(ts) { } @@ -138,7 +138,7 @@ IRenderer::CellStyle readyMadeTSstatus::cellStyle() const // ========================== // Generated TS status cell // ========================== -generatedTSstatus::generatedTSstatus(TimeSeries ts) : Cell(ts) +generatedTSstatus::generatedTSstatus(TimeSeriesType ts) : Cell(ts) { } @@ -171,7 +171,7 @@ IRenderer::CellStyle generatedTSstatus::cellStyle() const // =================== // Number TS Cell // =================== -NumberTsCell::NumberTsCell(TimeSeries ts) : Cell(ts) +NumberTsCell::NumberTsCell(TimeSeriesType ts) : Cell(ts) { OnStudyLoaded.connect(this, &NumberTsCell::onStudyLoaded); } @@ -237,7 +237,7 @@ IRenderer::CellStyle NumberTsCell::cellStyle() const // =================== // Refresh TS cell // =================== -RefreshTsCell::RefreshTsCell(TimeSeries ts) : Cell(ts) +RefreshTsCell::RefreshTsCell(TimeSeriesType ts) : Cell(ts) { OnStudyLoaded.connect(this, &RefreshTsCell::onStudyLoaded); } @@ -274,7 +274,7 @@ IRenderer::CellStyle RefreshTsCell::cellStyle() const // =================== // Refresh Span cell // =================== -RefreshSpanCell::RefreshSpanCell(TimeSeries ts) : Cell(ts) +RefreshSpanCell::RefreshSpanCell(TimeSeriesType ts) : Cell(ts) { OnStudyLoaded.connect(this, &RefreshSpanCell::onStudyLoaded); } @@ -330,7 +330,7 @@ IRenderer::CellStyle RefreshSpanCell::cellStyle() const // ============================ // Seasonal correlation cell // ============================ -SeasonalCorrelationCell::SeasonalCorrelationCell(TimeSeries ts) : Cell(ts) +SeasonalCorrelationCell::SeasonalCorrelationCell(TimeSeriesType ts) : Cell(ts) { OnStudyLoaded.connect(this, &SeasonalCorrelationCell::onStudyLoaded); } @@ -400,7 +400,7 @@ IRenderer::CellStyle SeasonalCorrelationCell::cellStyle() const // ===================== // Store to input cell // ===================== -storeToInputCell::storeToInputCell(TimeSeries ts) : Cell(ts) +storeToInputCell::storeToInputCell(TimeSeriesType ts) : Cell(ts) { } @@ -442,7 +442,7 @@ IRenderer::CellStyle storeToInputCell::cellStyle() const // ====================== // Store to output cell // ====================== -storeToOutputCell::storeToOutputCell(TimeSeries ts) : Cell(ts) +storeToOutputCell::storeToOutputCell(TimeSeriesType ts) : Cell(ts) { } @@ -484,7 +484,7 @@ IRenderer::CellStyle storeToOutputCell::cellStyle() const // ====================== // Intra modal cell // ====================== -intraModalCell::intraModalCell(TimeSeries ts) : Cell(ts) +intraModalCell::intraModalCell(TimeSeriesType ts) : Cell(ts) { } @@ -520,7 +520,7 @@ IRenderer::CellStyle intraModalCell::cellStyle() const // ====================== // Inter modal cell // ====================== -interModalCell::interModalCell(TimeSeries ts) : Cell(ts) +interModalCell::interModalCell(TimeSeriesType ts) : Cell(ts) { } diff --git a/src/ui/simulator/toolbox/components/datagrid/renderer/cell.h b/src/ui/simulator/toolbox/components/datagrid/renderer/cell.h index c48769300f..1477ec4b91 100644 --- a/src/ui/simulator/toolbox/components/datagrid/renderer/cell.h +++ b/src/ui/simulator/toolbox/components/datagrid/renderer/cell.h @@ -20,7 +20,7 @@ using namespace Antares::Data; class Cell : public Yuni::IEventObserver { public: - Cell(TimeSeries ts); + Cell(TimeSeriesType ts); ~Cell(); virtual wxString cellValue() const = 0; virtual double cellNumericValue() const = 0; @@ -33,7 +33,7 @@ class Cell : public Yuni::IEventObserver protected: Data::Study::Ptr study_; - TimeSeries tsKind_; + TimeSeriesType tsKind_; }; class blankCell : public Cell @@ -64,7 +64,7 @@ class inactiveCell : public Cell class readyMadeTSstatus : public Cell { public: - readyMadeTSstatus(TimeSeries ts); + readyMadeTSstatus(TimeSeriesType ts); ~readyMadeTSstatus() = default; wxString cellValue() const override; double cellNumericValue() const override; @@ -75,7 +75,7 @@ class readyMadeTSstatus : public Cell class generatedTSstatus : public Cell { public: - generatedTSstatus(TimeSeries ts); + generatedTSstatus(TimeSeriesType ts); ~generatedTSstatus() = default; wxString cellValue() const override; double cellNumericValue() const override; @@ -86,7 +86,7 @@ class generatedTSstatus : public Cell class NumberTsCell : public Cell { public: - NumberTsCell(TimeSeries ts); + NumberTsCell(TimeSeriesType ts); ~NumberTsCell() = default; wxString cellValue() const override; double cellNumericValue() const override; @@ -97,7 +97,7 @@ class NumberTsCell : public Cell void onStudyLoaded(); private: - std::map tsToNumberTs_; + std::map tsToNumberTs_; }; class NumberTsCellThermal : public NumberTsCell @@ -110,7 +110,7 @@ class NumberTsCellThermal : public NumberTsCell class RefreshTsCell : public Cell { public: - RefreshTsCell(TimeSeries ts); + RefreshTsCell(TimeSeriesType ts); ~RefreshTsCell() = default; wxString cellValue() const override; double cellNumericValue() const override; @@ -128,7 +128,7 @@ class RefreshTsCellThermal : public RefreshTsCell class RefreshSpanCell : public Cell { public: - RefreshSpanCell(TimeSeries ts); + RefreshSpanCell(TimeSeriesType ts); ~RefreshSpanCell() = default; wxString cellValue() const override; double cellNumericValue() const override; @@ -139,7 +139,7 @@ class RefreshSpanCell : public Cell void onStudyLoaded(); private: - std::map tsToRefreshSpan_; + std::map tsToRefreshSpan_; }; class RefreshSpanCellThermal : public RefreshSpanCell @@ -152,7 +152,7 @@ class RefreshSpanCellThermal : public RefreshSpanCell class SeasonalCorrelationCell : public Cell { public: - SeasonalCorrelationCell(TimeSeries ts); + SeasonalCorrelationCell(TimeSeriesType ts); ~SeasonalCorrelationCell() = default; virtual wxString cellValue() const override; double cellNumericValue() const override; @@ -163,7 +163,7 @@ class SeasonalCorrelationCell : public Cell void onStudyLoaded(); private: - std::map tsToCorrelation_; + std::map tsToCorrelation_; }; class SeasonalCorrelationCellThermal : public SeasonalCorrelationCell @@ -177,7 +177,7 @@ class SeasonalCorrelationCellThermal : public SeasonalCorrelationCell class storeToInputCell : public Cell { public: - storeToInputCell(TimeSeries ts); + storeToInputCell(TimeSeriesType ts); ~storeToInputCell() = default; wxString cellValue() const override; double cellNumericValue() const override; @@ -188,7 +188,7 @@ class storeToInputCell : public Cell class storeToOutputCell : public Cell { public: - storeToOutputCell(TimeSeries ts); + storeToOutputCell(TimeSeriesType ts); ~storeToOutputCell() = default; wxString cellValue() const override; double cellNumericValue() const override; @@ -199,7 +199,7 @@ class storeToOutputCell : public Cell class intraModalCell : public Cell { public: - intraModalCell(TimeSeries ts); + intraModalCell(TimeSeriesType ts); ~intraModalCell() = default; wxString cellValue() const override; double cellNumericValue() const override; @@ -210,7 +210,7 @@ class intraModalCell : public Cell class interModalCell : public Cell { public: - interModalCell(TimeSeries ts); + interModalCell(TimeSeriesType ts); ~interModalCell() = default; wxString cellValue() const override; double cellNumericValue() const override; diff --git a/src/ui/simulator/toolbox/components/datagrid/renderer/column.cpp b/src/ui/simulator/toolbox/components/datagrid/renderer/column.cpp index 064551856f..be086a1e6d 100644 --- a/src/ui/simulator/toolbox/components/datagrid/renderer/column.cpp +++ b/src/ui/simulator/toolbox/components/datagrid/renderer/column.cpp @@ -58,7 +58,7 @@ namespace Renderer // ------------------- // Base column class // ------------------- -Column::Column(Antares::Data::TimeSeries ts, const wxString& caption) : +Column::Column(Antares::Data::TimeSeriesType ts, const wxString& caption) : tsKind_(ts), caption_(caption) { } @@ -86,7 +86,7 @@ Column::~Column() // -------------------- - // Classic column // --------------------- -classicColumn::classicColumn(TimeSeries ts, const wxString& caption) : Column(ts, caption) +classicColumn::classicColumn(TimeSeriesType ts, const wxString& caption) : Column(ts, caption) { cells_ = {new_check_allocation(), new_check_allocation(tsKind_), diff --git a/src/ui/simulator/toolbox/components/datagrid/renderer/column.h b/src/ui/simulator/toolbox/components/datagrid/renderer/column.h index e18a2d7893..66118f94a3 100644 --- a/src/ui/simulator/toolbox/components/datagrid/renderer/column.h +++ b/src/ui/simulator/toolbox/components/datagrid/renderer/column.h @@ -47,7 +47,7 @@ class Cell; class Column { public: - Column(Antares::Data::TimeSeries ts, const wxString& caption); + Column(Antares::Data::TimeSeriesType ts, const wxString& caption); virtual ~Column(); Cell* getLine(int y) const; int getNumberOfLines() const; @@ -55,7 +55,7 @@ class Column protected: std::vector cells_; - Antares::Data::TimeSeries tsKind_; + Antares::Data::TimeSeriesType tsKind_; wxString caption_; }; @@ -65,7 +65,7 @@ class Column class classicColumn final : public Column { public: - classicColumn(Antares::Data::TimeSeries ts, const wxString& caption); + classicColumn(Antares::Data::TimeSeriesType ts, const wxString& caption); ~classicColumn() override = default; }; diff --git a/src/ui/simulator/windows/analyzer/analyzer.h b/src/ui/simulator/windows/analyzer/analyzer.h index a4baa0e81f..f85252a8c0 100644 --- a/src/ui/simulator/windows/analyzer/analyzer.h +++ b/src/ui/simulator/windows/analyzer/analyzer.h @@ -188,7 +188,7 @@ class AnalyzerWizard final : public wxDialog private: Yuni::Event onUpdateMaxTimeseries; - Yuni::Event onUpdateTimeseriesType; + Yuni::Event onUpdateTimeseriesType; //! \name Filesearch //@{ @@ -228,7 +228,7 @@ class AnalyzerWizard final : public wxDialog Component::Spotlight* pFileSearch; - Data::TimeSeries pTSSelected; + Data::TimeSeriesType pTSSelected; Component::Button* pTSSelector; bool pUpdating; diff --git a/src/ui/simulator/windows/options/advanced/advanced.cpp b/src/ui/simulator/windows/options/advanced/advanced.cpp index 1ab88a48d6..3b925d47ef 100644 --- a/src/ui/simulator/windows/options/advanced/advanced.cpp +++ b/src/ui/simulator/windows/options/advanced/advanced.cpp @@ -462,7 +462,7 @@ void AdvancedParameters::onEditSeedTSDraws(wxCommandEvent& evt) void AdvancedParameters::onNumericQuality(Component::Button&, wxMenu& menu, void*, - Data::TimeSeries ts) + Data::TimeSeriesType ts) { pCurrentTS = ts; wxMenuItem* it; diff --git a/src/ui/simulator/windows/options/advanced/advanced.h b/src/ui/simulator/windows/options/advanced/advanced.h index 7d25a55b89..15e274fae5 100644 --- a/src/ui/simulator/windows/options/advanced/advanced.h +++ b/src/ui/simulator/windows/options/advanced/advanced.h @@ -72,7 +72,7 @@ class AdvancedParameters final : public wxDialog void onEditSeedTSDraws(wxCommandEvent&); - void onNumericQuality(Component::Button&, wxMenu&, void*, Data::TimeSeries ts); + void onNumericQuality(Component::Button&, wxMenu&, void*, Data::TimeSeriesType ts); void onSelectNumericQualityStandard(wxCommandEvent& evt); void onSelectNumericQualityHigh(wxCommandEvent& evt); @@ -127,7 +127,7 @@ class AdvancedParameters final : public wxDialog Component::Button* pBtnNumberOfCores; wxTextCtrl* pEditSeeds[Data::seedMax]; // Only used for menus - Data::TimeSeries pCurrentTS; + Data::TimeSeriesType pCurrentTS; }; // class AdvancedParameters diff --git a/src/ui/simulator/windows/xcast/xcast.h b/src/ui/simulator/windows/xcast/xcast.h index 9afa178004..bd21e6485e 100644 --- a/src/ui/simulator/windows/xcast/xcast.h +++ b/src/ui/simulator/windows/xcast/xcast.h @@ -41,7 +41,7 @@ namespace Antares { namespace Window { -template +template class XCast final : public wxPanel, public Yuni::IEventObserver> { public: diff --git a/src/ui/simulator/windows/xcast/xcast.hxx b/src/ui/simulator/windows/xcast/xcast.hxx index cfcbaa763f..c2535aaa32 100644 --- a/src/ui/simulator/windows/xcast/xcast.hxx +++ b/src/ui/simulator/windows/xcast/xcast.hxx @@ -42,7 +42,7 @@ namespace Antares { namespace Window { -template +template XCast::XCast(wxWindow* parent, Toolbox::InputSelector::Area* notifier) : wxPanel(parent, wxID_ANY), pNotifier(notifier), pArea(nullptr) { @@ -189,13 +189,13 @@ XCast::XCast(wxWindow* parent, Toolbox::InputSelector::Area* notifier) : pPageGeneral->select(); } -template +template inline XCast::~XCast() { ObserverAncestorType::destroyBoundEvents(); } -template +template void XCast::onUpdateDistribution(wxCommandEvent& evt) { wxChoice* obj = (wxChoice*)evt.GetEventObject(); @@ -220,7 +220,7 @@ void XCast::onUpdateDistribution(wxCommandEvent& evt) } } -template +template void XCast::onUpdateConversion(wxCommandEvent& evt) { if (!pArea) @@ -238,7 +238,7 @@ void XCast::onUpdateConversion(wxCommandEvent& evt) } } -template +template void XCast::onUpdateTSTranslationUse(wxCommandEvent& evt) { wxChoice* obj = (wxChoice*)evt.GetEventObject(); @@ -260,21 +260,21 @@ void XCast::onUpdateTSTranslationUse(wxCommandEvent& evt) } } -template +template inline void XCast::selectDefaultPage() { if (pPageGeneral) pPageGeneral->select(); } -template +template void XCast::onStudyClosed() { pArea = nullptr; selectDefaultPage(); } -template +template void XCast::onAreaChanged(Data::Area* area) { using namespace Yuni; @@ -308,7 +308,7 @@ void XCast::onAreaChanged(Data::Area* area) useTranslation->SetSelection(0); } -template +template void XCast::onInstalledCapacityChanged(wxCommandEvent& evt) { if (!pArea) From 8a43ff2cf9ee2903c9c3c2d88d37c601b1b88a5d Mon Sep 17 00:00:00 2001 From: Milos <97689304+Milos-RTEi@users.noreply.github.com> Date: Wed, 4 Oct 2023 16:19:58 +0200 Subject: [PATCH 10/17] Always check mingen against maxPower, regardless of reservoirManagement (#1656) * checkHourlyMinGeneration - check in all cases * fix comments --- src/solver/hydro/management/management.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/solver/hydro/management/management.cpp b/src/solver/hydro/management/management.cpp index a0869b5055..f0ae5d1711 100644 --- a/src/solver/hydro/management/management.cpp +++ b/src/solver/hydro/management/management.cpp @@ -305,7 +305,7 @@ bool HydroManagement::checkWeeklyMinGeneration(uint tsIndex, Data::Area& area) c bool HydroManagement::checkHourlyMinGeneration(uint tsIndex, Data::Area& area) const { - // Hourly minimum generation <= hourly inflows for each hour + // Hourly minimum generation <= hourly max generation for each hour auto& mingenmatrix = area.hydro.series->mingen; auto const& srcmingen = mingenmatrix[tsIndex < mingenmatrix.width ? tsIndex : 0]; auto const& maxPower = area.hydro.maxPower; @@ -350,8 +350,7 @@ bool HydroManagement::checkMinGeneration(uint numSpace, uint year) const bool followLoadModulations = area.hydro.followLoadModulations; bool reservoirManagement = area.hydro.reservoirManagement; - if (!reservoirManagement) - ret = checkHourlyMinGeneration(tsIndex, area) && ret; + ret = checkHourlyMinGeneration(tsIndex, area) && ret; if (!useHeuristicTarget) return; From ab4e14bca410386b7db08948ae8fb66e05b39703 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jason=20Mar=C3=A9chal?= <45510813+JasonMarechal25@users.noreply.github.com> Date: Wed, 4 Oct 2023 21:28:49 +0200 Subject: [PATCH 11/17] [Win] Increase file size limit when reading file (#1674) --- src/ext/yuni/src/yuni/io/file/file.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/ext/yuni/src/yuni/io/file/file.h b/src/ext/yuni/src/yuni/io/file/file.h index 26c5081568..b966a88ee0 100644 --- a/src/ext/yuni/src/yuni/io/file/file.h +++ b/src/ext/yuni/src/yuni/io/file/file.h @@ -23,11 +23,8 @@ namespace IO namespace File { // constants -enum -{ - //! The maximum allowed size for a file in memory (Default: 80Go) - sizeHardLimit = 85899345920u, // 80Gb = 80 * 1024 * 1024 * 1024 -}; +//! The maximum allowed size for a file in memory (Default: 80Go) +constexpr unsigned long long sizeHardLimit = 85899345920u; // 80Go = 80 * 1024 * 1024 * 1024 /*! ** \brief Test if a node exists and is actually a file From 3033c34ee7607877e69c6cff94b27865aa873c9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20Omn=C3=A8s?= Date: Thu, 5 Oct 2023 10:02:26 +0200 Subject: [PATCH 12/17] Use std::unique_ptr::operator-> rather than std::unique_ptr::get (#1676) --- src/analyzer/atsp/correlations.cpp | 2 +- src/solver/optimisation/opt_alloc_probleme_a_optimiser.cpp | 2 +- src/solver/optimisation/opt_appel_solveur_lineaire.cpp | 4 ++-- .../opt_construction_contraintes_couts_demarrage.cpp | 2 +- .../opt_construction_matrice_des_contraintes_cas_lineaire.cpp | 2 +- .../opt_construction_variables_couts_demarrages.cpp | 2 +- .../opt_construction_variables_optimisees_lineaire.cpp | 2 +- .../opt_construction_variables_optimisees_quadratique.cpp | 2 +- .../optimisation/opt_decompte_variables_et_contraintes.cpp | 2 +- .../optimisation/opt_gestion_des_bornes_cas_lineaire.cpp | 2 +- .../optimisation/opt_gestion_des_bornes_cas_quadratique.cpp | 2 +- .../optimisation/opt_gestion_des_bornes_couts_demarrage.cpp | 2 +- .../optimisation/opt_gestion_des_couts_cas_lineaire.cpp | 2 +- .../optimisation/opt_gestion_des_couts_cas_quadratique.cpp | 2 +- .../optimisation/opt_gestion_des_couts_couts_demarrage.cpp | 2 +- .../optimisation/opt_gestion_second_membre_cas_lineaire.cpp | 2 +- .../opt_gestion_second_membre_cas_quadratique.cpp | 2 +- .../opt_gestion_second_membre_couts_demarrage.cpp | 2 +- src/solver/optimisation/opt_liberation_problemes_simplexe.cpp | 2 +- 19 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/analyzer/atsp/correlations.cpp b/src/analyzer/atsp/correlations.cpp index b067b42914..ae9db4a0c0 100644 --- a/src/analyzer/atsp/correlations.cpp +++ b/src/analyzer/atsp/correlations.cpp @@ -629,7 +629,7 @@ bool ATSP::computeMonthlyCorrelations() } // removing the mapping list - delete mapping; + delete[] mapping; return true; } diff --git a/src/solver/optimisation/opt_alloc_probleme_a_optimiser.cpp b/src/solver/optimisation/opt_alloc_probleme_a_optimiser.cpp index 968dcb3f49..4e9457c5a9 100644 --- a/src/solver/optimisation/opt_alloc_probleme_a_optimiser.cpp +++ b/src/solver/optimisation/opt_alloc_probleme_a_optimiser.cpp @@ -88,7 +88,7 @@ void OPT_AllocateFromNumberOfVariableConstraints(PROBLEME_ANTARES_A_RESOUDRE* Pr static void optimisationAllocateProblem(PROBLEME_HEBDO* problemeHebdo, const int mxPaliers) { - PROBLEME_ANTARES_A_RESOUDRE* ProblemeAResoudre = problemeHebdo->ProblemeAResoudre.get(); + const auto& ProblemeAResoudre = problemeHebdo->ProblemeAResoudre; int NombreDePasDeTempsPourUneOptimisation = problemeHebdo->NombreDePasDeTempsPourUneOptimisation; diff --git a/src/solver/optimisation/opt_appel_solveur_lineaire.cpp b/src/solver/optimisation/opt_appel_solveur_lineaire.cpp index 896cff84b3..5e9f8f45f8 100644 --- a/src/solver/optimisation/opt_appel_solveur_lineaire.cpp +++ b/src/solver/optimisation/opt_appel_solveur_lineaire.cpp @@ -107,7 +107,7 @@ static SimplexResult OPT_TryToCallSimplex( IResultWriter& writer ) { - PROBLEME_ANTARES_A_RESOUDRE* ProblemeAResoudre = problemeHebdo->ProblemeAResoudre.get(); + const auto& ProblemeAResoudre = problemeHebdo->ProblemeAResoudre; auto ProbSpx = (PROBLEME_SPX*)(ProblemeAResoudre->ProblemesSpx[(int)NumIntervalle]); auto solver = (MPSolver*)(ProblemeAResoudre->ProblemesSpx[(int)NumIntervalle]); @@ -304,7 +304,7 @@ bool OPT_AppelDuSimplexe(const OptimizationOptions& options, const OptPeriodStringGenerator& optPeriodStringGenerator, IResultWriter& writer) { - PROBLEME_ANTARES_A_RESOUDRE* ProblemeAResoudre = problemeHebdo->ProblemeAResoudre.get(); + const auto& ProblemeAResoudre = problemeHebdo->ProblemeAResoudre; Optimization::PROBLEME_SIMPLEXE_NOMME Probleme(ProblemeAResoudre->NomDesVariables, ProblemeAResoudre->NomDesContraintes, ProblemeAResoudre->StatutDesVariables, diff --git a/src/solver/optimisation/opt_construction_contraintes_couts_demarrage.cpp b/src/solver/optimisation/opt_construction_contraintes_couts_demarrage.cpp index da4c2f573b..600cbe71d2 100644 --- a/src/solver/optimisation/opt_construction_contraintes_couts_demarrage.cpp +++ b/src/solver/optimisation/opt_construction_contraintes_couts_demarrage.cpp @@ -45,7 +45,7 @@ void OPT_ConstruireLaMatriceDesContraintesDuProblemeLineaireCoutsDeDemarrage( PROBLEME_HEBDO* problemeHebdo, bool Simulation) { - PROBLEME_ANTARES_A_RESOUDRE* ProblemeAResoudre = problemeHebdo->ProblemeAResoudre.get(); + const auto& ProblemeAResoudre = problemeHebdo->ProblemeAResoudre; int nombreDePasDeTempsPourUneOptimisation = problemeHebdo->NombreDePasDeTempsPourUneOptimisation; diff --git a/src/solver/optimisation/opt_construction_matrice_des_contraintes_cas_lineaire.cpp b/src/solver/optimisation/opt_construction_matrice_des_contraintes_cas_lineaire.cpp index d9fae6948b..3dd43259a4 100644 --- a/src/solver/optimisation/opt_construction_matrice_des_contraintes_cas_lineaire.cpp +++ b/src/solver/optimisation/opt_construction_matrice_des_contraintes_cas_lineaire.cpp @@ -54,7 +54,7 @@ using namespace Antares::Data; void OPT_ConstruireLaMatriceDesContraintesDuProblemeLineaire(PROBLEME_HEBDO* problemeHebdo, Solver::IResultWriter& writer) { - PROBLEME_ANTARES_A_RESOUDRE* ProblemeAResoudre = problemeHebdo->ProblemeAResoudre.get(); + const auto& ProblemeAResoudre = problemeHebdo->ProblemeAResoudre; int nombreDePasDeTempsDUneJournee = problemeHebdo->NombreDePasDeTempsDUneJournee; int nombreDePasDeTempsPourUneOptimisation diff --git a/src/solver/optimisation/opt_construction_variables_couts_demarrages.cpp b/src/solver/optimisation/opt_construction_variables_couts_demarrages.cpp index 60b5c508a5..b7b1658fec 100644 --- a/src/solver/optimisation/opt_construction_variables_couts_demarrages.cpp +++ b/src/solver/optimisation/opt_construction_variables_couts_demarrages.cpp @@ -38,7 +38,7 @@ void OPT_ConstruireLaListeDesVariablesOptimiseesDuProblemeLineaireCoutsDeDemarra PROBLEME_HEBDO* problemeHebdo, bool Simulation) { - PROBLEME_ANTARES_A_RESOUDRE* ProblemeAResoudre = problemeHebdo->ProblemeAResoudre.get(); + const auto& ProblemeAResoudre = problemeHebdo->ProblemeAResoudre; int nombreDePasDeTempsPourUneOptimisation = problemeHebdo->NombreDePasDeTempsPourUneOptimisation; diff --git a/src/solver/optimisation/opt_construction_variables_optimisees_lineaire.cpp b/src/solver/optimisation/opt_construction_variables_optimisees_lineaire.cpp index 050f3e8c32..c33a5300b8 100644 --- a/src/solver/optimisation/opt_construction_variables_optimisees_lineaire.cpp +++ b/src/solver/optimisation/opt_construction_variables_optimisees_lineaire.cpp @@ -33,7 +33,7 @@ void OPT_ConstruireLaListeDesVariablesOptimiseesDuProblemeLineaire(PROBLEME_HEBDO* problemeHebdo) { - PROBLEME_ANTARES_A_RESOUDRE* ProblemeAResoudre = problemeHebdo->ProblemeAResoudre.get(); + const auto& ProblemeAResoudre = problemeHebdo->ProblemeAResoudre; int NombreDePasDeTempsPourUneOptimisation = problemeHebdo->NombreDePasDeTempsPourUneOptimisation; diff --git a/src/solver/optimisation/opt_construction_variables_optimisees_quadratique.cpp b/src/solver/optimisation/opt_construction_variables_optimisees_quadratique.cpp index 3b97031374..793a871db6 100644 --- a/src/solver/optimisation/opt_construction_variables_optimisees_quadratique.cpp +++ b/src/solver/optimisation/opt_construction_variables_optimisees_quadratique.cpp @@ -37,7 +37,7 @@ void OPT_ConstruireLaListeDesVariablesOptimiseesDuProblemeQuadratique(PROBLEME_HEBDO* problemeHebdo) { - PROBLEME_ANTARES_A_RESOUDRE* ProblemeAResoudre = problemeHebdo->ProblemeAResoudre.get(); + const auto& ProblemeAResoudre = problemeHebdo->ProblemeAResoudre; assert(ProblemeAResoudre != NULL); int nombreDeVariables = 0; diff --git a/src/solver/optimisation/opt_decompte_variables_et_contraintes.cpp b/src/solver/optimisation/opt_decompte_variables_et_contraintes.cpp index e874c11905..d68868d347 100644 --- a/src/solver/optimisation/opt_decompte_variables_et_contraintes.cpp +++ b/src/solver/optimisation/opt_decompte_variables_et_contraintes.cpp @@ -39,7 +39,7 @@ using namespace Antares; int OPT_DecompteDesVariablesEtDesContraintesDuProblemeAOptimiser(PROBLEME_HEBDO* problemeHebdo) { - PROBLEME_ANTARES_A_RESOUDRE* ProblemeAResoudre = problemeHebdo->ProblemeAResoudre.get(); + const auto& ProblemeAResoudre = problemeHebdo->ProblemeAResoudre; int nombreDePasDeTempsPourUneOptimisation = problemeHebdo->NombreDePasDeTempsPourUneOptimisation; diff --git a/src/solver/optimisation/opt_gestion_des_bornes_cas_lineaire.cpp b/src/solver/optimisation/opt_gestion_des_bornes_cas_lineaire.cpp index f0c8eff8fe..b45190106c 100644 --- a/src/solver/optimisation/opt_gestion_des_bornes_cas_lineaire.cpp +++ b/src/solver/optimisation/opt_gestion_des_bornes_cas_lineaire.cpp @@ -216,7 +216,7 @@ void OPT_InitialiserLesBornesDesVariablesDuProblemeLineaire(PROBLEME_HEBDO* prob const int DernierPdtDeLIntervalle, const int optimizationNumber) { - PROBLEME_ANTARES_A_RESOUDRE* ProblemeAResoudre = problemeHebdo->ProblemeAResoudre.get(); + const auto& ProblemeAResoudre = problemeHebdo->ProblemeAResoudre; std::vector& AdresseOuPlacerLaValeurDesVariablesOptimisees = ProblemeAResoudre->AdresseOuPlacerLaValeurDesVariablesOptimisees; diff --git a/src/solver/optimisation/opt_gestion_des_bornes_cas_quadratique.cpp b/src/solver/optimisation/opt_gestion_des_bornes_cas_quadratique.cpp index b39e338501..51ccbfac21 100644 --- a/src/solver/optimisation/opt_gestion_des_bornes_cas_quadratique.cpp +++ b/src/solver/optimisation/opt_gestion_des_bornes_cas_quadratique.cpp @@ -43,7 +43,7 @@ using namespace Yuni; void OPT_InitialiserLesBornesDesVariablesDuProblemeQuadratique(PROBLEME_HEBDO* problemeHebdo, int PdtHebdo) { - PROBLEME_ANTARES_A_RESOUDRE* ProblemeAResoudre = problemeHebdo->ProblemeAResoudre.get(); + const auto& ProblemeAResoudre = problemeHebdo->ProblemeAResoudre; for (int i = 0; i < ProblemeAResoudre->NombreDeVariables; i++) ProblemeAResoudre->AdresseOuPlacerLaValeurDesVariablesOptimisees[i] = nullptr; diff --git a/src/solver/optimisation/opt_gestion_des_bornes_couts_demarrage.cpp b/src/solver/optimisation/opt_gestion_des_bornes_couts_demarrage.cpp index bf23443c90..bf7d7ae914 100644 --- a/src/solver/optimisation/opt_gestion_des_bornes_couts_demarrage.cpp +++ b/src/solver/optimisation/opt_gestion_des_bornes_couts_demarrage.cpp @@ -39,7 +39,7 @@ void OPT_InitialiserLesBornesDesVariablesDuProblemeLineaireCoutsDeDemarrage( const int PremierPdtDeLIntervalle, const int DernierPdtDeLIntervalle) { - PROBLEME_ANTARES_A_RESOUDRE* ProblemeAResoudre = problemeHebdo->ProblemeAResoudre.get(); + const auto& ProblemeAResoudre = problemeHebdo->ProblemeAResoudre; int NombreDePasDeTempsPourUneOptimisation = problemeHebdo->NombreDePasDeTempsPourUneOptimisation; diff --git a/src/solver/optimisation/opt_gestion_des_couts_cas_lineaire.cpp b/src/solver/optimisation/opt_gestion_des_couts_cas_lineaire.cpp index 1994db4666..189a27662a 100644 --- a/src/solver/optimisation/opt_gestion_des_couts_cas_lineaire.cpp +++ b/src/solver/optimisation/opt_gestion_des_couts_cas_lineaire.cpp @@ -85,7 +85,7 @@ void OPT_InitialiserLesCoutsLineaire(PROBLEME_HEBDO* problemeHebdo, const int PremierPdtDeLIntervalle, const int DernierPdtDeLIntervalle) { - PROBLEME_ANTARES_A_RESOUDRE* ProblemeAResoudre = problemeHebdo->ProblemeAResoudre.get(); + const auto& ProblemeAResoudre = problemeHebdo->ProblemeAResoudre; int pdtJour = 0; diff --git a/src/solver/optimisation/opt_gestion_des_couts_cas_quadratique.cpp b/src/solver/optimisation/opt_gestion_des_couts_cas_quadratique.cpp index b6407c0f69..5aa0efee81 100644 --- a/src/solver/optimisation/opt_gestion_des_couts_cas_quadratique.cpp +++ b/src/solver/optimisation/opt_gestion_des_couts_cas_quadratique.cpp @@ -34,7 +34,7 @@ void OPT_InitialiserLesCoutsQuadratiques(PROBLEME_HEBDO* problemeHebdo, int PdtHebdo) { - PROBLEME_ANTARES_A_RESOUDRE* ProblemeAResoudre = problemeHebdo->ProblemeAResoudre.get(); + const auto& ProblemeAResoudre = problemeHebdo->ProblemeAResoudre; ProblemeAResoudre->CoutLineaire.assign(ProblemeAResoudre->NombreDeVariables, 0.); diff --git a/src/solver/optimisation/opt_gestion_des_couts_couts_demarrage.cpp b/src/solver/optimisation/opt_gestion_des_couts_couts_demarrage.cpp index 304f2b7cc8..2d508e10a6 100644 --- a/src/solver/optimisation/opt_gestion_des_couts_couts_demarrage.cpp +++ b/src/solver/optimisation/opt_gestion_des_couts_couts_demarrage.cpp @@ -38,7 +38,7 @@ void OPT_InitialiserLesCoutsLineaireCoutsDeDemarrage(PROBLEME_HEBDO* problemeHeb const int PremierPdtDeLIntervalle, const int DernierPdtDeLIntervalle) { - PROBLEME_ANTARES_A_RESOUDRE* ProblemeAResoudre = problemeHebdo->ProblemeAResoudre.get(); + const auto& ProblemeAResoudre = problemeHebdo->ProblemeAResoudre; std::vector& CoutLineaire = ProblemeAResoudre->CoutLineaire; for (int pdtHebdo = PremierPdtDeLIntervalle, pdtJour = 0; pdtHebdo < DernierPdtDeLIntervalle; diff --git a/src/solver/optimisation/opt_gestion_second_membre_cas_lineaire.cpp b/src/solver/optimisation/opt_gestion_second_membre_cas_lineaire.cpp index eb2fbb874d..73506a61c1 100644 --- a/src/solver/optimisation/opt_gestion_second_membre_cas_lineaire.cpp +++ b/src/solver/optimisation/opt_gestion_second_membre_cas_lineaire.cpp @@ -64,7 +64,7 @@ void OPT_InitialiserLeSecondMembreDuProblemeLineaire(PROBLEME_HEBDO* problemeHeb { int weekFirstHour = problemeHebdo->weekInTheYear * 168; - PROBLEME_ANTARES_A_RESOUDRE* ProblemeAResoudre = problemeHebdo->ProblemeAResoudre.get(); + const auto& ProblemeAResoudre = problemeHebdo->ProblemeAResoudre; std::vector& SecondMembre = ProblemeAResoudre->SecondMembre; diff --git a/src/solver/optimisation/opt_gestion_second_membre_cas_quadratique.cpp b/src/solver/optimisation/opt_gestion_second_membre_cas_quadratique.cpp index c06cf91b39..588d1f51b7 100644 --- a/src/solver/optimisation/opt_gestion_second_membre_cas_quadratique.cpp +++ b/src/solver/optimisation/opt_gestion_second_membre_cas_quadratique.cpp @@ -34,7 +34,7 @@ void OPT_InitialiserLeSecondMembreDuProblemeQuadratique(PROBLEME_HEBDO* problemeHebdo, int PdtHebdo) { - PROBLEME_ANTARES_A_RESOUDRE* ProblemeAResoudre = problemeHebdo->ProblemeAResoudre.get(); + const auto& ProblemeAResoudre = problemeHebdo->ProblemeAResoudre; for (uint32_t pays = 0; pays < problemeHebdo->NombreDePays - 1; pays++) { diff --git a/src/solver/optimisation/opt_gestion_second_membre_couts_demarrage.cpp b/src/solver/optimisation/opt_gestion_second_membre_couts_demarrage.cpp index 611cc42079..50a7d22d56 100644 --- a/src/solver/optimisation/opt_gestion_second_membre_couts_demarrage.cpp +++ b/src/solver/optimisation/opt_gestion_second_membre_couts_demarrage.cpp @@ -42,7 +42,7 @@ void OPT_InitialiserLeSecondMembreDuProblemeLineaireCoutsDeDemarrage(PROBLEME_HE int PremierPdtDeLIntervalle, int DernierPdtDeLIntervalle) { - PROBLEME_ANTARES_A_RESOUDRE* ProblemeAResoudre = problemeHebdo->ProblemeAResoudre.get(); + const auto& ProblemeAResoudre = problemeHebdo->ProblemeAResoudre; std::vector& SecondMembre = ProblemeAResoudre->SecondMembre; std::vector& AdresseOuPlacerLaValeurDesCoutsMarginaux diff --git a/src/solver/optimisation/opt_liberation_problemes_simplexe.cpp b/src/solver/optimisation/opt_liberation_problemes_simplexe.cpp index e826eda3aa..05b84ec32b 100644 --- a/src/solver/optimisation/opt_liberation_problemes_simplexe.cpp +++ b/src/solver/optimisation/opt_liberation_problemes_simplexe.cpp @@ -52,7 +52,7 @@ void OPT_LiberationProblemesSimplexe(const OptimizationOptions& options, const P int nbIntervalles = problemeHebdo->NombreDePasDeTemps / NombreDePasDeTempsPourUneOptimisation; - const PROBLEME_ANTARES_A_RESOUDRE* ProblemeAResoudre = problemeHebdo->ProblemeAResoudre.get(); + const auto& ProblemeAResoudre = problemeHebdo->ProblemeAResoudre; if (!ProblemeAResoudre) return; From cf4a792b34c95518f39a6ce680867f4eb07a499a Mon Sep 17 00:00:00 2001 From: abdoulbari zakir <32519851+a-zakir@users.noreply.github.com> Date: Thu, 5 Oct 2023 10:25:32 +0200 Subject: [PATCH 13/17] Create Doxygen documentation (#1650) * clean branch * update .yml * update deploy branch * ooooooook * set develop as gh-pages deployer * move Doxyfile * just for test * checks: ok * update README.md * try clone instead of submodule --- .github/workflows/doxygen.yml | 44 + README.md | 1 + docs/Doxyfile | 2863 +++++++++++++++++++++++++++++++++ 3 files changed, 2908 insertions(+) create mode 100644 .github/workflows/doxygen.yml create mode 100644 docs/Doxyfile diff --git a/.github/workflows/doxygen.yml b/.github/workflows/doxygen.yml new file mode 100644 index 0000000000..9bb8f34512 --- /dev/null +++ b/.github/workflows/doxygen.yml @@ -0,0 +1,44 @@ +name: GitHub Pages + +on: + push: + branches: + - develop # Set a branch name to trigger deployment + pull_request: + +jobs: + deploy: + runs-on: ubuntu-22.04 + permissions: + contents: write + concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + steps: + - uses: actions/checkout@v3 + with: + submodules: true # Fetch Hugo themes (true OR recursive) + fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod + + - name: theme + run: | + git clone https://github.com/jothepro/doxygen-awesome-css.git + cd doxygen-awesome-css + git checkout v2.2.1 + + - name: Doxygen + uses: mattnotmitt/doxygen-action@1.9.5 + with: + doxyfile-path: docs/Doxyfile + + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + # If you're changing the branch from main, + # also change the `main` in `refs/heads/main` + # below accordingly. + if: github.ref == 'refs/heads/develop' + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./html + + + \ No newline at end of file diff --git a/README.md b/README.md index 7b6deb64fe..dea3006bc4 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,7 @@ In May 2018 RTE decided to release the project under the GPLv3 license. - Antares web site : https://antares-simulator.org - RTE web site : http://www.rte-france.com/ +- Doxygen code documentation : https://antaressimulatorteam.github.io/Antares_Simulator/ # Installation diff --git a/docs/Doxyfile b/docs/Doxyfile new file mode 100644 index 0000000000..24c257cd98 --- /dev/null +++ b/docs/Doxyfile @@ -0,0 +1,2863 @@ +# Doxyfile 1.9.8 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project. +# +# All text after a double hash (##) is considered a comment and is placed in +# front of the TAG it is preceding. +# +# All text after a single hash (#) is considered a comment and will be ignored. +# The format is: +# TAG = value [value, ...] +# For lists, items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (\" \"). +# +# Note: +# +# Use doxygen to compare the used configuration file with the template +# configuration file: +# doxygen -x [configFile] +# Use doxygen to compare the used configuration file with the template +# configuration file without replacing the environment variables or CMake type +# replacement variables: +# doxygen -x_noenv [configFile] + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# This tag specifies the encoding used for all characters in the configuration +# file that follow. The default is UTF-8 which is also the encoding used for all +# text before the first occurrence of this tag. Doxygen uses libiconv (or the +# iconv built into libc) for the transcoding. See +# https://www.gnu.org/software/libiconv/ for the list of possible encodings. +# The default value is: UTF-8. + +DOXYFILE_ENCODING = UTF-8 + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by +# double-quotes, unless you are using Doxywizard) that should identify the +# project for which the documentation is generated. This name is used in the +# title of most generated pages and in a few other places. +# The default value is: My Project. + +PROJECT_NAME = "Antares Simulator" + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. This +# could be handy for archiving the generated documentation or if some version +# control system is used. + +PROJECT_NUMBER = + +# Using the PROJECT_BRIEF tag one can provide an optional one line description +# for a project that appears at the top of each page and should give viewer a +# quick idea about the purpose of the project. Keep the description short. + +PROJECT_BRIEF = + +# With the PROJECT_LOGO tag one can specify a logo or an icon that is included +# in the documentation. The maximum height of the logo should not exceed 55 +# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy +# the logo to the output directory. + +PROJECT_LOGO = + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path +# into which the generated documentation will be written. If a relative path is +# entered, it will be relative to the location where doxygen was started. If +# left blank the current directory will be used. + +OUTPUT_DIRECTORY = + +# If the CREATE_SUBDIRS tag is set to YES then doxygen will create up to 4096 +# sub-directories (in 2 levels) under the output directory of each output format +# and will distribute the generated files over these directories. Enabling this +# option can be useful when feeding doxygen a huge amount of source files, where +# putting all generated files in the same directory would otherwise causes +# performance problems for the file system. Adapt CREATE_SUBDIRS_LEVEL to +# control the number of sub-directories. +# The default value is: NO. + +CREATE_SUBDIRS = NO + +# Controls the number of sub-directories that will be created when +# CREATE_SUBDIRS tag is set to YES. Level 0 represents 16 directories, and every +# level increment doubles the number of directories, resulting in 4096 +# directories at level 8 which is the default and also the maximum value. The +# sub-directories are organized in 2 levels, the first level always has a fixed +# number of 16 directories. +# Minimum value: 0, maximum value: 8, default value: 8. +# This tag requires that the tag CREATE_SUBDIRS is set to YES. + +CREATE_SUBDIRS_LEVEL = 8 + +# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII +# characters to appear in the names of generated files. If set to NO, non-ASCII +# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode +# U+3044. +# The default value is: NO. + +ALLOW_UNICODE_NAMES = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Bulgarian, +# Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, Dutch, English +# (United States), Esperanto, Farsi (Persian), Finnish, French, German, Greek, +# Hindi, Hungarian, Indonesian, Italian, Japanese, Japanese-en (Japanese with +# English messages), Korean, Korean-en (Korean with English messages), Latvian, +# Lithuanian, Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, +# Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, +# Swedish, Turkish, Ukrainian and Vietnamese. +# The default value is: English. + +OUTPUT_LANGUAGE = English + +# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member +# descriptions after the members that are listed in the file and class +# documentation (similar to Javadoc). Set to NO to disable this. +# The default value is: YES. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief +# description of a member or function before the detailed description +# +# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. +# The default value is: YES. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator that is +# used to form the text in various listings. Each string in this list, if found +# as the leading text of the brief description, will be stripped from the text +# and the result, after processing the whole list, is used as the annotated +# text. Otherwise, the brief description is used as-is. If left blank, the +# following values are used ($name is automatically replaced with the name of +# the entity):The $name class, The $name widget, The $name file, is, provides, +# specifies, contains, represents, a, an and the. + +ABBREVIATE_BRIEF = "The $name class" \ + "The $name widget" \ + "The $name file" \ + is \ + provides \ + specifies \ + contains \ + represents \ + a \ + an \ + the + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# doxygen will generate a detailed section even if there is only a brief +# description. +# The default value is: NO. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. +# The default value is: NO. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path +# before files name in the file list and in the header files. If set to NO the +# shortest path that makes the file name unique will be used +# The default value is: YES. + +FULL_PATH_NAMES = YES + +# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. +# Stripping is only done if one of the specified strings matches the left-hand +# part of the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the path to +# strip. +# +# Note that you can specify absolute paths here, but also relative paths, which +# will be relative from the directory where doxygen is started. +# This tag requires that the tag FULL_PATH_NAMES is set to YES. + +STRIP_FROM_PATH = + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the +# path mentioned in the documentation of a class, which tells the reader which +# header file to include in order to use a class. If left blank only the name of +# the header file containing the class definition is used. Otherwise one should +# specify the list of include paths that are normally passed to the compiler +# using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but +# less readable) file names. This can be useful is your file systems doesn't +# support long names like on DOS, Mac, or CD-ROM. +# The default value is: NO. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the +# first line (until the first dot) of a Javadoc-style comment as the brief +# description. If set to NO, the Javadoc-style will behave just like regular Qt- +# style comments (thus requiring an explicit @brief command for a brief +# description.) +# The default value is: NO. + +JAVADOC_AUTOBRIEF = NO + +# If the JAVADOC_BANNER tag is set to YES then doxygen will interpret a line +# such as +# /*************** +# as being the beginning of a Javadoc-style comment "banner". If set to NO, the +# Javadoc-style will behave just like regular comments and it will not be +# interpreted by doxygen. +# The default value is: NO. + +JAVADOC_BANNER = NO + +# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first +# line (until the first dot) of a Qt-style comment as the brief description. If +# set to NO, the Qt-style will behave just like regular Qt-style comments (thus +# requiring an explicit \brief command for a brief description.) +# The default value is: NO. + +QT_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a +# multi-line C++ special comment block (i.e. a block of //! or /// comments) as +# a brief description. This used to be the default behavior. The new default is +# to treat a multi-line C++ comment block as a detailed description. Set this +# tag to YES if you prefer the old behavior instead. +# +# Note that setting this tag to YES also means that rational rose comments are +# not recognized any more. +# The default value is: NO. + +MULTILINE_CPP_IS_BRIEF = NO + +# By default Python docstrings are displayed as preformatted text and doxygen's +# special commands cannot be used. By setting PYTHON_DOCSTRING to NO the +# doxygen's special commands can be used and the contents of the docstring +# documentation blocks is shown as doxygen documentation. +# The default value is: YES. + +PYTHON_DOCSTRING = YES + +# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the +# documentation from any documented member that it re-implements. +# The default value is: YES. + +INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new +# page for each member. If set to NO, the documentation of a member will be part +# of the file/class/namespace that contains it. +# The default value is: NO. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen +# uses this value to replace tabs by spaces in code fragments. +# Minimum value: 1, maximum value: 16, default value: 4. + +TAB_SIZE = 4 + +# This tag can be used to specify a number of aliases that act as commands in +# the documentation. An alias has the form: +# name=value +# For example adding +# "sideeffect=@par Side Effects:^^" +# will allow you to put the command \sideeffect (or @sideeffect) in the +# documentation, which will result in a user-defined paragraph with heading +# "Side Effects:". Note that you cannot put \n's in the value part of an alias +# to insert newlines (in the resulting output). You can put ^^ in the value part +# of an alias to insert a newline as if a physical newline was in the original +# file. When you need a literal { or } or , in the value part of an alias you +# have to escape them by means of a backslash (\), this can lead to conflicts +# with the commands \{ and \} for these it is advised to use the version @{ and +# @} or use a double escape (\\{ and \\}) + +ALIASES = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources +# only. Doxygen will then generate output that is more tailored for C. For +# instance, some of the names that are used will be different. The list of all +# members will be omitted, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_FOR_C = NO + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or +# Python sources only. Doxygen will then generate output that is more tailored +# for that language. For instance, namespaces will be presented as packages, +# qualified scopes will look different, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_JAVA = NO + +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources. Doxygen will then generate output that is tailored for Fortran. +# The default value is: NO. + +OPTIMIZE_FOR_FORTRAN = NO + +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for VHDL. +# The default value is: NO. + +OPTIMIZE_OUTPUT_VHDL = NO + +# Set the OPTIMIZE_OUTPUT_SLICE tag to YES if your project consists of Slice +# sources only. Doxygen will then generate output that is more tailored for that +# language. For instance, namespaces will be presented as modules, types will be +# separated into more groups, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_SLICE = NO + +# Doxygen selects the parser to use depending on the extension of the files it +# parses. With this tag you can assign which parser to use for a given +# extension. Doxygen has a built-in mapping, but you can override or extend it +# using this tag. The format is ext=language, where ext is a file extension, and +# language is one of the parsers supported by doxygen: IDL, Java, JavaScript, +# Csharp (C#), C, C++, Lex, D, PHP, md (Markdown), Objective-C, Python, Slice, +# VHDL, Fortran (fixed format Fortran: FortranFixed, free formatted Fortran: +# FortranFree, unknown formatted Fortran: Fortran. In the later case the parser +# tries to guess whether the code is fixed or free formatted code, this is the +# default for Fortran type files). For instance to make doxygen treat .inc files +# as Fortran files (default is PHP), and .f files as C (default is Fortran), +# use: inc=Fortran f=C. +# +# Note: For files without extension you can use no_extension as a placeholder. +# +# Note that for custom extensions you also need to set FILE_PATTERNS otherwise +# the files are not read by doxygen. When specifying no_extension you should add +# * to the FILE_PATTERNS. +# +# Note see also the list of default file extension mappings. + +EXTENSION_MAPPING = + +# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments +# according to the Markdown format, which allows for more readable +# documentation. See https://daringfireball.net/projects/markdown/ for details. +# The output of markdown processing is further processed by doxygen, so you can +# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in +# case of backward compatibilities issues. +# The default value is: YES. + +MARKDOWN_SUPPORT = YES + +# When the TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings up +# to that level are automatically included in the table of contents, even if +# they do not have an id attribute. +# Note: This feature currently applies only to Markdown headings. +# Minimum value: 0, maximum value: 99, default value: 5. +# This tag requires that the tag MARKDOWN_SUPPORT is set to YES. + +TOC_INCLUDE_HEADINGS = 5 + +# The MARKDOWN_ID_STYLE tag can be used to specify the algorithm used to +# generate identifiers for the Markdown headings. Note: Every identifier is +# unique. +# Possible values are: DOXYGEN use a fixed 'autotoc_md' string followed by a +# sequence number starting at 0 and GITHUB use the lower case version of title +# with any whitespace replaced by '-' and punctuation characters removed. +# The default value is: DOXYGEN. +# This tag requires that the tag MARKDOWN_SUPPORT is set to YES. + +MARKDOWN_ID_STYLE = DOXYGEN + +# When enabled doxygen tries to link words that correspond to documented +# classes, or namespaces to their corresponding documentation. Such a link can +# be prevented in individual cases by putting a % sign in front of the word or +# globally by setting AUTOLINK_SUPPORT to NO. +# The default value is: YES. + +AUTOLINK_SUPPORT = YES + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should set this +# tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); +# versus func(std::string) {}). This also make the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. +# The default value is: NO. + +BUILTIN_STL_SUPPORT = NO + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. +# The default value is: NO. + +CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip (see: +# https://www.riverbankcomputing.com/software/sip/intro) sources only. Doxygen +# will parse them like normal C++ but will assume all classes use public instead +# of private inheritance when no explicit protection keyword is present. +# The default value is: NO. + +SIP_SUPPORT = NO + +# For Microsoft's IDL there are propget and propput attributes to indicate +# getter and setter methods for a property. Setting this option to YES will make +# doxygen to replace the get and set methods by a property in the documentation. +# This will only work if the methods are indeed getting or setting a simple +# type. If this is not the case, or you want to show the methods anyway, you +# should set this option to NO. +# The default value is: YES. + +IDL_PROPERTY_SUPPORT = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. +# The default value is: NO. + +DISTRIBUTE_GROUP_DOC = NO + +# If one adds a struct or class to a group and this option is enabled, then also +# any nested class or struct is added to the same group. By default this option +# is disabled and one has to add nested compounds explicitly via \ingroup. +# The default value is: NO. + +GROUP_NESTED_COMPOUNDS = NO + +# Set the SUBGROUPING tag to YES to allow class member groups of the same type +# (for instance a group of public functions) to be put as a subgroup of that +# type (e.g. under the Public Functions section). Set it to NO to prevent +# subgrouping. Alternatively, this can be done per class using the +# \nosubgrouping command. +# The default value is: YES. + +SUBGROUPING = YES + +# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions +# are shown inside the group in which they are included (e.g. using \ingroup) +# instead of on a separate page (for HTML and Man pages) or section (for LaTeX +# and RTF). +# +# Note that this feature does not work in combination with +# SEPARATE_MEMBER_PAGES. +# The default value is: NO. + +INLINE_GROUPED_CLASSES = NO + +# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions +# with only public data fields or simple typedef fields will be shown inline in +# the documentation of the scope in which they are defined (i.e. file, +# namespace, or group documentation), provided this scope is documented. If set +# to NO, structs, classes, and unions are shown on a separate page (for HTML and +# Man pages) or section (for LaTeX and RTF). +# The default value is: NO. + +INLINE_SIMPLE_STRUCTS = NO + +# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or +# enum is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically be +# useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. +# The default value is: NO. + +TYPEDEF_HIDES_STRUCT = NO + +# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This +# cache is used to resolve symbols given their name and scope. Since this can be +# an expensive process and often the same symbol appears multiple times in the +# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small +# doxygen will become slower. If the cache is too large, memory is wasted. The +# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range +# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 +# symbols. At the end of a run doxygen will report the cache usage and suggest +# the optimal cache size from a speed point of view. +# Minimum value: 0, maximum value: 9, default value: 0. + +LOOKUP_CACHE_SIZE = 0 + +# The NUM_PROC_THREADS specifies the number of threads doxygen is allowed to use +# during processing. When set to 0 doxygen will based this on the number of +# cores available in the system. You can set it explicitly to a value larger +# than 0 to get more control over the balance between CPU load and processing +# speed. At this moment only the input processing can be done using multiple +# threads. Since this is still an experimental feature the default is set to 1, +# which effectively disables parallel processing. Please report any issues you +# encounter. Generating dot graphs in parallel is controlled by the +# DOT_NUM_THREADS setting. +# Minimum value: 0, maximum value: 32, default value: 1. + +NUM_PROC_THREADS = 1 + +# If the TIMESTAMP tag is set different from NO then each generated page will +# contain the date or date and time when the page was generated. Setting this to +# NO can help when comparing the output of multiple runs. +# Possible values are: YES, NO, DATETIME and DATE. +# The default value is: NO. + +TIMESTAMP = NO + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in +# documentation are documented, even if no documentation was available. Private +# class members and static file members will be hidden unless the +# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. +# Note: This will also disable the warnings about undocumented members that are +# normally produced when WARNINGS is set to YES. +# The default value is: NO. + +EXTRACT_ALL = NO + +# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will +# be included in the documentation. +# The default value is: NO. + +EXTRACT_PRIVATE = NO + +# If the EXTRACT_PRIV_VIRTUAL tag is set to YES, documented private virtual +# methods of a class will be included in the documentation. +# The default value is: NO. + +EXTRACT_PRIV_VIRTUAL = NO + +# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal +# scope will be included in the documentation. +# The default value is: NO. + +EXTRACT_PACKAGE = NO + +# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be +# included in the documentation. +# The default value is: NO. + +EXTRACT_STATIC = NO + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined +# locally in source files will be included in the documentation. If set to NO, +# only classes defined in header files are included. Does not have any effect +# for Java sources. +# The default value is: YES. + +EXTRACT_LOCAL_CLASSES = YES + +# This flag is only useful for Objective-C code. If set to YES, local methods, +# which are defined in the implementation section but not in the interface are +# included in the documentation. If set to NO, only methods in the interface are +# included. +# The default value is: NO. + +EXTRACT_LOCAL_METHODS = NO + +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base name of +# the file that contains the anonymous namespace. By default anonymous namespace +# are hidden. +# The default value is: NO. + +EXTRACT_ANON_NSPACES = NO + +# If this flag is set to YES, the name of an unnamed parameter in a declaration +# will be determined by the corresponding definition. By default unnamed +# parameters remain unnamed in the output. +# The default value is: YES. + +RESOLVE_UNNAMED_PARAMS = YES + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all +# undocumented members inside documented classes or files. If set to NO these +# members will be included in the various overviews, but no documentation +# section is generated. This option has no effect if EXTRACT_ALL is enabled. +# The default value is: NO. + +HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. If set +# to NO, these classes will be included in the various overviews. This option +# will also hide undocumented C++ concepts if enabled. This option has no effect +# if EXTRACT_ALL is enabled. +# The default value is: NO. + +HIDE_UNDOC_CLASSES = NO + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend +# declarations. If set to NO, these declarations will be included in the +# documentation. +# The default value is: NO. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any +# documentation blocks found inside the body of a function. If set to NO, these +# blocks will be appended to the function's detailed documentation block. +# The default value is: NO. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation that is typed after a +# \internal command is included. If the tag is set to NO then the documentation +# will be excluded. Set it to YES to include the internal documentation. +# The default value is: NO. + +INTERNAL_DOCS = NO + +# With the correct setting of option CASE_SENSE_NAMES doxygen will better be +# able to match the capabilities of the underlying filesystem. In case the +# filesystem is case sensitive (i.e. it supports files in the same directory +# whose names only differ in casing), the option must be set to YES to properly +# deal with such files in case they appear in the input. For filesystems that +# are not case sensitive the option should be set to NO to properly deal with +# output files written for symbols that only differ in casing, such as for two +# classes, one named CLASS and the other named Class, and to also support +# references to files without having to specify the exact matching casing. On +# Windows (including Cygwin) and MacOS, users should typically set this option +# to NO, whereas on Linux or other Unix flavors it should typically be set to +# YES. +# Possible values are: SYSTEM, NO and YES. +# The default value is: SYSTEM. + +CASE_SENSE_NAMES = SYSTEM + +# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with +# their full class and namespace scopes in the documentation. If set to YES, the +# scope will be hidden. +# The default value is: NO. + +HIDE_SCOPE_NAMES = NO + +# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will +# append additional text to a page's title, such as Class Reference. If set to +# YES the compound reference will be hidden. +# The default value is: NO. + +HIDE_COMPOUND_REFERENCE= NO + +# If the SHOW_HEADERFILE tag is set to YES then the documentation for a class +# will show which file needs to be included to use the class. +# The default value is: YES. + +SHOW_HEADERFILE = YES + +# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of +# the files that are included by a file in the documentation of that file. +# The default value is: YES. + +SHOW_INCLUDE_FILES = YES + +# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each +# grouped member an include statement to the documentation, telling the reader +# which file to include in order to use the member. +# The default value is: NO. + +SHOW_GROUPED_MEMB_INC = NO + +# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include +# files with double quotes in the documentation rather than with sharp brackets. +# The default value is: NO. + +FORCE_LOCAL_INCLUDES = NO + +# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the +# documentation for inline members. +# The default value is: YES. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the +# (detailed) documentation of file and class members alphabetically by member +# name. If set to NO, the members will appear in declaration order. +# The default value is: YES. + +SORT_MEMBER_DOCS = YES + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief +# descriptions of file, namespace and class members alphabetically by member +# name. If set to NO, the members will appear in declaration order. Note that +# this will also influence the order of the classes in the class list. +# The default value is: NO. + +SORT_BRIEF_DOCS = NO + +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the +# (brief and detailed) documentation of class members so that constructors and +# destructors are listed first. If set to NO the constructors will appear in the +# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. +# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief +# member documentation. +# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting +# detailed member documentation. +# The default value is: NO. + +SORT_MEMBERS_CTORS_1ST = NO + +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy +# of group names into alphabetical order. If set to NO the group names will +# appear in their defined order. +# The default value is: NO. + +SORT_GROUP_NAMES = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by +# fully-qualified names, including namespaces. If set to NO, the class list will +# be sorted only by class name, not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the alphabetical +# list. +# The default value is: NO. + +SORT_BY_SCOPE_NAME = NO + +# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper +# type resolution of all parameters of a function it will reject a match between +# the prototype and the implementation of a member function even if there is +# only one candidate or it is obvious which candidate to choose by doing a +# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still +# accept a match between prototype and implementation in such cases. +# The default value is: NO. + +STRICT_PROTO_MATCHING = NO + +# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo +# list. This list is created by putting \todo commands in the documentation. +# The default value is: YES. + +GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test +# list. This list is created by putting \test commands in the documentation. +# The default value is: YES. + +GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug +# list. This list is created by putting \bug commands in the documentation. +# The default value is: YES. + +GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO) +# the deprecated list. This list is created by putting \deprecated commands in +# the documentation. +# The default value is: YES. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional documentation +# sections, marked by \if ... \endif and \cond +# ... \endcond blocks. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the +# initial value of a variable or macro / define can have for it to appear in the +# documentation. If the initializer consists of more lines than specified here +# it will be hidden. Use a value of 0 to hide initializers completely. The +# appearance of the value of individual variables and macros / defines can be +# controlled using \showinitializer or \hideinitializer command in the +# documentation regardless of this setting. +# Minimum value: 0, maximum value: 10000, default value: 30. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at +# the bottom of the documentation of classes and structs. If set to YES, the +# list will mention the files that were used to generate the documentation. +# The default value is: YES. + +SHOW_USED_FILES = YES + +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This +# will remove the Files entry from the Quick Index and from the Folder Tree View +# (if specified). +# The default value is: YES. + +SHOW_FILES = YES + +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces +# page. This will remove the Namespaces entry from the Quick Index and from the +# Folder Tree View (if specified). +# The default value is: YES. + +SHOW_NAMESPACES = YES + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command command input-file, where command is the value of the +# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided +# by doxygen. Whatever the program writes to standard output is used as the file +# version. For an example see the documentation. + +FILE_VERSION_FILTER = + +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed +# by doxygen. The layout file controls the global structure of the generated +# output files in an output format independent way. To create the layout file +# that represents doxygen's defaults, run doxygen with the -l option. You can +# optionally specify a file name after the option, if omitted DoxygenLayout.xml +# will be used as the name of the layout file. See also section "Changing the +# layout of pages" for information. +# +# Note that if you run doxygen from a directory containing a file called +# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE +# tag is left empty. + +LAYOUT_FILE = + +# The CITE_BIB_FILES tag can be used to specify one or more bib files containing +# the reference definitions. This must be a list of .bib files. The .bib +# extension is automatically appended if omitted. This requires the bibtex tool +# to be installed. See also https://en.wikipedia.org/wiki/BibTeX for more info. +# For LaTeX the style of the bibliography can be controlled using +# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the +# search path. See also \cite for info how to create references. + +CITE_BIB_FILES = + +#--------------------------------------------------------------------------- +# Configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated to +# standard output by doxygen. If QUIET is set to YES this implies that the +# messages are off. +# The default value is: NO. + +QUIET = NO + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES +# this implies that the warnings are on. +# +# Tip: Turn warnings on while writing the documentation. +# The default value is: YES. + +WARNINGS = YES + +# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate +# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag +# will automatically be disabled. +# The default value is: YES. + +WARN_IF_UNDOCUMENTED = YES + +# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as documenting some parameters in +# a documented function twice, or documenting parameters that don't exist or +# using markup commands wrongly. +# The default value is: YES. + +WARN_IF_DOC_ERROR = YES + +# If WARN_IF_INCOMPLETE_DOC is set to YES, doxygen will warn about incomplete +# function parameter documentation. If set to NO, doxygen will accept that some +# parameters have no documentation without warning. +# The default value is: YES. + +WARN_IF_INCOMPLETE_DOC = YES + +# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that +# are documented, but have no documentation for their parameters or return +# value. If set to NO, doxygen will only warn about wrong parameter +# documentation, but not about the absence of documentation. If EXTRACT_ALL is +# set to YES then this flag will automatically be disabled. See also +# WARN_IF_INCOMPLETE_DOC +# The default value is: NO. + +WARN_NO_PARAMDOC = NO + +# If WARN_IF_UNDOC_ENUM_VAL option is set to YES, doxygen will warn about +# undocumented enumeration values. If set to NO, doxygen will accept +# undocumented enumeration values. If EXTRACT_ALL is set to YES then this flag +# will automatically be disabled. +# The default value is: NO. + +WARN_IF_UNDOC_ENUM_VAL = NO + +# If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when +# a warning is encountered. If the WARN_AS_ERROR tag is set to FAIL_ON_WARNINGS +# then doxygen will continue running as if WARN_AS_ERROR tag is set to NO, but +# at the end of the doxygen process doxygen will return with a non-zero status. +# If the WARN_AS_ERROR tag is set to FAIL_ON_WARNINGS_PRINT then doxygen behaves +# like FAIL_ON_WARNINGS but in case no WARN_LOGFILE is defined doxygen will not +# write the warning messages in between other messages but write them at the end +# of a run, in case a WARN_LOGFILE is defined the warning messages will be +# besides being in the defined file also be shown at the end of a run, unless +# the WARN_LOGFILE is defined as - i.e. standard output (stdout) in that case +# the behavior will remain as with the setting FAIL_ON_WARNINGS. +# Possible values are: NO, YES, FAIL_ON_WARNINGS and FAIL_ON_WARNINGS_PRINT. +# The default value is: NO. + +WARN_AS_ERROR = NO + +# The WARN_FORMAT tag determines the format of the warning messages that doxygen +# can produce. The string should contain the $file, $line, and $text tags, which +# will be replaced by the file and line number from which the warning originated +# and the warning text. Optionally the format may contain $version, which will +# be replaced by the version of the file (if it could be obtained via +# FILE_VERSION_FILTER) +# See also: WARN_LINE_FORMAT +# The default value is: $file:$line: $text. + +WARN_FORMAT = "$file:$line: $text" + +# In the $text part of the WARN_FORMAT command it is possible that a reference +# to a more specific place is given. To make it easier to jump to this place +# (outside of doxygen) the user can define a custom "cut" / "paste" string. +# Example: +# WARN_LINE_FORMAT = "'vi $file +$line'" +# See also: WARN_FORMAT +# The default value is: at line $line of file $file. + +WARN_LINE_FORMAT = "at line $line of file $file" + +# The WARN_LOGFILE tag can be used to specify a file to which warning and error +# messages should be written. If left blank the output is written to standard +# error (stderr). In case the file specified cannot be opened for writing the +# warning and error messages are written to standard error. When as file - is +# specified the warning and error messages are written to standard output +# (stdout). + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# Configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag is used to specify the files and/or directories that contain +# documented source files. You may enter file names like myfile.cpp or +# directories like /usr/src/myproject. Separate the files or directories with +# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING +# Note: If this tag is empty the current directory is searched. + +INPUT = src/ + +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses +# libiconv (or the iconv built into libc) for the transcoding. See the libiconv +# documentation (see: +# https://www.gnu.org/software/libiconv/) for the list of possible encodings. +# See also: INPUT_FILE_ENCODING +# The default value is: UTF-8. + +INPUT_ENCODING = UTF-8 + +# This tag can be used to specify the character encoding of the source files +# that doxygen parses The INPUT_FILE_ENCODING tag can be used to specify +# character encoding on a per file pattern basis. Doxygen will compare the file +# name with each pattern and apply the encoding instead of the default +# INPUT_ENCODING) if there is a match. The character encodings are a list of the +# form: pattern=encoding (like *.php=ISO-8859-1). See cfg_input_encoding +# "INPUT_ENCODING" for further information on supported encodings. + +INPUT_FILE_ENCODING = + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and +# *.h) to filter out the source-files in the directories. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# read by doxygen. +# +# Note the list of default checked file patterns might differ from the list of +# default file extension mappings. +# +# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cxxm, +# *.cpp, *.cppm, *.c++, *.c++m, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, +# *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp, *.h++, *.ixx, *.l, *.cs, *.d, *.php, +# *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown, *.md, *.mm, *.dox (to be +# provided as doxygen C comment), *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, +# *.f18, *.f, *.for, *.vhd, *.vhdl, *.ucf, *.qsf and *.ice. + +FILE_PATTERNS = *.c \ + *.cc \ + *.cxx \ + *.cxxm \ + *.cpp \ + *.cppm \ + *.c++ \ + *.c++m \ + *.java \ + *.ii \ + *.ixx \ + *.ipp \ + *.i++ \ + *.inl \ + *.idl \ + *.ddl \ + *.odl \ + *.h \ + *.hh \ + *.hxx \ + *.hpp \ + *.h++ \ + *.ixx \ + *.l \ + *.cs \ + *.d \ + *.php \ + *.php4 \ + *.php5 \ + *.phtml \ + *.inc \ + *.m \ + *.markdown \ + *.md \ + *.mm \ + *.dox \ + *.py \ + *.pyw \ + *.f90 \ + *.f95 \ + *.f03 \ + *.f08 \ + *.f18 \ + *.f \ + *.for \ + *.vhd \ + *.vhdl \ + *.ucf \ + *.qsf \ + *.ice + +# The RECURSIVE tag can be used to specify whether or not subdirectories should +# be searched for input files as well. +# The default value is: NO. + +RECURSIVE = YES + +# The EXCLUDE tag can be used to specify files and/or directories that should be +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. +# +# Note that relative paths are relative to the directory from which doxygen is +# run. + +EXCLUDE = src/antares-deps/ src/ext/ src/tests/resources/Antares_Simulator_Tests/ + +# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or +# directories that are symbolic links (a Unix file system feature) are excluded +# from the input. +# The default value is: NO. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories for example use the pattern */test/* + +EXCLUDE_PATTERNS = + +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, +# ANamespace::AClass, ANamespace::*Test + +EXCLUDE_SYMBOLS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or directories +# that contain example code fragments that are included (see the \include +# command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and +# *.h) to filter out the source-files in the directories. If left blank all +# files are included. + +EXAMPLE_PATTERNS = * + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude commands +# irrespective of the value of the RECURSIVE tag. +# The default value is: NO. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or directories +# that contain images that are to be included in the documentation (see the +# \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command: +# +# +# +# where is the value of the INPUT_FILTER tag, and is the +# name of an input file. Doxygen will then use the output that the filter +# program writes to standard output. If FILTER_PATTERNS is specified, this tag +# will be ignored. +# +# Note that the filter must not add or remove lines; it is applied before the +# code is scanned, but not when the output code is generated. If lines are added +# or removed, the anchors will not be placed correctly. +# +# Note that doxygen will use the data processed and written to standard output +# for further processing, therefore nothing else, like debug statements or used +# commands (so in case of a Windows batch file always use @echo OFF), should be +# written to standard output. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# properly processed by doxygen. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. The filters are a list of the form: pattern=filter +# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how +# filters are used. If the FILTER_PATTERNS tag is empty or if none of the +# patterns match the file name, INPUT_FILTER is applied. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# properly processed by doxygen. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will also be used to filter the input files that are used for +# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). +# The default value is: NO. + +FILTER_SOURCE_FILES = NO + +# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file +# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and +# it is also possible to disable source filtering for a specific pattern using +# *.ext= (so without naming a filter). +# This tag requires that the tag FILTER_SOURCE_FILES is set to YES. + +FILTER_SOURCE_PATTERNS = + +# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that +# is part of the input, its contents will be placed on the main page +# (index.html). This can be useful if you have a project on for instance GitHub +# and want to reuse the introduction page also for the doxygen output. + +USE_MDFILE_AS_MAINPAGE = + +# The Fortran standard specifies that for fixed formatted Fortran code all +# characters from position 72 are to be considered as comment. A common +# extension is to allow longer lines before the automatic comment starts. The +# setting FORTRAN_COMMENT_AFTER will also make it possible that longer lines can +# be processed before the automatic comment starts. +# Minimum value: 7, maximum value: 10000, default value: 72. + +FORTRAN_COMMENT_AFTER = 72 + +#--------------------------------------------------------------------------- +# Configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will be +# generated. Documented entities will be cross-referenced with these sources. +# +# Note: To get rid of all source code in the generated output, make sure that +# also VERBATIM_HEADERS is set to NO. +# The default value is: NO. + +SOURCE_BROWSER = NO + +# Setting the INLINE_SOURCES tag to YES will include the body of functions, +# classes and enums directly into the documentation. +# The default value is: NO. + +INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any +# special comment blocks from generated source code fragments. Normal C, C++ and +# Fortran comments will always remain visible. +# The default value is: YES. + +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES then for each documented +# entity all documented functions referencing it will be listed. +# The default value is: NO. + +REFERENCED_BY_RELATION = NO + +# If the REFERENCES_RELATION tag is set to YES then for each documented function +# all documented entities called/used by that function will be listed. +# The default value is: NO. + +REFERENCES_RELATION = NO + +# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set +# to YES then the hyperlinks from functions in REFERENCES_RELATION and +# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will +# link to the documentation. +# The default value is: YES. + +REFERENCES_LINK_SOURCE = YES + +# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the +# source code will show a tooltip with additional information such as prototype, +# brief description and links to the definition and documentation. Since this +# will make the HTML file larger and loading of large files a bit slower, you +# can opt to disable this feature. +# The default value is: YES. +# This tag requires that the tag SOURCE_BROWSER is set to YES. + +SOURCE_TOOLTIPS = YES + +# If the USE_HTAGS tag is set to YES then the references to source code will +# point to the HTML generated by the htags(1) tool instead of doxygen built-in +# source browser. The htags tool is part of GNU's global source tagging system +# (see https://www.gnu.org/software/global/global.html). You will need version +# 4.8.6 or higher. +# +# To use it do the following: +# - Install the latest version of global +# - Enable SOURCE_BROWSER and USE_HTAGS in the configuration file +# - Make sure the INPUT points to the root of the source tree +# - Run doxygen as normal +# +# Doxygen will invoke htags (and that will in turn invoke gtags), so these +# tools must be available from the command line (i.e. in the search path). +# +# The result: instead of the source browser generated by doxygen, the links to +# source code will now point to the output of htags. +# The default value is: NO. +# This tag requires that the tag SOURCE_BROWSER is set to YES. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a +# verbatim copy of the header file for each class for which an include is +# specified. Set to NO to disable this. +# See also: Section \class. +# The default value is: YES. + +VERBATIM_HEADERS = YES + +# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the +# clang parser (see: +# http://clang.llvm.org/) for more accurate parsing at the cost of reduced +# performance. This can be particularly helpful with template rich C++ code for +# which doxygen's built-in parser lacks the necessary type information. +# Note: The availability of this option depends on whether or not doxygen was +# generated with the -Duse_libclang=ON option for CMake. +# The default value is: NO. + +CLANG_ASSISTED_PARSING = NO + +# If the CLANG_ASSISTED_PARSING tag is set to YES and the CLANG_ADD_INC_PATHS +# tag is set to YES then doxygen will add the directory of each input to the +# include path. +# The default value is: YES. +# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES. + +CLANG_ADD_INC_PATHS = YES + +# If clang assisted parsing is enabled you can provide the compiler with command +# line options that you would normally use when invoking the compiler. Note that +# the include paths will already be set by doxygen for the files and directories +# specified with INPUT and INCLUDE_PATH. +# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES. + +CLANG_OPTIONS = + +# If clang assisted parsing is enabled you can provide the clang parser with the +# path to the directory containing a file called compile_commands.json. This +# file is the compilation database (see: +# http://clang.llvm.org/docs/HowToSetupToolingForLLVM.html) containing the +# options used when the source files were built. This is equivalent to +# specifying the -p option to a clang tool, such as clang-check. These options +# will then be passed to the parser. Any options specified with CLANG_OPTIONS +# will be added as well. +# Note: The availability of this option depends on whether or not doxygen was +# generated with the -Duse_libclang=ON option for CMake. + +CLANG_DATABASE_PATH = + +#--------------------------------------------------------------------------- +# Configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all +# compounds will be generated. Enable this if the project contains a lot of +# classes, structs, unions or interfaces. +# The default value is: YES. + +ALPHABETICAL_INDEX = YES + +# The IGNORE_PREFIX tag can be used to specify a prefix (or a list of prefixes) +# that should be ignored while generating the index headers. The IGNORE_PREFIX +# tag works for classes, function and member names. The entity will be placed in +# the alphabetical list under the first letter of the entity name that remains +# after removing the prefix. +# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output +# The default value is: YES. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a +# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of +# it. +# The default directory is: html. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_OUTPUT = html + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each +# generated HTML page (for example: .htm, .php, .asp). +# The default value is: .html. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a user-defined HTML header file for +# each generated HTML page. If the tag is left blank doxygen will generate a +# standard header. +# +# To get valid HTML the header file that includes any scripts and style sheets +# that doxygen needs, which is dependent on the configuration options used (e.g. +# the setting GENERATE_TREEVIEW). It is highly recommended to start with a +# default header using +# doxygen -w html new_header.html new_footer.html new_stylesheet.css +# YourConfigFile +# and then modify the file new_header.html. See also section "Doxygen usage" +# for information on how to generate the default header that doxygen normally +# uses. +# Note: The header is subject to change so you typically have to regenerate the +# default header when upgrading to a newer version of doxygen. For a description +# of the possible markers and block names see the documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each +# generated HTML page. If the tag is left blank doxygen will generate a standard +# footer. See HTML_HEADER for more information on how to generate a default +# footer and what special commands can be used inside the footer. See also +# section "Doxygen usage" for information on how to generate the default footer +# that doxygen normally uses. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style +# sheet that is used by each HTML page. It can be used to fine-tune the look of +# the HTML output. If left blank doxygen will generate a default style sheet. +# See also section "Doxygen usage" for information on how to generate the style +# sheet that doxygen normally uses. +# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as +# it is more robust and this tag (HTML_STYLESHEET) will in the future become +# obsolete. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_STYLESHEET = + +# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined +# cascading style sheets that are included after the standard style sheets +# created by doxygen. Using this option one can overrule certain style aspects. +# This is preferred over using HTML_STYLESHEET since it does not replace the +# standard style sheet and is therefore more robust against future updates. +# Doxygen will copy the style sheet files to the output directory. +# Note: The order of the extra style sheet files is of importance (e.g. the last +# style sheet in the list overrules the setting of the previous ones in the +# list). +# Note: Since the styling of scrollbars can currently not be overruled in +# Webkit/Chromium, the styling will be left out of the default doxygen.css if +# one or more extra stylesheets have been specified. So if scrollbar +# customization is desired it has to be added explicitly. For an example see the +# documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_EXTRA_STYLESHEET = doxygen-awesome-css/doxygen-awesome.css \ + doxygen-awesome-css/doxygen-awesome-sidebar-only.css + +# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or +# other source files which should be copied to the HTML output directory. Note +# that these files will be copied to the base HTML output directory. Use the +# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these +# files. In the HTML_STYLESHEET file, use the file name only. Also note that the +# files will be copied as-is; there are no commands or markers available. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_EXTRA_FILES = + +# The HTML_COLORSTYLE tag can be used to specify if the generated HTML output +# should be rendered with a dark or light theme. +# Possible values are: LIGHT always generate light mode output, DARK always +# generate dark mode output, AUTO_LIGHT automatically set the mode according to +# the user preference, use light mode if no preference is set (the default), +# AUTO_DARK automatically set the mode according to the user preference, use +# dark mode if no preference is set and TOGGLE allow to user to switch between +# light and dark mode via a button. +# The default value is: AUTO_LIGHT. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE = LIGHT + +# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen +# will adjust the colors in the style sheet and background images according to +# this color. Hue is specified as an angle on a color-wheel, see +# https://en.wikipedia.org/wiki/Hue for more information. For instance the value +# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 +# purple, and 360 is red again. +# Minimum value: 0, maximum value: 359, default value: 220. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_HUE = 220 + +# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors +# in the HTML output. For a value of 0 the output will use gray-scales only. A +# value of 255 will produce the most vivid colors. +# Minimum value: 0, maximum value: 255, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_SAT = 100 + +# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the +# luminance component of the colors in the HTML output. Values below 100 +# gradually make the output lighter, whereas values above 100 make the output +# darker. The value divided by 100 is the actual gamma applied, so 80 represents +# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not +# change the gamma. +# Minimum value: 40, maximum value: 240, default value: 80. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_GAMMA = 80 + +# If the HTML_DYNAMIC_MENUS tag is set to YES then the generated HTML +# documentation will contain a main index with vertical navigation menus that +# are dynamically created via JavaScript. If disabled, the navigation index will +# consists of multiple levels of tabs that are statically embedded in every HTML +# page. Disable this option to support browsers that do not have JavaScript, +# like the Qt help browser. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_DYNAMIC_MENUS = YES + +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_DYNAMIC_SECTIONS = NO + +# If the HTML_CODE_FOLDING tag is set to YES then classes and functions can be +# dynamically folded and expanded in the generated HTML source code. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_CODE_FOLDING = YES + +# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries +# shown in the various tree structured indices initially; the user can expand +# and collapse entries dynamically later on. Doxygen will expand the tree to +# such a level that at most the specified number of entries are visible (unless +# a fully collapsed tree already exceeds this amount). So setting the number of +# entries 1 will produce a full collapsed tree by default. 0 is a special value +# representing an infinite number of entries and will result in a full expanded +# tree by default. +# Minimum value: 0, maximum value: 9999, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_INDEX_NUM_ENTRIES = 100 + +# If the GENERATE_DOCSET tag is set to YES, additional index files will be +# generated that can be used as input for Apple's Xcode 3 integrated development +# environment (see: +# https://developer.apple.com/xcode/), introduced with OSX 10.5 (Leopard). To +# create a documentation set, doxygen will generate a Makefile in the HTML +# output directory. Running make will produce the docset in that directory and +# running make install will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at +# startup. See https://developer.apple.com/library/archive/featuredarticles/Doxy +# genXcode/_index.html for more information. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_DOCSET = NO + +# This tag determines the name of the docset feed. A documentation feed provides +# an umbrella under which multiple documentation sets from a single provider +# (such as a company or product suite) can be grouped. +# The default value is: Doxygen generated docs. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_FEEDNAME = "Doxygen generated docs" + +# This tag determines the URL of the docset feed. A documentation feed provides +# an umbrella under which multiple documentation sets from a single provider +# (such as a company or product suite) can be grouped. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_FEEDURL = + +# This tag specifies a string that should uniquely identify the documentation +# set bundle. This should be a reverse domain-name style string, e.g. +# com.mycompany.MyDocSet. Doxygen will append .docset to the name. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_BUNDLE_ID = org.doxygen.Project + +# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify +# the documentation publisher. This should be a reverse domain-name style +# string, e.g. com.mycompany.MyDocSet.documentation. +# The default value is: org.doxygen.Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_PUBLISHER_ID = org.doxygen.Publisher + +# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. +# The default value is: Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_PUBLISHER_NAME = Publisher + +# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three +# additional HTML index files: index.hhp, index.hhc, and index.hhk. The +# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop +# on Windows. In the beginning of 2021 Microsoft took the original page, with +# a.o. the download links, offline the HTML help workshop was already many years +# in maintenance mode). You can download the HTML help workshop from the web +# archives at Installation executable (see: +# http://web.archive.org/web/20160201063255/http://download.microsoft.com/downlo +# ad/0/A/9/0A939EF6-E31C-430F-A3DF-DFAE7960D564/htmlhelp.exe). +# +# The HTML Help Workshop contains a compiler that can convert all HTML output +# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML +# files are now used as the Windows 98 help format, and will replace the old +# Windows help format (.hlp) on all Windows platforms in the future. Compressed +# HTML files also contain an index, a table of contents, and you can search for +# words in the documentation. The HTML workshop also contains a viewer for +# compressed HTML files. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_HTMLHELP = NO + +# The CHM_FILE tag can be used to specify the file name of the resulting .chm +# file. You can add a path in front of the file if the result should not be +# written to the html output directory. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +CHM_FILE = + +# The HHC_LOCATION tag can be used to specify the location (absolute path +# including file name) of the HTML help compiler (hhc.exe). If non-empty, +# doxygen will try to run the HTML help compiler on the generated index.hhp. +# The file has to be specified with full path. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +HHC_LOCATION = + +# The GENERATE_CHI flag controls if a separate .chi index file is generated +# (YES) or that it should be included in the main .chm file (NO). +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +GENERATE_CHI = NO + +# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc) +# and project file content. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +CHM_INDEX_ENCODING = + +# The BINARY_TOC flag controls whether a binary table of contents is generated +# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it +# enables the Previous and Next buttons. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members to +# the table of contents of the HTML help documentation and to the tree view. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +TOC_EXPAND = NO + +# The SITEMAP_URL tag is used to specify the full URL of the place where the +# generated documentation will be placed on the server by the user during the +# deployment of the documentation. The generated sitemap is called sitemap.xml +# and placed on the directory specified by HTML_OUTPUT. In case no SITEMAP_URL +# is specified no sitemap is generated. For information about the sitemap +# protocol see https://www.sitemaps.org +# This tag requires that the tag GENERATE_HTML is set to YES. + +SITEMAP_URL = + +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and +# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that +# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help +# (.qch) of the generated HTML documentation. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_QHP = NO + +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify +# the file name of the resulting .qch file. The path specified is relative to +# the HTML output folder. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QCH_FILE = + +# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help +# Project output. For more information please see Qt Help Project / Namespace +# (see: +# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#namespace). +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_NAMESPACE = org.doxygen.Project + +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt +# Help Project output. For more information please see Qt Help Project / Virtual +# Folders (see: +# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#virtual-folders). +# The default value is: doc. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_VIRTUAL_FOLDER = doc + +# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom +# filter to add. For more information please see Qt Help Project / Custom +# Filters (see: +# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-filters). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_CUST_FILTER_NAME = + +# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the +# custom filter to add. For more information please see Qt Help Project / Custom +# Filters (see: +# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-filters). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_CUST_FILTER_ATTRS = + +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this +# project's filter section matches. Qt Help Project / Filter Attributes (see: +# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#filter-attributes). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_SECT_FILTER_ATTRS = + +# The QHG_LOCATION tag can be used to specify the location (absolute path +# including file name) of Qt's qhelpgenerator. If non-empty doxygen will try to +# run qhelpgenerator on the generated .qhp file. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHG_LOCATION = + +# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be +# generated, together with the HTML files, they form an Eclipse help plugin. To +# install this plugin and make it available under the help contents menu in +# Eclipse, the contents of the directory containing the HTML and XML files needs +# to be copied into the plugins directory of eclipse. The name of the directory +# within the plugins directory should be the same as the ECLIPSE_DOC_ID value. +# After copying Eclipse needs to be restarted before the help appears. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_ECLIPSEHELP = NO + +# A unique identifier for the Eclipse help plugin. When installing the plugin +# the directory name containing the HTML and XML files should also have this +# name. Each documentation set should have its own identifier. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. + +ECLIPSE_DOC_ID = org.doxygen.Project + +# If you want full control over the layout of the generated HTML pages it might +# be necessary to disable the index and replace it with your own. The +# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top +# of each HTML page. A value of NO enables the index and the value YES disables +# it. Since the tabs in the index contain the same information as the navigation +# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +DISABLE_INDEX = NO + +# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index +# structure should be generated to display hierarchical information. If the tag +# value is set to YES, a side panel will be generated containing a tree-like +# index structure (just like the one that is generated for HTML Help). For this +# to work a browser that supports JavaScript, DHTML, CSS and frames is required +# (i.e. any modern browser). Windows users are probably better off using the +# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can +# further fine tune the look of the index (see "Fine-tuning the output"). As an +# example, the default style sheet generated by doxygen has an example that +# shows how to put an image at the root of the tree instead of the PROJECT_NAME. +# Since the tree basically has the same information as the tab index, you could +# consider setting DISABLE_INDEX to YES when enabling this option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_TREEVIEW = YES + +# When both GENERATE_TREEVIEW and DISABLE_INDEX are set to YES, then the +# FULL_SIDEBAR option determines if the side bar is limited to only the treeview +# area (value NO) or if it should extend to the full height of the window (value +# YES). Setting this to YES gives a layout similar to +# https://docs.readthedocs.io with more room for contents, but less room for the +# project logo, title, and description. If either GENERATE_TREEVIEW or +# DISABLE_INDEX is set to NO, this option has no effect. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +FULL_SIDEBAR = NO + +# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that +# doxygen will group on one line in the generated HTML documentation. +# +# Note that a value of 0 will completely suppress the enum values from appearing +# in the overview section. +# Minimum value: 0, maximum value: 20, default value: 4. +# This tag requires that the tag GENERATE_HTML is set to YES. + +ENUM_VALUES_PER_LINE = 4 + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used +# to set the initial width (in pixels) of the frame in which the tree is shown. +# Minimum value: 0, maximum value: 1500, default value: 250. +# This tag requires that the tag GENERATE_HTML is set to YES. + +TREEVIEW_WIDTH = 250 + +# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to +# external symbols imported via tag files in a separate window. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +EXT_LINKS_IN_WINDOW = NO + +# If the OBFUSCATE_EMAILS tag is set to YES, doxygen will obfuscate email +# addresses. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +OBFUSCATE_EMAILS = YES + +# If the HTML_FORMULA_FORMAT option is set to svg, doxygen will use the pdf2svg +# tool (see https://github.com/dawbarton/pdf2svg) or inkscape (see +# https://inkscape.org) to generate formulas as SVG images instead of PNGs for +# the HTML output. These images will generally look nicer at scaled resolutions. +# Possible values are: png (the default) and svg (looks nicer but requires the +# pdf2svg or inkscape tool). +# The default value is: png. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_FORMULA_FORMAT = png + +# Use this tag to change the font size of LaTeX formulas included as images in +# the HTML documentation. When you change the font size after a successful +# doxygen run you need to manually remove any form_*.png images from the HTML +# output directory to force them to be regenerated. +# Minimum value: 8, maximum value: 50, default value: 10. +# This tag requires that the tag GENERATE_HTML is set to YES. + +FORMULA_FONTSIZE = 10 + +# The FORMULA_MACROFILE can contain LaTeX \newcommand and \renewcommand commands +# to create new LaTeX commands to be used in formulas as building blocks. See +# the section "Including formulas" for details. + +FORMULA_MACROFILE = + +# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see +# https://www.mathjax.org) which uses client side JavaScript for the rendering +# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX +# installed or if you want to formulas look prettier in the HTML output. When +# enabled you may also need to install MathJax separately and configure the path +# to it using the MATHJAX_RELPATH option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +USE_MATHJAX = NO + +# With MATHJAX_VERSION it is possible to specify the MathJax version to be used. +# Note that the different versions of MathJax have different requirements with +# regards to the different settings, so it is possible that also other MathJax +# settings have to be changed when switching between the different MathJax +# versions. +# Possible values are: MathJax_2 and MathJax_3. +# The default value is: MathJax_2. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_VERSION = MathJax_2 + +# When MathJax is enabled you can set the default output format to be used for +# the MathJax output. For more details about the output format see MathJax +# version 2 (see: +# http://docs.mathjax.org/en/v2.7-latest/output.html) and MathJax version 3 +# (see: +# http://docs.mathjax.org/en/latest/web/components/output.html). +# Possible values are: HTML-CSS (which is slower, but has the best +# compatibility. This is the name for Mathjax version 2, for MathJax version 3 +# this will be translated into chtml), NativeMML (i.e. MathML. Only supported +# for NathJax 2. For MathJax version 3 chtml will be used instead.), chtml (This +# is the name for Mathjax version 3, for MathJax version 2 this will be +# translated into HTML-CSS) and SVG. +# The default value is: HTML-CSS. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_FORMAT = HTML-CSS + +# When MathJax is enabled you need to specify the location relative to the HTML +# output directory using the MATHJAX_RELPATH option. The destination directory +# should contain the MathJax.js script. For instance, if the mathjax directory +# is located at the same level as the HTML output directory, then +# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax +# Content Delivery Network so you can quickly see the result without installing +# MathJax. However, it is strongly recommended to install a local copy of +# MathJax from https://www.mathjax.org before deployment. The default value is: +# - in case of MathJax version 2: https://cdn.jsdelivr.net/npm/mathjax@2 +# - in case of MathJax version 3: https://cdn.jsdelivr.net/npm/mathjax@3 +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_RELPATH = + +# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax +# extension names that should be enabled during MathJax rendering. For example +# for MathJax version 2 (see +# https://docs.mathjax.org/en/v2.7-latest/tex.html#tex-and-latex-extensions): +# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols +# For example for MathJax version 3 (see +# http://docs.mathjax.org/en/latest/input/tex/extensions/index.html): +# MATHJAX_EXTENSIONS = ams +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_EXTENSIONS = + +# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces +# of code that will be used on startup of the MathJax code. See the MathJax site +# (see: +# http://docs.mathjax.org/en/v2.7-latest/output.html) for more details. For an +# example see the documentation. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_CODEFILE = + +# When the SEARCHENGINE tag is enabled doxygen will generate a search box for +# the HTML output. The underlying search engine uses javascript and DHTML and +# should work on any modern browser. Note that when using HTML help +# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) +# there is already a search function so this one should typically be disabled. +# For large projects the javascript based search engine can be slow, then +# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to +# search using the keyboard; to jump to the search box use + S +# (what the is depends on the OS and browser, but it is typically +# , /