From 7683adc2028446be85f8abdfe773ad08fc16a2a1 Mon Sep 17 00:00:00 2001 From: Jason Marechal Date: Tue, 8 Aug 2023 16:50:22 +0200 Subject: [PATCH 01/52] Move writer in libs --- src/libs/antares/CMakeLists.txt | 6 ++---- src/libs/antares/study/area/links.h | 2 +- src/libs/antares/study/area/store-timeseries-numbers.cpp | 2 +- src/libs/antares/study/area/store-timeseries-numbers.h | 2 +- src/libs/antares/study/parameters.cpp | 1 - src/libs/antares/study/parts/common/cluster_list.h | 2 +- src/libs/antares/study/progression/progression.h | 2 +- src/libs/antares/study/simulation.h | 2 +- src/libs/antares/study/study.cpp | 2 +- src/libs/antares/study/study.h | 2 +- src/{solver => libs/antares}/writer/CMakeLists.txt | 0 .../antares}/writer/ensure_queue_started.cpp | 0 .../antares}/writer/ensure_queue_started.h | 2 +- src/{solver => libs/antares}/writer/i_writer.h | 0 .../antares}/writer/immediate_file_writer.cpp | 0 .../antares}/writer/immediate_file_writer.h | 2 +- src/{solver => libs/antares}/writer/writer_factory.cpp | 0 src/{solver => libs/antares}/writer/writer_factory.h | 2 +- src/{solver => libs/antares}/writer/zip_writer.cpp | 0 src/{solver => libs/antares}/writer/zip_writer.h | 2 +- src/{solver => libs/antares}/writer/zip_writer.hxx | 0 src/solver/CMakeLists.txt | 1 - src/solver/application.h | 2 +- src/solver/hydro/management/daily.cpp | 2 +- .../adequacy_patch_csr/adq_patch_curtailment_sharing.h | 2 +- .../construct_problem_constraints_RHS.cpp | 5 +++-- .../adequacy_patch_csr/construct_problem_variables.cpp | 1 + .../adequacy_patch_csr/csr_quadratic_problem.cpp | 1 + .../optimisation/adequacy_patch_csr/hourly_csr_problem.h | 9 ++++++--- .../adequacy_patch_csr/set_problem_cost_function.cpp | 1 + .../adequacy_patch_csr/set_variable_boundaries.cpp | 1 + ...construction_matrice_des_contraintes_cas_lineaire.cpp | 1 + src/solver/optimisation/opt_optimisation_lineaire.cpp | 3 +-- .../optimisation/opt_structure_probleme_a_resoudre.h | 5 ++--- .../BindingConstraintsTimeSeriesNumbersWriter.h | 2 +- src/solver/simulation/opt_time_writer.h | 2 +- src/solver/simulation/solver.h | 2 +- src/solver/simulation/solver.utils.h | 2 +- src/solver/ts-generator/generator.h | 2 +- src/solver/ts-generator/hydro.cpp | 2 +- src/solver/ts-generator/thermal.cpp | 2 +- src/solver/ts-generator/xcast/xcast.h | 2 +- src/solver/utils/ortools_utils.h | 2 +- src/solver/variable/surveyresults/data.h | 2 +- src/solver/variable/surveyresults/surveyresults.h | 2 +- .../solver/simulation/test-store-timeseries-number.cpp | 4 ++-- 46 files changed, 47 insertions(+), 44 deletions(-) rename src/{solver => libs/antares}/writer/CMakeLists.txt (100%) rename src/{solver => libs/antares}/writer/ensure_queue_started.cpp (100%) rename src/{solver => libs/antares}/writer/ensure_queue_started.h (92%) rename src/{solver => libs/antares}/writer/i_writer.h (100%) rename src/{solver => libs/antares}/writer/immediate_file_writer.cpp (100%) rename src/{solver => libs/antares}/writer/immediate_file_writer.h (95%) rename src/{solver => libs/antares}/writer/writer_factory.cpp (100%) rename src/{solver => libs/antares}/writer/writer_factory.h (94%) rename src/{solver => libs/antares}/writer/zip_writer.cpp (100%) rename src/{solver => libs/antares}/writer/zip_writer.h (98%) rename src/{solver => libs/antares}/writer/zip_writer.hxx (100%) diff --git a/src/libs/antares/CMakeLists.txt b/src/libs/antares/CMakeLists.txt index e8a7610c49..6b4c628033 100644 --- a/src/libs/antares/CMakeLists.txt +++ b/src/libs/antares/CMakeLists.txt @@ -1,6 +1,8 @@ OMESSAGE("Antares Core library") +add_subdirectory(writer) + set(SRC_MEMORY memory/memory.h memory/memory.hxx @@ -544,7 +546,6 @@ target_include_directories(libantares-core-checks ${CMAKE_SOURCE_DIR}/libs/antares/study ${CMAKE_SOURCE_DIR}/libs/antares/logs ${CMAKE_SOURCE_DIR}/libs - ${CMAKE_SOURCE_DIR}/solver/writer ) target_link_libraries(libantares-core-checks @@ -554,9 +555,7 @@ target_link_libraries(libantares-core-checks add_library(libantares-core antares.h ${SRC} - ${SRC_LOGS} ${SRC_MEMORY} - ${SRC_JIT} ${SRC_MATRIX} ${SRC_BENCHMARKING} ${SRC_AREAS} @@ -588,7 +587,6 @@ target_include_directories(libantares-core PUBLIC ${CMAKE_SOURCE_DIR}/libs ${CMAKE_SOURCE_DIR}/libs/antares/logs - ${CMAKE_SOURCE_DIR}/solver/writer ) target_link_libraries(libantares-core diff --git a/src/libs/antares/study/area/links.h b/src/libs/antares/study/area/links.h index 10d4ab1739..1a82a57c4c 100644 --- a/src/libs/antares/study/area/links.h +++ b/src/libs/antares/study/area/links.h @@ -32,7 +32,7 @@ #include #include "../fwd.h" #include "../../array/matrix.h" -#include +#include #include //! The minimal allowed value for hurdle costs when not null diff --git a/src/libs/antares/study/area/store-timeseries-numbers.cpp b/src/libs/antares/study/area/store-timeseries-numbers.cpp index 9fc45c4bf6..beeeed11ac 100644 --- a/src/libs/antares/study/area/store-timeseries-numbers.cpp +++ b/src/libs/antares/study/area/store-timeseries-numbers.cpp @@ -25,7 +25,7 @@ ** SPDX-License-Identifier: licenceRef-GPL3_WITH_RTE-Exceptions */ -#include +#include #include "../study.h" #include "../../logs.h" diff --git a/src/libs/antares/study/area/store-timeseries-numbers.h b/src/libs/antares/study/area/store-timeseries-numbers.h index db20e83240..d3cb6bfe6f 100644 --- a/src/libs/antares/study/area/store-timeseries-numbers.h +++ b/src/libs/antares/study/area/store-timeseries-numbers.h @@ -26,7 +26,7 @@ */ #pragma once -#include +#include #include "area.h" diff --git a/src/libs/antares/study/parameters.cpp b/src/libs/antares/study/parameters.cpp index 8f0de06bca..729a0d6dd4 100644 --- a/src/libs/antares/study/parameters.cpp +++ b/src/libs/antares/study/parameters.cpp @@ -41,7 +41,6 @@ #include #include #include "../solver/variable/economy/all.h" -#include "../solver/optimisation/adequacy_patch_csr/adq_patch_curtailment_sharing.h" #include #include diff --git a/src/libs/antares/study/parts/common/cluster_list.h b/src/libs/antares/study/parts/common/cluster_list.h index 752f8f221a..81ea630373 100644 --- a/src/libs/antares/study/parts/common/cluster_list.h +++ b/src/libs/antares/study/parts/common/cluster_list.h @@ -5,7 +5,7 @@ #include "../../../logs.h" #include "../../fwd.h" -#include +#include #include #include diff --git a/src/libs/antares/study/progression/progression.h b/src/libs/antares/study/progression/progression.h index e7502b8410..81d4df1eed 100644 --- a/src/libs/antares/study/progression/progression.h +++ b/src/libs/antares/study/progression/progression.h @@ -35,7 +35,7 @@ #include #include "../fwd.h" #include -#include +#include namespace Antares { diff --git a/src/libs/antares/study/simulation.h b/src/libs/antares/study/simulation.h index fc56aebe62..9bbb8c4727 100644 --- a/src/libs/antares/study/simulation.h +++ b/src/libs/antares/study/simulation.h @@ -28,7 +28,7 @@ #define __ANTARES_LIBS_STUDY_SIMULATION_H__ #include -#include +#include #include "fwd.h" namespace Antares diff --git a/src/libs/antares/study/study.cpp b/src/libs/antares/study/study.cpp index 2a4db3e0db..777be1e7c0 100644 --- a/src/libs/antares/study/study.cpp +++ b/src/libs/antares/study/study.cpp @@ -45,7 +45,7 @@ #include // For use of Yuni::System::CPU::Count() #include // For use of floor(...) and ceil(...) -#include +#include #include "ui-runtimeinfos.h" using namespace Yuni; diff --git a/src/libs/antares/study/study.h b/src/libs/antares/study/study.h index 0913b4e1c8..47fac19eb4 100644 --- a/src/libs/antares/study/study.h +++ b/src/libs/antares/study/study.h @@ -33,7 +33,7 @@ #include #include -#include +#include #include "../antares.h" #include "../object/object.h" diff --git a/src/solver/writer/CMakeLists.txt b/src/libs/antares/writer/CMakeLists.txt similarity index 100% rename from src/solver/writer/CMakeLists.txt rename to src/libs/antares/writer/CMakeLists.txt diff --git a/src/solver/writer/ensure_queue_started.cpp b/src/libs/antares/writer/ensure_queue_started.cpp similarity index 100% rename from src/solver/writer/ensure_queue_started.cpp rename to src/libs/antares/writer/ensure_queue_started.cpp diff --git a/src/solver/writer/ensure_queue_started.h b/src/libs/antares/writer/ensure_queue_started.h similarity index 92% rename from src/solver/writer/ensure_queue_started.h rename to src/libs/antares/writer/ensure_queue_started.h index d23aef9366..201665a8e8 100644 --- a/src/solver/writer/ensure_queue_started.h +++ b/src/libs/antares/writer/ensure_queue_started.h @@ -1,5 +1,5 @@ #pragma once -#include "i_writer.h" +#include #include diff --git a/src/solver/writer/i_writer.h b/src/libs/antares/writer/i_writer.h similarity index 100% rename from src/solver/writer/i_writer.h rename to src/libs/antares/writer/i_writer.h diff --git a/src/solver/writer/immediate_file_writer.cpp b/src/libs/antares/writer/immediate_file_writer.cpp similarity index 100% rename from src/solver/writer/immediate_file_writer.cpp rename to src/libs/antares/writer/immediate_file_writer.cpp diff --git a/src/solver/writer/immediate_file_writer.h b/src/libs/antares/writer/immediate_file_writer.h similarity index 95% rename from src/solver/writer/immediate_file_writer.h rename to src/libs/antares/writer/immediate_file_writer.h index 126b3e138b..304ffac0d4 100644 --- a/src/solver/writer/immediate_file_writer.h +++ b/src/libs/antares/writer/immediate_file_writer.h @@ -3,7 +3,7 @@ #include #include -#include "i_writer.h" +#include namespace Antares { diff --git a/src/solver/writer/writer_factory.cpp b/src/libs/antares/writer/writer_factory.cpp similarity index 100% rename from src/solver/writer/writer_factory.cpp rename to src/libs/antares/writer/writer_factory.cpp diff --git a/src/solver/writer/writer_factory.h b/src/libs/antares/writer/writer_factory.h similarity index 94% rename from src/solver/writer/writer_factory.h rename to src/libs/antares/writer/writer_factory.h index c4c9324f8e..afae896e1b 100644 --- a/src/solver/writer/writer_factory.h +++ b/src/libs/antares/writer/writer_factory.h @@ -6,7 +6,7 @@ #include #include // Timer -#include "i_writer.h" +#include #include "immediate_file_writer.h" #include "zip_writer.h" diff --git a/src/solver/writer/zip_writer.cpp b/src/libs/antares/writer/zip_writer.cpp similarity index 100% rename from src/solver/writer/zip_writer.cpp rename to src/libs/antares/writer/zip_writer.cpp diff --git a/src/solver/writer/zip_writer.h b/src/libs/antares/writer/zip_writer.h similarity index 98% rename from src/solver/writer/zip_writer.h rename to src/libs/antares/writer/zip_writer.h index 90a0db946c..bf7063d705 100644 --- a/src/solver/writer/zip_writer.h +++ b/src/libs/antares/writer/zip_writer.h @@ -9,7 +9,7 @@ #include #include -#include "i_writer.h" +#include namespace Antares { diff --git a/src/solver/writer/zip_writer.hxx b/src/libs/antares/writer/zip_writer.hxx similarity index 100% rename from src/solver/writer/zip_writer.hxx rename to src/libs/antares/writer/zip_writer.hxx diff --git a/src/solver/CMakeLists.txt b/src/solver/CMakeLists.txt index 4e79f6543d..2f88dd20e2 100644 --- a/src/solver/CMakeLists.txt +++ b/src/solver/CMakeLists.txt @@ -8,7 +8,6 @@ endif(MSVC) add_subdirectory(infeasible-problem-analysis) -add_subdirectory(writer) add_subdirectory(variable) add_subdirectory(hydro) add_subdirectory(simulation) diff --git a/src/solver/application.h b/src/solver/application.h index f009e45bf3..fe4dae86f4 100644 --- a/src/solver/application.h +++ b/src/solver/application.h @@ -6,7 +6,7 @@ #include #include "simulation/simulation.h" -#include +#include #include diff --git a/src/solver/hydro/management/daily.cpp b/src/solver/hydro/management/daily.cpp index 9f1728b872..a65f1b39f6 100644 --- a/src/solver/hydro/management/daily.cpp +++ b/src/solver/hydro/management/daily.cpp @@ -32,7 +32,7 @@ #include #include "management.h" #include -#include +#include #include "../daily/h2o_j_donnees_mensuelles.h" #include "../daily/h2o_j_fonctions.h" #include "../daily2/h2o2_j_donnees_mensuelles.h" diff --git a/src/solver/optimisation/adequacy_patch_csr/adq_patch_curtailment_sharing.h b/src/solver/optimisation/adequacy_patch_csr/adq_patch_curtailment_sharing.h index 331ea198cf..fb92eae287 100644 --- a/src/solver/optimisation/adequacy_patch_csr/adq_patch_curtailment_sharing.h +++ b/src/solver/optimisation/adequacy_patch_csr/adq_patch_curtailment_sharing.h @@ -27,7 +27,7 @@ #pragma once -#include "../simulation/sim_structure_probleme_economique.h" +#include "sim_structure_probleme_economique.h" namespace Antares::Data::AdequacyPatch { diff --git a/src/solver/optimisation/adequacy_patch_csr/construct_problem_constraints_RHS.cpp b/src/solver/optimisation/adequacy_patch_csr/construct_problem_constraints_RHS.cpp index 45d39e9b09..64ec416bd2 100644 --- a/src/solver/optimisation/adequacy_patch_csr/construct_problem_constraints_RHS.cpp +++ b/src/solver/optimisation/adequacy_patch_csr/construct_problem_constraints_RHS.cpp @@ -25,9 +25,10 @@ ** SPDX-License-Identifier: licenceRef-GPL3_WITH_RTE-Exceptions */ -#include "../solver/optimisation/opt_structure_probleme_a_resoudre.h" -#include "../simulation/adequacy_patch_runtime_data.h" #include "hourly_csr_problem.h" +#include +#include +#include "adequacy_patch_runtime_data.h" void HourlyCSRProblem::setRHSvalueOnFlows() { diff --git a/src/solver/optimisation/adequacy_patch_csr/construct_problem_variables.cpp b/src/solver/optimisation/adequacy_patch_csr/construct_problem_variables.cpp index 63f7c2d62b..72c80a8a07 100644 --- a/src/solver/optimisation/adequacy_patch_csr/construct_problem_variables.cpp +++ b/src/solver/optimisation/adequacy_patch_csr/construct_problem_variables.cpp @@ -27,6 +27,7 @@ #include "../solver/optimisation/opt_structure_probleme_a_resoudre.h" #include "../simulation/adequacy_patch_runtime_data.h" +#include "sim_structure_probleme_economique.h" #include "hourly_csr_problem.h" #include "pi_constantes_externes.h" diff --git a/src/solver/optimisation/adequacy_patch_csr/csr_quadratic_problem.cpp b/src/solver/optimisation/adequacy_patch_csr/csr_quadratic_problem.cpp index 235615079d..1480a99d89 100644 --- a/src/solver/optimisation/adequacy_patch_csr/csr_quadratic_problem.cpp +++ b/src/solver/optimisation/adequacy_patch_csr/csr_quadratic_problem.cpp @@ -32,6 +32,7 @@ #include "../solver/optimisation/opt_fonctions.h" #include "csr_quadratic_problem.h" #include "hourly_csr_problem.h" +#include "sim_structure_probleme_economique.h" using namespace Antares::Data; diff --git a/src/solver/optimisation/adequacy_patch_csr/hourly_csr_problem.h b/src/solver/optimisation/adequacy_patch_csr/hourly_csr_problem.h index 66ebe154c7..a09bb68de0 100644 --- a/src/solver/optimisation/adequacy_patch_csr/hourly_csr_problem.h +++ b/src/solver/optimisation/adequacy_patch_csr/hourly_csr_problem.h @@ -29,9 +29,12 @@ // TODO[FOM] Remove this, it is only required for PROBLEME_HEBDO // but this problem has nothing to do with PROBLEME_HEBDO -#include "../simulation/sim_structure_probleme_economique.h" +#include +#include #include +#include "../opt_structure_probleme_a_resoudre.h" +struct PROBLEME_HEBDO; class HourlyCSRProblem { private: @@ -118,9 +121,9 @@ class HourlyCSRProblem inline bool check() const { if (directVar < 0) - logs.warning() << "directVar < 0 detected, this should not happen"; + Antares::logs.warning() << "directVar < 0 detected, this should not happen"; if (indirectVar < 0) - logs.warning() << "indirectVar < 0 detected, this should not happen"; + Antares::logs.warning() << "indirectVar < 0 detected, this should not happen"; return (directVar >= 0) && (indirectVar >= 0); } diff --git a/src/solver/optimisation/adequacy_patch_csr/set_problem_cost_function.cpp b/src/solver/optimisation/adequacy_patch_csr/set_problem_cost_function.cpp index b2ac89e81b..122cff49bf 100644 --- a/src/solver/optimisation/adequacy_patch_csr/set_problem_cost_function.cpp +++ b/src/solver/optimisation/adequacy_patch_csr/set_problem_cost_function.cpp @@ -29,6 +29,7 @@ #include "../simulation/adequacy_patch_runtime_data.h" #include "../solver/optimisation/opt_fonctions.h" +#include "sim_structure_probleme_economique.h" namespace { diff --git a/src/solver/optimisation/adequacy_patch_csr/set_variable_boundaries.cpp b/src/solver/optimisation/adequacy_patch_csr/set_variable_boundaries.cpp index b67fca8bb7..e0cd057820 100644 --- a/src/solver/optimisation/adequacy_patch_csr/set_variable_boundaries.cpp +++ b/src/solver/optimisation/adequacy_patch_csr/set_variable_boundaries.cpp @@ -33,6 +33,7 @@ #include "../solver/optimisation/opt_fonctions.h" #include "pi_constantes_externes.h" +#include "sim_structure_probleme_economique.h" #include 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 73c5f2be00..562af053e5 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 @@ -29,6 +29,7 @@ #include "../utils/filename.h" #include "opt_fonctions.h" #include "opt_rename_problem.h" +#include "sim_structure_probleme_economique.h" #include diff --git a/src/solver/optimisation/opt_optimisation_lineaire.cpp b/src/solver/optimisation/opt_optimisation_lineaire.cpp index 323c6f9ef8..57c59a7881 100644 --- a/src/solver/optimisation/opt_optimisation_lineaire.cpp +++ b/src/solver/optimisation/opt_optimisation_lineaire.cpp @@ -25,8 +25,7 @@ ** SPDX-License-Identifier: licenceRef-GPL3_WITH_RTE-Exceptions */ -#include "../simulation/simulation.h" - +#include "sim_structure_probleme_economique.h" #include "opt_fonctions.h" #include diff --git a/src/solver/optimisation/opt_structure_probleme_a_resoudre.h b/src/solver/optimisation/opt_structure_probleme_a_resoudre.h index 659e860ca2..b46b659140 100644 --- a/src/solver/optimisation/opt_structure_probleme_a_resoudre.h +++ b/src/solver/optimisation/opt_structure_probleme_a_resoudre.h @@ -44,7 +44,7 @@ struct OptimizationOptions } /* Le probleme a resoudre */ -typedef struct +struct PROBLEME_ANTARES_A_RESOUDRE { /* La matrice des contraintes */ int NombreDeVariables; @@ -115,10 +115,9 @@ typedef struct std::vector NomDesVariables; std::vector NomDesContraintes; -public: std::vector StatutDesVariables; std::vector StatutDesContraintes; -} PROBLEME_ANTARES_A_RESOUDRE; +}; #endif /* __SOLVER_OPTIMISATION_STRUCTURE_PROBLEME_A_RESOUDRE_H__ */ diff --git a/src/solver/simulation/BindingConstraintsTimeSeriesNumbersWriter.h b/src/solver/simulation/BindingConstraintsTimeSeriesNumbersWriter.h index 98b53997a1..459a73dc6d 100644 --- a/src/solver/simulation/BindingConstraintsTimeSeriesNumbersWriter.h +++ b/src/solver/simulation/BindingConstraintsTimeSeriesNumbersWriter.h @@ -6,7 +6,7 @@ #include #include "ITimeSeriesNumbersWriter.h" -#include "i_writer.h" +#include #include "antares/study/binding_constraint/BindingConstraintsRepository.h" namespace Antares::Solver::Simulation { diff --git a/src/solver/simulation/opt_time_writer.h b/src/solver/simulation/opt_time_writer.h index 44ca477c7d..985916bb17 100644 --- a/src/solver/simulation/opt_time_writer.h +++ b/src/solver/simulation/opt_time_writer.h @@ -26,7 +26,7 @@ */ #pragma once #include -#include +#include #include "simulation.h" diff --git a/src/solver/simulation/solver.h b/src/solver/simulation/solver.h index ebbb5b9198..897c1d5365 100644 --- a/src/solver/simulation/solver.h +++ b/src/solver/simulation/solver.h @@ -41,7 +41,7 @@ #include "solver.utils.h" #include "../hydro/management/management.h" -#include +#include namespace Antares::Solver::Simulation { diff --git a/src/solver/simulation/solver.utils.h b/src/solver/simulation/solver.utils.h index aa8d2beec6..96d22be0fa 100644 --- a/src/solver/simulation/solver.utils.h +++ b/src/solver/simulation/solver.utils.h @@ -35,7 +35,7 @@ // #include #include -#include +#include #define SEP Yuni::IO::Separator diff --git a/src/solver/ts-generator/generator.h b/src/solver/ts-generator/generator.h index c3ce0df8a4..7182dddfec 100644 --- a/src/solver/ts-generator/generator.h +++ b/src/solver/ts-generator/generator.h @@ -31,7 +31,7 @@ #include #include #include -#include +#include #include "xcast/xcast.h" namespace Antares diff --git a/src/solver/ts-generator/hydro.cpp b/src/solver/ts-generator/hydro.cpp index df6252f61d..0636993bbe 100644 --- a/src/solver/ts-generator/hydro.cpp +++ b/src/solver/ts-generator/hydro.cpp @@ -34,7 +34,7 @@ #include #include #include -#include +#include #include "../misc/cholesky.h" #include "../misc/matrix-dp-make.h" diff --git a/src/solver/ts-generator/thermal.cpp b/src/solver/ts-generator/thermal.cpp index 7d3600c4fa..c476718528 100644 --- a/src/solver/ts-generator/thermal.cpp +++ b/src/solver/ts-generator/thermal.cpp @@ -33,7 +33,7 @@ #include #include -#include +#include #include "../simulation/simulation.h" #include "../simulation/sim_structure_donnees.h" diff --git a/src/solver/ts-generator/xcast/xcast.h b/src/solver/ts-generator/xcast/xcast.h index ba766f7377..254bb431db 100644 --- a/src/solver/ts-generator/xcast/xcast.h +++ b/src/solver/ts-generator/xcast/xcast.h @@ -30,7 +30,7 @@ #include #include #include -#include +#include #include "studydata.h" #include diff --git a/src/solver/utils/ortools_utils.h b/src/solver/utils/ortools_utils.h index 51a974ded5..e3f0987834 100644 --- a/src/solver/utils/ortools_utils.h +++ b/src/solver/utils/ortools_utils.h @@ -3,7 +3,7 @@ #include #include -#include +#include #include "ortools/linear_solver/linear_solver.h" diff --git a/src/solver/variable/surveyresults/data.h b/src/solver/variable/surveyresults/data.h index aae3a7b40d..ca3d1eb0d5 100644 --- a/src/solver/variable/surveyresults/data.h +++ b/src/solver/variable/surveyresults/data.h @@ -31,7 +31,7 @@ #include "../constants.h" #include #include -#include +#include namespace Antares { diff --git a/src/solver/variable/surveyresults/surveyresults.h b/src/solver/variable/surveyresults/surveyresults.h index 6be2f29bf7..64aa5bfbb3 100644 --- a/src/solver/variable/surveyresults/surveyresults.h +++ b/src/solver/variable/surveyresults/surveyresults.h @@ -34,7 +34,7 @@ #include "../categories.h" #include "data.h" #include -#include +#include namespace Antares { diff --git a/src/tests/src/solver/simulation/test-store-timeseries-number.cpp b/src/tests/src/solver/simulation/test-store-timeseries-number.cpp index 01b1b137a8..ffed096f9d 100644 --- a/src/tests/src/solver/simulation/test-store-timeseries-number.cpp +++ b/src/tests/src/solver/simulation/test-store-timeseries-number.cpp @@ -7,9 +7,9 @@ #include #include -#include "antares/study.h" -#include "immediate_file_writer.h" +#include #include "timeseries-numbers.h" +#include #include "BindingConstraintsTimeSeriesNumbersWriter.h" #include "utils.h" From f072ec90a5aabb42e10b22a7acfc85d259d530a5 Mon Sep 17 00:00:00 2001 From: Jason Marechal Date: Tue, 8 Aug 2023 17:15:05 +0200 Subject: [PATCH 02/52] wip --- src/libs/antares/writer/CMakeLists.txt | 13 +++++++++---- src/libs/antares/writer/ensure_queue_started.h | 2 +- src/libs/antares/writer/i_writer.h | 1 - src/libs/antares/writer/immediate_file_writer.cpp | 4 ---- src/libs/antares/writer/immediate_file_writer.h | 2 -- src/libs/antares/writer/writer_factory.h | 4 ---- src/libs/antares/writer/zip_writer.cpp | 1 - src/libs/antares/writer/zip_writer.h | 5 +---- 8 files changed, 11 insertions(+), 21 deletions(-) diff --git a/src/libs/antares/writer/CMakeLists.txt b/src/libs/antares/writer/CMakeLists.txt index f81260cf9b..f402aa606a 100644 --- a/src/libs/antares/writer/CMakeLists.txt +++ b/src/libs/antares/writer/CMakeLists.txt @@ -19,12 +19,17 @@ add_library(result_writer zip_writer.cpp zip_writer.h) -target_include_directories(result_writer PUBLIC - ${CMAKE_SOURCE_DIR}/solver/writer) +target_include_directories(result_writer + PRIVATE + ${CMAKE_SOURCE_DIR}/ext/yuni/src +) target_link_libraries(result_writer PRIVATE - libantares-core - MINIZIP::minizip) + MINIZIP::minizip + logs + inifile + benchmarking +) diff --git a/src/libs/antares/writer/ensure_queue_started.h b/src/libs/antares/writer/ensure_queue_started.h index 201665a8e8..d23aef9366 100644 --- a/src/libs/antares/writer/ensure_queue_started.h +++ b/src/libs/antares/writer/ensure_queue_started.h @@ -1,5 +1,5 @@ #pragma once -#include +#include "i_writer.h" #include diff --git a/src/libs/antares/writer/i_writer.h b/src/libs/antares/writer/i_writer.h index d9bee3a5a5..9f612dda5e 100644 --- a/src/libs/antares/writer/i_writer.h +++ b/src/libs/antares/writer/i_writer.h @@ -1,7 +1,6 @@ #pragma once #include -#include #include #include diff --git a/src/libs/antares/writer/immediate_file_writer.cpp b/src/libs/antares/writer/immediate_file_writer.cpp index 1bb7df0c99..b896814fd1 100644 --- a/src/libs/antares/writer/immediate_file_writer.cpp +++ b/src/libs/antares/writer/immediate_file_writer.cpp @@ -1,10 +1,6 @@ #include #include -#include -#include // IOFileSetContent -#include // Yuni::IO::File::LoadFromFile - #include "immediate_file_writer.h" // Create directory hierarchy (incl. root) diff --git a/src/libs/antares/writer/immediate_file_writer.h b/src/libs/antares/writer/immediate_file_writer.h index 304ffac0d4..2741404835 100644 --- a/src/libs/antares/writer/immediate_file_writer.h +++ b/src/libs/antares/writer/immediate_file_writer.h @@ -3,8 +3,6 @@ #include #include -#include - namespace Antares { namespace Solver diff --git a/src/libs/antares/writer/writer_factory.h b/src/libs/antares/writer/writer_factory.h index afae896e1b..9680aa5393 100644 --- a/src/libs/antares/writer/writer_factory.h +++ b/src/libs/antares/writer/writer_factory.h @@ -3,10 +3,6 @@ #include #include -#include -#include // Timer - -#include #include "immediate_file_writer.h" #include "zip_writer.h" diff --git a/src/libs/antares/writer/zip_writer.cpp b/src/libs/antares/writer/zip_writer.cpp index b2bd427fb1..3cbdb872ed 100644 --- a/src/libs/antares/writer/zip_writer.cpp +++ b/src/libs/antares/writer/zip_writer.cpp @@ -1,5 +1,4 @@ #include -#include #include // Yuni::IO::File::LoadFromFile #include "zip_writer.h" diff --git a/src/libs/antares/writer/zip_writer.h b/src/libs/antares/writer/zip_writer.h index bf7063d705..27bdae4050 100644 --- a/src/libs/antares/writer/zip_writer.h +++ b/src/libs/antares/writer/zip_writer.h @@ -3,13 +3,10 @@ #include #include -#include // Timer - #include #include #include - -#include +#include namespace Antares { From 1f54d627cfe21a67b49b62653605be50012e55ad Mon Sep 17 00:00:00 2001 From: Jason Marechal Date: Fri, 28 Jul 2023 15:32:38 +0200 Subject: [PATCH 03/52] Benchmarking --- src/libs/antares/CMakeLists.txt | 13 ++-------- src/libs/antares/benchmarking/CMakeLists.txt | 26 +++++++++++++++++++ .../antares/{ => benchmarking}/benchmarking.h | 4 +-- src/libs/antares/study/load.cpp | 2 +- src/libs/antares/study/save.cpp | 2 +- src/libs/antares/writer/writer_factory.h | 4 +++ src/libs/antares/writer/zip_writer.h | 2 ++ src/solver/application.h | 2 +- src/solver/main/adequacy.cpp | 2 +- src/solver/main/economy.cpp | 2 +- src/solver/simulation/solver.h | 2 +- src/solver/simulation/solver.hxx | 2 +- src/solver/ts-generator/hydro.cpp | 6 +---- 13 files changed, 44 insertions(+), 25 deletions(-) create mode 100644 src/libs/antares/benchmarking/CMakeLists.txt rename src/libs/antares/{ => benchmarking}/benchmarking.h (94%) diff --git a/src/libs/antares/CMakeLists.txt b/src/libs/antares/CMakeLists.txt index 6b4c628033..0784358417 100644 --- a/src/libs/antares/CMakeLists.txt +++ b/src/libs/antares/CMakeLists.txt @@ -335,17 +335,7 @@ set(SRC_XCAST ) source_group("study\\xcast" FILES ${SRC_XCAST}) -set(SRC_BENCHMARKING - benchmarking.h - benchmarking/timer.h - benchmarking/timer.cpp - benchmarking/info_collectors.h - benchmarking/info_collectors.cpp - benchmarking/file_content.h - benchmarking/file_content.cpp - ) -source_group("misc\\benchmarking" FILES ${SRC_BENCHMARKING}) - +add_subdirectory(benchmarking) add_subdirectory(io) set(SRC_EXCEPTION @@ -603,6 +593,7 @@ target_link_libraries(libantares-core array correlation object + benchmarking ) import_std_libs(libantares-core) diff --git a/src/libs/antares/benchmarking/CMakeLists.txt b/src/libs/antares/benchmarking/CMakeLists.txt new file mode 100644 index 0000000000..09bf70184e --- /dev/null +++ b/src/libs/antares/benchmarking/CMakeLists.txt @@ -0,0 +1,26 @@ +set(SRC_BENCHMARKING + benchmarking.h + timer.h + timer.cpp + info_collectors.h + info_collectors.cpp + file_content.h + file_content.cpp + ) +source_group("misc\\benchmarking" FILES ${SRC_BENCHMARKING}) + +add_library(benchmarking + ${SRC_BENCHMARKING} + ) + +target_include_directories(benchmarking + PRIVATE + ${CMAKE_SOURCE_DIR}/ext/yuni/src + ${CMAKE_SOURCE_DIR}/libs + ${CMAKE_SOURCE_DIR}/solver/writer + ) + +target_link_libraries(benchmarking + PRIVATE + yuni-static-core + ) \ No newline at end of file diff --git a/src/libs/antares/benchmarking.h b/src/libs/antares/benchmarking/benchmarking.h similarity index 94% rename from src/libs/antares/benchmarking.h rename to src/libs/antares/benchmarking/benchmarking.h index 0cf9da4122..946b3435b1 100644 --- a/src/libs/antares/benchmarking.h +++ b/src/libs/antares/benchmarking/benchmarking.h @@ -27,7 +27,7 @@ #ifndef __ANTARES_LIBS_BENCHMARKING_H__ #define __ANTARES_LIBS_BENCHMARKING_H__ -#include "benchmarking/timer.h" -#include "benchmarking/info_collectors.h" +#include "timer.h" +#include "info_collectors.h" #endif // __ANTARES_LIBS_BENCHMARKING_H__ diff --git a/src/libs/antares/study/load.cpp b/src/libs/antares/study/load.cpp index da22db2938..e9205c69d2 100644 --- a/src/libs/antares/study/load.cpp +++ b/src/libs/antares/study/load.cpp @@ -27,7 +27,7 @@ #include #include "study.h" #include "version.h" -#include "../benchmarking.h" +#include #include "scenario-builder/sets.h" #include "ui-runtimeinfos.h" diff --git a/src/libs/antares/study/save.cpp b/src/libs/antares/study/save.cpp index 6f52b0641c..77e5bffcd6 100644 --- a/src/libs/antares/study/save.cpp +++ b/src/libs/antares/study/save.cpp @@ -26,7 +26,7 @@ */ #include "study.h" -#include "../benchmarking.h" +#include #include "scenario-builder/sets.h" #include #include diff --git a/src/libs/antares/writer/writer_factory.h b/src/libs/antares/writer/writer_factory.h index 9680aa5393..406b84120b 100644 --- a/src/libs/antares/writer/writer_factory.h +++ b/src/libs/antares/writer/writer_factory.h @@ -3,6 +3,10 @@ #include #include +#include +#include // Timer + +#include "i_writer.h" #include "immediate_file_writer.h" #include "zip_writer.h" diff --git a/src/libs/antares/writer/zip_writer.h b/src/libs/antares/writer/zip_writer.h index 27bdae4050..44aeb92408 100644 --- a/src/libs/antares/writer/zip_writer.h +++ b/src/libs/antares/writer/zip_writer.h @@ -3,6 +3,8 @@ #include #include +#include // Timer + #include #include #include diff --git a/src/solver/application.h b/src/solver/application.h index fe4dae86f4..ea84b76535 100644 --- a/src/solver/application.h +++ b/src/solver/application.h @@ -3,7 +3,7 @@ #include "misc/options.h" #include #include -#include +#include #include "simulation/simulation.h" #include diff --git a/src/solver/main/adequacy.cpp b/src/solver/main/adequacy.cpp index e95df01402..6f07d6e3b0 100644 --- a/src/solver/main/adequacy.cpp +++ b/src/solver/main/adequacy.cpp @@ -28,7 +28,7 @@ #include "../application.h" #include "../simulation/solver.h" #include "../simulation/adequacy.h" -#include +#include #include namespace Antares diff --git a/src/solver/main/economy.cpp b/src/solver/main/economy.cpp index aac780a402..f192e157d0 100644 --- a/src/solver/main/economy.cpp +++ b/src/solver/main/economy.cpp @@ -28,7 +28,7 @@ #include "../application.h" #include "../simulation/solver.h" #include "../simulation/economy.h" -#include +#include #include namespace Antares diff --git a/src/solver/simulation/solver.h b/src/solver/simulation/solver.h index 897c1d5365..98e1bb43bd 100644 --- a/src/solver/simulation/solver.h +++ b/src/solver/simulation/solver.h @@ -31,7 +31,7 @@ #include #include #include // PowerFluctuations -#include +#include #include #include diff --git a/src/solver/simulation/solver.hxx b/src/solver/simulation/solver.hxx index 27147581d6..0b2b084e22 100644 --- a/src/solver/simulation/solver.hxx +++ b/src/solver/simulation/solver.hxx @@ -30,7 +30,7 @@ #include "../variable/constants.h" #include #include -#include +#include #include #include "../variable/print.h" #include diff --git a/src/solver/ts-generator/hydro.cpp b/src/solver/ts-generator/hydro.cpp index 0636993bbe..944e5e9432 100644 --- a/src/solver/ts-generator/hydro.cpp +++ b/src/solver/ts-generator/hydro.cpp @@ -26,14 +26,10 @@ */ #include -#include "../simulation/sim_structure_probleme_economique.h" -#include "../simulation/sim_structure_probleme_adequation.h" #include "../simulation/sim_extern_variables_globales.h" #include "../aleatoire/alea_fonctions.h" -#include +#include #include -#include -#include #include #include "../misc/cholesky.h" #include "../misc/matrix-dp-make.h" From 842f75bf18bd88762817ff35df67dcc8d6ecd328 Mon Sep 17 00:00:00 2001 From: Jason Marechal Date: Tue, 8 Aug 2023 14:23:16 +0200 Subject: [PATCH 04/52] Remove extra dependency --- src/libs/antares/benchmarking/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/src/libs/antares/benchmarking/CMakeLists.txt b/src/libs/antares/benchmarking/CMakeLists.txt index 09bf70184e..5bd06e0182 100644 --- a/src/libs/antares/benchmarking/CMakeLists.txt +++ b/src/libs/antares/benchmarking/CMakeLists.txt @@ -17,7 +17,6 @@ target_include_directories(benchmarking PRIVATE ${CMAKE_SOURCE_DIR}/ext/yuni/src ${CMAKE_SOURCE_DIR}/libs - ${CMAKE_SOURCE_DIR}/solver/writer ) target_link_libraries(benchmarking From a7d28cd8c5fd546b0eab986f6246369310b85e87 Mon Sep 17 00:00:00 2001 From: Jason Marechal Date: Wed, 9 Aug 2023 14:49:51 +0200 Subject: [PATCH 05/52] Move writer in libs --- src/libs/antares/benchmarking/CMakeLists.txt | 4 +++- src/libs/antares/benchmarking/info_collectors.h | 2 +- src/libs/antares/writer/CMakeLists.txt | 5 ++++- src/libs/antares/writer/immediate_file_writer.cpp | 3 +++ src/libs/antares/writer/immediate_file_writer.h | 1 + src/libs/antares/writer/writer_factory.h | 10 +++------- src/libs/antares/writer/zip_writer.cpp | 1 + src/libs/antares/writer/zip_writer.h | 15 +++++++-------- 8 files changed, 23 insertions(+), 18 deletions(-) diff --git a/src/libs/antares/benchmarking/CMakeLists.txt b/src/libs/antares/benchmarking/CMakeLists.txt index 5bd06e0182..cbb92bcf92 100644 --- a/src/libs/antares/benchmarking/CMakeLists.txt +++ b/src/libs/antares/benchmarking/CMakeLists.txt @@ -22,4 +22,6 @@ target_include_directories(benchmarking target_link_libraries(benchmarking PRIVATE yuni-static-core - ) \ No newline at end of file + inifile + result_writer + ) diff --git a/src/libs/antares/benchmarking/info_collectors.h b/src/libs/antares/benchmarking/info_collectors.h index 2c9501824e..092decdd04 100644 --- a/src/libs/antares/benchmarking/info_collectors.h +++ b/src/libs/antares/benchmarking/info_collectors.h @@ -5,8 +5,8 @@ #include #include -#include #include "file_content.h" +#include namespace Benchmarking { diff --git a/src/libs/antares/writer/CMakeLists.txt b/src/libs/antares/writer/CMakeLists.txt index f402aa606a..e18a81cb7a 100644 --- a/src/libs/antares/writer/CMakeLists.txt +++ b/src/libs/antares/writer/CMakeLists.txt @@ -22,6 +22,7 @@ add_library(result_writer target_include_directories(result_writer PRIVATE ${CMAKE_SOURCE_DIR}/ext/yuni/src + ${CMAKE_SOURCE_DIR}/libs ) target_link_libraries(result_writer @@ -30,6 +31,8 @@ target_link_libraries(result_writer logs inifile benchmarking -) + io + ) + diff --git a/src/libs/antares/writer/immediate_file_writer.cpp b/src/libs/antares/writer/immediate_file_writer.cpp index b896814fd1..ca16edec20 100644 --- a/src/libs/antares/writer/immediate_file_writer.cpp +++ b/src/libs/antares/writer/immediate_file_writer.cpp @@ -2,6 +2,9 @@ #include #include "immediate_file_writer.h" +#include "antares/io/file.h" +#include + // Create directory hierarchy (incl. root) // Don't complain if directories already exist diff --git a/src/libs/antares/writer/immediate_file_writer.h b/src/libs/antares/writer/immediate_file_writer.h index 2741404835..6eb7bebc70 100644 --- a/src/libs/antares/writer/immediate_file_writer.h +++ b/src/libs/antares/writer/immediate_file_writer.h @@ -2,6 +2,7 @@ #include #include +#include "i_writer.h" namespace Antares { diff --git a/src/libs/antares/writer/writer_factory.h b/src/libs/antares/writer/writer_factory.h index 406b84120b..a5f3ad94ae 100644 --- a/src/libs/antares/writer/writer_factory.h +++ b/src/libs/antares/writer/writer_factory.h @@ -3,20 +3,16 @@ #include #include -#include -#include // Timer - #include "i_writer.h" #include "immediate_file_writer.h" #include "zip_writer.h" -namespace Antares -{ -namespace Solver + +namespace Antares::Solver { IResultWriter::Ptr resultWriterFactory(Antares::Data::ResultFormat fmt, const YString& folderOutput, std::shared_ptr qs, Benchmarking::IDurationCollector* duration_collector); } -} // namespace Antares + diff --git a/src/libs/antares/writer/zip_writer.cpp b/src/libs/antares/writer/zip_writer.cpp index 3cbdb872ed..07bb19c7e4 100644 --- a/src/libs/antares/writer/zip_writer.cpp +++ b/src/libs/antares/writer/zip_writer.cpp @@ -2,6 +2,7 @@ #include // Yuni::IO::File::LoadFromFile #include "zip_writer.h" +#include extern "C" { diff --git a/src/libs/antares/writer/zip_writer.h b/src/libs/antares/writer/zip_writer.h index 44aeb92408..314abd5c6b 100644 --- a/src/libs/antares/writer/zip_writer.h +++ b/src/libs/antares/writer/zip_writer.h @@ -3,16 +3,15 @@ #include #include -#include // Timer - #include #include #include -#include -namespace Antares -{ -namespace Solver +#include "i_writer.h" +#include "antares/benchmarking/info_collectors.h" + + +namespace Antares::Solver { enum class ZipState { @@ -80,7 +79,7 @@ class ZipWriter : public IResultWriter template void addEntryFromBufferHelper(const std::string& entryPath, ContentType& entryContent); }; -} // namespace Solver -} // namespace Antares +} // namespace Antares::Solver + #include "zip_writer.hxx" From 0b5ac842bcea096d02155f30330369c54c8e0e4a Mon Sep 17 00:00:00 2001 From: Jason Marechal Date: Wed, 9 Aug 2023 17:14:05 +0200 Subject: [PATCH 06/52] Fix post rebase --- src/solver/optimisation/opt_fonctions.h | 11 ++++++----- src/solver/signal-handling/common.h | 2 +- src/solver/signal-handling/public.h | 1 - 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/solver/optimisation/opt_fonctions.h b/src/solver/optimisation/opt_fonctions.h index 5fb2700ab9..54a953ec1a 100644 --- a/src/solver/optimisation/opt_fonctions.h +++ b/src/solver/optimisation/opt_fonctions.h @@ -34,6 +34,7 @@ #include "opt_period_string_generator_base.h" #include "antares/study/parameters/adq-patch-params.h" #include "opt_structure_probleme_a_resoudre.h" +#include using AdqPatchParams = Antares::Data::AdequacyPatch::AdqPatchParams; using OptimizationOptions = Antares::Solver::Optimization::OptimizationOptions; @@ -41,13 +42,13 @@ using OptimizationOptions = Antares::Solver::Optimization::OptimizationOptions; void OPT_OptimisationHebdomadaire(const OptimizationOptions& options, PROBLEME_HEBDO*, const AdqPatchParams&, - Solver::IResultWriter& writer); + Antares::Solver::IResultWriter& writer); void OPT_NumeroDeJourDuPasDeTemps(PROBLEME_HEBDO*); void OPT_NumeroDIntervalleOptimiseDuPasDeTemps(PROBLEME_HEBDO*); void OPT_ConstruireLaListeDesVariablesOptimiseesDuProblemeLineaire(PROBLEME_HEBDO*); void OPT_ConstruireLaListeDesVariablesOptimiseesDuProblemeQuadratique(PROBLEME_HEBDO*); void OPT_ConstruireLaMatriceDesContraintesDuProblemeLineaire(PROBLEME_HEBDO*, - Solver::IResultWriter& writer); + Antares::Solver::IResultWriter& writer); void OPT_ConstruireLaMatriceDesContraintesDuProblemeQuadratique(PROBLEME_HEBDO*); void OPT_InitialiserLesPminHebdo(PROBLEME_HEBDO*); void OPT_InitialiserLesContrainteDEnergieHydrauliqueParIntervalleOptimise(PROBLEME_HEBDO*); @@ -75,7 +76,7 @@ bool ADQ_PATCH_CSR(PROBLEME_ANTARES_A_RESOUDRE&, bool OPT_PilotageOptimisationLineaire(const OptimizationOptions& options, PROBLEME_HEBDO*, const AdqPatchParams&, - Solver::IResultWriter& writer); + Antares::Solver::IResultWriter& writer); void OPT_VerifierPresenceReserveJmoins1(PROBLEME_HEBDO*); bool OPT_PilotageOptimisationQuadratique(PROBLEME_HEBDO*); @@ -89,13 +90,13 @@ bool OPT_AppelDuSimplexe(const OptimizationOptions& options, int, const int, const OptPeriodStringGenerator&, - Solver::IResultWriter& writer); + Antares::Solver::IResultWriter& writer); void OPT_LiberationProblemesSimplexe(const OptimizationOptions& options, const PROBLEME_HEBDO*); bool OPT_OptimisationLineaire(const OptimizationOptions& options, PROBLEME_HEBDO*, const AdqPatchParams&, - Solver::IResultWriter& writer); + Antares::Solver::IResultWriter& writer); void OPT_RestaurerLesDonnees(const PROBLEME_HEBDO*); /*------------------------------*/ diff --git a/src/solver/signal-handling/common.h b/src/solver/signal-handling/common.h index 538ee5f302..1c4f096646 100644 --- a/src/solver/signal-handling/common.h +++ b/src/solver/signal-handling/common.h @@ -1,7 +1,7 @@ #pragma once #include -#include +#include void signalCtrl_term(int); void signalCtrl_int(int); diff --git a/src/solver/signal-handling/public.h b/src/solver/signal-handling/public.h index 8f24769228..d1cbf36688 100644 --- a/src/solver/signal-handling/public.h +++ b/src/solver/signal-handling/public.h @@ -1,7 +1,6 @@ #pragma once #include -#include namespace Antares::Solver { From e29824992ceef203a47412d9bb95396428549d1a Mon Sep 17 00:00:00 2001 From: Jason Marechal Date: Wed, 9 Aug 2023 17:14:48 +0200 Subject: [PATCH 07/52] Remove Yuni target include --- src/libs/antares/benchmarking/CMakeLists.txt | 1 - src/libs/antares/writer/CMakeLists.txt | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/libs/antares/benchmarking/CMakeLists.txt b/src/libs/antares/benchmarking/CMakeLists.txt index cbb92bcf92..fb06a705d9 100644 --- a/src/libs/antares/benchmarking/CMakeLists.txt +++ b/src/libs/antares/benchmarking/CMakeLists.txt @@ -15,7 +15,6 @@ add_library(benchmarking target_include_directories(benchmarking PRIVATE - ${CMAKE_SOURCE_DIR}/ext/yuni/src ${CMAKE_SOURCE_DIR}/libs ) diff --git a/src/libs/antares/writer/CMakeLists.txt b/src/libs/antares/writer/CMakeLists.txt index e18a81cb7a..1e52d12b96 100644 --- a/src/libs/antares/writer/CMakeLists.txt +++ b/src/libs/antares/writer/CMakeLists.txt @@ -21,12 +21,12 @@ add_library(result_writer target_include_directories(result_writer PRIVATE - ${CMAKE_SOURCE_DIR}/ext/yuni/src ${CMAKE_SOURCE_DIR}/libs ) target_link_libraries(result_writer PRIVATE + yuni-static-core MINIZIP::minizip logs inifile From b2cbab5c5a9854f60e3af24f1565ebbdde7fd265 Mon Sep 17 00:00:00 2001 From: Jason Marechal Date: Thu, 10 Aug 2023 15:43:07 +0200 Subject: [PATCH 08/52] Lots of lib change --- src/analyzer/atsp/load.cpp | 2 +- src/analyzer/atsp/preflight.cpp | 2 +- src/analyzer/main.cpp | 4 +- src/ext/yuni/src/yuni/CMakeLists.txt | 1 - src/libs/antares/CMakeLists.txt | 48 +++---------------- src/libs/antares/array/CMakeLists.txt | 15 +++--- src/libs/antares/array/{ => array}/array1d.h | 0 .../array/{ => array}/matrix-to-buffer.h | 0 .../array/{ => array}/matrix-to-buffer.hxx | 0 src/libs/antares/array/{ => array}/matrix.h | 0 src/libs/antares/array/{ => array}/matrix.hxx | 4 +- src/libs/antares/benchmarking/CMakeLists.txt | 17 ++++--- src/libs/antares/benchmarking/benchmarking.h | 33 ------------- .../{ => benchmarking}/file_content.h | 0 .../{ => benchmarking}/info_collectors.h | 0 .../benchmarking/{ => benchmarking}/timer.h | 0 .../antares/benchmarking/file_content.cpp | 4 +- src/libs/antares/benchmarking/file_writer.cpp | 30 ------------ .../antares/benchmarking/info_collectors.cpp | 2 +- src/libs/antares/benchmarking/timer.cpp | 2 +- src/libs/antares/checks/CMakeLists.txt | 27 +++++++++++ .../antares/checks/checkLoadedInputData.cpp | 2 +- .../{ => checks}/checkLoadedInputData.h | 0 src/libs/antares/correlation/CMakeLists.txt | 6 ++- src/libs/antares/correlation/correlation.cpp | 2 +- src/libs/antares/correlation/correlation.h | 4 +- src/libs/antares/date.h | 32 ------------- src/libs/antares/date/CMakeLists.txt | 24 ++++++++++ src/libs/antares/date/date.cpp | 15 +++--- src/libs/antares/date/{ => date}/date.h | 4 +- src/libs/antares/hostinfo.cpp | 4 +- src/libs/antares/inifile/CMakeLists.txt | 8 ++-- src/libs/antares/inifile/inifile.cpp | 7 +-- .../antares/inifile/{ => inifile}/inifile.h | 0 .../antares/inifile/{ => inifile}/inifile.hxx | 0 src/libs/antares/io/CMakeLists.txt | 11 +++-- src/libs/antares/io/file.cpp | 4 +- src/libs/antares/io/{ => io}/file.h | 0 src/libs/antares/io/{ => io}/statistics.h | 0 src/libs/antares/io/statistics.cpp | 4 +- src/libs/antares/jit/CMakeLists.txt | 15 +++--- src/libs/antares/jit/jit.hxx | 2 +- src/libs/antares/logs.h | 32 ------------- src/libs/antares/logs/CMakeLists.txt | 16 +++++-- src/libs/antares/logs/cleaner.cpp | 2 +- src/libs/antares/logs/logs.cpp | 2 +- src/libs/antares/logs/{ => logs}/cleaner.h | 0 src/libs/antares/logs/{ => logs}/logs.h | 2 +- src/libs/antares/logs/{ => logs}/logs.hxx | 0 src/libs/antares/memory/memory.cpp | 2 +- src/libs/antares/memory/new_check.hxx | 2 +- src/libs/antares/paths/list.cpp | 2 +- src/libs/antares/resources/resources.cpp | 2 +- src/libs/antares/study/area/area.h | 2 +- src/libs/antares/study/area/links.cpp | 2 +- src/libs/antares/study/area/links.h | 2 +- src/libs/antares/study/area/list.cpp | 6 +-- src/libs/antares/study/area/scratchpad.h | 2 +- .../study/area/store-timeseries-numbers.cpp | 2 +- src/libs/antares/study/area/ui.cpp | 4 +- .../binding_constraint/BindingConstraint.h | 4 +- .../BindingConstraintSaver.h | 2 +- .../study/binding_constraint/EnvForLoading.h | 4 +- .../antares/study/cleaner/cleaner-v20.cpp | 2 +- src/libs/antares/study/cleaner/cleaner.cpp | 2 +- .../study/estimate.memory-footprint.cpp | 2 +- src/libs/antares/study/fwd.h | 9 ---- src/libs/antares/study/header.cpp | 18 ++++--- src/libs/antares/study/header.h | 4 +- src/libs/antares/study/importlogs.cpp | 2 +- src/libs/antares/study/layerdata.cpp | 4 +- src/libs/antares/study/load-options.cpp | 3 +- src/libs/antares/study/load.cpp | 2 +- src/libs/antares/study/memory-usage.cpp | 2 +- src/libs/antares/study/memory-usage.h | 10 ++-- src/libs/antares/study/parameters.cpp | 4 +- src/libs/antares/study/parameters.h | 9 ++-- .../study/parameters/adq-patch-params.cpp | 2 +- .../study/parameters/adq-patch-params.h | 2 +- src/libs/antares/study/parts/common/cluster.h | 2 +- .../antares/study/parts/common/cluster_list.h | 2 +- src/libs/antares/study/parts/common/series.h | 2 +- .../antares/study/parts/hydro/container.cpp | 4 +- src/libs/antares/study/parts/hydro/prepro.cpp | 6 +-- src/libs/antares/study/parts/hydro/prepro.h | 2 +- src/libs/antares/study/parts/hydro/series.cpp | 4 +- src/libs/antares/study/parts/hydro/series.h | 2 +- src/libs/antares/study/parts/load/series.h | 2 +- .../antares/study/parts/renewable/cluster.cpp | 4 +- .../antares/study/parts/renewable/cluster.h | 2 +- .../study/parts/renewable/cluster_list.cpp | 2 +- .../study/parts/renewable/container.cpp | 2 +- .../parts/short-term-storage/cluster.cpp | 2 +- .../study/parts/short-term-storage/cluster.h | 2 +- .../parts/short-term-storage/container.cpp | 2 +- .../parts/short-term-storage/properties.cpp | 2 +- .../parts/short-term-storage/properties.h | 2 +- .../study/parts/short-term-storage/series.cpp | 2 +- src/libs/antares/study/parts/solar/series.h | 2 +- .../antares/study/parts/thermal/cluster.cpp | 4 +- .../antares/study/parts/thermal/cluster.h | 2 +- .../antares/study/parts/thermal/container.cpp | 2 +- .../antares/study/parts/thermal/ecoInput.cpp | 4 +- .../antares/study/parts/thermal/ecoInput.h | 2 +- .../antares/study/parts/thermal/prepro.cpp | 4 +- src/libs/antares/study/parts/thermal/prepro.h | 2 +- src/libs/antares/study/parts/wind/prepro.cpp | 2 +- src/libs/antares/study/parts/wind/series.h | 2 +- .../antares/study/progression/progression.cpp | 2 +- src/libs/antares/study/save.cpp | 2 +- .../antares/study/scenario-builder/rules.cpp | 2 +- .../antares/study/scenario-builder/sets.cpp | 2 +- src/libs/antares/study/sets.h | 4 +- src/libs/antares/study/simulation.cpp | 2 +- src/libs/antares/study/study.h | 2 +- src/libs/antares/study/xcast/xcast.cpp | 4 +- src/libs/antares/study/xcast/xcast.h | 2 +- src/libs/antares/sys/policy.cpp | 4 +- src/libs/antares/writer/CMakeLists.txt | 17 ++++--- .../writer/{ => antares/writer}/i_writer.h | 0 .../writer/antares/writer/result_format.h | 17 +++++++ .../{ => antares/writer}/writer_factory.h | 5 +- .../antares/writer/ensure_queue_started.cpp | 2 +- .../antares/writer/immediate_file_writer.cpp | 6 +-- .../{ => private}/ensure_queue_started.h | 0 .../{ => private}/immediate_file_writer.h | 0 .../antares/writer/{ => private}/zip_writer.h | 2 +- .../writer/{ => private}/zip_writer.hxx | 0 src/libs/antares/writer/writer_factory.cpp | 2 +- src/libs/antares/writer/zip_writer.cpp | 4 +- src/libs/fswalker/CMakeLists.txt | 3 +- src/libs/fswalker/fswalker.cpp | 2 +- src/solver/CMakeLists.txt | 4 +- .../alea_tirage_au_sort_chroniques.cpp | 2 +- src/solver/application.cpp | 4 +- src/solver/application.h | 5 +- src/solver/config.h | 36 -------------- src/solver/constraints-builder/load.cpp | 2 +- .../infeasible-problem-analysis/report.cpp | 2 +- src/solver/main.cpp | 2 +- src/solver/main/adequacy.cpp | 4 +- src/solver/main/economy.cpp | 4 +- src/solver/memory/mem.h | 32 ------------- src/solver/misc/options.cpp | 2 +- src/solver/misc/process-priority.cpp | 2 +- src/solver/misc/system-memory.cpp | 2 +- src/solver/misc/write-command-line.cpp | 2 +- .../construct_problem_constraints_RHS.cpp | 2 +- .../adequacy_patch_csr/hourly_csr_problem.h | 2 +- .../adequacy_patch_csr/solve_problem.cpp | 2 +- .../opt_alloc_probleme_a_optimiser.cpp | 2 +- .../opt_appel_solveur_lineaire.cpp | 2 +- .../opt_appel_solveur_quadratique.cpp | 2 +- .../opt_decompte_variables_et_contraintes.cpp | 2 +- .../optimisation/opt_optimisation_hebdo.cpp | 2 +- .../opt_optimisation_lineaire.cpp | 2 +- src/solver/signal-handling/common.cpp | 2 +- src/solver/simulation/common-eco-adq.cpp | 2 +- src/solver/simulation/common-hydro-remix.cpp | 2 +- src/solver/simulation/solver.h | 4 +- src/solver/simulation/solver.hxx | 6 +-- src/solver/ts-generator/CMakeLists.txt | 7 ++- src/solver/ts-generator/generator.hxx | 2 +- src/solver/ts-generator/hydro.cpp | 2 +- src/solver/ts-generator/thermal.cpp | 2 +- src/solver/ts-generator/xcast/core.cpp | 12 ++--- src/solver/ts-generator/xcast/gamma-euler.cpp | 2 +- src/solver/ts-generator/xcast/gamma-inc.cpp | 2 +- src/solver/ts-generator/xcast/math.hxx | 2 +- src/solver/ts-generator/xcast/studydata.hxx | 2 +- src/solver/ts-generator/xcast/xcast.cpp | 2 +- src/solver/utils/ortools_utils.cpp | 2 +- src/solver/variable/CMakeLists.txt | 10 +++- .../variable/commons/spatial-aggregate.h | 2 +- src/solver/variable/container.h | 18 +++---- .../variable/surveyresults/reportbuilder.hxx | 2 +- .../variable/surveyresults/surveyresults.cpp | 2 +- src/tests/src/libs/antares/CMakeLists.txt | 4 +- src/tests/src/libs/antares/logs/logs.cpp | 2 +- .../thermal-price-definition.cpp | 2 +- src/tools/batchrun/main.cpp | 2 +- src/tools/cleaner/main.cpp | 2 +- src/tools/config/main.cpp | 2 +- src/tools/finder/main.cpp | 2 +- src/tools/kirchhoff-cbuilder/main.cpp | 2 +- src/tools/updater/main.cpp | 2 +- src/tools/vacuum/antares-study.cpp | 2 +- src/tools/vacuum/main.cpp | 2 +- src/tools/vacuum/modified-inode.cpp | 2 +- src/tools/yby-aggregator/job.cpp | 2 +- src/tools/yby-aggregator/main.cpp | 2 +- src/tools/yby-aggregator/output.cpp | 2 +- src/tools/yby-aggregator/progress.cpp | 2 +- src/tools/yby-aggregator/progress.h | 2 +- src/ui/common/CMakeLists.txt | 8 +++- src/ui/common/component/scrollbox/scrollbox.h | 2 +- .../common/component/spotlight/mini-frame.cpp | 2 +- src/ui/common/dispatcher/action.cpp | 2 +- src/ui/common/dispatcher/gui.cpp | 2 +- src/ui/simulator/application/application.cpp | 2 +- .../simulator/application/main/analyzer.cpp | 2 +- src/ui/simulator/application/main/create.cpp | 2 +- src/ui/simulator/application/menus.cpp | 2 +- src/ui/simulator/application/recentfiles.cpp | 2 +- src/ui/simulator/application/study.cpp | 2 +- src/ui/simulator/application/wait.cpp | 2 +- src/ui/simulator/main.cpp | 2 +- .../simulator/toolbox/clipboard/clipboard.h | 2 +- .../toolbox/components/button/button.cpp | 2 +- .../toolbox/components/datagrid/component.h | 2 +- .../components/datagrid/filter/component.cpp | 2 +- .../components/datagrid/filter/filter.h | 2 +- .../datagrid/filter/parameter/parameter.cpp | 4 +- .../toolbox/components/datagrid/renderer.h | 2 +- .../renderer/area/creditmodulations.h | 2 +- .../renderer/area/hydromonthlypower.h | 2 +- .../datagrid/renderer/area/hydroprepro.h | 2 +- .../datagrid/renderer/area/inflowpattern.h | 2 +- .../datagrid/renderer/area/reservoirlevels.h | 2 +- .../datagrid/renderer/area/timeseries.h | 2 +- .../datagrid/renderer/area/watervalues.h | 2 +- .../components/datagrid/renderer/connection.h | 2 +- .../components/datagrid/renderer/matrix.h | 2 +- .../components/notebook/mapnotebook.cpp | 2 +- .../toolbox/components/notebook/mapnotebook.h | 2 +- .../toolbox/components/notebook/notebook.cpp | 2 +- src/ui/simulator/toolbox/create.cpp | 2 +- src/ui/simulator/toolbox/jobs/job.h | 2 +- src/ui/simulator/toolbox/locales.cpp | 2 +- src/ui/simulator/toolbox/resources.cpp | 2 +- .../toolbox/system/diskfreespace.hxx | 2 +- src/ui/simulator/windows/about/aboutbox.h | 2 +- .../simulator/windows/analyzer/analyzer.cpp | 6 +-- src/ui/simulator/windows/cleaner.cpp | 2 +- .../constraintsbuilder.cpp | 6 +-- .../adequacy-patch/adequacy-patch-options.cpp | 2 +- .../windows/options/advanced/advanced.cpp | 2 +- .../options/optimization/optimization.cpp | 2 +- .../options/temp-folder/temp-folder.cpp | 2 +- src/ui/simulator/windows/output/job.cpp | 2 +- .../simulator/windows/output/mini-frame.cpp | 2 +- src/ui/simulator/windows/simulation/panel.cpp | 2 +- 242 files changed, 440 insertions(+), 582 deletions(-) rename src/libs/antares/array/{ => array}/array1d.h (100%) rename src/libs/antares/array/{ => array}/matrix-to-buffer.h (100%) rename src/libs/antares/array/{ => array}/matrix-to-buffer.hxx (100%) rename src/libs/antares/array/{ => array}/matrix.h (100%) rename src/libs/antares/array/{ => array}/matrix.hxx (99%) delete mode 100644 src/libs/antares/benchmarking/benchmarking.h rename src/libs/antares/benchmarking/{ => benchmarking}/file_content.h (100%) rename src/libs/antares/benchmarking/{ => benchmarking}/info_collectors.h (100%) rename src/libs/antares/benchmarking/{ => benchmarking}/timer.h (100%) delete mode 100644 src/libs/antares/benchmarking/file_writer.cpp create mode 100644 src/libs/antares/checks/CMakeLists.txt rename src/libs/antares/checks/{ => checks}/checkLoadedInputData.h (100%) delete mode 100644 src/libs/antares/date.h create mode 100644 src/libs/antares/date/CMakeLists.txt rename src/libs/antares/date/{ => date}/date.h (99%) rename src/libs/antares/inifile/{ => inifile}/inifile.h (100%) rename src/libs/antares/inifile/{ => inifile}/inifile.hxx (100%) rename src/libs/antares/io/{ => io}/file.h (100%) rename src/libs/antares/io/{ => io}/statistics.h (100%) delete mode 100644 src/libs/antares/logs.h rename src/libs/antares/logs/{ => logs}/cleaner.h (100%) rename src/libs/antares/logs/{ => logs}/logs.h (99%) rename src/libs/antares/logs/{ => logs}/logs.hxx (100%) rename src/libs/antares/writer/{ => antares/writer}/i_writer.h (100%) create mode 100644 src/libs/antares/writer/antares/writer/result_format.h rename src/libs/antares/writer/{ => antares/writer}/writer_factory.h (86%) rename src/libs/antares/writer/{ => private}/ensure_queue_started.h (100%) rename src/libs/antares/writer/{ => private}/immediate_file_writer.h (100%) rename src/libs/antares/writer/{ => private}/zip_writer.h (98%) rename src/libs/antares/writer/{ => private}/zip_writer.hxx (100%) delete mode 100644 src/solver/config.h delete mode 100644 src/solver/memory/mem.h diff --git a/src/analyzer/atsp/load.cpp b/src/analyzer/atsp/load.cpp index f4eb43941a..ca2384da83 100644 --- a/src/analyzer/atsp/load.cpp +++ b/src/analyzer/atsp/load.cpp @@ -25,7 +25,7 @@ ** SPDX-License-Identifier: licenceRef-GPL3_WITH_RTE-Exceptions */ #include "atsp.h" -#include +#include #include "../../config.h" using namespace Yuni; diff --git a/src/analyzer/atsp/preflight.cpp b/src/analyzer/atsp/preflight.cpp index fa41b6e681..6fb4f95edc 100644 --- a/src/analyzer/atsp/preflight.cpp +++ b/src/analyzer/atsp/preflight.cpp @@ -26,7 +26,7 @@ */ #include "atsp.h" -#include +#include #include using namespace Yuni; diff --git a/src/analyzer/main.cpp b/src/analyzer/main.cpp index 74f82b928a..985cc73195 100644 --- a/src/analyzer/main.cpp +++ b/src/analyzer/main.cpp @@ -26,7 +26,7 @@ */ #include -#include +#include #include #include "../ui/common/winmain.hxx" #include @@ -34,7 +34,7 @@ #include #include "atsp/atsp.h" #include -#include +#include #include #include #include "../config.h" diff --git a/src/ext/yuni/src/yuni/CMakeLists.txt b/src/ext/yuni/src/yuni/CMakeLists.txt index 067acee6a8..758a906e5c 100644 --- a/src/ext/yuni/src/yuni/CMakeLists.txt +++ b/src/ext/yuni/src/yuni/CMakeLists.txt @@ -193,4 +193,3 @@ file("WRITE" "${CMAKE_CURRENT_BINARY_DIR}/../compiler-flags-release-cxx" "${CMAK file("WRITE" "${CMAKE_CURRENT_BINARY_DIR}/../compiler-flags-debug-cc" "${CMAKE_C_FLAGS_DEBUG}") file("WRITE" "${CMAKE_CURRENT_BINARY_DIR}/../compiler-flags-release-cc" "${CMAKE_C_FLAGS_RELEASE}") - diff --git a/src/libs/antares/CMakeLists.txt b/src/libs/antares/CMakeLists.txt index 0784358417..318e8a03e1 100644 --- a/src/libs/antares/CMakeLists.txt +++ b/src/libs/antares/CMakeLists.txt @@ -351,12 +351,6 @@ set(SRC_EXCEPTION ) source_group("exception" FILES ${SRC_EXCEPTION}) -set(SRC_CHECKS - checks/checkLoadedInputData.cpp - checks/checkLoadedInputData.h - ) -source_group("checks" FILES ${SRC_CHECKS}) - set(SRC_STDCXX stdcxx/demangle.cpp # TODO : should be in a target_include_directories : but need to remove all .h from all SRC @@ -498,23 +492,7 @@ set(SRC Enum.hpp Enum.hxx ) - - -add_library( libantares-core-calendar - # separated target to reduce multiple unit compilations introduced by swap mode - date.h - date/date.h - date/date.cpp -) - -target_link_libraries(libantares-core-calendar - PRIVATE yuni-static-core) - -target_include_directories(libantares-core-calendar - PRIVATE - ${CMAKE_SOURCE_DIR}/libs - ) - +add_subdirectory(date) add_library(libantares-core-exceptions ${SRC_EXCEPTION} ) @@ -527,26 +505,12 @@ target_include_directories(libantares-core-exceptions ${CMAKE_SOURCE_DIR}/libs ) -add_library(libantares-core-checks - ${SRC_CHECKS} -) - -target_include_directories(libantares-core-checks - PRIVATE - ${CMAKE_SOURCE_DIR}/libs/antares/study - ${CMAKE_SOURCE_DIR}/libs/antares/logs - ${CMAKE_SOURCE_DIR}/libs -) - -target_link_libraries(libantares-core-checks - PRIVATE - yuni-static-core) +add_subdirectory(checks) add_library(libantares-core antares.h ${SRC} ${SRC_MEMORY} - ${SRC_MATRIX} ${SRC_BENCHMARKING} ${SRC_AREAS} ${SRC_XCAST} @@ -574,18 +538,18 @@ add_library(libantares-core #TODO : needed for include yuni : why yuni must be include first ??? cheat : made it public so everybody will have this include (should be done in yuni) #TODO : needed for include target_include_directories(libantares-core - PUBLIC + PRIVATE ${CMAKE_SOURCE_DIR}/libs - ${CMAKE_SOURCE_DIR}/libs/antares/logs ) target_link_libraries(libantares-core PUBLIC yuni-static-core yuni-static-uuid - libantares-core-calendar + date + logs libantares-core-exceptions - libantares-core-checks + checks libantares-solver-variable-info result_writer inifile diff --git a/src/libs/antares/array/CMakeLists.txt b/src/libs/antares/array/CMakeLists.txt index 7915253ba5..afbab94c6f 100644 --- a/src/libs/antares/array/CMakeLists.txt +++ b/src/libs/antares/array/CMakeLists.txt @@ -1,9 +1,8 @@ set(SRC_MATRIX - array1d.h - array1d.cpp - matrix.h + array/matrix.h + array/array1d.h matrix.cpp - matrix.hxx + array/matrix.hxx ) source_group("array" FILES ${SRC_MATRIX}) @@ -12,10 +11,14 @@ add_library(array ${SRC_MATRIX}) target_link_libraries(array PRIVATE yuni-static-core - jit + PUBLIC + io #matrix.hxx + jit #jit.hxx require logs ) target_include_directories(array PRIVATE - ${CMAKE_SOURCE_DIR}/libs + ${CMAKE_SOURCE_DIR}/libs #memory usage + PUBLIC + ${CMAKE_CURRENT_SOURCE_DIR} ) \ No newline at end of file diff --git a/src/libs/antares/array/array1d.h b/src/libs/antares/array/array/array1d.h similarity index 100% rename from src/libs/antares/array/array1d.h rename to src/libs/antares/array/array/array1d.h diff --git a/src/libs/antares/array/matrix-to-buffer.h b/src/libs/antares/array/array/matrix-to-buffer.h similarity index 100% rename from src/libs/antares/array/matrix-to-buffer.h rename to src/libs/antares/array/array/matrix-to-buffer.h diff --git a/src/libs/antares/array/matrix-to-buffer.hxx b/src/libs/antares/array/array/matrix-to-buffer.hxx similarity index 100% rename from src/libs/antares/array/matrix-to-buffer.hxx rename to src/libs/antares/array/array/matrix-to-buffer.hxx diff --git a/src/libs/antares/array/matrix.h b/src/libs/antares/array/array/matrix.h similarity index 100% rename from src/libs/antares/array/matrix.h rename to src/libs/antares/array/array/matrix.h diff --git a/src/libs/antares/array/matrix.hxx b/src/libs/antares/array/array/matrix.hxx similarity index 99% rename from src/libs/antares/array/matrix.hxx rename to src/libs/antares/array/array/matrix.hxx index 69e81bf00d..3715fc7795 100644 --- a/src/libs/antares/array/matrix.hxx +++ b/src/libs/antares/array/array/matrix.hxx @@ -30,10 +30,10 @@ #include #include #include -#include +#include #include #include -#include "../io/statistics.h" +#include "io/statistics.h" #include "matrix-to-buffer.h" #define ANTARES_MATRIX_CSV_COMMA "\t;," diff --git a/src/libs/antares/benchmarking/CMakeLists.txt b/src/libs/antares/benchmarking/CMakeLists.txt index fb06a705d9..9cb7378f94 100644 --- a/src/libs/antares/benchmarking/CMakeLists.txt +++ b/src/libs/antares/benchmarking/CMakeLists.txt @@ -1,10 +1,9 @@ set(SRC_BENCHMARKING - benchmarking.h - timer.h timer.cpp - info_collectors.h info_collectors.cpp - file_content.h + benchmarking/file_content.h + benchmarking/timer.h + benchmarking/info_collectors.h file_content.cpp ) source_group("misc\\benchmarking" FILES ${SRC_BENCHMARKING}) @@ -14,8 +13,14 @@ add_library(benchmarking ) target_include_directories(benchmarking - PRIVATE - ${CMAKE_SOURCE_DIR}/libs + PUBLIC + ${CMAKE_SOURCE_DIR}/libs #study + ${CMAKE_SOURCE_DIR}/libs/antares/date #parameters -> date + ${CMAKE_SOURCE_DIR}/libs/antares/array #links + ${CMAKE_SOURCE_DIR}/libs/antares/logs #study -> binding constraint -> matrix -> jit + ${CMAKE_SOURCE_DIR}/libs/antares/io #study -> binding constraint -> matrix + PUBLIC + ${CMAKE_CURRENT_SOURCE_DIR} ) target_link_libraries(benchmarking diff --git a/src/libs/antares/benchmarking/benchmarking.h b/src/libs/antares/benchmarking/benchmarking.h deleted file mode 100644 index 946b3435b1..0000000000 --- a/src/libs/antares/benchmarking/benchmarking.h +++ /dev/null @@ -1,33 +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_BENCHMARKING_H__ -#define __ANTARES_LIBS_BENCHMARKING_H__ - -#include "timer.h" -#include "info_collectors.h" - -#endif // __ANTARES_LIBS_BENCHMARKING_H__ diff --git a/src/libs/antares/benchmarking/file_content.h b/src/libs/antares/benchmarking/benchmarking/file_content.h similarity index 100% rename from src/libs/antares/benchmarking/file_content.h rename to src/libs/antares/benchmarking/benchmarking/file_content.h diff --git a/src/libs/antares/benchmarking/info_collectors.h b/src/libs/antares/benchmarking/benchmarking/info_collectors.h similarity index 100% rename from src/libs/antares/benchmarking/info_collectors.h rename to src/libs/antares/benchmarking/benchmarking/info_collectors.h diff --git a/src/libs/antares/benchmarking/timer.h b/src/libs/antares/benchmarking/benchmarking/timer.h similarity index 100% rename from src/libs/antares/benchmarking/timer.h rename to src/libs/antares/benchmarking/benchmarking/timer.h diff --git a/src/libs/antares/benchmarking/file_content.cpp b/src/libs/antares/benchmarking/file_content.cpp index 67829e7ede..7cc07af859 100644 --- a/src/libs/antares/benchmarking/file_content.cpp +++ b/src/libs/antares/benchmarking/file_content.cpp @@ -1,6 +1,6 @@ -#include +#include -#include "file_content.h" +#include "benchmarking/file_content.h" using namespace std; diff --git a/src/libs/antares/benchmarking/file_writer.cpp b/src/libs/antares/benchmarking/file_writer.cpp deleted file mode 100644 index 816e8b8eb2..0000000000 --- a/src/libs/antares/benchmarking/file_writer.cpp +++ /dev/null @@ -1,30 +0,0 @@ -#include "file_writer.h" -#include "antares/inifile/inifile.h" - -using namespace std; - -namespace Benchmarking -{ -FileWriter::FileWriter(FileContent& fileContent) : fileContent_(fileContent) -{ -} - -iniFilewriter::iniFilewriter(Yuni::String& filePath, FileContent& fileContent) : - FileWriter(fileContent), filePath_(filePath) -{ -} - -void iniFilewriter::flush() -{ - Antares::IniFile ini; - - for (const auto& [section_name, properties] : fileContent_) - { - auto* section = ini.addSection(section_name); - for (pair line : properties) - section->add(line.first, line.second); - } - - ini.save(filePath_); -} -} // namespace Benchmarking diff --git a/src/libs/antares/benchmarking/info_collectors.cpp b/src/libs/antares/benchmarking/info_collectors.cpp index 6cf9e038f5..371311f094 100644 --- a/src/libs/antares/benchmarking/info_collectors.cpp +++ b/src/libs/antares/benchmarking/info_collectors.cpp @@ -1,5 +1,5 @@ #include -#include "info_collectors.h" +#include "benchmarking/info_collectors.h" #include #include #include diff --git a/src/libs/antares/benchmarking/timer.cpp b/src/libs/antares/benchmarking/timer.cpp index d3ac6d785b..41a45e8db1 100644 --- a/src/libs/antares/benchmarking/timer.cpp +++ b/src/libs/antares/benchmarking/timer.cpp @@ -25,7 +25,7 @@ ** SPDX-License-Identifier: licenceRef-GPL3_WITH_RTE-Exceptions */ -#include "timer.h" +#include "benchmarking/timer.h" #include using namespace Yuni; diff --git a/src/libs/antares/checks/CMakeLists.txt b/src/libs/antares/checks/CMakeLists.txt new file mode 100644 index 0000000000..a6f229b9a2 --- /dev/null +++ b/src/libs/antares/checks/CMakeLists.txt @@ -0,0 +1,27 @@ +set(SRC_CHECKS + checkLoadedInputData.cpp + checks/checkLoadedInputData.h +) +source_group("checks" FILES ${SRC_CHECKS}) + +add_library(checks + ${SRC_CHECKS} +) + +target_include_directories(checks + PRIVATE + ${CMAKE_SOURCE_DIR}/libs/ + ${CMAKE_SOURCE_DIR}/libs/antares/study + ${CMAKE_SOURCE_DIR}/libs/antares/inifile #adq-patch-params + ${CMAKE_SOURCE_DIR}/libs/antares/array #area + ${CMAKE_SOURCE_DIR}/libs/antares/io #area -> matrix -> io + ${CMAKE_SOURCE_DIR}/libs/antares/date #area -> parameter -> date + PUBLIC + ${CMAKE_CURRENT_SOURCE_DIR} +) + +target_link_libraries(checks + PRIVATE + logs + yuni-static-core +) \ No newline at end of file diff --git a/src/libs/antares/checks/checkLoadedInputData.cpp b/src/libs/antares/checks/checkLoadedInputData.cpp index bc318a8947..4e15218bbc 100644 --- a/src/libs/antares/checks/checkLoadedInputData.cpp +++ b/src/libs/antares/checks/checkLoadedInputData.cpp @@ -29,7 +29,7 @@ #include #include -#include "checkLoadedInputData.h" +#include "checks/checkLoadedInputData.h" #include "area.h" namespace Antares::Check diff --git a/src/libs/antares/checks/checkLoadedInputData.h b/src/libs/antares/checks/checks/checkLoadedInputData.h similarity index 100% rename from src/libs/antares/checks/checkLoadedInputData.h rename to src/libs/antares/checks/checks/checkLoadedInputData.h diff --git a/src/libs/antares/correlation/CMakeLists.txt b/src/libs/antares/correlation/CMakeLists.txt index d9453be793..2390e88de0 100644 --- a/src/libs/antares/correlation/CMakeLists.txt +++ b/src/libs/antares/correlation/CMakeLists.txt @@ -10,11 +10,13 @@ add_library(correlation ${SRC_CORRELATION}) target_link_libraries(correlation PRIVATE yuni-static-core - result_writer + inifile + array ) target_include_directories(correlation PRIVATE - ${CMAKE_SOURCE_DIR}/libs ${CMAKE_SOURCE_DIR}/libs/solver + ${CMAKE_SOURCE_DIR}/libs/ #area -> antares/study/parameters/adq-patch-params.h + ${CMAKE_SOURCE_DIR}/libs/antares/date #area -> antares/study/parameters/adq-patch-params.h -> date ) \ No newline at end of file diff --git a/src/libs/antares/correlation/correlation.cpp b/src/libs/antares/correlation/correlation.cpp index e55e7f85d2..9f07fa8e00 100644 --- a/src/libs/antares/correlation/correlation.cpp +++ b/src/libs/antares/correlation/correlation.cpp @@ -28,7 +28,7 @@ #include "correlation.h" #include "antares/study/study.h" #include "antares/study/area/area.h" -#include "antares/array/matrix.h" +#include "array/matrix.h" using namespace Yuni; using namespace Antares; diff --git a/src/libs/antares/correlation/correlation.h b/src/libs/antares/correlation/correlation.h index bf71d5a6b3..18f7e80281 100644 --- a/src/libs/antares/correlation/correlation.h +++ b/src/libs/antares/correlation/correlation.h @@ -28,8 +28,8 @@ #define __ANTARES_LIBS_ARRAY_CORRELATION_H__ #include -#include "antares/array/matrix.h" -#include +#include "array/matrix.h" +#include #include "../study/fwd.h" #include "../study/version.h" diff --git a/src/libs/antares/date.h b/src/libs/antares/date.h deleted file mode 100644 index c11018c053..0000000000 --- a/src/libs/antares/date.h +++ /dev/null @@ -1,32 +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_DATE_H__ -#define __ANTARES_LIBS_DATE_H__ - -#include "date/date.h" - -#endif // __ANTARES_CORE_DATE_H__ diff --git a/src/libs/antares/date/CMakeLists.txt b/src/libs/antares/date/CMakeLists.txt new file mode 100644 index 0000000000..a04f19cd10 --- /dev/null +++ b/src/libs/antares/date/CMakeLists.txt @@ -0,0 +1,24 @@ +set(PROJ date) +set(HEADERS + ${PROJ} +) +set(SRC_DATE + date.cpp +) +source_group("misc\\${PROJ}" FILES ${SRC_DATE}) + +add_library(${PROJ} ${SRC_DATE}) + +target_link_libraries(${PROJ} + PRIVATE + yuni-static-core + logs +) + +target_include_directories(${PROJ} + PRIVATE + ${CMAKE_SOURCE_DIR}/libs/antares/inifile #study/parameters -> inifile + ${CMAKE_SOURCE_DIR}/libs #study/parameters -> fwd + PUBLIC + ${CMAKE_CURRENT_SOURCE_DIR} +) diff --git a/src/libs/antares/date/date.cpp b/src/libs/antares/date/date.cpp index 618bf0612e..0b8c57cd3f 100644 --- a/src/libs/antares/date/date.cpp +++ b/src/libs/antares/date/date.cpp @@ -28,17 +28,16 @@ #include #include #include -#include "date.h" -#include +#include "date/date.h" +#include #include "../study/parameters.h" #include -#include "../logs.h" +#include "logs/logs.h" using namespace Yuni; -namespace Antares -{ -namespace Date + +namespace Antares::Date { static const uint StandardDaysPerMonths[12] = { 31, // january @@ -684,5 +683,5 @@ void Calendar::reset() } } -} // namespace Date -} // namespace Antares +} // namespace Antares::Date + diff --git a/src/libs/antares/date/date.h b/src/libs/antares/date/date/date.h similarity index 99% rename from src/libs/antares/date/date.h rename to src/libs/antares/date/date/date.h index bda0b18742..9144815e3c 100644 --- a/src/libs/antares/date/date.h +++ b/src/libs/antares/date/date/date.h @@ -30,8 +30,8 @@ #include #include #include -#include "../constants.h" -#include "../study/fwd.h" +#include "../../constants.h" +#include "../../study/fwd.h" namespace Antares { diff --git a/src/libs/antares/hostinfo.cpp b/src/libs/antares/hostinfo.cpp index c8c2f73133..c437a1720c 100644 --- a/src/libs/antares/hostinfo.cpp +++ b/src/libs/antares/hostinfo.cpp @@ -28,9 +28,7 @@ #include #include #include "hostinfo.h" -#include -#include -#include "logs.h" +#include "logs/logs.h" #include "sys/hostname.hxx" diff --git a/src/libs/antares/inifile/CMakeLists.txt b/src/libs/antares/inifile/CMakeLists.txt index 82bb1f12c3..786f7eb5a3 100644 --- a/src/libs/antares/inifile/CMakeLists.txt +++ b/src/libs/antares/inifile/CMakeLists.txt @@ -1,6 +1,6 @@ set(SRC_INI - inifile.h - inifile.hxx + inifile/inifile.h + inifile/inifile.hxx inifile.cpp ) @@ -13,9 +13,11 @@ add_library(inifile target_link_libraries(inifile PRIVATE io + logs yuni-static-core ) target_include_directories(inifile - PRIVATE + PUBLIC + ${CMAKE_CURRENT_SOURCE_DIR} ) \ No newline at end of file diff --git a/src/libs/antares/inifile/inifile.cpp b/src/libs/antares/inifile/inifile.cpp index 7fb1403023..a6a62a38c4 100644 --- a/src/libs/antares/inifile/inifile.cpp +++ b/src/libs/antares/inifile/inifile.cpp @@ -25,9 +25,10 @@ ** SPDX-License-Identifier: licenceRef-GPL3_WITH_RTE-Exceptions */ -#include "inifile.h" -#include "../io/statistics.h" -#include "../logs.h" +#include "inifile/inifile.h" + +#include "logs/logs.h" +#include "io/statistics.h" #include using namespace Yuni; diff --git a/src/libs/antares/inifile/inifile.h b/src/libs/antares/inifile/inifile/inifile.h similarity index 100% rename from src/libs/antares/inifile/inifile.h rename to src/libs/antares/inifile/inifile/inifile.h diff --git a/src/libs/antares/inifile/inifile.hxx b/src/libs/antares/inifile/inifile/inifile.hxx similarity index 100% rename from src/libs/antares/inifile/inifile.hxx rename to src/libs/antares/inifile/inifile/inifile.hxx diff --git a/src/libs/antares/io/CMakeLists.txt b/src/libs/antares/io/CMakeLists.txt index 6713a3969e..7d90b9e69a 100644 --- a/src/libs/antares/io/CMakeLists.txt +++ b/src/libs/antares/io/CMakeLists.txt @@ -1,7 +1,10 @@ +set(HEADERS + io/statistics.h + io/file.h +) set(SRC_IO - statistics.h + ${HEADERS} statistics.cpp - file.h file.cpp ) source_group("io" FILES ${SRC_IO}) @@ -13,8 +16,10 @@ add_library(io target_link_libraries(io PRIVATE yuni-static-core + logs ) target_include_directories(io - PRIVATE + PUBLIC + ${CMAKE_CURRENT_SOURCE_DIR} ) \ No newline at end of file diff --git a/src/libs/antares/io/file.cpp b/src/libs/antares/io/file.cpp index 757ffc2975..e213c73c7f 100644 --- a/src/libs/antares/io/file.cpp +++ b/src/libs/antares/io/file.cpp @@ -25,7 +25,7 @@ ** SPDX-License-Identifier: licenceRef-GPL3_WITH_RTE-Exceptions */ -#include "file.h" +#include "io/file.h" #include #include #include @@ -37,7 +37,7 @@ #include #endif #include -#include "../logs.h" +#include "logs/logs.h" using namespace Yuni; using namespace Antares; diff --git a/src/libs/antares/io/file.h b/src/libs/antares/io/io/file.h similarity index 100% rename from src/libs/antares/io/file.h rename to src/libs/antares/io/io/file.h diff --git a/src/libs/antares/io/statistics.h b/src/libs/antares/io/io/statistics.h similarity index 100% rename from src/libs/antares/io/statistics.h rename to src/libs/antares/io/io/statistics.h diff --git a/src/libs/antares/io/statistics.cpp b/src/libs/antares/io/statistics.cpp index 2743315c68..772c12d400 100644 --- a/src/libs/antares/io/statistics.cpp +++ b/src/libs/antares/io/statistics.cpp @@ -25,9 +25,9 @@ ** SPDX-License-Identifier: licenceRef-GPL3_WITH_RTE-Exceptions */ -#include "statistics.h" +#include "io/statistics.h" #include -#include "../logs.h" +#include "logs/logs.h" using namespace Yuni; diff --git a/src/libs/antares/jit/CMakeLists.txt b/src/libs/antares/jit/CMakeLists.txt index 13f130a17c..5f973fca84 100644 --- a/src/libs/antares/jit/CMakeLists.txt +++ b/src/libs/antares/jit/CMakeLists.txt @@ -10,13 +10,14 @@ add_library(jit ${SRC_JIT} ) +target_include_directories(jit + PUBLIC + ${CMAKE_CURRENT_SOURCE_DIR} +) + target_link_libraries(jit PRIVATE - logs yuni-static-core - ) - -target_include_directories(jit - PRIVATE - ${CMAKE_SOURCE_DIR}/libs - ) + PUBLIC + logs #templated function use logs + ) \ No newline at end of file diff --git a/src/libs/antares/jit/jit.hxx b/src/libs/antares/jit/jit.hxx index 34170276ad..e24d989e77 100644 --- a/src/libs/antares/jit/jit.hxx +++ b/src/libs/antares/jit/jit.hxx @@ -27,7 +27,7 @@ #ifndef __ANTARES_LIBS_JUST_IN_TIME_INFORMATIONS_HXX__ #define __ANTARES_LIBS_JUST_IN_TIME_INFORMATIONS_HXX__ -#include +#include using namespace Antares; diff --git a/src/libs/antares/logs.h b/src/libs/antares/logs.h deleted file mode 100644 index 979dc33ca6..0000000000 --- a/src/libs/antares/logs.h +++ /dev/null @@ -1,32 +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_LOGS_H__ -#define __ANTARES_LIBS_LOGS_H__ - -#include "logs/logs.h" - -#endif /* __ANTARES_LIBS_LOGS_H__ */ \ No newline at end of file diff --git a/src/libs/antares/logs/CMakeLists.txt b/src/libs/antares/logs/CMakeLists.txt index 4a1d8c3821..fd9340cd7b 100644 --- a/src/libs/antares/logs/CMakeLists.txt +++ b/src/libs/antares/logs/CMakeLists.txt @@ -1,15 +1,21 @@ +set(PROJ logs) +set(HEADERS + ${PROJ} +) set(SRC_LOGS - logs.h - logs.hxx logs.cpp - cleaner.h cleaner.cpp ) source_group("misc\\logs" FILES ${SRC_LOGS}) -add_library(logs ${SRC_LOGS}) +add_library(${PROJ} ${SRC_LOGS}) -target_link_libraries(logs +target_link_libraries(${PROJ} PRIVATE yuni-static-core ) + +target_include_directories(${PROJ} + PUBLIC + ${CMAKE_CURRENT_SOURCE_DIR} +) diff --git a/src/libs/antares/logs/cleaner.cpp b/src/libs/antares/logs/cleaner.cpp index ee86d6525f..a750650a63 100644 --- a/src/libs/antares/logs/cleaner.cpp +++ b/src/libs/antares/logs/cleaner.cpp @@ -25,7 +25,7 @@ ** SPDX-License-Identifier: licenceRef-GPL3_WITH_RTE-Exceptions */ -#include "cleaner.h" +#include "logs/cleaner.h" #include "../constants.h" #include #include diff --git a/src/libs/antares/logs/logs.cpp b/src/libs/antares/logs/logs.cpp index 4f3ee6401e..6eb07933e2 100644 --- a/src/libs/antares/logs/logs.cpp +++ b/src/libs/antares/logs/logs.cpp @@ -25,7 +25,7 @@ ** SPDX-License-Identifier: licenceRef-GPL3_WITH_RTE-Exceptions */ -#include "logs.h" +#include "logs/logs.h" namespace Antares { diff --git a/src/libs/antares/logs/cleaner.h b/src/libs/antares/logs/logs/cleaner.h similarity index 100% rename from src/libs/antares/logs/cleaner.h rename to src/libs/antares/logs/logs/cleaner.h diff --git a/src/libs/antares/logs/logs.h b/src/libs/antares/logs/logs/logs.h similarity index 99% rename from src/libs/antares/logs/logs.h rename to src/libs/antares/logs/logs/logs.h index 7cfc9411f5..187579224b 100644 --- a/src/libs/antares/logs/logs.h +++ b/src/libs/antares/logs/logs/logs.h @@ -28,7 +28,7 @@ #define __ANTARES_LIBS_LOGS_LOGS_H__ #include -#include "../constants.h" +#include "../../constants.h" /*! ** \defgroup logs Logs diff --git a/src/libs/antares/logs/logs.hxx b/src/libs/antares/logs/logs/logs.hxx similarity index 100% rename from src/libs/antares/logs/logs.hxx rename to src/libs/antares/logs/logs/logs.hxx diff --git a/src/libs/antares/memory/memory.cpp b/src/libs/antares/memory/memory.cpp index fe42a3e16d..4598a81dc8 100644 --- a/src/libs/antares/memory/memory.cpp +++ b/src/libs/antares/memory/memory.cpp @@ -31,7 +31,7 @@ #include #include #include -#include "../logs.h" +#include "logs/logs.h" #ifndef YUNI_OS_WINDOWS #include #include diff --git a/src/libs/antares/memory/new_check.hxx b/src/libs/antares/memory/new_check.hxx index e982d8e86d..4f8cc9d15d 100644 --- a/src/libs/antares/memory/new_check.hxx +++ b/src/libs/antares/memory/new_check.hxx @@ -1,4 +1,4 @@ -#include +#include #include namespace Antares diff --git a/src/libs/antares/paths/list.cpp b/src/libs/antares/paths/list.cpp index 08738f9393..3cb618a165 100644 --- a/src/libs/antares/paths/list.cpp +++ b/src/libs/antares/paths/list.cpp @@ -33,7 +33,7 @@ #ifdef YUNI_OS_WINDOWS #include #endif -#include "../logs.h" +#include "logs/logs.h" using namespace Yuni; using namespace Antares; diff --git a/src/libs/antares/resources/resources.cpp b/src/libs/antares/resources/resources.cpp index 60bcbd6d08..6cc3ab1124 100644 --- a/src/libs/antares/resources/resources.cpp +++ b/src/libs/antares/resources/resources.cpp @@ -28,7 +28,7 @@ #include #include #include "resources.h" -#include "../logs.h" +#include "logs/logs.h" #include "../config.h" using namespace Yuni; diff --git a/src/libs/antares/study/area/area.h b/src/libs/antares/study/area/area.h index 86fe02d7dd..0a6bbae9d9 100644 --- a/src/libs/antares/study/area/area.h +++ b/src/libs/antares/study/area/area.h @@ -32,7 +32,7 @@ #include #include #include -#include "../../array/matrix.h" +#include "array/matrix.h" #include "../parts/parts.h" #include #include diff --git a/src/libs/antares/study/area/links.cpp b/src/libs/antares/study/area/links.cpp index af71ab87aa..8376ac7139 100644 --- a/src/libs/antares/study/area/links.cpp +++ b/src/libs/antares/study/area/links.cpp @@ -30,7 +30,7 @@ #include "../study.h" #include "links.h" #include "area.h" -#include "../../logs.h" +#include "logs/logs.h" #include "../memory-usage.h" #include "../filter.h" #include "constants.h" diff --git a/src/libs/antares/study/area/links.h b/src/libs/antares/study/area/links.h index 1a82a57c4c..b444129bf0 100644 --- a/src/libs/antares/study/area/links.h +++ b/src/libs/antares/study/area/links.h @@ -31,7 +31,7 @@ #include #include #include "../fwd.h" -#include "../../array/matrix.h" +#include "array/matrix.h" #include #include diff --git a/src/libs/antares/study/area/list.cpp b/src/libs/antares/study/area/list.cpp index f3c897016d..994e3dbdea 100644 --- a/src/libs/antares/study/area/list.cpp +++ b/src/libs/antares/study/area/list.cpp @@ -31,9 +31,9 @@ #include "../study.h" #include #include "area.h" -#include "../../array/array1d.h" -#include "../../inifile/inifile.h" -#include "../../logs.h" +#include "array/array1d.h" +#include "inifile/inifile.h" +#include "logs/logs.h" #include "../memory-usage.h" #include "../../config.h" #include "../filter.h" diff --git a/src/libs/antares/study/area/scratchpad.h b/src/libs/antares/study/area/scratchpad.h index 230481c37e..3851c2fab6 100644 --- a/src/libs/antares/study/area/scratchpad.h +++ b/src/libs/antares/study/area/scratchpad.h @@ -31,7 +31,7 @@ #include #include #include "../fwd.h" -#include "../../array/matrix.h" +#include "array/matrix.h" #include #include diff --git a/src/libs/antares/study/area/store-timeseries-numbers.cpp b/src/libs/antares/study/area/store-timeseries-numbers.cpp index beeeed11ac..bc866ca697 100644 --- a/src/libs/antares/study/area/store-timeseries-numbers.cpp +++ b/src/libs/antares/study/area/store-timeseries-numbers.cpp @@ -27,7 +27,7 @@ #include #include "../study.h" -#include "../../logs.h" +#include "logs/logs.h" #include "store-timeseries-numbers.h" diff --git a/src/libs/antares/study/area/ui.cpp b/src/libs/antares/study/area/ui.cpp index f0df8f08b9..4e1702fd6d 100644 --- a/src/libs/antares/study/area/ui.cpp +++ b/src/libs/antares/study/area/ui.cpp @@ -26,9 +26,9 @@ */ #include "ui.h" -#include "../../logs.h" +#include "logs/logs.h" #include -#include +#include #include using namespace Yuni; diff --git a/src/libs/antares/study/binding_constraint/BindingConstraint.h b/src/libs/antares/study/binding_constraint/BindingConstraint.h index 8b6df01e89..87307da60f 100644 --- a/src/libs/antares/study/binding_constraint/BindingConstraint.h +++ b/src/libs/antares/study/binding_constraint/BindingConstraint.h @@ -33,8 +33,8 @@ #include "../../constants.h" #include "../area/links.h" #include "../parts/thermal/cluster.h" -#include "../../array/matrix.h" -#include "../../inifile/inifile.h" +#include "array/matrix.h" +#include "inifile/inifile.h" #include "EnvForLoading.h" #include "antares/study/filter.h" #include "BindingConstraintStructures.h" diff --git a/src/libs/antares/study/binding_constraint/BindingConstraintSaver.h b/src/libs/antares/study/binding_constraint/BindingConstraintSaver.h index e5d83960aa..7b7a915142 100644 --- a/src/libs/antares/study/binding_constraint/BindingConstraintSaver.h +++ b/src/libs/antares/study/binding_constraint/BindingConstraintSaver.h @@ -4,7 +4,7 @@ #pragma once -#include "antares/inifile/inifile.h" +#include #include "antares/study/fwd.h" namespace Antares::Data { diff --git a/src/libs/antares/study/binding_constraint/EnvForLoading.h b/src/libs/antares/study/binding_constraint/EnvForLoading.h index 41933ec097..65e108255d 100644 --- a/src/libs/antares/study/binding_constraint/EnvForLoading.h +++ b/src/libs/antares/study/binding_constraint/EnvForLoading.h @@ -5,8 +5,8 @@ #pragma once #include "yuni/core/fwd.h" -#include "antares/inifile/inifile.h" -#include "antares/array/matrix.h" +#include +#include "array/matrix.h" namespace Antares::Data { diff --git a/src/libs/antares/study/cleaner/cleaner-v20.cpp b/src/libs/antares/study/cleaner/cleaner-v20.cpp index a0f4dea784..9989cfc14c 100644 --- a/src/libs/antares/study/cleaner/cleaner-v20.cpp +++ b/src/libs/antares/study/cleaner/cleaner-v20.cpp @@ -28,7 +28,7 @@ #include #include "../study.h" #include "../cleaner.h" -#include +#include using namespace Yuni; using namespace Antares; diff --git a/src/libs/antares/study/cleaner/cleaner.cpp b/src/libs/antares/study/cleaner/cleaner.cpp index 8880d69e0b..5885874332 100644 --- a/src/libs/antares/study/cleaner/cleaner.cpp +++ b/src/libs/antares/study/cleaner/cleaner.cpp @@ -29,7 +29,7 @@ #include #include "../cleaner.h" #include "versions.h" -#include "../../logs.h" +#include "logs/logs.h" using namespace Yuni; diff --git a/src/libs/antares/study/estimate.memory-footprint.cpp b/src/libs/antares/study/estimate.memory-footprint.cpp index c6b1dec3d2..e8b43934a2 100644 --- a/src/libs/antares/study/estimate.memory-footprint.cpp +++ b/src/libs/antares/study/estimate.memory-footprint.cpp @@ -31,7 +31,7 @@ #include "runtime.h" #include "../../../solver/simulation/simulation.h" #include "../../../solver/variable/economy/all.h" -#include "../logs.h" +#include "logs/logs.h" #include "../../../solver/simulation/economy.h" #include "../../../solver/simulation/solver.h" diff --git a/src/libs/antares/study/fwd.h b/src/libs/antares/study/fwd.h index 6d8733e67e..c7ab5d5479 100644 --- a/src/libs/antares/study/fwd.h +++ b/src/libs/antares/study/fwd.h @@ -520,15 +520,6 @@ const char* RenewableGenerationModellingToCString(RenewableGenerationModelling r */ RenewableGenerationModelling StringToRenewableGenerationModelling(const AnyString& text); -// Format of results -enum ResultFormat -{ - // Store outputs as files inside directories - legacyFilesDirectories = 0, - // Store outputs inside a single zip archive - zipArchive -}; - // ------------------------ // MPS export status // ------------------------ diff --git a/src/libs/antares/study/header.cpp b/src/libs/antares/study/header.cpp index 8e2ae4c976..4752c5acad 100644 --- a/src/libs/antares/study/header.cpp +++ b/src/libs/antares/study/header.cpp @@ -26,18 +26,16 @@ */ #include "header.h" -#include -#include -#include -#include "../inifile/inifile.h" -#include "../logs.h" +#include +#include +#include +#include "logs/logs.h" #include "version.h" using namespace Yuni; -namespace Antares -{ -namespace Data + +namespace Antares::Data { // TODO this method should be removed - use Yuni::String instead static inline int ConvertCStrToTimeT(const char* s, time_t* var) @@ -208,5 +206,5 @@ uint StudyHeader::ReadVersionFromFile(const AnyString& filename) return (uint)versionUnknown; } -} // namespace Data -} // namespace Antares +} // namespace Antares::Data + diff --git a/src/libs/antares/study/header.h b/src/libs/antares/study/header.h index c4d72ced8e..1805ba24b2 100644 --- a/src/libs/antares/study/header.h +++ b/src/libs/antares/study/header.h @@ -29,8 +29,8 @@ #include #include -#include -#include +#include +#include //! Default author #define STUDYHEADER_DEFAULT_AUTHOR "Unknown" diff --git a/src/libs/antares/study/importlogs.cpp b/src/libs/antares/study/importlogs.cpp index 63562b34c3..b621bfdf0c 100644 --- a/src/libs/antares/study/importlogs.cpp +++ b/src/libs/antares/study/importlogs.cpp @@ -28,7 +28,7 @@ #include #include #include "study.h" -#include "../logs.h" +#include "logs/logs.h" #include using namespace Yuni; diff --git a/src/libs/antares/study/layerdata.cpp b/src/libs/antares/study/layerdata.cpp index bc83e39cf1..5dc76149a9 100644 --- a/src/libs/antares/study/layerdata.cpp +++ b/src/libs/antares/study/layerdata.cpp @@ -29,9 +29,9 @@ #include #include -#include "../inifile/inifile.h" +#include #include "layerdata.h" -#include "../logs.h" +#include "logs/logs.h" using namespace Yuni; diff --git a/src/libs/antares/study/load-options.cpp b/src/libs/antares/study/load-options.cpp index c34ddd55c4..69dc523e75 100644 --- a/src/libs/antares/study/load-options.cpp +++ b/src/libs/antares/study/load-options.cpp @@ -26,8 +26,7 @@ */ #include "load-options.h" -#include "../logs.h" -#include "../config.h" +#include "logs/logs.h" #include diff --git a/src/libs/antares/study/load.cpp b/src/libs/antares/study/load.cpp index e9205c69d2..7d34c8070e 100644 --- a/src/libs/antares/study/load.cpp +++ b/src/libs/antares/study/load.cpp @@ -27,7 +27,7 @@ #include #include "study.h" #include "version.h" -#include +#include #include "scenario-builder/sets.h" #include "ui-runtimeinfos.h" diff --git a/src/libs/antares/study/memory-usage.cpp b/src/libs/antares/study/memory-usage.cpp index 01f71132fb..b0ad8fdfa4 100644 --- a/src/libs/antares/study/memory-usage.cpp +++ b/src/libs/antares/study/memory-usage.cpp @@ -27,7 +27,7 @@ #include "study.h" #include "memory-usage.h" -#include "../date.h" +#include "date/date.h" using namespace Yuni; diff --git a/src/libs/antares/study/memory-usage.h b/src/libs/antares/study/memory-usage.h index 2b2bd43a4e..682b9bb425 100644 --- a/src/libs/antares/study/memory-usage.h +++ b/src/libs/antares/study/memory-usage.h @@ -29,11 +29,9 @@ #include #include "fwd.h" -#include "../array/matrix.h" +#include "array/matrix.h" -namespace Antares -{ -namespace Data +namespace Antares::Data { /*! ** \brief Estimate the amount of memory (RAM, disk) required for a simulation @@ -125,7 +123,7 @@ class StudyMemoryUsage final }; // class StudyMemoryUsage -} // namespace Data -} // namespace Antares +} // namespace Antares::Data + #endif // __ANTARES_LIBS_STUDY_MEMORYUSAGE_H__ diff --git a/src/libs/antares/study/parameters.cpp b/src/libs/antares/study/parameters.cpp index 729a0d6dd4..f4d9886f68 100644 --- a/src/libs/antares/study/parameters.cpp +++ b/src/libs/antares/study/parameters.cpp @@ -35,8 +35,8 @@ #include "../constants.h" #include "parameters.h" -#include -#include "../logs.h" +#include +#include "logs/logs.h" #include "load-options.h" #include #include diff --git a/src/libs/antares/study/parameters.h b/src/libs/antares/study/parameters.h index d19a8256cd..9a6aa83362 100644 --- a/src/libs/antares/study/parameters.h +++ b/src/libs/antares/study/parameters.h @@ -32,10 +32,11 @@ #include #include #include "../constants.h" -#include -#include -#include "../date.h" -#include +#include +#include +#include "antares/writer/antares/writer/result_format.h" //Conflit between ${CMake_Source_dir}/libs and result_writer findong "antares" +#include "date/date.h" +#include #include "fwd.h" #include "variable-print-info.h" #include "parameters/adq-patch-params.h" diff --git a/src/libs/antares/study/parameters/adq-patch-params.cpp b/src/libs/antares/study/parameters/adq-patch-params.cpp index 584ff0f095..3be5796f2a 100644 --- a/src/libs/antares/study/parameters/adq-patch-params.cpp +++ b/src/libs/antares/study/parameters/adq-patch-params.cpp @@ -1,5 +1,5 @@ #include "adq-patch-params.h" -#include "antares/logs.h" +#include "logs/logs.h" #include diff --git a/src/libs/antares/study/parameters/adq-patch-params.h b/src/libs/antares/study/parameters/adq-patch-params.h index 796e905837..def0aac8f5 100644 --- a/src/libs/antares/study/parameters/adq-patch-params.h +++ b/src/libs/antares/study/parameters/adq-patch-params.h @@ -5,7 +5,7 @@ #include #include -#include "antares/inifile/inifile.h" +#include using namespace Yuni; diff --git a/src/libs/antares/study/parts/common/cluster.h b/src/libs/antares/study/parts/common/cluster.h index 83d76b00b1..3af3438cdb 100644 --- a/src/libs/antares/study/parts/common/cluster.h +++ b/src/libs/antares/study/parts/common/cluster.h @@ -4,7 +4,7 @@ #include #include #include "series.h" -#include "../../../array/matrix.h" +#include "array/matrix.h" #include "../../fwd.h" #include diff --git a/src/libs/antares/study/parts/common/cluster_list.h b/src/libs/antares/study/parts/common/cluster_list.h index 81ea630373..18aae76662 100644 --- a/src/libs/antares/study/parts/common/cluster_list.h +++ b/src/libs/antares/study/parts/common/cluster_list.h @@ -2,7 +2,7 @@ #define __ANTARES_LIBS_STUDY_PARTS_COMMON_CLUSTER_LIST_H__ #include "../../memory-usage.h" -#include "../../../logs.h" +#include "logs/logs.h" #include "../../fwd.h" #include diff --git a/src/libs/antares/study/parts/common/series.h b/src/libs/antares/study/parts/common/series.h index b0c0dabb76..4e2a7b50f7 100644 --- a/src/libs/antares/study/parts/common/series.h +++ b/src/libs/antares/study/parts/common/series.h @@ -27,7 +27,7 @@ #ifndef __ANTARES_LIBS_STUDY_PARTS_COMMON_TIMESERIES_H__ #define __ANTARES_LIBS_STUDY_PARTS_COMMON_TIMESERIES_H__ -#include "../../../array/matrix.h" +#include "array/matrix.h" #include "../../fwd.h" namespace Antares diff --git a/src/libs/antares/study/parts/hydro/container.cpp b/src/libs/antares/study/parts/hydro/container.cpp index 2ac2b7f860..4e9248e284 100644 --- a/src/libs/antares/study/parts/hydro/container.cpp +++ b/src/libs/antares/study/parts/hydro/container.cpp @@ -27,8 +27,8 @@ #include "../../study.h" #include "container.h" -#include -#include "../../../array/array1d.h" +#include +#include "array/array1d.h" using namespace Antares; using namespace Yuni; diff --git a/src/libs/antares/study/parts/hydro/prepro.cpp b/src/libs/antares/study/parts/hydro/prepro.cpp index c89c9079a4..d2d5b36c43 100644 --- a/src/libs/antares/study/parts/hydro/prepro.cpp +++ b/src/libs/antares/study/parts/hydro/prepro.cpp @@ -31,9 +31,9 @@ #include "../../study.h" #include "../../memory-usage.h" #include "prepro.h" -#include -#include "../../../array/array1d.h" -#include "../../../logs.h" +#include +#include "array/array1d.h" +#include "logs/logs.h" using namespace Antares; using namespace Yuni; diff --git a/src/libs/antares/study/parts/hydro/prepro.h b/src/libs/antares/study/parts/hydro/prepro.h index fcc17808f4..8a62b1afe5 100644 --- a/src/libs/antares/study/parts/hydro/prepro.h +++ b/src/libs/antares/study/parts/hydro/prepro.h @@ -27,7 +27,7 @@ #ifndef __ANTARES_LIBS_STUDY_PARTS_HYDRO_PREPRO_H__ #define __ANTARES_LIBS_STUDY_PARTS_HYDRO_PREPRO_H__ -#include "../../../array/matrix.h" +#include "array/matrix.h" #include "../../fwd.h" namespace Antares diff --git a/src/libs/antares/study/parts/hydro/series.cpp b/src/libs/antares/study/parts/hydro/series.cpp index 7aa18c08ca..0d4f8bde1b 100644 --- a/src/libs/antares/study/parts/hydro/series.cpp +++ b/src/libs/antares/study/parts/hydro/series.cpp @@ -29,8 +29,8 @@ #include #include #include "series.h" -#include -#include "../../../logs.h" +#include +#include "logs/logs.h" #include "../../study.h" #include "../../memory-usage.h" diff --git a/src/libs/antares/study/parts/hydro/series.h b/src/libs/antares/study/parts/hydro/series.h index ab74fb7c9e..de0729162e 100644 --- a/src/libs/antares/study/parts/hydro/series.h +++ b/src/libs/antares/study/parts/hydro/series.h @@ -27,7 +27,7 @@ #ifndef __ANTARES_LIBS_STUDY_PARTS_HYDRO_TIMESERIES_H__ #define __ANTARES_LIBS_STUDY_PARTS_HYDRO_TIMESERIES_H__ -#include "../../../array/matrix.h" +#include "array/matrix.h" #include "../../fwd.h" namespace Antares diff --git a/src/libs/antares/study/parts/load/series.h b/src/libs/antares/study/parts/load/series.h index 70e125d9cf..e11534b821 100644 --- a/src/libs/antares/study/parts/load/series.h +++ b/src/libs/antares/study/parts/load/series.h @@ -27,7 +27,7 @@ #ifndef __ANTARES_LIBS_STUDY_PARTS_LOAD_TIMESERIES_H__ #define __ANTARES_LIBS_STUDY_PARTS_LOAD_TIMESERIES_H__ -#include "../../../array/matrix.h" +#include "array/matrix.h" #include "../../fwd.h" namespace Antares diff --git a/src/libs/antares/study/parts/renewable/cluster.cpp b/src/libs/antares/study/parts/renewable/cluster.cpp index f85b555b1a..46d8b7a1c3 100644 --- a/src/libs/antares/study/parts/renewable/cluster.cpp +++ b/src/libs/antares/study/parts/renewable/cluster.cpp @@ -33,8 +33,8 @@ #include "../../study.h" #include "../../memory-usage.h" #include "cluster.h" -#include -#include "../../../logs.h" +#include +#include "logs/logs.h" #include "../../../utils.h" using namespace Yuni; diff --git a/src/libs/antares/study/parts/renewable/cluster.h b/src/libs/antares/study/parts/renewable/cluster.h index 6f50141cfb..9237ee49b8 100644 --- a/src/libs/antares/study/parts/renewable/cluster.h +++ b/src/libs/antares/study/parts/renewable/cluster.h @@ -29,7 +29,7 @@ #include #include -#include "../../../array/matrix.h" +#include "array/matrix.h" #include "defines.h" #include "../common/cluster.h" #include "../../fwd.h" diff --git a/src/libs/antares/study/parts/renewable/cluster_list.cpp b/src/libs/antares/study/parts/renewable/cluster_list.cpp index 9094f4d47d..d9b8c2cef0 100644 --- a/src/libs/antares/study/parts/renewable/cluster_list.cpp +++ b/src/libs/antares/study/parts/renewable/cluster_list.cpp @@ -1,5 +1,5 @@ #include "cluster_list.h" -#include +#include #include "../../study.h" #include "../../area.h" diff --git a/src/libs/antares/study/parts/renewable/container.cpp b/src/libs/antares/study/parts/renewable/container.cpp index 3b2540a58d..6bfca56fc1 100644 --- a/src/libs/antares/study/parts/renewable/container.cpp +++ b/src/libs/antares/study/parts/renewable/container.cpp @@ -29,7 +29,7 @@ #include "../../study.h" #include "../../memory-usage.h" #include "container.h" -#include "../../../logs.h" +#include "logs/logs.h" using namespace Yuni; using namespace Antares; diff --git a/src/libs/antares/study/parts/short-term-storage/cluster.cpp b/src/libs/antares/study/parts/short-term-storage/cluster.cpp index 1c491de0d6..6e57785eef 100644 --- a/src/libs/antares/study/parts/short-term-storage/cluster.cpp +++ b/src/libs/antares/study/parts/short-term-storage/cluster.cpp @@ -25,7 +25,7 @@ ** SPDX-License-Identifier: licenceRef-GPL3_WITH_RTE-Exceptions */ #include -#include +#include #include #include diff --git a/src/libs/antares/study/parts/short-term-storage/cluster.h b/src/libs/antares/study/parts/short-term-storage/cluster.h index 4e909962a0..acf84b3b3d 100644 --- a/src/libs/antares/study/parts/short-term-storage/cluster.h +++ b/src/libs/antares/study/parts/short-term-storage/cluster.h @@ -28,7 +28,7 @@ #pragma once #include #include -#include +#include #include "properties.h" #include "series.h" diff --git a/src/libs/antares/study/parts/short-term-storage/container.cpp b/src/libs/antares/study/parts/short-term-storage/container.cpp index 1555ccac12..9256f9d8d9 100644 --- a/src/libs/antares/study/parts/short-term-storage/container.cpp +++ b/src/libs/antares/study/parts/short-term-storage/container.cpp @@ -25,7 +25,7 @@ ** SPDX-License-Identifier: licenceRef-GPL3_WITH_RTE-Exceptions */ -#include +#include #include #include #include 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 0b997a2e77..2b863fd695 100644 --- a/src/libs/antares/study/parts/short-term-storage/properties.cpp +++ b/src/libs/antares/study/parts/short-term-storage/properties.cpp @@ -25,7 +25,7 @@ ** SPDX-License-Identifier: licenceRef-GPL3_WITH_RTE-Exceptions */ -#include +#include #include #include "properties.h" 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..a4da6bfcbd 100644 --- a/src/libs/antares/study/parts/short-term-storage/properties.h +++ b/src/libs/antares/study/parts/short-term-storage/properties.h @@ -30,7 +30,7 @@ #include #include -#include +#include namespace Antares::Data::ShortTermStorage { diff --git a/src/libs/antares/study/parts/short-term-storage/series.cpp b/src/libs/antares/study/parts/short-term-storage/series.cpp index 754a58b2f8..db674d6fc1 100644 --- a/src/libs/antares/study/parts/short-term-storage/series.cpp +++ b/src/libs/antares/study/parts/short-term-storage/series.cpp @@ -25,7 +25,7 @@ ** SPDX-License-Identifier: licenceRef-GPL3_WITH_RTE-Exceptions */ #include -#include +#include #include #include diff --git a/src/libs/antares/study/parts/solar/series.h b/src/libs/antares/study/parts/solar/series.h index 0e5f500c64..edc986159d 100644 --- a/src/libs/antares/study/parts/solar/series.h +++ b/src/libs/antares/study/parts/solar/series.h @@ -27,7 +27,7 @@ #ifndef __ANTARES_LIBS_STUDY_PARTS_SOLAR_TIMESERIES_H__ #define __ANTARES_LIBS_STUDY_PARTS_SOLAR_TIMESERIES_H__ -#include "../../../array/matrix.h" +#include "array/matrix.h" #include "../../fwd.h" namespace Antares diff --git a/src/libs/antares/study/parts/thermal/cluster.cpp b/src/libs/antares/study/parts/thermal/cluster.cpp index 6e427cf04f..fa4cc90562 100644 --- a/src/libs/antares/study/parts/thermal/cluster.cpp +++ b/src/libs/antares/study/parts/thermal/cluster.cpp @@ -35,8 +35,8 @@ #include "../../study.h" #include "../../memory-usage.h" #include "cluster.h" -#include -#include "../../../logs.h" +#include +#include "logs/logs.h" #include "../../../utils.h" diff --git a/src/libs/antares/study/parts/thermal/cluster.h b/src/libs/antares/study/parts/thermal/cluster.h index 8ee8941b2f..1d6f542621 100644 --- a/src/libs/antares/study/parts/thermal/cluster.h +++ b/src/libs/antares/study/parts/thermal/cluster.h @@ -29,7 +29,7 @@ #include #include -#include "../../../array/matrix.h" +#include "array/matrix.h" #include "defines.h" #include "prepro.h" #include "ecoInput.h" diff --git a/src/libs/antares/study/parts/thermal/container.cpp b/src/libs/antares/study/parts/thermal/container.cpp index 42760dd8fb..e7df8cc900 100644 --- a/src/libs/antares/study/parts/thermal/container.cpp +++ b/src/libs/antares/study/parts/thermal/container.cpp @@ -29,7 +29,7 @@ #include "../../study.h" #include "../../memory-usage.h" #include "container.h" -#include "../../../logs.h" +#include "logs/logs.h" #include #include diff --git a/src/libs/antares/study/parts/thermal/ecoInput.cpp b/src/libs/antares/study/parts/thermal/ecoInput.cpp index 64fcb07982..fdd189e1ed 100644 --- a/src/libs/antares/study/parts/thermal/ecoInput.cpp +++ b/src/libs/antares/study/parts/thermal/ecoInput.cpp @@ -32,8 +32,8 @@ #include "../../study.h" #include "../../memory-usage.h" #include "ecoInput.h" -#include "../../../logs.h" -#include "../../../array/array1d.h" +#include "logs/logs.h" +#include "array/array1d.h" using namespace Yuni; diff --git a/src/libs/antares/study/parts/thermal/ecoInput.h b/src/libs/antares/study/parts/thermal/ecoInput.h index bcf17e3f6a..3d252a5f01 100644 --- a/src/libs/antares/study/parts/thermal/ecoInput.h +++ b/src/libs/antares/study/parts/thermal/ecoInput.h @@ -28,7 +28,7 @@ #define __ANTARES_LIBS_STUDY_PARTS_THERMAL_ECOINPUT_H__ #include "cluster.h" -#include "../../../array/matrix.h" +#include "array/matrix.h" #include "defines.h" #include "../../fwd.h" #include diff --git a/src/libs/antares/study/parts/thermal/prepro.cpp b/src/libs/antares/study/parts/thermal/prepro.cpp index 9eea09641e..9505b13663 100644 --- a/src/libs/antares/study/parts/thermal/prepro.cpp +++ b/src/libs/antares/study/parts/thermal/prepro.cpp @@ -32,8 +32,8 @@ #include "../../study.h" #include "../../memory-usage.h" #include "prepro.h" -#include "../../../logs.h" -#include "../../../array/array1d.h" +#include "logs/logs.h" +#include "array/array1d.h" using namespace Yuni; diff --git a/src/libs/antares/study/parts/thermal/prepro.h b/src/libs/antares/study/parts/thermal/prepro.h index ce1ef899c6..40dfc07cb9 100644 --- a/src/libs/antares/study/parts/thermal/prepro.h +++ b/src/libs/antares/study/parts/thermal/prepro.h @@ -28,7 +28,7 @@ #define __ANTARES_LIBS_STUDY_PARTS_THERMAL_PREPRO_H__ #include "cluster.h" -#include "../../../array/matrix.h" +#include "array/matrix.h" #include "defines.h" #include "../../fwd.h" #include diff --git a/src/libs/antares/study/parts/wind/prepro.cpp b/src/libs/antares/study/parts/wind/prepro.cpp index d6239b5870..2ea465f2d0 100644 --- a/src/libs/antares/study/parts/wind/prepro.cpp +++ b/src/libs/antares/study/parts/wind/prepro.cpp @@ -29,7 +29,7 @@ #include "prepro.h" #include #include "../../study.h" -#include "../../../logs.h" +#include "logs/logs.h" using namespace Yuni; using namespace Antares; diff --git a/src/libs/antares/study/parts/wind/series.h b/src/libs/antares/study/parts/wind/series.h index 3ee850cf31..9193eb4089 100644 --- a/src/libs/antares/study/parts/wind/series.h +++ b/src/libs/antares/study/parts/wind/series.h @@ -27,7 +27,7 @@ #ifndef __ANTARES_LIBS_STUDY_PARTS_WIND_TIMESERIES_H__ #define __ANTARES_LIBS_STUDY_PARTS_WIND_TIMESERIES_H__ -#include "../../../array/matrix.h" +#include "array/matrix.h" #include "../../fwd.h" namespace Antares diff --git a/src/libs/antares/study/progression/progression.cpp b/src/libs/antares/study/progression/progression.cpp index b1fbdd89ab..3884ad36d7 100644 --- a/src/libs/antares/study/progression/progression.cpp +++ b/src/libs/antares/study/progression/progression.cpp @@ -27,7 +27,7 @@ #include "progression.h" #include "../study.h" -#include "../../logs.h" +#include "logs/logs.h" using namespace Yuni; diff --git a/src/libs/antares/study/save.cpp b/src/libs/antares/study/save.cpp index 77e5bffcd6..eec3efc00c 100644 --- a/src/libs/antares/study/save.cpp +++ b/src/libs/antares/study/save.cpp @@ -26,7 +26,7 @@ */ #include "study.h" -#include +#include #include "scenario-builder/sets.h" #include #include diff --git a/src/libs/antares/study/scenario-builder/rules.cpp b/src/libs/antares/study/scenario-builder/rules.cpp index b2f5e5bfef..4b363b1b1c 100644 --- a/src/libs/antares/study/scenario-builder/rules.cpp +++ b/src/libs/antares/study/scenario-builder/rules.cpp @@ -28,7 +28,7 @@ #include #include "rules.h" #include "../study.h" -#include "../../logs.h" +#include "logs/logs.h" #include "scBuilderUtils.h" #include "TSnumberData.h" diff --git a/src/libs/antares/study/scenario-builder/sets.cpp b/src/libs/antares/study/scenario-builder/sets.cpp index 1037b443e9..0e7173077b 100644 --- a/src/libs/antares/study/scenario-builder/sets.cpp +++ b/src/libs/antares/study/scenario-builder/sets.cpp @@ -27,7 +27,7 @@ #include "sets.h" #include "../study.h" -#include "../../logs.h" +#include "logs/logs.h" using namespace Yuni; diff --git a/src/libs/antares/study/sets.h b/src/libs/antares/study/sets.h index 02a5dabc3d..e4425de3fd 100644 --- a/src/libs/antares/study/sets.h +++ b/src/libs/antares/study/sets.h @@ -33,8 +33,8 @@ #include #include #include -#include -#include "../logs.h" +#include +#include "logs/logs.h" namespace Antares { diff --git a/src/libs/antares/study/simulation.cpp b/src/libs/antares/study/simulation.cpp index 8faafee458..ec71281d5c 100644 --- a/src/libs/antares/study/simulation.cpp +++ b/src/libs/antares/study/simulation.cpp @@ -32,7 +32,7 @@ #include #include #include "simulation.h" -#include "../logs.h" +#include "logs/logs.h" using namespace Yuni; diff --git a/src/libs/antares/study/study.h b/src/libs/antares/study/study.h index 47fac19eb4..6c846dc830 100644 --- a/src/libs/antares/study/study.h +++ b/src/libs/antares/study/study.h @@ -47,7 +47,7 @@ #include "sets.h" #include "progression/progression.h" #include "load-options.h" -#include "../date.h" +#include "date/date.h" #include "layerdata.h" #include "antares/correlation/correlation.h" #include "area/store-timeseries-numbers.h" diff --git a/src/libs/antares/study/xcast/xcast.cpp b/src/libs/antares/study/xcast/xcast.cpp index b66e81c1a3..93f0830a48 100644 --- a/src/libs/antares/study/xcast/xcast.cpp +++ b/src/libs/antares/study/xcast/xcast.cpp @@ -26,8 +26,8 @@ */ #include "xcast.h" -#include "../../logs.h" -#include +#include "logs/logs.h" +#include #include "../study.h" #include "../memory-usage.h" #include diff --git a/src/libs/antares/study/xcast/xcast.h b/src/libs/antares/study/xcast/xcast.h index e4d81ce78e..7f76da7b52 100644 --- a/src/libs/antares/study/xcast/xcast.h +++ b/src/libs/antares/study/xcast/xcast.h @@ -28,7 +28,7 @@ #define __ANTARES_LIBS_STUDY_XCAST_XCAST_H__ #include -#include "../../array/matrix.h" +#include "array/matrix.h" #include #include diff --git a/src/libs/antares/sys/policy.cpp b/src/libs/antares/sys/policy.cpp index f052679184..2441256ff7 100644 --- a/src/libs/antares/sys/policy.cpp +++ b/src/libs/antares/sys/policy.cpp @@ -29,8 +29,8 @@ #include #include #include "appdata.h" -#include "../logs.h" -#include "../inifile/inifile.h" +#include "logs/logs.h" +#include #include "hostname.hxx" #include "../config.h" #include diff --git a/src/libs/antares/writer/CMakeLists.txt b/src/libs/antares/writer/CMakeLists.txt index 1e52d12b96..6895ef5590 100644 --- a/src/libs/antares/writer/CMakeLists.txt +++ b/src/libs/antares/writer/CMakeLists.txt @@ -1,27 +1,30 @@ project(result-writer) add_library(result_writer # Interface class (public API) - i_writer.h + antares/writer/i_writer.h + antares/writer/result_format.h # Helper class - ensure_queue_started.h + private/ensure_queue_started.h ensure_queue_started.cpp # Generic factory (public API) - writer_factory.h + antares/writer/writer_factory.h writer_factory.cpp # Immediate file writer (private) - immediate_file_writer.h + private/immediate_file_writer.h immediate_file_writer.cpp # Add entry to zip, using a job queue (private) zip_writer.cpp - zip_writer.h) + private/zip_writer.h + antares/writer/result_format.h +) target_include_directories(result_writer - PRIVATE - ${CMAKE_SOURCE_DIR}/libs + PUBLIC + ${CMAKE_CURRENT_SOURCE_DIR} ) target_link_libraries(result_writer diff --git a/src/libs/antares/writer/i_writer.h b/src/libs/antares/writer/antares/writer/i_writer.h similarity index 100% rename from src/libs/antares/writer/i_writer.h rename to src/libs/antares/writer/antares/writer/i_writer.h diff --git a/src/libs/antares/writer/antares/writer/result_format.h b/src/libs/antares/writer/antares/writer/result_format.h new file mode 100644 index 0000000000..b189fbadda --- /dev/null +++ b/src/libs/antares/writer/antares/writer/result_format.h @@ -0,0 +1,17 @@ +// +// Created by marechaljas on 10/08/23. +// + +#pragma once + +namespace Antares::Data +{ + // Format of results + enum ResultFormat + { + // Store outputs as files inside directories + legacyFilesDirectories = 0, + // Store outputs inside a single zip archive + zipArchive + }; +} \ No newline at end of file diff --git a/src/libs/antares/writer/writer_factory.h b/src/libs/antares/writer/antares/writer/writer_factory.h similarity index 86% rename from src/libs/antares/writer/writer_factory.h rename to src/libs/antares/writer/antares/writer/writer_factory.h index a5f3ad94ae..f4f5f32eaf 100644 --- a/src/libs/antares/writer/writer_factory.h +++ b/src/libs/antares/writer/antares/writer/writer_factory.h @@ -4,9 +4,8 @@ #include #include "i_writer.h" -#include "immediate_file_writer.h" -#include "zip_writer.h" - +#include "result_format.h" +#include namespace Antares::Solver { diff --git a/src/libs/antares/writer/ensure_queue_started.cpp b/src/libs/antares/writer/ensure_queue_started.cpp index f4fcb3fa74..18618a5f96 100644 --- a/src/libs/antares/writer/ensure_queue_started.cpp +++ b/src/libs/antares/writer/ensure_queue_started.cpp @@ -1,4 +1,4 @@ -#include "ensure_queue_started.h" +#include "private/ensure_queue_started.h" namespace Antares { diff --git a/src/libs/antares/writer/immediate_file_writer.cpp b/src/libs/antares/writer/immediate_file_writer.cpp index ca16edec20..f276ee4f05 100644 --- a/src/libs/antares/writer/immediate_file_writer.cpp +++ b/src/libs/antares/writer/immediate_file_writer.cpp @@ -1,9 +1,9 @@ #include #include -#include "immediate_file_writer.h" -#include "antares/io/file.h" -#include +#include "private/immediate_file_writer.h" +#include +#include // Create directory hierarchy (incl. root) diff --git a/src/libs/antares/writer/ensure_queue_started.h b/src/libs/antares/writer/private/ensure_queue_started.h similarity index 100% rename from src/libs/antares/writer/ensure_queue_started.h rename to src/libs/antares/writer/private/ensure_queue_started.h diff --git a/src/libs/antares/writer/immediate_file_writer.h b/src/libs/antares/writer/private/immediate_file_writer.h similarity index 100% rename from src/libs/antares/writer/immediate_file_writer.h rename to src/libs/antares/writer/private/immediate_file_writer.h diff --git a/src/libs/antares/writer/zip_writer.h b/src/libs/antares/writer/private/zip_writer.h similarity index 98% rename from src/libs/antares/writer/zip_writer.h rename to src/libs/antares/writer/private/zip_writer.h index 314abd5c6b..840e08b162 100644 --- a/src/libs/antares/writer/zip_writer.h +++ b/src/libs/antares/writer/private/zip_writer.h @@ -8,7 +8,7 @@ #include #include "i_writer.h" -#include "antares/benchmarking/info_collectors.h" +#include "benchmarking/info_collectors.h" namespace Antares::Solver diff --git a/src/libs/antares/writer/zip_writer.hxx b/src/libs/antares/writer/private/zip_writer.hxx similarity index 100% rename from src/libs/antares/writer/zip_writer.hxx rename to src/libs/antares/writer/private/zip_writer.hxx diff --git a/src/libs/antares/writer/writer_factory.cpp b/src/libs/antares/writer/writer_factory.cpp index 811c905c37..c2d2f3aaee 100644 --- a/src/libs/antares/writer/writer_factory.cpp +++ b/src/libs/antares/writer/writer_factory.cpp @@ -1,4 +1,4 @@ -#include "writer_factory.h" +#include "antares/writer/writer_factory.h" namespace Antares { diff --git a/src/libs/antares/writer/zip_writer.cpp b/src/libs/antares/writer/zip_writer.cpp index 07bb19c7e4..f642c39c6b 100644 --- a/src/libs/antares/writer/zip_writer.cpp +++ b/src/libs/antares/writer/zip_writer.cpp @@ -1,8 +1,8 @@ #include #include // Yuni::IO::File::LoadFromFile -#include "zip_writer.h" -#include +#include "private/zip_writer.h" +#include extern "C" { diff --git a/src/libs/fswalker/CMakeLists.txt b/src/libs/fswalker/CMakeLists.txt index f6ca0b421d..dc2e70cd74 100644 --- a/src/libs/fswalker/CMakeLists.txt +++ b/src/libs/fswalker/CMakeLists.txt @@ -13,8 +13,6 @@ add_library(libantares-fswalker job.cpp ) -#TODO : needed for include yuni : why yuni must be include first ??? -#TODO : needed for include target_include_directories(libantares-fswalker PRIVATE ${CMAKE_SOURCE_DIR}/libs @@ -22,4 +20,5 @@ target_include_directories(libantares-fswalker target_link_libraries(libantares-fswalker PRIVATE yuni-static-core + logs ) diff --git a/src/libs/fswalker/fswalker.cpp b/src/libs/fswalker/fswalker.cpp index 86d04a2986..c33cbc61d9 100644 --- a/src/libs/fswalker/fswalker.cpp +++ b/src/libs/fswalker/fswalker.cpp @@ -38,7 +38,7 @@ #include #include "registry.inc.hxx" #include "filejob.inc.hxx" -#include +#include using namespace Yuni; using namespace Antares; diff --git a/src/solver/CMakeLists.txt b/src/solver/CMakeLists.txt index 2f88dd20e2..15c3104445 100644 --- a/src/solver/CMakeLists.txt +++ b/src/solver/CMakeLists.txt @@ -46,8 +46,6 @@ OMESSAGE(" :: application solver") set(exec_name "antares-${ANTARES_PRG_VERSION}-solver") add_executable(antares-solver - memory/mem.h - misc/options.h misc/options.cpp misc/process-priority.cpp @@ -96,6 +94,8 @@ set(ANTARES_SOLVER_LIBS ${ANTARES_SOLVER_LIBS} target_link_libraries(antares-solver PRIVATE ${ANTARES_SOLVER_LIBS} + benchmarking + result_writer ) target_include_directories(antares-solver diff --git a/src/solver/aleatoire/alea_tirage_au_sort_chroniques.cpp b/src/solver/aleatoire/alea_tirage_au_sort_chroniques.cpp index 505a67501e..ae030ce14a 100644 --- a/src/solver/aleatoire/alea_tirage_au_sort_chroniques.cpp +++ b/src/solver/aleatoire/alea_tirage_au_sort_chroniques.cpp @@ -35,7 +35,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/solver/application.cpp b/src/solver/application.cpp index 9dfcb340a5..5a0d99d430 100644 --- a/src/solver/application.cpp +++ b/src/solver/application.cpp @@ -4,11 +4,11 @@ #include #include #include -#include +#include #include #include -#include +#include #include #include "signal-handling/public.h" diff --git a/src/solver/application.h b/src/solver/application.h index ea84b76535..8497c6ec15 100644 --- a/src/solver/application.h +++ b/src/solver/application.h @@ -3,10 +3,11 @@ #include "misc/options.h" #include #include -#include +#include +#include #include "simulation/simulation.h" -#include +#include #include diff --git a/src/solver/config.h b/src/solver/config.h deleted file mode 100644 index f06888dc5e..0000000000 --- a/src/solver/config.h +++ /dev/null @@ -1,36 +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 __SOLVER_CONFIG_H__ -#define __SOLVER_CONFIG_H__ - -/* Logs */ -#include - -/* Memory manager */ -#include "memory/mem.h" - -#endif /* __SOLVER_CONFIG_H__ */ diff --git a/src/solver/constraints-builder/load.cpp b/src/solver/constraints-builder/load.cpp index aa61fffa6c..d791682c68 100644 --- a/src/solver/constraints-builder/load.cpp +++ b/src/solver/constraints-builder/load.cpp @@ -25,7 +25,7 @@ ** SPDX-License-Identifier: licenceRef-GPL3_WITH_RTE-Exceptions */ #include "cbuilder.h" -#include +#include #include "../../config.h" #include "../../libs/antares/study/area/constants.h" #include diff --git a/src/solver/infeasible-problem-analysis/report.cpp b/src/solver/infeasible-problem-analysis/report.cpp index 53a00e426a..431fe970fa 100644 --- a/src/solver/infeasible-problem-analysis/report.cpp +++ b/src/solver/infeasible-problem-analysis/report.cpp @@ -1,6 +1,6 @@ #include "report.h" #include "constraint.h" -#include +#include #include static bool compareSlackSolutions(const Antares::Optimization::Constraint& a, diff --git a/src/solver/main.cpp b/src/solver/main.cpp index 79bcef7d0f..b4fd01f207 100644 --- a/src/solver/main.cpp +++ b/src/solver/main.cpp @@ -26,7 +26,7 @@ */ #include -#include +#include #include "application.h" #include "../ui/common/winmain.hxx" //TODO: remove that reverse dependency to UI diff --git a/src/solver/main/adequacy.cpp b/src/solver/main/adequacy.cpp index 6f07d6e3b0..e8471a3962 100644 --- a/src/solver/main/adequacy.cpp +++ b/src/solver/main/adequacy.cpp @@ -28,8 +28,8 @@ #include "../application.h" #include "../simulation/solver.h" #include "../simulation/adequacy.h" -#include -#include +#include +#include namespace Antares { diff --git a/src/solver/main/economy.cpp b/src/solver/main/economy.cpp index f192e157d0..708f70c81e 100644 --- a/src/solver/main/economy.cpp +++ b/src/solver/main/economy.cpp @@ -28,8 +28,8 @@ #include "../application.h" #include "../simulation/solver.h" #include "../simulation/economy.h" -#include -#include +#include +#include namespace Antares { diff --git a/src/solver/memory/mem.h b/src/solver/memory/mem.h deleted file mode 100644 index a1b8faf4d9..0000000000 --- a/src/solver/memory/mem.h +++ /dev/null @@ -1,32 +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 __SOLVER_MEMORY_H__ -#define __SOLVER_MEMORY_H__ - -#include - -#endif /* __SOLVER_MEMORY_H__ */ diff --git a/src/solver/misc/options.cpp b/src/solver/misc/options.cpp index 40e76ec477..571c0f962a 100644 --- a/src/solver/misc/options.cpp +++ b/src/solver/misc/options.cpp @@ -30,7 +30,7 @@ #include #include -#include +#include #include #include #include diff --git a/src/solver/misc/process-priority.cpp b/src/solver/misc/process-priority.cpp index 3ad7b756f8..f99d5b3256 100644 --- a/src/solver/misc/process-priority.cpp +++ b/src/solver/misc/process-priority.cpp @@ -29,7 +29,7 @@ #ifdef YUNI_OS_WINDOWS #include #include -#include +#include using namespace Yuni; using namespace Antares; diff --git a/src/solver/misc/system-memory.cpp b/src/solver/misc/system-memory.cpp index 99012aef51..815014198f 100644 --- a/src/solver/misc/system-memory.cpp +++ b/src/solver/misc/system-memory.cpp @@ -26,7 +26,7 @@ */ #include "system-memory.h" -#include +#include #include using namespace Yuni; diff --git a/src/solver/misc/write-command-line.cpp b/src/solver/misc/write-command-line.cpp index 7cd11dcd45..6170ac16a3 100644 --- a/src/solver/misc/write-command-line.cpp +++ b/src/solver/misc/write-command-line.cpp @@ -1,4 +1,4 @@ -#include +#include #include namespace Antares::Solver diff --git a/src/solver/optimisation/adequacy_patch_csr/construct_problem_constraints_RHS.cpp b/src/solver/optimisation/adequacy_patch_csr/construct_problem_constraints_RHS.cpp index 64ec416bd2..8ed25dc02e 100644 --- a/src/solver/optimisation/adequacy_patch_csr/construct_problem_constraints_RHS.cpp +++ b/src/solver/optimisation/adequacy_patch_csr/construct_problem_constraints_RHS.cpp @@ -26,7 +26,7 @@ */ #include "hourly_csr_problem.h" -#include +#include #include #include "adequacy_patch_runtime_data.h" diff --git a/src/solver/optimisation/adequacy_patch_csr/hourly_csr_problem.h b/src/solver/optimisation/adequacy_patch_csr/hourly_csr_problem.h index a09bb68de0..c5357b2ab5 100644 --- a/src/solver/optimisation/adequacy_patch_csr/hourly_csr_problem.h +++ b/src/solver/optimisation/adequacy_patch_csr/hourly_csr_problem.h @@ -30,7 +30,7 @@ // TODO[FOM] Remove this, it is only required for PROBLEME_HEBDO // but this problem has nothing to do with PROBLEME_HEBDO #include -#include +#include #include #include "../opt_structure_probleme_a_resoudre.h" diff --git a/src/solver/optimisation/adequacy_patch_csr/solve_problem.cpp b/src/solver/optimisation/adequacy_patch_csr/solve_problem.cpp index 966975d15b..afafd27863 100644 --- a/src/solver/optimisation/adequacy_patch_csr/solve_problem.cpp +++ b/src/solver/optimisation/adequacy_patch_csr/solve_problem.cpp @@ -46,7 +46,7 @@ extern "C" #include "pi_fonctions.h" } -#include +#include using namespace Antares; diff --git a/src/solver/optimisation/opt_alloc_probleme_a_optimiser.cpp b/src/solver/optimisation/opt_alloc_probleme_a_optimiser.cpp index 1b110e9beb..b2fb770268 100644 --- a/src/solver/optimisation/opt_alloc_probleme_a_optimiser.cpp +++ b/src/solver/optimisation/opt_alloc_probleme_a_optimiser.cpp @@ -34,7 +34,7 @@ #include "opt_fonctions.h" #include -#include +#include using namespace Antares; diff --git a/src/solver/optimisation/opt_appel_solveur_lineaire.cpp b/src/solver/optimisation/opt_appel_solveur_lineaire.cpp index 1e912c4bce..6d23c9a50e 100644 --- a/src/solver/optimisation/opt_appel_solveur_lineaire.cpp +++ b/src/solver/optimisation/opt_appel_solveur_lineaire.cpp @@ -40,7 +40,7 @@ extern "C" #include "srs_api.h" } -#include +#include #include #include "../utils/mps_utils.h" diff --git a/src/solver/optimisation/opt_appel_solveur_quadratique.cpp b/src/solver/optimisation/opt_appel_solveur_quadratique.cpp index 2d444c056b..5aca3121d3 100644 --- a/src/solver/optimisation/opt_appel_solveur_quadratique.cpp +++ b/src/solver/optimisation/opt_appel_solveur_quadratique.cpp @@ -45,7 +45,7 @@ extern "C" #include "pi_fonctions.h" } -#include +#include using namespace Antares; diff --git a/src/solver/optimisation/opt_decompte_variables_et_contraintes.cpp b/src/solver/optimisation/opt_decompte_variables_et_contraintes.cpp index 47b43684f6..3adcd31c5b 100644 --- a/src/solver/optimisation/opt_decompte_variables_et_contraintes.cpp +++ b/src/solver/optimisation/opt_decompte_variables_et_contraintes.cpp @@ -32,7 +32,7 @@ #include "opt_fonctions.h" -#include +#include #include using namespace Antares; diff --git a/src/solver/optimisation/opt_optimisation_hebdo.cpp b/src/solver/optimisation/opt_optimisation_hebdo.cpp index 60b2a1d84c..578c09e39a 100644 --- a/src/solver/optimisation/opt_optimisation_hebdo.cpp +++ b/src/solver/optimisation/opt_optimisation_hebdo.cpp @@ -32,7 +32,7 @@ #include "opt_fonctions.h" #include -#include +#include #include extern "C" diff --git a/src/solver/optimisation/opt_optimisation_lineaire.cpp b/src/solver/optimisation/opt_optimisation_lineaire.cpp index 57c59a7881..5856e37a0e 100644 --- a/src/solver/optimisation/opt_optimisation_lineaire.cpp +++ b/src/solver/optimisation/opt_optimisation_lineaire.cpp @@ -28,7 +28,7 @@ #include "sim_structure_probleme_economique.h" #include "opt_fonctions.h" -#include +#include #include "../utils/filename.h" using namespace Antares; diff --git a/src/solver/signal-handling/common.cpp b/src/solver/signal-handling/common.cpp index 76083bb0ca..f49c10e223 100644 --- a/src/solver/signal-handling/common.cpp +++ b/src/solver/signal-handling/common.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include "common.h" diff --git a/src/solver/simulation/common-eco-adq.cpp b/src/solver/simulation/common-eco-adq.cpp index dc31e5f02e..4a9f2bfbdc 100644 --- a/src/solver/simulation/common-eco-adq.cpp +++ b/src/solver/simulation/common-eco-adq.cpp @@ -33,7 +33,7 @@ #include #include "common-eco-adq.h" -#include +#include #include #include #include "simulation.h" diff --git a/src/solver/simulation/common-hydro-remix.cpp b/src/solver/simulation/common-hydro-remix.cpp index e2d4ebb574..dfd4f247e5 100644 --- a/src/solver/simulation/common-hydro-remix.cpp +++ b/src/solver/simulation/common-hydro-remix.cpp @@ -31,7 +31,7 @@ #include #include #include "common-eco-adq.h" -#include +#include #include #include "simulation.h" #include diff --git a/src/solver/simulation/solver.h b/src/solver/simulation/solver.h index 98e1bb43bd..620b2a021e 100644 --- a/src/solver/simulation/solver.h +++ b/src/solver/simulation/solver.h @@ -29,9 +29,9 @@ #include #include -#include +#include #include // PowerFluctuations -#include +#include #include #include diff --git a/src/solver/simulation/solver.hxx b/src/solver/simulation/solver.hxx index 0b2b084e22..7c0018037c 100644 --- a/src/solver/simulation/solver.hxx +++ b/src/solver/simulation/solver.hxx @@ -28,9 +28,9 @@ #define __SOLVER_SIMULATION_SOLVER_HXX__ #include "../variable/constants.h" -#include -#include -#include +#include +#include +#include #include #include "../variable/print.h" #include diff --git a/src/solver/ts-generator/CMakeLists.txt b/src/solver/ts-generator/CMakeLists.txt index 99d1a148ed..69569333c0 100644 --- a/src/solver/ts-generator/CMakeLists.txt +++ b/src/solver/ts-generator/CMakeLists.txt @@ -41,4 +41,9 @@ add_library(libantares-solver-ts-generator ${SRC_GENERATORS} ${SRC_XCAST}) -target_link_libraries(libantares-solver-ts-generator PRIVATE libantares-core result_writer) +target_link_libraries(libantares-solver-ts-generator + PRIVATE + libantares-core + result_writer + array +) diff --git a/src/solver/ts-generator/generator.hxx b/src/solver/ts-generator/generator.hxx index 1a3ef1bb9a..558b649e72 100644 --- a/src/solver/ts-generator/generator.hxx +++ b/src/solver/ts-generator/generator.hxx @@ -28,7 +28,7 @@ #define __ANTARES_SOLVER_timeSeries_GENERATOR_HXX__ #include "../aleatoire/alea_fonctions.h" -#include +#include namespace Antares { diff --git a/src/solver/ts-generator/hydro.cpp b/src/solver/ts-generator/hydro.cpp index 944e5e9432..28c0115359 100644 --- a/src/solver/ts-generator/hydro.cpp +++ b/src/solver/ts-generator/hydro.cpp @@ -28,7 +28,7 @@ #include #include "../simulation/sim_extern_variables_globales.h" #include "../aleatoire/alea_fonctions.h" -#include +#include #include #include #include "../misc/cholesky.h" diff --git a/src/solver/ts-generator/thermal.cpp b/src/solver/ts-generator/thermal.cpp index c476718528..e885b9c302 100644 --- a/src/solver/ts-generator/thermal.cpp +++ b/src/solver/ts-generator/thermal.cpp @@ -32,7 +32,7 @@ #include #include -#include +#include #include #include "../simulation/simulation.h" diff --git a/src/solver/ts-generator/xcast/core.cpp b/src/solver/ts-generator/xcast/core.cpp index dee294f30c..fae59ffbb9 100644 --- a/src/solver/ts-generator/xcast/core.cpp +++ b/src/solver/ts-generator/xcast/core.cpp @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include "xcast.h" #include "constants.h" #include "../../misc/cholesky.h" @@ -225,7 +225,7 @@ bool XCast::generateValuesForTheCurrentDay() Triangle_courant, CORR, Carre_reference, pCorrMonth->entry, processCount, pQCHOLTotal); if (shrink == -1.f) { - // sortie impossible car on a vérifié que C est d.p + // sortie impossible car on a v�rifi� que C est d.p logs.error() << "TS " << pTSName << " generator: invalid correlation matrix"; return false; } @@ -243,7 +243,7 @@ bool XCast::generateValuesForTheCurrentDay() x = PETIT / T[s]; if (x < STEP) { - // plafonne le terme lineaire de retour à la moyenne a PETIT *(ecart à la + // plafonne le terme lineaire de retour � la moyenne a PETIT *(ecart � la // moyenne) STEP = x; } @@ -253,7 +253,7 @@ bool XCast::generateValuesForTheCurrentDay() { x = STDE[s] / x; x *= x; - // plafonne l'amplitude de la diffusion à 2*sqrt(PETIT)*STDE (pour brown=1) + // plafonne l'amplitude de la diffusion � 2*sqrt(PETIT)*STDE (pour brown=1) x *= 4.f * PETIT; if (x < STEP) STEP = x; @@ -419,7 +419,7 @@ bool XCast::generateValuesForTheCurrentDay() { if (shrink == -1.f) { - // sortie impossible car on a vérifié que C est d.p + // sortie impossible car on a v�rifi� que C est d.p logs.error() << "TS " << pTSName << " generator: invalid correlation matrix"; return false; @@ -527,7 +527,7 @@ bool XCast::generateValuesForTheCurrentDay() // Reexpression des dernieres positions des processus en relatif par rapport // a l'intervalle mini, esperance,maxi cette reexpression permet d'assurer // la continuite avec l'appel suivant s'il correspond au debut d'un nouveau - // mois de caractéristiques différentes. + // mois de caract�ristiques diff�rentes. // // si espe <= posi < maxi on retient posi = (posi - espe) / (maxi - espe) // si mini < posi <= espe on retient posi = -(posi - espe) / (mini - espe) diff --git a/src/solver/ts-generator/xcast/gamma-euler.cpp b/src/solver/ts-generator/xcast/gamma-euler.cpp index 9b2ae552aa..ee91ef74ad 100644 --- a/src/solver/ts-generator/xcast/gamma-euler.cpp +++ b/src/solver/ts-generator/xcast/gamma-euler.cpp @@ -29,7 +29,7 @@ #include #include "xcast.h" #include -#include +#include #include using namespace Yuni; diff --git a/src/solver/ts-generator/xcast/gamma-inc.cpp b/src/solver/ts-generator/xcast/gamma-inc.cpp index 9768d68dc1..42cb4faa9b 100644 --- a/src/solver/ts-generator/xcast/gamma-inc.cpp +++ b/src/solver/ts-generator/xcast/gamma-inc.cpp @@ -29,7 +29,7 @@ #include #include "xcast.h" #include -#include +#include using namespace Yuni; diff --git a/src/solver/ts-generator/xcast/math.hxx b/src/solver/ts-generator/xcast/math.hxx index a12fbeefb6..18e2746136 100644 --- a/src/solver/ts-generator/xcast/math.hxx +++ b/src/solver/ts-generator/xcast/math.hxx @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include "xcast.h" #include "constants.h" diff --git a/src/solver/ts-generator/xcast/studydata.hxx b/src/solver/ts-generator/xcast/studydata.hxx index 2b179b164b..5b69e43f10 100644 --- a/src/solver/ts-generator/xcast/studydata.hxx +++ b/src/solver/ts-generator/xcast/studydata.hxx @@ -29,7 +29,7 @@ #include #include -#include +#include namespace Antares { diff --git a/src/solver/ts-generator/xcast/xcast.cpp b/src/solver/ts-generator/xcast/xcast.cpp index 9910113c7a..cfb45c80f4 100644 --- a/src/solver/ts-generator/xcast/xcast.cpp +++ b/src/solver/ts-generator/xcast/xcast.cpp @@ -31,7 +31,7 @@ #include #include "xcast.h" #include "predicate.hxx" -#include +#include #include #include #include diff --git a/src/solver/utils/ortools_utils.cpp b/src/solver/utils/ortools_utils.cpp index 0a6e99bd7a..2c61eb9869 100644 --- a/src/solver/utils/ortools_utils.cpp +++ b/src/solver/utils/ortools_utils.cpp @@ -1,6 +1,6 @@ #include "ortools_utils.h" -#include +#include #include #include #include diff --git a/src/solver/variable/CMakeLists.txt b/src/solver/variable/CMakeLists.txt index 095983c7b0..aa02301a5c 100644 --- a/src/solver/variable/CMakeLists.txt +++ b/src/solver/variable/CMakeLists.txt @@ -156,7 +156,11 @@ add_library(libantares-solver-variable ${SRC_VARIABLE_ADEQUACY} ${SRC_VARIABLE_ECONOMY} ) -target_include_directories(libantares-solver-variable PUBLIC .) +target_include_directories(libantares-solver-variable + PRIVATE + ${CMAKE_SOURCE_DIR}/libs + PUBLIC + .) target_link_libraries(libantares-solver-variable PRIVATE libantares-core) @@ -172,5 +176,9 @@ add_library(libantares-solver-variable-info surveyresults/data.h surveyresults/surveyresults.cpp ) +target_include_directories(libantares-solver-variable-info + PRIVATE + ${CMAKE_SOURCE_DIR}/libs +) target_link_libraries(libantares-solver-variable-info PRIVATE libantares-core result_writer) diff --git a/src/solver/variable/commons/spatial-aggregate.h b/src/solver/variable/commons/spatial-aggregate.h index ff4cf0ed44..0d79027297 100644 --- a/src/solver/variable/commons/spatial-aggregate.h +++ b/src/solver/variable/commons/spatial-aggregate.h @@ -28,7 +28,7 @@ #define __SOLVER_VARIABLE_ECONOMY_SPATIAL_AGGREGATE_H__ #include "../variable.h" -// #include // In case it is needed +// #include // In case it is needed namespace Antares { diff --git a/src/solver/variable/container.h b/src/solver/variable/container.h index 69388baa92..249f3b3579 100644 --- a/src/solver/variable/container.h +++ b/src/solver/variable/container.h @@ -31,20 +31,14 @@ #include #include -#include +#include #include "endoflist.h" #include "categories.h" #include "surveyresults.h" #include "info.h" -namespace Antares -{ -namespace Solver -{ -namespace Variable -{ -namespace Container +namespace Antares::Solver::Variable::Container { /*! ** \brief Static list for all output variables @@ -250,10 +244,10 @@ class List : public NextT }; // class List -} // namespace Container -} // namespace Variable -} // namespace Solver -} // namespace Antares +} // namespace Antares::Solver::Variable::Container + + + #include "surveyresults/reportbuilder.hxx" #include "container.hxx" diff --git a/src/solver/variable/surveyresults/reportbuilder.hxx b/src/solver/variable/surveyresults/reportbuilder.hxx index 76c4228da9..815649503f 100644 --- a/src/solver/variable/surveyresults/reportbuilder.hxx +++ b/src/solver/variable/surveyresults/reportbuilder.hxx @@ -32,7 +32,7 @@ #include #include -#include +#include #include "../endoflist.h" #include "../categories.h" diff --git a/src/solver/variable/surveyresults/surveyresults.cpp b/src/solver/variable/surveyresults/surveyresults.cpp index c1c7e5b2b8..8952d38e73 100644 --- a/src/solver/variable/surveyresults/surveyresults.cpp +++ b/src/solver/variable/surveyresults/surveyresults.cpp @@ -30,7 +30,7 @@ #include #include #include "surveyresults.h" -#include +#include #include #include diff --git a/src/tests/src/libs/antares/CMakeLists.txt b/src/tests/src/libs/antares/CMakeLists.txt index 3629fb7043..67bb89eff3 100644 --- a/src/tests/src/libs/antares/CMakeLists.txt +++ b/src/tests/src/libs/antares/CMakeLists.txt @@ -7,8 +7,8 @@ set(src_libs_antares "${CMAKE_SOURCE_DIR}/libs/antares") set(SRC_MATRIX_LIB # For confort in IDE, but not necessary - ${src_libs_antares}/array/matrix.h - ${src_libs_antares}/array/matrix.hxx + ${src_libs_antares}/array/array/matrix.h + ${src_libs_antares}/array/array/matrix.hxx # Necessary cpp files ${src_libs_antares}/jit/jit.cpp diff --git a/src/tests/src/libs/antares/logs/logs.cpp b/src/tests/src/libs/antares/logs/logs.cpp index 669638737c..5cc5430360 100644 --- a/src/tests/src/libs/antares/logs/logs.cpp +++ b/src/tests/src/libs/antares/logs/logs.cpp @@ -1,5 +1,5 @@ -#include "logs.h" +#include "logs/logs.h" diff --git a/src/tests/src/libs/antares/study/thermal-price-definition/thermal-price-definition.cpp b/src/tests/src/libs/antares/study/thermal-price-definition/thermal-price-definition.cpp index f1e5324725..a0fa5840ba 100644 --- a/src/tests/src/libs/antares/study/thermal-price-definition/thermal-price-definition.cpp +++ b/src/tests/src/libs/antares/study/thermal-price-definition/thermal-price-definition.cpp @@ -8,7 +8,7 @@ #include #include -#include +#include #include #include "checkLoadedInputData.h" diff --git a/src/tools/batchrun/main.cpp b/src/tools/batchrun/main.cpp index 34635bfe07..90d14a3832 100644 --- a/src/tools/batchrun/main.cpp +++ b/src/tools/batchrun/main.cpp @@ -26,7 +26,7 @@ */ #include -#include +#include #include #include #include diff --git a/src/tools/cleaner/main.cpp b/src/tools/cleaner/main.cpp index 9cfed36fa0..5a09b5fb78 100644 --- a/src/tools/cleaner/main.cpp +++ b/src/tools/cleaner/main.cpp @@ -25,7 +25,7 @@ ** SPDX-License-Identifier: licenceRef-GPL3_WITH_RTE-Exceptions */ -#include +#include #include #include #include "../../ui/common/winmain.hxx" diff --git a/src/tools/config/main.cpp b/src/tools/config/main.cpp index 4579f3b9b0..df3ca350b0 100644 --- a/src/tools/config/main.cpp +++ b/src/tools/config/main.cpp @@ -26,7 +26,7 @@ */ #include -#include +#include #include #include #include diff --git a/src/tools/finder/main.cpp b/src/tools/finder/main.cpp index b67299567b..5271890dbb 100644 --- a/src/tools/finder/main.cpp +++ b/src/tools/finder/main.cpp @@ -25,7 +25,7 @@ ** SPDX-License-Identifier: licenceRef-GPL3_WITH_RTE-Exceptions */ -#include +#include #include #include #include "../../ui/common/winmain.hxx" diff --git a/src/tools/kirchhoff-cbuilder/main.cpp b/src/tools/kirchhoff-cbuilder/main.cpp index 8187f2d5bd..4fef8c6c7d 100644 --- a/src/tools/kirchhoff-cbuilder/main.cpp +++ b/src/tools/kirchhoff-cbuilder/main.cpp @@ -31,7 +31,7 @@ #include #include #include -#include +#include #include #include "../../solver/constraints-builder/cbuilder.h" diff --git a/src/tools/updater/main.cpp b/src/tools/updater/main.cpp index f4d77299fe..370edde9da 100644 --- a/src/tools/updater/main.cpp +++ b/src/tools/updater/main.cpp @@ -26,7 +26,7 @@ */ #include -#include +#include #include #include #include "../../ui/common/winmain.hxx" diff --git a/src/tools/vacuum/antares-study.cpp b/src/tools/vacuum/antares-study.cpp index d7df89d640..b2669d2ed6 100644 --- a/src/tools/vacuum/antares-study.cpp +++ b/src/tools/vacuum/antares-study.cpp @@ -27,7 +27,7 @@ #include "antares-study.h" #include -#include +#include #include #include #include "io.h" diff --git a/src/tools/vacuum/main.cpp b/src/tools/vacuum/main.cpp index 82321d57ee..56600c7f2b 100644 --- a/src/tools/vacuum/main.cpp +++ b/src/tools/vacuum/main.cpp @@ -34,7 +34,7 @@ #include #include #include -#include +#include #include "../../ui/common/winmain.hxx" #include #include diff --git a/src/tools/vacuum/modified-inode.cpp b/src/tools/vacuum/modified-inode.cpp index 8b16a4b33a..57a4c8e8be 100644 --- a/src/tools/vacuum/modified-inode.cpp +++ b/src/tools/vacuum/modified-inode.cpp @@ -29,7 +29,7 @@ #include "modified-inode.h" #include #include -#include +#include #include #include #include "io.h" diff --git a/src/tools/yby-aggregator/job.cpp b/src/tools/yby-aggregator/job.cpp index 02d7c0293c..e181b3d4b4 100644 --- a/src/tools/yby-aggregator/job.cpp +++ b/src/tools/yby-aggregator/job.cpp @@ -26,7 +26,7 @@ */ #include "job.h" -#include +#include #include "progress.h" using namespace Yuni; diff --git a/src/tools/yby-aggregator/main.cpp b/src/tools/yby-aggregator/main.cpp index ba8b03e595..4af77404a0 100644 --- a/src/tools/yby-aggregator/main.cpp +++ b/src/tools/yby-aggregator/main.cpp @@ -26,7 +26,7 @@ */ #include -#include +#include #include #include "../../ui/common/winmain.hxx" #include diff --git a/src/tools/yby-aggregator/output.cpp b/src/tools/yby-aggregator/output.cpp index f01aefb309..1a1de0f043 100644 --- a/src/tools/yby-aggregator/output.cpp +++ b/src/tools/yby-aggregator/output.cpp @@ -26,7 +26,7 @@ */ #include "output.h" -#include +#include using namespace Yuni; using namespace Antares; diff --git a/src/tools/yby-aggregator/progress.cpp b/src/tools/yby-aggregator/progress.cpp index 38336fa334..678c9b34f4 100644 --- a/src/tools/yby-aggregator/progress.cpp +++ b/src/tools/yby-aggregator/progress.cpp @@ -26,7 +26,7 @@ */ #include "progress.h" -#include +#include using namespace Yuni; using namespace Antares; diff --git a/src/tools/yby-aggregator/progress.h b/src/tools/yby-aggregator/progress.h index 3c0b5603d5..0dabde8563 100644 --- a/src/tools/yby-aggregator/progress.h +++ b/src/tools/yby-aggregator/progress.h @@ -30,7 +30,7 @@ #include #include #include -#include +#include class Progress final : public Yuni::Thread::Timer { diff --git a/src/ui/common/CMakeLists.txt b/src/ui/common/CMakeLists.txt index 7fcdf8d446..7fcca3f0b0 100644 --- a/src/ui/common/CMakeLists.txt +++ b/src/ui/common/CMakeLists.txt @@ -34,7 +34,7 @@ set(SRC_UI_COMMON add_library(libantares-ui-common ${SRC_UI_COMMON}) target_include_directories(libantares-ui-common PUBLIC - . + ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_SOURCE_DIR} ) @@ -89,7 +89,11 @@ set(SRC_COMPONENT_PANEL component/panel/group.cpp ) add_library(libantares-ui-component-panel ${SRC_COMPONENT_PANEL}) - +target_include_directories( + libantares-ui-component-panel + PRIVATE + ${CMAKE_SOURCE_DIR}/libs +) target_link_libraries(libantares-ui-component-panel PUBLIC ${wxWidgets_LIBRARIES} diff --git a/src/ui/common/component/scrollbox/scrollbox.h b/src/ui/common/component/scrollbox/scrollbox.h index 5e01fe5b89..718e449683 100644 --- a/src/ui/common/component/scrollbox/scrollbox.h +++ b/src/ui/common/component/scrollbox/scrollbox.h @@ -27,7 +27,7 @@ #ifndef __ANTARES_TOOLBOX_COMPONENTS_SCROLLBOX_H__ #define __ANTARES_TOOLBOX_COMPONENTS_SCROLLBOX_H__ -#include +#include #include namespace Antares diff --git a/src/ui/common/component/spotlight/mini-frame.cpp b/src/ui/common/component/spotlight/mini-frame.cpp index 8b2e5b7cd2..4a99f0fed4 100644 --- a/src/ui/common/component/spotlight/mini-frame.cpp +++ b/src/ui/common/component/spotlight/mini-frame.cpp @@ -28,7 +28,7 @@ #include "mini-frame.h" #include "../../dispatcher/gui.h" #include -#include +#include #include #include diff --git a/src/ui/common/dispatcher/action.cpp b/src/ui/common/dispatcher/action.cpp index e0f73e09f6..d947bff18b 100644 --- a/src/ui/common/dispatcher/action.cpp +++ b/src/ui/common/dispatcher/action.cpp @@ -31,7 +31,7 @@ #include #include #include "action.h" -#include +#include #include "settings.h" #include diff --git a/src/ui/common/dispatcher/gui.cpp b/src/ui/common/dispatcher/gui.cpp index 215d4438c3..2e1410fc94 100644 --- a/src/ui/common/dispatcher/gui.cpp +++ b/src/ui/common/dispatcher/gui.cpp @@ -26,7 +26,7 @@ */ #include "gui.h" -#include +#include #include #include #include diff --git a/src/ui/simulator/application/application.cpp b/src/ui/simulator/application/application.cpp index be1633296e..b21446e82e 100644 --- a/src/ui/simulator/application/application.cpp +++ b/src/ui/simulator/application/application.cpp @@ -36,7 +36,7 @@ #include #include #include -#include +#include #include #include #include "../windows/message.h" diff --git a/src/ui/simulator/application/main/analyzer.cpp b/src/ui/simulator/application/main/analyzer.cpp index 86d3aebfe8..cc6644d23d 100644 --- a/src/ui/simulator/application/main/analyzer.cpp +++ b/src/ui/simulator/application/main/analyzer.cpp @@ -26,7 +26,7 @@ */ #include "main.h" -#include +#include #include "../study.h" #include "../../toolbox/execute/execute.h" #include "../../windows/message.h" diff --git a/src/ui/simulator/application/main/create.cpp b/src/ui/simulator/application/main/create.cpp index 6695ef0fe8..3df180dc1e 100644 --- a/src/ui/simulator/application/main/create.cpp +++ b/src/ui/simulator/application/main/create.cpp @@ -35,7 +35,7 @@ #include #include -#include +#include #include "toolbox/resources.h" #include "toolbox/locales.h" #include "internal-data.h" diff --git a/src/ui/simulator/application/menus.cpp b/src/ui/simulator/application/menus.cpp index 1618862068..023ed1a9f5 100644 --- a/src/ui/simulator/application/menus.cpp +++ b/src/ui/simulator/application/menus.cpp @@ -26,7 +26,7 @@ */ #include -#include +#include #include "menus.h" #include #include "../toolbox/resources.h" diff --git a/src/ui/simulator/application/recentfiles.cpp b/src/ui/simulator/application/recentfiles.cpp index 5db9100108..76b88930dd 100644 --- a/src/ui/simulator/application/recentfiles.cpp +++ b/src/ui/simulator/application/recentfiles.cpp @@ -25,7 +25,7 @@ ** SPDX-License-Identifier: licenceRef-GPL3_WITH_RTE-Exceptions */ -#include +#include #include "recentfiles.h" #include #include diff --git a/src/ui/simulator/application/study.cpp b/src/ui/simulator/application/study.cpp index 1a76242b28..9392ca5769 100644 --- a/src/ui/simulator/application/study.cpp +++ b/src/ui/simulator/application/study.cpp @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/ui/simulator/application/wait.cpp b/src/ui/simulator/application/wait.cpp index be9fbaff66..811d54b47f 100644 --- a/src/ui/simulator/application/wait.cpp +++ b/src/ui/simulator/application/wait.cpp @@ -30,7 +30,7 @@ #include #include "main/main.h" #include -#include +#include namespace Antares { diff --git a/src/ui/simulator/main.cpp b/src/ui/simulator/main.cpp index 749bac133e..36039556cc 100644 --- a/src/ui/simulator/main.cpp +++ b/src/ui/simulator/main.cpp @@ -34,7 +34,7 @@ #include "../common/winmain.hxx" #include #include -#include +#include #include #ifdef YUNI_OS_MSVC diff --git a/src/ui/simulator/toolbox/clipboard/clipboard.h b/src/ui/simulator/toolbox/clipboard/clipboard.h index 7a6984e7ef..c3a8ef4b16 100644 --- a/src/ui/simulator/toolbox/clipboard/clipboard.h +++ b/src/ui/simulator/toolbox/clipboard/clipboard.h @@ -28,7 +28,7 @@ #define __ANTARES_TOOLBOX_CLIPBOARD_CLIPBOARD_H__ #include -#include +#include #include #include #include "../components/datagrid/gridhelper.h" diff --git a/src/ui/simulator/toolbox/components/button/button.cpp b/src/ui/simulator/toolbox/components/button/button.cpp index 4a41ed31b9..ff1a9f62e8 100644 --- a/src/ui/simulator/toolbox/components/button/button.cpp +++ b/src/ui/simulator/toolbox/components/button/button.cpp @@ -31,7 +31,7 @@ #include #include #include -#include +#include using namespace Yuni; diff --git a/src/ui/simulator/toolbox/components/datagrid/component.h b/src/ui/simulator/toolbox/components/datagrid/component.h index 8c73dbc0ca..3f8b6bfa8a 100644 --- a/src/ui/simulator/toolbox/components/datagrid/component.h +++ b/src/ui/simulator/toolbox/components/datagrid/component.h @@ -29,7 +29,7 @@ #include #include -#include +#include namespace Antares { diff --git a/src/ui/simulator/toolbox/components/datagrid/filter/component.cpp b/src/ui/simulator/toolbox/components/datagrid/filter/component.cpp index 1b87fe4d04..95d6cb2b49 100644 --- a/src/ui/simulator/toolbox/components/datagrid/filter/component.cpp +++ b/src/ui/simulator/toolbox/components/datagrid/filter/component.cpp @@ -29,7 +29,7 @@ #include "component.h" #include "../gridhelper.h" #include -#include +#include using namespace Yuni; diff --git a/src/ui/simulator/toolbox/components/datagrid/filter/filter.h b/src/ui/simulator/toolbox/components/datagrid/filter/filter.h index b6f31dc18b..465a08db55 100644 --- a/src/ui/simulator/toolbox/components/datagrid/filter/filter.h +++ b/src/ui/simulator/toolbox/components/datagrid/filter/filter.h @@ -31,7 +31,7 @@ #include #include "operator.h" #include "operator.list.h" -#include +#include namespace Antares { diff --git a/src/ui/simulator/toolbox/components/datagrid/filter/parameter/parameter.cpp b/src/ui/simulator/toolbox/components/datagrid/filter/parameter/parameter.cpp index 09c221d78a..93c0236b74 100644 --- a/src/ui/simulator/toolbox/components/datagrid/filter/parameter/parameter.cpp +++ b/src/ui/simulator/toolbox/components/datagrid/filter/parameter/parameter.cpp @@ -26,13 +26,13 @@ */ #include "parameter.h" -#include +#include #include "../../../../validator.h" #include #include #include #include "../operator.h" -#include +#include namespace Antares { diff --git a/src/ui/simulator/toolbox/components/datagrid/renderer.h b/src/ui/simulator/toolbox/components/datagrid/renderer.h index addedb994f..9513ad456b 100644 --- a/src/ui/simulator/toolbox/components/datagrid/renderer.h +++ b/src/ui/simulator/toolbox/components/datagrid/renderer.h @@ -29,7 +29,7 @@ #include #include -#include +#include #include #include "default.h" #include diff --git a/src/ui/simulator/toolbox/components/datagrid/renderer/area/creditmodulations.h b/src/ui/simulator/toolbox/components/datagrid/renderer/area/creditmodulations.h index 224909bfe1..4ced07c345 100644 --- a/src/ui/simulator/toolbox/components/datagrid/renderer/area/creditmodulations.h +++ b/src/ui/simulator/toolbox/components/datagrid/renderer/area/creditmodulations.h @@ -30,7 +30,7 @@ #include #include "../area.h" #include "../matrix.h" -#include +#include #include namespace Antares diff --git a/src/ui/simulator/toolbox/components/datagrid/renderer/area/hydromonthlypower.h b/src/ui/simulator/toolbox/components/datagrid/renderer/area/hydromonthlypower.h index 5e22435b26..667988a841 100644 --- a/src/ui/simulator/toolbox/components/datagrid/renderer/area/hydromonthlypower.h +++ b/src/ui/simulator/toolbox/components/datagrid/renderer/area/hydromonthlypower.h @@ -30,7 +30,7 @@ #include #include "../area.h" #include "../matrix.h" -#include +#include #include namespace Antares diff --git a/src/ui/simulator/toolbox/components/datagrid/renderer/area/hydroprepro.h b/src/ui/simulator/toolbox/components/datagrid/renderer/area/hydroprepro.h index 8d52828073..ab5d0c81d7 100644 --- a/src/ui/simulator/toolbox/components/datagrid/renderer/area/hydroprepro.h +++ b/src/ui/simulator/toolbox/components/datagrid/renderer/area/hydroprepro.h @@ -30,7 +30,7 @@ #include #include "../area.h" #include "../matrix.h" -#include +#include #include namespace Antares diff --git a/src/ui/simulator/toolbox/components/datagrid/renderer/area/inflowpattern.h b/src/ui/simulator/toolbox/components/datagrid/renderer/area/inflowpattern.h index 339eacf814..ed85e8e1a0 100644 --- a/src/ui/simulator/toolbox/components/datagrid/renderer/area/inflowpattern.h +++ b/src/ui/simulator/toolbox/components/datagrid/renderer/area/inflowpattern.h @@ -30,7 +30,7 @@ #include #include "../area.h" #include "../matrix.h" -#include +#include #include namespace Antares diff --git a/src/ui/simulator/toolbox/components/datagrid/renderer/area/reservoirlevels.h b/src/ui/simulator/toolbox/components/datagrid/renderer/area/reservoirlevels.h index feffdfbd25..33215c1b96 100644 --- a/src/ui/simulator/toolbox/components/datagrid/renderer/area/reservoirlevels.h +++ b/src/ui/simulator/toolbox/components/datagrid/renderer/area/reservoirlevels.h @@ -30,7 +30,7 @@ #include #include "../area.h" #include "../matrix.h" -#include +#include namespace Antares { diff --git a/src/ui/simulator/toolbox/components/datagrid/renderer/area/timeseries.h b/src/ui/simulator/toolbox/components/datagrid/renderer/area/timeseries.h index 00f364ae68..c68e9209cd 100644 --- a/src/ui/simulator/toolbox/components/datagrid/renderer/area/timeseries.h +++ b/src/ui/simulator/toolbox/components/datagrid/renderer/area/timeseries.h @@ -32,7 +32,7 @@ #include "../matrix.h" #include "../../../../input/thermal-cluster.h" #include "../../../../input/renewable-cluster.h" -#include +#include #include "../../../../../application/study.h" namespace Antares diff --git a/src/ui/simulator/toolbox/components/datagrid/renderer/area/watervalues.h b/src/ui/simulator/toolbox/components/datagrid/renderer/area/watervalues.h index 09a6936ed6..da7c28a6b3 100644 --- a/src/ui/simulator/toolbox/components/datagrid/renderer/area/watervalues.h +++ b/src/ui/simulator/toolbox/components/datagrid/renderer/area/watervalues.h @@ -30,7 +30,7 @@ #include #include "../area.h" #include "../matrix.h" -#include +#include namespace Antares { diff --git a/src/ui/simulator/toolbox/components/datagrid/renderer/connection.h b/src/ui/simulator/toolbox/components/datagrid/renderer/connection.h index a07cc9af0d..100b67257d 100644 --- a/src/ui/simulator/toolbox/components/datagrid/renderer/connection.h +++ b/src/ui/simulator/toolbox/components/datagrid/renderer/connection.h @@ -30,7 +30,7 @@ #include #include "../../../input/connection.h" #include "../renderer.h" -#include +#include #include "matrix.h" #include diff --git a/src/ui/simulator/toolbox/components/datagrid/renderer/matrix.h b/src/ui/simulator/toolbox/components/datagrid/renderer/matrix.h index 6a2a720695..9ed1bbf59c 100644 --- a/src/ui/simulator/toolbox/components/datagrid/renderer/matrix.h +++ b/src/ui/simulator/toolbox/components/datagrid/renderer/matrix.h @@ -32,7 +32,7 @@ #include "../../../input/area.h" #include "../component.h" -#include +#include #include "../../../../application/study.h" #include diff --git a/src/ui/simulator/toolbox/components/notebook/mapnotebook.cpp b/src/ui/simulator/toolbox/components/notebook/mapnotebook.cpp index f6aea320b9..bf28fc557f 100644 --- a/src/ui/simulator/toolbox/components/notebook/mapnotebook.cpp +++ b/src/ui/simulator/toolbox/components/notebook/mapnotebook.cpp @@ -31,7 +31,7 @@ #include #include #include "../../components/map/settings.h" -#include +#include #include "../../../application/wait.h" #include #include diff --git a/src/ui/simulator/toolbox/components/notebook/mapnotebook.h b/src/ui/simulator/toolbox/components/notebook/mapnotebook.h index 2ea5a33695..a6b4daf0e7 100644 --- a/src/ui/simulator/toolbox/components/notebook/mapnotebook.h +++ b/src/ui/simulator/toolbox/components/notebook/mapnotebook.h @@ -29,7 +29,7 @@ #include "notebook.h" #include -#include "antares/logs.h" +#include "logs/logs.h" namespace Antares { namespace Component diff --git a/src/ui/simulator/toolbox/components/notebook/notebook.cpp b/src/ui/simulator/toolbox/components/notebook/notebook.cpp index 4b67cee2a1..8ccebd8342 100644 --- a/src/ui/simulator/toolbox/components/notebook/notebook.cpp +++ b/src/ui/simulator/toolbox/components/notebook/notebook.cpp @@ -31,7 +31,7 @@ #include #include #include "../../components/map/settings.h" -#include +#include #include "../../../application/wait.h" #include #include diff --git a/src/ui/simulator/toolbox/create.cpp b/src/ui/simulator/toolbox/create.cpp index 4a6fff2d70..0dab172ed5 100644 --- a/src/ui/simulator/toolbox/create.cpp +++ b/src/ui/simulator/toolbox/create.cpp @@ -28,7 +28,7 @@ #include "create.h" #include #include -#include +#include #include namespace Antares diff --git a/src/ui/simulator/toolbox/jobs/job.h b/src/ui/simulator/toolbox/jobs/job.h index 0a38e10300..ca1f04af4a 100644 --- a/src/ui/simulator/toolbox/jobs/job.h +++ b/src/ui/simulator/toolbox/jobs/job.h @@ -28,7 +28,7 @@ #define __ANTARES_TOOLBOX_JOB_H__ #include -#include +#include #include #include #include diff --git a/src/ui/simulator/toolbox/locales.cpp b/src/ui/simulator/toolbox/locales.cpp index 7b7f81f21c..b1bd0a384e 100644 --- a/src/ui/simulator/toolbox/locales.cpp +++ b/src/ui/simulator/toolbox/locales.cpp @@ -28,7 +28,7 @@ #include #include #include -#include +#include namespace Antares { diff --git a/src/ui/simulator/toolbox/resources.cpp b/src/ui/simulator/toolbox/resources.cpp index b460f323b0..863bde0d89 100644 --- a/src/ui/simulator/toolbox/resources.cpp +++ b/src/ui/simulator/toolbox/resources.cpp @@ -31,7 +31,7 @@ #include #include #include -#include +#include using namespace Yuni; diff --git a/src/ui/simulator/toolbox/system/diskfreespace.hxx b/src/ui/simulator/toolbox/system/diskfreespace.hxx index 1ed458e61f..5d1c1a5747 100644 --- a/src/ui/simulator/toolbox/system/diskfreespace.hxx +++ b/src/ui/simulator/toolbox/system/diskfreespace.hxx @@ -29,7 +29,7 @@ #include #include #include -#include +#include using namespace Yuni; diff --git a/src/ui/simulator/windows/about/aboutbox.h b/src/ui/simulator/windows/about/aboutbox.h index 81e32feacd..c92031b69d 100644 --- a/src/ui/simulator/windows/about/aboutbox.h +++ b/src/ui/simulator/windows/about/aboutbox.h @@ -27,7 +27,7 @@ #ifndef __ANTARES_APPLICATION_ABOUTBOX_ABOUTBOX_H__ #define __ANTARES_APPLICATION_ABOUTBOX_ABOUTBOX_H__ -#include +#include #include namespace Antares diff --git a/src/ui/simulator/windows/analyzer/analyzer.cpp b/src/ui/simulator/windows/analyzer/analyzer.cpp index 237bb10a34..a26c97f39f 100644 --- a/src/ui/simulator/windows/analyzer/analyzer.cpp +++ b/src/ui/simulator/windows/analyzer/analyzer.cpp @@ -51,11 +51,11 @@ #include "../../application/main/main.h" #include "../../application/menus.h" #include "../message.h" -#include -#include +#include +#include #include "../../application/study.h" #include -#include +#include using namespace Yuni; diff --git a/src/ui/simulator/windows/cleaner.cpp b/src/ui/simulator/windows/cleaner.cpp index 94b84bbca2..45f421bb3c 100644 --- a/src/ui/simulator/windows/cleaner.cpp +++ b/src/ui/simulator/windows/cleaner.cpp @@ -42,7 +42,7 @@ #include "../toolbox/create.h" #include "../application/main.h" #include "../application/wait.h" -#include +#include using namespace Yuni; diff --git a/src/ui/simulator/windows/constraints-builder/constraintsbuilder.cpp b/src/ui/simulator/windows/constraints-builder/constraintsbuilder.cpp index a8ea12f023..b0382b8344 100644 --- a/src/ui/simulator/windows/constraints-builder/constraintsbuilder.cpp +++ b/src/ui/simulator/windows/constraints-builder/constraintsbuilder.cpp @@ -55,12 +55,12 @@ #include "../../application/menus.h" #include "../../application/study.h" #include "../message.h" -#include +#include #include -#include +#include #include "../../application/study.h" #include -#include +#include #include "../../application/main.h" using namespace Yuni; diff --git a/src/ui/simulator/windows/options/adequacy-patch/adequacy-patch-options.cpp b/src/ui/simulator/windows/options/adequacy-patch/adequacy-patch-options.cpp index 2e10345436..89ee181652 100644 --- a/src/ui/simulator/windows/options/adequacy-patch/adequacy-patch-options.cpp +++ b/src/ui/simulator/windows/options/adequacy-patch/adequacy-patch-options.cpp @@ -36,7 +36,7 @@ #include "../../../application/menus.h" #include "../../../windows/message.h" #include -#include +#include using namespace Yuni; using namespace Data::AdequacyPatch; diff --git a/src/ui/simulator/windows/options/advanced/advanced.cpp b/src/ui/simulator/windows/options/advanced/advanced.cpp index d5af22593b..3abd26160d 100644 --- a/src/ui/simulator/windows/options/advanced/advanced.cpp +++ b/src/ui/simulator/windows/options/advanced/advanced.cpp @@ -36,7 +36,7 @@ #include "../../../application/menus.h" #include "../../../windows/message.h" #include -#include +#include using namespace Yuni; diff --git a/src/ui/simulator/windows/options/optimization/optimization.cpp b/src/ui/simulator/windows/options/optimization/optimization.cpp index 98de3a0a7d..c0727fd462 100644 --- a/src/ui/simulator/windows/options/optimization/optimization.cpp +++ b/src/ui/simulator/windows/options/optimization/optimization.cpp @@ -35,7 +35,7 @@ #include "../../../application/study.h" #include "../../../windows/message.h" #include -#include +#include using namespace Yuni; diff --git a/src/ui/simulator/windows/options/temp-folder/temp-folder.cpp b/src/ui/simulator/windows/options/temp-folder/temp-folder.cpp index f6d142f1ba..11313168c7 100644 --- a/src/ui/simulator/windows/options/temp-folder/temp-folder.cpp +++ b/src/ui/simulator/windows/options/temp-folder/temp-folder.cpp @@ -37,7 +37,7 @@ #include #include #include -#include +#include #include "../../../toolbox/components/wizardheader.h" #include "../../../toolbox/create.h" #include diff --git a/src/ui/simulator/windows/output/job.cpp b/src/ui/simulator/windows/output/job.cpp index f6e8f9a93b..92158cd126 100644 --- a/src/ui/simulator/windows/output/job.cpp +++ b/src/ui/simulator/windows/output/job.cpp @@ -26,7 +26,7 @@ */ #include "job.h" -#include +#include #include #include diff --git a/src/ui/simulator/windows/output/mini-frame.cpp b/src/ui/simulator/windows/output/mini-frame.cpp index f3424b7d83..a71face430 100644 --- a/src/ui/simulator/windows/output/mini-frame.cpp +++ b/src/ui/simulator/windows/output/mini-frame.cpp @@ -28,7 +28,7 @@ #include "mini-frame.h" #include #include -#include +#include using namespace Yuni; diff --git a/src/ui/simulator/windows/simulation/panel.cpp b/src/ui/simulator/windows/simulation/panel.cpp index cda2c123e1..56e6b206ab 100644 --- a/src/ui/simulator/windows/simulation/panel.cpp +++ b/src/ui/simulator/windows/simulation/panel.cpp @@ -26,7 +26,7 @@ */ #include "panel.h" -#include +#include #include #include "../../toolbox/components/notebook/notebook.h" #include "../../toolbox/components/captionpanel.h" From 1e6dba1d0c2a0064d0b68eb9e9ddcfa3528b8bcc Mon Sep 17 00:00:00 2001 From: Jason Marechal Date: Thu, 10 Aug 2023 16:58:31 +0200 Subject: [PATCH 09/52] Lots of lib change --- src/analyzer/CMakeLists.txt | 2 +- src/analyzer/atsp/correlations.cpp | 2 +- src/libs/antares/checks/CMakeLists.txt | 1 + src/libs/antares/correlation/CMakeLists.txt | 1 + src/libs/antares/date/CMakeLists.txt | 2 +- src/libs/antares/date/{ => antares}/date/date.h | 4 ++-- src/libs/antares/date/date.cpp | 2 +- src/libs/antares/study/memory-usage.cpp | 2 +- src/libs/antares/study/parameters.h | 2 +- src/libs/antares/study/study.h | 2 +- .../antares/writer/private/ensure_queue_started.h | 2 +- .../antares/writer/private/immediate_file_writer.h | 10 ++++------ src/libs/antares/writer/private/zip_writer.h | 2 +- src/libs/antares/writer/writer_factory.cpp | 2 ++ src/solver/CMakeLists.txt | 2 +- .../aleatoire/alea_tirage_au_sort_chroniques.cpp | 2 +- src/solver/application.h | 2 +- src/solver/main/adequacy.cpp | 2 +- src/solver/main/economy.cpp | 2 +- src/solver/misc/cholesky.h | 2 +- src/solver/optimisation/opt_export_structure.h | 2 +- src/solver/simulation/solver.hxx | 2 +- src/solver/ts-generator/CMakeLists.txt | 1 + src/solver/ts-generator/hydro.cpp | 2 +- src/solver/variable/surveyresults/surveyresults.cpp | 2 +- src/tests/src/libs/antares/CMakeLists.txt | 10 ++++++++-- src/tests/src/libs/antares/array/fill-matrix.h | 2 +- src/tests/src/libs/antares/logs/{ => logs}/logs.h | 0 .../study/thermal-price-definition/CMakeLists.txt | 2 +- .../thermal-price-definition.cpp | 2 +- src/tests/src/solver/simulation/CMakeLists.txt | 1 + .../simulation/test-store-timeseries-number.cpp | 12 ++++++++---- src/tools/batchrun/CMakeLists.txt | 2 +- src/tools/yby-aggregator/CMakeLists.txt | 2 +- src/ui/simulator/CMakeLists.txt | 2 +- src/ui/simulator/application/application.cpp | 2 +- src/ui/simulator/application/main/main.cpp | 2 +- src/ui/simulator/application/main/refresh.cpp | 2 +- src/ui/simulator/application/study.cpp | 4 ++-- .../toolbox/components/datagrid/component.cpp | 2 +- .../toolbox/components/datagrid/component.h | 2 +- .../components/datagrid/filter/all/columnindex.h | 2 +- .../toolbox/components/datagrid/filter/all/day.h | 2 +- .../toolbox/components/datagrid/filter/all/dayyear.h | 2 +- .../toolbox/components/datagrid/filter/all/hour.h | 2 +- .../toolbox/components/datagrid/filter/all/week.cpp | 2 +- .../toolbox/components/datagrid/filter/all/weekday.h | 2 +- .../toolbox/components/datagrid/filter/component.h | 2 +- .../toolbox/components/datagrid/filter/filter.cpp | 2 +- .../toolbox/components/datagrid/filter/filter.h | 2 +- .../components/datagrid/filter/operator.list.cpp | 2 +- .../datagrid/filter/parameter/parameter.cpp | 2 +- .../simulator/toolbox/components/datagrid/renderer.h | 2 +- .../datagrid/renderer/area/creditmodulations.h | 2 +- .../toolbox/components/datagrid/renderer/area/dsm.h | 2 +- .../datagrid/renderer/area/hydro/allocation.h | 2 +- .../datagrid/renderer/area/hydromonthlypower.h | 2 +- .../components/datagrid/renderer/area/hydroprepro.h | 2 +- .../datagrid/renderer/area/inflowpattern.h | 2 +- .../datagrid/renderer/area/reservoirlevels.h | 2 +- .../components/datagrid/renderer/area/timeseries.h | 2 +- .../components/datagrid/renderer/area/watervalues.h | 2 +- .../datagrid/renderer/area/xcast-coefficients.hxx | 2 +- .../datagrid/renderer/area/xcast-translation.hxx | 2 +- .../components/datagrid/renderer/connection.h | 2 +- .../toolbox/components/datagrid/renderer/matrix.h | 2 +- src/ui/simulator/toolbox/jobs/job.cpp | 2 +- src/ui/simulator/windows/correlation/correlation.cpp | 2 +- .../windows/output/panel/area-link-renderer.h | 2 +- src/ui/simulator/windows/output/panel/panel.h | 2 +- src/ui/simulator/windows/scenario-builder/panel.cpp | 2 +- src/ui/simulator/windows/simulation/panel.cpp | 2 +- 72 files changed, 91 insertions(+), 77 deletions(-) rename src/libs/antares/date/{ => antares}/date/date.h (99%) rename src/tests/src/libs/antares/logs/{ => logs}/logs.h (100%) diff --git a/src/analyzer/CMakeLists.txt b/src/analyzer/CMakeLists.txt index 337979e22d..eca39e2968 100644 --- a/src/analyzer/CMakeLists.txt +++ b/src/analyzer/CMakeLists.txt @@ -51,7 +51,7 @@ INSTALL(EXPORT antares-analyzer target_link_libraries(antares-${ANTARES_PRG_VERSION}-analyzer PRIVATE libantares-core - libantares-core-calendar + date yuni-static-core ${CMAKE_THREADS_LIBS_INIT} ) diff --git a/src/analyzer/atsp/correlations.cpp b/src/analyzer/atsp/correlations.cpp index cad13934f2..b067b42914 100644 --- a/src/analyzer/atsp/correlations.cpp +++ b/src/analyzer/atsp/correlations.cpp @@ -26,7 +26,7 @@ */ #include "atsp.h" -#include +#include #include "../solver/misc/matrix-dp-make.h" using namespace Yuni; diff --git a/src/libs/antares/checks/CMakeLists.txt b/src/libs/antares/checks/CMakeLists.txt index a6f229b9a2..dde3381f00 100644 --- a/src/libs/antares/checks/CMakeLists.txt +++ b/src/libs/antares/checks/CMakeLists.txt @@ -16,6 +16,7 @@ target_include_directories(checks ${CMAKE_SOURCE_DIR}/libs/antares/array #area ${CMAKE_SOURCE_DIR}/libs/antares/io #area -> matrix -> io ${CMAKE_SOURCE_DIR}/libs/antares/date #area -> parameter -> date + ${CMAKE_SOURCE_DIR}/libs/antares/writer #area -> antares/parts/thermal/cluster -> writer PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ) diff --git a/src/libs/antares/correlation/CMakeLists.txt b/src/libs/antares/correlation/CMakeLists.txt index 2390e88de0..e9868fc22c 100644 --- a/src/libs/antares/correlation/CMakeLists.txt +++ b/src/libs/antares/correlation/CMakeLists.txt @@ -19,4 +19,5 @@ target_include_directories(correlation ${CMAKE_SOURCE_DIR}/libs/solver ${CMAKE_SOURCE_DIR}/libs/ #area -> antares/study/parameters/adq-patch-params.h ${CMAKE_SOURCE_DIR}/libs/antares/date #area -> antares/study/parameters/adq-patch-params.h -> date + ${CMAKE_SOURCE_DIR}/libs/antares/writer #area -> antares/parts/thermal/cluster -> writer ) \ No newline at end of file diff --git a/src/libs/antares/date/CMakeLists.txt b/src/libs/antares/date/CMakeLists.txt index a04f19cd10..de46a80489 100644 --- a/src/libs/antares/date/CMakeLists.txt +++ b/src/libs/antares/date/CMakeLists.txt @@ -1,6 +1,6 @@ set(PROJ date) set(HEADERS - ${PROJ} + antares/${PROJ} ) set(SRC_DATE date.cpp diff --git a/src/libs/antares/date/date/date.h b/src/libs/antares/date/antares/date/date.h similarity index 99% rename from src/libs/antares/date/date/date.h rename to src/libs/antares/date/antares/date/date.h index 9144815e3c..8d8401c669 100644 --- a/src/libs/antares/date/date/date.h +++ b/src/libs/antares/date/antares/date/date.h @@ -30,8 +30,8 @@ #include #include #include -#include "../../constants.h" -#include "../../study/fwd.h" +#include "../../../constants.h" +#include "../../../study/fwd.h" namespace Antares { diff --git a/src/libs/antares/date/date.cpp b/src/libs/antares/date/date.cpp index 0b8c57cd3f..71bea2a7f0 100644 --- a/src/libs/antares/date/date.cpp +++ b/src/libs/antares/date/date.cpp @@ -28,7 +28,7 @@ #include #include #include -#include "date/date.h" +#include #include #include "../study/parameters.h" #include diff --git a/src/libs/antares/study/memory-usage.cpp b/src/libs/antares/study/memory-usage.cpp index b0ad8fdfa4..5c5b7d72a5 100644 --- a/src/libs/antares/study/memory-usage.cpp +++ b/src/libs/antares/study/memory-usage.cpp @@ -27,7 +27,7 @@ #include "study.h" #include "memory-usage.h" -#include "date/date.h" +#include using namespace Yuni; diff --git a/src/libs/antares/study/parameters.h b/src/libs/antares/study/parameters.h index 9a6aa83362..71b12eca0a 100644 --- a/src/libs/antares/study/parameters.h +++ b/src/libs/antares/study/parameters.h @@ -35,7 +35,7 @@ #include #include #include "antares/writer/antares/writer/result_format.h" //Conflit between ${CMake_Source_dir}/libs and result_writer findong "antares" -#include "date/date.h" +#include #include #include "fwd.h" #include "variable-print-info.h" diff --git a/src/libs/antares/study/study.h b/src/libs/antares/study/study.h index 6c846dc830..d7b5424998 100644 --- a/src/libs/antares/study/study.h +++ b/src/libs/antares/study/study.h @@ -47,7 +47,7 @@ #include "sets.h" #include "progression/progression.h" #include "load-options.h" -#include "date/date.h" +#include #include "layerdata.h" #include "antares/correlation/correlation.h" #include "area/store-timeseries-numbers.h" diff --git a/src/libs/antares/writer/private/ensure_queue_started.h b/src/libs/antares/writer/private/ensure_queue_started.h index d23aef9366..691cc29c79 100644 --- a/src/libs/antares/writer/private/ensure_queue_started.h +++ b/src/libs/antares/writer/private/ensure_queue_started.h @@ -1,5 +1,5 @@ #pragma once -#include "i_writer.h" +#include "antares/writer/i_writer.h" #include diff --git a/src/libs/antares/writer/private/immediate_file_writer.h b/src/libs/antares/writer/private/immediate_file_writer.h index 6eb7bebc70..fad9422bab 100644 --- a/src/libs/antares/writer/private/immediate_file_writer.h +++ b/src/libs/antares/writer/private/immediate_file_writer.h @@ -2,11 +2,9 @@ #include #include -#include "i_writer.h" +#include "antares/writer/i_writer.h" -namespace Antares -{ -namespace Solver +namespace Antares::Solver { class ImmediateFileResultWriter : public IResultWriter { @@ -23,5 +21,5 @@ class ImmediateFileResultWriter : public IResultWriter private: Yuni::String pOutputFolder; }; -} // namespace Solver -} // namespace Antares +} // namespace Antares::Solver + diff --git a/src/libs/antares/writer/private/zip_writer.h b/src/libs/antares/writer/private/zip_writer.h index 840e08b162..b1f3fcb494 100644 --- a/src/libs/antares/writer/private/zip_writer.h +++ b/src/libs/antares/writer/private/zip_writer.h @@ -7,7 +7,7 @@ #include #include -#include "i_writer.h" +#include "antares/writer/i_writer.h" #include "benchmarking/info_collectors.h" diff --git a/src/libs/antares/writer/writer_factory.cpp b/src/libs/antares/writer/writer_factory.cpp index c2d2f3aaee..66ed04d6de 100644 --- a/src/libs/antares/writer/writer_factory.cpp +++ b/src/libs/antares/writer/writer_factory.cpp @@ -1,4 +1,6 @@ #include "antares/writer/writer_factory.h" +#include "private/immediate_file_writer.h" +#include "private/zip_writer.h" namespace Antares { diff --git a/src/solver/CMakeLists.txt b/src/solver/CMakeLists.txt index 15c3104445..624b75ddc3 100644 --- a/src/solver/CMakeLists.txt +++ b/src/solver/CMakeLists.txt @@ -74,7 +74,7 @@ add_executable(antares-solver set_target_properties(antares-solver PROPERTIES OUTPUT_NAME ${exec_name}) set(ANTARES_SOLVER_LIBS - libantares-core-calendar + date yuni-static-uuid yuni-static-core ${CMAKE_THREADS_LIBS_INIT} diff --git a/src/solver/aleatoire/alea_tirage_au_sort_chroniques.cpp b/src/solver/aleatoire/alea_tirage_au_sort_chroniques.cpp index ae030ce14a..cb0a72e8d6 100644 --- a/src/solver/aleatoire/alea_tirage_au_sort_chroniques.cpp +++ b/src/solver/aleatoire/alea_tirage_au_sort_chroniques.cpp @@ -36,7 +36,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/solver/application.h b/src/solver/application.h index 8497c6ec15..7f095cf351 100644 --- a/src/solver/application.h +++ b/src/solver/application.h @@ -7,7 +7,7 @@ #include #include "simulation/simulation.h" -#include +#include #include diff --git a/src/solver/main/adequacy.cpp b/src/solver/main/adequacy.cpp index e8471a3962..2c060418a3 100644 --- a/src/solver/main/adequacy.cpp +++ b/src/solver/main/adequacy.cpp @@ -28,7 +28,7 @@ #include "../application.h" #include "../simulation/solver.h" #include "../simulation/adequacy.h" -#include +#include #include namespace Antares diff --git a/src/solver/main/economy.cpp b/src/solver/main/economy.cpp index 708f70c81e..ea8588df17 100644 --- a/src/solver/main/economy.cpp +++ b/src/solver/main/economy.cpp @@ -28,7 +28,7 @@ #include "../application.h" #include "../simulation/solver.h" #include "../simulation/economy.h" -#include +#include #include namespace Antares diff --git a/src/solver/misc/cholesky.h b/src/solver/misc/cholesky.h index 550acc3151..cc869dd0dc 100644 --- a/src/solver/misc/cholesky.h +++ b/src/solver/misc/cholesky.h @@ -29,7 +29,7 @@ #include #include -#include +#include namespace Antares { diff --git a/src/solver/optimisation/opt_export_structure.h b/src/solver/optimisation/opt_export_structure.h index 22c8c3db12..e7e00126bc 100644 --- a/src/solver/optimisation/opt_export_structure.h +++ b/src/solver/optimisation/opt_export_structure.h @@ -34,7 +34,7 @@ #include #include -#include "../writer/i_writer.h" +#include "antares/writer/i_writer.h" #include namespace Antares diff --git a/src/solver/simulation/solver.hxx b/src/solver/simulation/solver.hxx index 7c0018037c..85292f84c3 100644 --- a/src/solver/simulation/solver.hxx +++ b/src/solver/simulation/solver.hxx @@ -29,7 +29,7 @@ #include "../variable/constants.h" #include -#include +#include #include #include #include "../variable/print.h" diff --git a/src/solver/ts-generator/CMakeLists.txt b/src/solver/ts-generator/CMakeLists.txt index 69569333c0..846f9091ff 100644 --- a/src/solver/ts-generator/CMakeLists.txt +++ b/src/solver/ts-generator/CMakeLists.txt @@ -46,4 +46,5 @@ target_link_libraries(libantares-solver-ts-generator libantares-core result_writer array + benchmarking ) diff --git a/src/solver/ts-generator/hydro.cpp b/src/solver/ts-generator/hydro.cpp index 28c0115359..702428fb83 100644 --- a/src/solver/ts-generator/hydro.cpp +++ b/src/solver/ts-generator/hydro.cpp @@ -28,7 +28,7 @@ #include #include "../simulation/sim_extern_variables_globales.h" #include "../aleatoire/alea_fonctions.h" -#include +#include #include #include #include "../misc/cholesky.h" diff --git a/src/solver/variable/surveyresults/surveyresults.cpp b/src/solver/variable/surveyresults/surveyresults.cpp index 8952d38e73..7de049aa27 100644 --- a/src/solver/variable/surveyresults/surveyresults.cpp +++ b/src/solver/variable/surveyresults/surveyresults.cpp @@ -32,7 +32,7 @@ #include "surveyresults.h" #include #include -#include +#include using namespace Yuni; using namespace Antares; diff --git a/src/tests/src/libs/antares/CMakeLists.txt b/src/tests/src/libs/antares/CMakeLists.txt index 67bb89eff3..38a5ca3123 100644 --- a/src/tests/src/libs/antares/CMakeLists.txt +++ b/src/tests/src/libs/antares/CMakeLists.txt @@ -17,7 +17,11 @@ set(SRC_MATRIX_LIB add_library(lib-matrix ${SRC_MATRIX_LIB}) -target_link_libraries(lib-matrix PRIVATE libantares-core yuni-static-core) +target_link_libraries(lib-matrix + PRIVATE + libantares-core + yuni-static-core +) target_include_directories(lib-matrix PRIVATE @@ -32,7 +36,7 @@ set_target_properties(lib-matrix PROPERTIES FOLDER Unit-tests) # Building tests on Matrix save operations set(SRC_TEST_MATRIX_SAVE - logs/logs.h + logs/logs/logs.h array/fill-matrix.h array/matrix-bypass-load.h array/tests-matrix-save.h @@ -44,6 +48,7 @@ add_executable(tests-matrix-save ${SRC_TEST_MATRIX_SAVE}) target_include_directories(tests-matrix-save PRIVATE "${src_libs_antares}/array" + "${src_libs_antares}/io" "${CMAKE_CURRENT_SOURCE_DIR}/logs" "${CMAKE_CURRENT_SOURCE_DIR}/jit" "${CMAKE_SOURCE_DIR}/tests/src/libs" @@ -76,6 +81,7 @@ add_executable(tests-matrix-load ${SRC_TEST_MATRIX_LOAD}) target_include_directories(tests-matrix-load PRIVATE "${src_libs_antares}/array" + "${src_libs_antares}/io" "${CMAKE_CURRENT_SOURCE_DIR}/logs" "${CMAKE_CURRENT_SOURCE_DIR}/jit" "${CMAKE_SOURCE_DIR}/tests/src/libs" diff --git a/src/tests/src/libs/antares/array/fill-matrix.h b/src/tests/src/libs/antares/array/fill-matrix.h index 26e0a9b224..b2005a829d 100644 --- a/src/tests/src/libs/antares/array/fill-matrix.h +++ b/src/tests/src/libs/antares/array/fill-matrix.h @@ -3,7 +3,7 @@ #ifndef __ANTARES_LIBS_ARRAY_MATRIX_FILL_MTX_H__ #define __ANTARES_LIBS_ARRAY_MATRIX_FILL_MTX_H__ -#include +#include #include using namespace std; diff --git a/src/tests/src/libs/antares/logs/logs.h b/src/tests/src/libs/antares/logs/logs/logs.h similarity index 100% rename from src/tests/src/libs/antares/logs/logs.h rename to src/tests/src/libs/antares/logs/logs/logs.h diff --git a/src/tests/src/libs/antares/study/thermal-price-definition/CMakeLists.txt b/src/tests/src/libs/antares/study/thermal-price-definition/CMakeLists.txt index 48c272ed6a..d8e55c3248 100644 --- a/src/tests/src/libs/antares/study/thermal-price-definition/CMakeLists.txt +++ b/src/tests/src/libs/antares/study/thermal-price-definition/CMakeLists.txt @@ -22,7 +22,7 @@ target_link_libraries(thermal-price-definition PRIVATE Boost::unit_test_framework libantares-core - libantares-core-checks + checks ) # Linux if(UNIX AND NOT APPLE) diff --git a/src/tests/src/libs/antares/study/thermal-price-definition/thermal-price-definition.cpp b/src/tests/src/libs/antares/study/thermal-price-definition/thermal-price-definition.cpp index a0fa5840ba..290066c87a 100644 --- a/src/tests/src/libs/antares/study/thermal-price-definition/thermal-price-definition.cpp +++ b/src/tests/src/libs/antares/study/thermal-price-definition/thermal-price-definition.cpp @@ -11,7 +11,7 @@ #include #include -#include "checkLoadedInputData.h" +#include "checks/checkLoadedInputData.h" #include "cluster_list.h" #include "container.h" diff --git a/src/tests/src/solver/simulation/CMakeLists.txt b/src/tests/src/solver/simulation/CMakeLists.txt index b2a91e74a0..bfab3f6cba 100644 --- a/src/tests/src/solver/simulation/CMakeLists.txt +++ b/src/tests/src/solver/simulation/CMakeLists.txt @@ -46,6 +46,7 @@ target_link_libraries(test-store-timeseries-number test_utils_unit libantares-core libantares-solver-simulation + result_writer ) # Linux diff --git a/src/tests/src/solver/simulation/test-store-timeseries-number.cpp b/src/tests/src/solver/simulation/test-store-timeseries-number.cpp index ffed096f9d..0e0bc3da73 100644 --- a/src/tests/src/solver/simulation/test-store-timeseries-number.cpp +++ b/src/tests/src/solver/simulation/test-store-timeseries-number.cpp @@ -9,9 +9,10 @@ #include #include #include "timeseries-numbers.h" -#include #include "BindingConstraintsTimeSeriesNumbersWriter.h" #include "utils.h" +#include "antares/writer/writer_factory.h" +#include "antares/writer/result_format.h" using namespace Antares::Solver; using namespace Antares::Data; @@ -41,7 +42,8 @@ BOOST_AUTO_TEST_CASE(BC_group_TestGroup_has_output_file) { auto working_tmp_dir = CREATE_TMP_DIR_BASED_ON_TEST_NAME(); - study->resultWriter = std::make_shared(working_tmp_dir.string().c_str()); + study->resultWriter = resultWriterFactory(ResultFormat::legacyFilesDirectories, working_tmp_dir.string().c_str(), + nullptr, nullptr); fs::path bc_path = working_tmp_dir / "ts-numbers" / "bindingconstraints" / "TestGroup.txt"; initializeStudy(*study); @@ -62,7 +64,8 @@ BOOST_AUTO_TEST_CASE(BC_output_ts_numbers_file_for_each_group) { auto working_tmp_dir = CREATE_TMP_DIR_BASED_ON_TEST_NAME(); - study->resultWriter = std::make_shared(working_tmp_dir.string().c_str()); + study->resultWriter = resultWriterFactory(ResultFormat::legacyFilesDirectories, working_tmp_dir.string().c_str(), + nullptr, nullptr); initializeStudy(*study); TimeSeriesNumbers::Generate(*study); @@ -86,7 +89,8 @@ BOOST_AUTO_TEST_CASE(BC_timeseries_numbers_store_values) { auto working_tmp_dir = CREATE_TMP_DIR_BASED_ON_TEST_NAME(); - study->resultWriter = std::make_shared(working_tmp_dir.string().c_str()); + study->resultWriter = resultWriterFactory(ResultFormat::legacyFilesDirectories, working_tmp_dir.string().c_str(), + nullptr, nullptr); initializeStudy(*study); TimeSeriesNumbers::Generate(*study); diff --git a/src/tools/batchrun/CMakeLists.txt b/src/tools/batchrun/CMakeLists.txt index b8b41f2575..c7fe1cccbe 100644 --- a/src/tools/batchrun/CMakeLists.txt +++ b/src/tools/batchrun/CMakeLists.txt @@ -37,7 +37,7 @@ INSTALL(EXPORT antares-batchrun set(BATCHRUN_LIBS libantares-core - libantares-core-calendar + date yuni-static-core inifile ${CMAKE_THREADS_LIBS_INIT} diff --git a/src/tools/yby-aggregator/CMakeLists.txt b/src/tools/yby-aggregator/CMakeLists.txt index 619a80deb5..098b169c81 100644 --- a/src/tools/yby-aggregator/CMakeLists.txt +++ b/src/tools/yby-aggregator/CMakeLists.txt @@ -48,7 +48,7 @@ INSTALL(EXPORT antares-ybyaggregator set(YBY_AGGREGATOR_LIBS libantares-core - libantares-core-calendar + date yuni-static-core ${wxWidgets_LIBRARIES} ${CMAKE_THREADS_LIBS_INIT}) diff --git a/src/ui/simulator/CMakeLists.txt b/src/ui/simulator/CMakeLists.txt index 39f5148965..4aad2a34d8 100644 --- a/src/ui/simulator/CMakeLists.txt +++ b/src/ui/simulator/CMakeLists.txt @@ -146,7 +146,7 @@ set(ANTARES_LIBS libantares-solver-constraints-builder libantares-solver-variable-info libantares-core - libantares-core-calendar + date yuni-static-core yuni-static-uuid libmodel_antares diff --git a/src/ui/simulator/application/application.cpp b/src/ui/simulator/application/application.cpp index b21446e82e..7a4a5435a1 100644 --- a/src/ui/simulator/application/application.cpp +++ b/src/ui/simulator/application/application.cpp @@ -44,7 +44,7 @@ #include #include "study.h" #include -#include +#include #include #ifndef YUNI_OS_WINDOWS #include diff --git a/src/ui/simulator/application/main/main.cpp b/src/ui/simulator/application/main/main.cpp index d807c8c7be..0df326e541 100644 --- a/src/ui/simulator/application/main/main.cpp +++ b/src/ui/simulator/application/main/main.cpp @@ -32,7 +32,7 @@ #include "../menus.h" #include "../study.h" -#include +#include // Map #include "../../toolbox/components/map/component.h" diff --git a/src/ui/simulator/application/main/refresh.cpp b/src/ui/simulator/application/main/refresh.cpp index 58a5cea767..f3f6b90ed5 100644 --- a/src/ui/simulator/application/main/refresh.cpp +++ b/src/ui/simulator/application/main/refresh.cpp @@ -28,7 +28,7 @@ #include "main.h" #include "../study.h" #include "../menus.h" -#include +#include #include #include "../../toolbox/components/refresh.h" #include "../../../common/lock.h" diff --git a/src/ui/simulator/application/study.cpp b/src/ui/simulator/application/study.cpp index 9392ca5769..8fa0665b31 100644 --- a/src/ui/simulator/application/study.cpp +++ b/src/ui/simulator/application/study.cpp @@ -30,7 +30,7 @@ #include #include #include -#include +#include #include @@ -40,7 +40,7 @@ #include #include "../toolbox/execute/execute.h" #include "../windows/message.h" -#include +#include #include "../windows/saveas.h" #include "main.h" #include "menus.h" diff --git a/src/ui/simulator/toolbox/components/datagrid/component.cpp b/src/ui/simulator/toolbox/components/datagrid/component.cpp index 665fb7606d..51bd7b8a6b 100644 --- a/src/ui/simulator/toolbox/components/datagrid/component.cpp +++ b/src/ui/simulator/toolbox/components/datagrid/component.cpp @@ -26,7 +26,7 @@ */ #include -#include +#include #include #ifndef YUNI_OS_WINDOWS #include diff --git a/src/ui/simulator/toolbox/components/datagrid/component.h b/src/ui/simulator/toolbox/components/datagrid/component.h index 3f8b6bfa8a..ab5df996d9 100644 --- a/src/ui/simulator/toolbox/components/datagrid/component.h +++ b/src/ui/simulator/toolbox/components/datagrid/component.h @@ -29,7 +29,7 @@ #include #include -#include +#include namespace Antares { diff --git a/src/ui/simulator/toolbox/components/datagrid/filter/all/columnindex.h b/src/ui/simulator/toolbox/components/datagrid/filter/all/columnindex.h index e061931cbb..2d74cd0a95 100644 --- a/src/ui/simulator/toolbox/components/datagrid/filter/all/columnindex.h +++ b/src/ui/simulator/toolbox/components/datagrid/filter/all/columnindex.h @@ -29,7 +29,7 @@ #include #include "../filter.h" -#include +#include namespace Antares { diff --git a/src/ui/simulator/toolbox/components/datagrid/filter/all/day.h b/src/ui/simulator/toolbox/components/datagrid/filter/all/day.h index 5633e6710e..9f79924e87 100644 --- a/src/ui/simulator/toolbox/components/datagrid/filter/all/day.h +++ b/src/ui/simulator/toolbox/components/datagrid/filter/all/day.h @@ -29,7 +29,7 @@ #include #include "../filter.h" -#include +#include namespace Antares { diff --git a/src/ui/simulator/toolbox/components/datagrid/filter/all/dayyear.h b/src/ui/simulator/toolbox/components/datagrid/filter/all/dayyear.h index 33b8b85ab6..073d7170f8 100644 --- a/src/ui/simulator/toolbox/components/datagrid/filter/all/dayyear.h +++ b/src/ui/simulator/toolbox/components/datagrid/filter/all/dayyear.h @@ -29,7 +29,7 @@ #include #include "../filter.h" -#include +#include namespace Antares { diff --git a/src/ui/simulator/toolbox/components/datagrid/filter/all/hour.h b/src/ui/simulator/toolbox/components/datagrid/filter/all/hour.h index d0cadac814..6e37e3620b 100644 --- a/src/ui/simulator/toolbox/components/datagrid/filter/all/hour.h +++ b/src/ui/simulator/toolbox/components/datagrid/filter/all/hour.h @@ -29,7 +29,7 @@ #include #include "../filter.h" -#include +#include namespace Antares { diff --git a/src/ui/simulator/toolbox/components/datagrid/filter/all/week.cpp b/src/ui/simulator/toolbox/components/datagrid/filter/all/week.cpp index 253861e421..b3d4b4203c 100644 --- a/src/ui/simulator/toolbox/components/datagrid/filter/all/week.cpp +++ b/src/ui/simulator/toolbox/components/datagrid/filter/all/week.cpp @@ -26,7 +26,7 @@ */ #include "week.h" -#include +#include #include #include "application/study.h" diff --git a/src/ui/simulator/toolbox/components/datagrid/filter/all/weekday.h b/src/ui/simulator/toolbox/components/datagrid/filter/all/weekday.h index 02393cb21c..01ae2aedf3 100644 --- a/src/ui/simulator/toolbox/components/datagrid/filter/all/weekday.h +++ b/src/ui/simulator/toolbox/components/datagrid/filter/all/weekday.h @@ -29,7 +29,7 @@ #include #include "../filter.h" -#include +#include #include #include "application/study.h" diff --git a/src/ui/simulator/toolbox/components/datagrid/filter/component.h b/src/ui/simulator/toolbox/components/datagrid/filter/component.h index dd17dbf74b..d59433f3a8 100644 --- a/src/ui/simulator/toolbox/components/datagrid/filter/component.h +++ b/src/ui/simulator/toolbox/components/datagrid/filter/component.h @@ -34,7 +34,7 @@ #include "input.h" #include "../gridhelper.h" #include "filter.h" -#include +#include #include "component/panel.h" namespace Antares diff --git a/src/ui/simulator/toolbox/components/datagrid/filter/filter.cpp b/src/ui/simulator/toolbox/components/datagrid/filter/filter.cpp index a1f345e648..1023aaf9f4 100644 --- a/src/ui/simulator/toolbox/components/datagrid/filter/filter.cpp +++ b/src/ui/simulator/toolbox/components/datagrid/filter/filter.cpp @@ -28,7 +28,7 @@ #include #include "operator.h" #include "filter.h" -#include +#include #include #include #include "input.h" diff --git a/src/ui/simulator/toolbox/components/datagrid/filter/filter.h b/src/ui/simulator/toolbox/components/datagrid/filter/filter.h index 465a08db55..4991b88d66 100644 --- a/src/ui/simulator/toolbox/components/datagrid/filter/filter.h +++ b/src/ui/simulator/toolbox/components/datagrid/filter/filter.h @@ -31,7 +31,7 @@ #include #include "operator.h" #include "operator.list.h" -#include +#include namespace Antares { diff --git a/src/ui/simulator/toolbox/components/datagrid/filter/operator.list.cpp b/src/ui/simulator/toolbox/components/datagrid/filter/operator.list.cpp index b84b717a68..a70a793db0 100644 --- a/src/ui/simulator/toolbox/components/datagrid/filter/operator.list.cpp +++ b/src/ui/simulator/toolbox/components/datagrid/filter/operator.list.cpp @@ -28,7 +28,7 @@ #include "operator.list.h" #include "operator/all.h" #include "filter.h" -#include +#include namespace Antares { diff --git a/src/ui/simulator/toolbox/components/datagrid/filter/parameter/parameter.cpp b/src/ui/simulator/toolbox/components/datagrid/filter/parameter/parameter.cpp index 93c0236b74..924eb42ad3 100644 --- a/src/ui/simulator/toolbox/components/datagrid/filter/parameter/parameter.cpp +++ b/src/ui/simulator/toolbox/components/datagrid/filter/parameter/parameter.cpp @@ -26,7 +26,7 @@ */ #include "parameter.h" -#include +#include #include "../../../../validator.h" #include #include diff --git a/src/ui/simulator/toolbox/components/datagrid/renderer.h b/src/ui/simulator/toolbox/components/datagrid/renderer.h index 9513ad456b..f1fe97d1e2 100644 --- a/src/ui/simulator/toolbox/components/datagrid/renderer.h +++ b/src/ui/simulator/toolbox/components/datagrid/renderer.h @@ -29,7 +29,7 @@ #include #include -#include +#include #include #include "default.h" #include diff --git a/src/ui/simulator/toolbox/components/datagrid/renderer/area/creditmodulations.h b/src/ui/simulator/toolbox/components/datagrid/renderer/area/creditmodulations.h index 4ced07c345..a5790a8e82 100644 --- a/src/ui/simulator/toolbox/components/datagrid/renderer/area/creditmodulations.h +++ b/src/ui/simulator/toolbox/components/datagrid/renderer/area/creditmodulations.h @@ -30,7 +30,7 @@ #include #include "../area.h" #include "../matrix.h" -#include +#include #include namespace Antares diff --git a/src/ui/simulator/toolbox/components/datagrid/renderer/area/dsm.h b/src/ui/simulator/toolbox/components/datagrid/renderer/area/dsm.h index 61d3148d10..82b0175cb7 100644 --- a/src/ui/simulator/toolbox/components/datagrid/renderer/area/dsm.h +++ b/src/ui/simulator/toolbox/components/datagrid/renderer/area/dsm.h @@ -30,7 +30,7 @@ #include #include "../area.h" #include "../matrix.h" -#include +#include #include namespace Antares diff --git a/src/ui/simulator/toolbox/components/datagrid/renderer/area/hydro/allocation.h b/src/ui/simulator/toolbox/components/datagrid/renderer/area/hydro/allocation.h index b6aa99c694..b940f792a8 100644 --- a/src/ui/simulator/toolbox/components/datagrid/renderer/area/hydro/allocation.h +++ b/src/ui/simulator/toolbox/components/datagrid/renderer/area/hydro/allocation.h @@ -28,7 +28,7 @@ #define __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_AREA_HYDRO_ALLOCATION_H__ #include -#include +#include #include #include "../../../renderer.h" diff --git a/src/ui/simulator/toolbox/components/datagrid/renderer/area/hydromonthlypower.h b/src/ui/simulator/toolbox/components/datagrid/renderer/area/hydromonthlypower.h index 667988a841..62d717ab0e 100644 --- a/src/ui/simulator/toolbox/components/datagrid/renderer/area/hydromonthlypower.h +++ b/src/ui/simulator/toolbox/components/datagrid/renderer/area/hydromonthlypower.h @@ -30,7 +30,7 @@ #include #include "../area.h" #include "../matrix.h" -#include +#include #include namespace Antares diff --git a/src/ui/simulator/toolbox/components/datagrid/renderer/area/hydroprepro.h b/src/ui/simulator/toolbox/components/datagrid/renderer/area/hydroprepro.h index ab5d0c81d7..425e5f53c6 100644 --- a/src/ui/simulator/toolbox/components/datagrid/renderer/area/hydroprepro.h +++ b/src/ui/simulator/toolbox/components/datagrid/renderer/area/hydroprepro.h @@ -30,7 +30,7 @@ #include #include "../area.h" #include "../matrix.h" -#include +#include #include namespace Antares diff --git a/src/ui/simulator/toolbox/components/datagrid/renderer/area/inflowpattern.h b/src/ui/simulator/toolbox/components/datagrid/renderer/area/inflowpattern.h index ed85e8e1a0..eb48fe9789 100644 --- a/src/ui/simulator/toolbox/components/datagrid/renderer/area/inflowpattern.h +++ b/src/ui/simulator/toolbox/components/datagrid/renderer/area/inflowpattern.h @@ -30,7 +30,7 @@ #include #include "../area.h" #include "../matrix.h" -#include +#include #include namespace Antares diff --git a/src/ui/simulator/toolbox/components/datagrid/renderer/area/reservoirlevels.h b/src/ui/simulator/toolbox/components/datagrid/renderer/area/reservoirlevels.h index 33215c1b96..3826b17ad2 100644 --- a/src/ui/simulator/toolbox/components/datagrid/renderer/area/reservoirlevels.h +++ b/src/ui/simulator/toolbox/components/datagrid/renderer/area/reservoirlevels.h @@ -30,7 +30,7 @@ #include #include "../area.h" #include "../matrix.h" -#include +#include namespace Antares { diff --git a/src/ui/simulator/toolbox/components/datagrid/renderer/area/timeseries.h b/src/ui/simulator/toolbox/components/datagrid/renderer/area/timeseries.h index c68e9209cd..dadc06c850 100644 --- a/src/ui/simulator/toolbox/components/datagrid/renderer/area/timeseries.h +++ b/src/ui/simulator/toolbox/components/datagrid/renderer/area/timeseries.h @@ -32,7 +32,7 @@ #include "../matrix.h" #include "../../../../input/thermal-cluster.h" #include "../../../../input/renewable-cluster.h" -#include +#include #include "../../../../../application/study.h" namespace Antares diff --git a/src/ui/simulator/toolbox/components/datagrid/renderer/area/watervalues.h b/src/ui/simulator/toolbox/components/datagrid/renderer/area/watervalues.h index da7c28a6b3..803bef8b80 100644 --- a/src/ui/simulator/toolbox/components/datagrid/renderer/area/watervalues.h +++ b/src/ui/simulator/toolbox/components/datagrid/renderer/area/watervalues.h @@ -30,7 +30,7 @@ #include #include "../area.h" #include "../matrix.h" -#include +#include namespace Antares { 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 1a6ff4b072..84fddf276c 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 @@ -26,7 +26,7 @@ */ #include -#include +#include namespace Antares { 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 4d27a76ab0..928557400b 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 @@ -28,7 +28,7 @@ #define __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_AREA_XCAST_TRANSLATION_HXX__ #include -#include +#include namespace Antares { diff --git a/src/ui/simulator/toolbox/components/datagrid/renderer/connection.h b/src/ui/simulator/toolbox/components/datagrid/renderer/connection.h index 100b67257d..3319dfde4a 100644 --- a/src/ui/simulator/toolbox/components/datagrid/renderer/connection.h +++ b/src/ui/simulator/toolbox/components/datagrid/renderer/connection.h @@ -30,7 +30,7 @@ #include #include "../../../input/connection.h" #include "../renderer.h" -#include +#include #include "matrix.h" #include diff --git a/src/ui/simulator/toolbox/components/datagrid/renderer/matrix.h b/src/ui/simulator/toolbox/components/datagrid/renderer/matrix.h index 9ed1bbf59c..3fada3aa15 100644 --- a/src/ui/simulator/toolbox/components/datagrid/renderer/matrix.h +++ b/src/ui/simulator/toolbox/components/datagrid/renderer/matrix.h @@ -32,7 +32,7 @@ #include "../../../input/area.h" #include "../component.h" -#include +#include #include "../../../../application/study.h" #include diff --git a/src/ui/simulator/toolbox/jobs/job.cpp b/src/ui/simulator/toolbox/jobs/job.cpp index 9c8ac8c53a..8d85871bc4 100644 --- a/src/ui/simulator/toolbox/jobs/job.cpp +++ b/src/ui/simulator/toolbox/jobs/job.cpp @@ -53,7 +53,7 @@ #include "../../windows/message.h" #include "../components/refresh.h" #include -#include +#include #define PROGRESSBAR_MAX_RANGE 1000000 #define PROGRESSBAR_MAX_RANGE_F 1000000.0 diff --git a/src/ui/simulator/windows/correlation/correlation.cpp b/src/ui/simulator/windows/correlation/correlation.cpp index a02e0a988c..03787f9eb9 100644 --- a/src/ui/simulator/windows/correlation/correlation.cpp +++ b/src/ui/simulator/windows/correlation/correlation.cpp @@ -31,7 +31,7 @@ #include "../../toolbox/components/datagrid/component.h" #include "../../toolbox/components/datagrid/renderer/correlation.h" #include "../../toolbox/components/refresh.h" -#include +#include #include "../../toolbox/resources.h" #include diff --git a/src/ui/simulator/windows/output/panel/area-link-renderer.h b/src/ui/simulator/windows/output/panel/area-link-renderer.h index ceec2411cd..db8170cc8d 100644 --- a/src/ui/simulator/windows/output/panel/area-link-renderer.h +++ b/src/ui/simulator/windows/output/panel/area-link-renderer.h @@ -30,7 +30,7 @@ #include #include "../../../toolbox/components/datagrid/renderer.h" #include -#include +#include #include "../output.h" namespace Antares diff --git a/src/ui/simulator/windows/output/panel/panel.h b/src/ui/simulator/windows/output/panel/panel.h index c6a8ed3cb8..d62e396d30 100644 --- a/src/ui/simulator/windows/output/panel/panel.h +++ b/src/ui/simulator/windows/output/panel/panel.h @@ -33,7 +33,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/ui/simulator/windows/scenario-builder/panel.cpp b/src/ui/simulator/windows/scenario-builder/panel.cpp index 2fc897bbe5..1d96d5a411 100644 --- a/src/ui/simulator/windows/scenario-builder/panel.cpp +++ b/src/ui/simulator/windows/scenario-builder/panel.cpp @@ -26,7 +26,7 @@ */ #include "panel.h" -#include +#include #include #include #include diff --git a/src/ui/simulator/windows/simulation/panel.cpp b/src/ui/simulator/windows/simulation/panel.cpp index 56e6b206ab..a24f86fabd 100644 --- a/src/ui/simulator/windows/simulation/panel.cpp +++ b/src/ui/simulator/windows/simulation/panel.cpp @@ -26,7 +26,7 @@ */ #include "panel.h" -#include +#include #include #include "../../toolbox/components/notebook/notebook.h" #include "../../toolbox/components/captionpanel.h" From 5d3af8fa893c19fc4ed21db5ce95de62d4ce30a2 Mon Sep 17 00:00:00 2001 From: Jason Marechal Date: Thu, 10 Aug 2023 17:30:48 +0200 Subject: [PATCH 10/52] Remove extra writer dependency --- src/libs/antares/benchmarking/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/antares/benchmarking/CMakeLists.txt b/src/libs/antares/benchmarking/CMakeLists.txt index 9cb7378f94..dd9b4242b1 100644 --- a/src/libs/antares/benchmarking/CMakeLists.txt +++ b/src/libs/antares/benchmarking/CMakeLists.txt @@ -19,6 +19,7 @@ target_include_directories(benchmarking ${CMAKE_SOURCE_DIR}/libs/antares/array #links ${CMAKE_SOURCE_DIR}/libs/antares/logs #study -> binding constraint -> matrix -> jit ${CMAKE_SOURCE_DIR}/libs/antares/io #study -> binding constraint -> matrix + ${CMAKE_SOURCE_DIR}/libs/antares/writer #study PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ) @@ -27,5 +28,4 @@ target_link_libraries(benchmarking PRIVATE yuni-static-core inifile - result_writer ) From 2d2c41ab571978212920e3028320773de933b3e2 Mon Sep 17 00:00:00 2001 From: Jason Marechal Date: Mon, 14 Aug 2023 14:45:39 +0200 Subject: [PATCH 11/52] Improve Cmake correlation --- src/libs/antares/correlation/CMakeLists.txt | 6 ++++-- .../{ => antares/correlation}/correlation.h | 0 .../{ => antares/correlation}/correlation.hxx | 0 src/libs/antares/correlation/correlation.cpp | 10 ++++------ src/libs/antares/study/study.h | 2 +- src/solver/ts-generator/xcast/studydata.h | 18 ++++++------------ 6 files changed, 15 insertions(+), 21 deletions(-) rename src/libs/antares/correlation/{ => antares/correlation}/correlation.h (100%) rename src/libs/antares/correlation/{ => antares/correlation}/correlation.hxx (100%) diff --git a/src/libs/antares/correlation/CMakeLists.txt b/src/libs/antares/correlation/CMakeLists.txt index e9868fc22c..deb4226783 100644 --- a/src/libs/antares/correlation/CMakeLists.txt +++ b/src/libs/antares/correlation/CMakeLists.txt @@ -1,7 +1,7 @@ set(SRC_CORRELATION correlation.cpp - correlation.h - correlation.hxx + antares/correlation/correlation.h + antares/correlation/correlation.hxx ) source_group("correlation" FILES ${SRC_CORRELATION}) @@ -12,6 +12,8 @@ target_link_libraries(correlation yuni-static-core inifile array + PUBLIC + ${CMAKE_CURRENT_SOURCE_DIR} ) target_include_directories(correlation diff --git a/src/libs/antares/correlation/correlation.h b/src/libs/antares/correlation/antares/correlation/correlation.h similarity index 100% rename from src/libs/antares/correlation/correlation.h rename to src/libs/antares/correlation/antares/correlation/correlation.h diff --git a/src/libs/antares/correlation/correlation.hxx b/src/libs/antares/correlation/antares/correlation/correlation.hxx similarity index 100% rename from src/libs/antares/correlation/correlation.hxx rename to src/libs/antares/correlation/antares/correlation/correlation.hxx diff --git a/src/libs/antares/correlation/correlation.cpp b/src/libs/antares/correlation/correlation.cpp index 9f07fa8e00..a6f6352825 100644 --- a/src/libs/antares/correlation/correlation.cpp +++ b/src/libs/antares/correlation/correlation.cpp @@ -25,7 +25,7 @@ ** SPDX-License-Identifier: licenceRef-GPL3_WITH_RTE-Exceptions */ -#include "correlation.h" +#include "antares/correlation/correlation.h" #include "antares/study/study.h" #include "antares/study/area/area.h" #include "array/matrix.h" @@ -33,9 +33,7 @@ using namespace Yuni; using namespace Antares; -namespace Antares -{ -namespace Data +namespace Antares::Data { static inline void InterAreaCorrelationSetValue(Matrix<>& m, const char filename[], @@ -730,5 +728,5 @@ void Correlation::copyFrom(const Correlation& source, } } -} // namespace Data -} // namespace Antares +} // namespace Antares::Data + diff --git a/src/libs/antares/study/study.h b/src/libs/antares/study/study.h index d7b5424998..5333cb265c 100644 --- a/src/libs/antares/study/study.h +++ b/src/libs/antares/study/study.h @@ -49,7 +49,7 @@ #include "load-options.h" #include #include "layerdata.h" -#include "antares/correlation/correlation.h" +#include //TODO Collision #include "area/store-timeseries-numbers.h" #include "antares/study/binding_constraint/BindingConstraintsRepository.h" #include "antares/study/binding_constraint/BindingConstraintGroupRepository.h" diff --git a/src/solver/ts-generator/xcast/studydata.h b/src/solver/ts-generator/xcast/studydata.h index defe7459b1..5a5ebdb223 100644 --- a/src/solver/ts-generator/xcast/studydata.h +++ b/src/solver/ts-generator/xcast/studydata.h @@ -29,15 +29,9 @@ #include #include -#include +#include //TODO collision -namespace Antares -{ -namespace Solver -{ -namespace TSGenerator -{ -namespace XCast +namespace Antares::Solver::TSGenerator::XCast { class StudyData final { @@ -106,10 +100,10 @@ class StudyData final }; // class StudyData -} // namespace XCast -} // namespace TSGenerator -} // namespace Solver -} // namespace Antares +} // namespace Antares::Solver::TSGenerator::XCast + + + #include "studydata.hxx" From de3c1c26bc6a3bc226b6a7341dfa8bd95530cb2d Mon Sep 17 00:00:00 2001 From: Jason Marechal Date: Mon, 14 Aug 2023 15:09:17 +0200 Subject: [PATCH 12/52] Improve Cmake checks --- src/libs/antares/checks/CMakeLists.txt | 2 +- .../antares/checks/{ => antares}/checks/checkLoadedInputData.h | 0 src/libs/antares/checks/checkLoadedInputData.cpp | 2 +- src/solver/application.cpp | 2 +- .../study/thermal-price-definition/thermal-price-definition.cpp | 2 +- 5 files changed, 4 insertions(+), 4 deletions(-) rename src/libs/antares/checks/{ => antares}/checks/checkLoadedInputData.h (100%) diff --git a/src/libs/antares/checks/CMakeLists.txt b/src/libs/antares/checks/CMakeLists.txt index dde3381f00..1db825b1fd 100644 --- a/src/libs/antares/checks/CMakeLists.txt +++ b/src/libs/antares/checks/CMakeLists.txt @@ -1,6 +1,6 @@ set(SRC_CHECKS checkLoadedInputData.cpp - checks/checkLoadedInputData.h + antares/checks/checkLoadedInputData.h ) source_group("checks" FILES ${SRC_CHECKS}) diff --git a/src/libs/antares/checks/checks/checkLoadedInputData.h b/src/libs/antares/checks/antares/checks/checkLoadedInputData.h similarity index 100% rename from src/libs/antares/checks/checks/checkLoadedInputData.h rename to src/libs/antares/checks/antares/checks/checkLoadedInputData.h diff --git a/src/libs/antares/checks/checkLoadedInputData.cpp b/src/libs/antares/checks/checkLoadedInputData.cpp index 4e15218bbc..672b68d580 100644 --- a/src/libs/antares/checks/checkLoadedInputData.cpp +++ b/src/libs/antares/checks/checkLoadedInputData.cpp @@ -29,7 +29,7 @@ #include #include -#include "checks/checkLoadedInputData.h" +#include #include "area.h" namespace Antares::Check diff --git a/src/solver/application.cpp b/src/solver/application.cpp index 5a0d99d430..8b3309e5e6 100644 --- a/src/solver/application.cpp +++ b/src/solver/application.cpp @@ -8,7 +8,7 @@ #include #include -#include +#include #include #include "signal-handling/public.h" diff --git a/src/tests/src/libs/antares/study/thermal-price-definition/thermal-price-definition.cpp b/src/tests/src/libs/antares/study/thermal-price-definition/thermal-price-definition.cpp index 290066c87a..e4651a133d 100644 --- a/src/tests/src/libs/antares/study/thermal-price-definition/thermal-price-definition.cpp +++ b/src/tests/src/libs/antares/study/thermal-price-definition/thermal-price-definition.cpp @@ -11,7 +11,7 @@ #include #include -#include "checks/checkLoadedInputData.h" +#include #include "cluster_list.h" #include "container.h" From b1f4a354a1ac95c0bcb5b022945d64ee95c179bc Mon Sep 17 00:00:00 2001 From: Jason Marechal Date: Mon, 14 Aug 2023 15:28:33 +0200 Subject: [PATCH 13/52] Improve Cmake benchmarking --- src/libs/antares/benchmarking/CMakeLists.txt | 6 +++--- .../benchmarking/{ => antares}/benchmarking/file_content.h | 0 .../{ => antares}/benchmarking/info_collectors.h | 0 .../benchmarking/{ => antares}/benchmarking/timer.h | 0 src/libs/antares/benchmarking/file_content.cpp | 2 +- src/libs/antares/benchmarking/info_collectors.cpp | 2 +- src/libs/antares/benchmarking/timer.cpp | 2 +- src/libs/antares/study/load.cpp | 2 +- src/libs/antares/study/save.cpp | 2 +- src/libs/antares/writer/antares/writer/writer_factory.h | 2 +- src/libs/antares/writer/private/zip_writer.h | 4 ++-- src/libs/antares/writer/zip_writer.cpp | 7 ++++--- src/solver/application.cpp | 2 +- src/solver/application.h | 4 ++-- src/solver/main/adequacy.cpp | 2 +- src/solver/main/economy.cpp | 2 +- src/solver/simulation/solver.h | 2 +- src/solver/simulation/solver.hxx | 2 +- src/solver/ts-generator/hydro.cpp | 2 +- 19 files changed, 23 insertions(+), 22 deletions(-) rename src/libs/antares/benchmarking/{ => antares}/benchmarking/file_content.h (100%) rename src/libs/antares/benchmarking/{ => antares}/benchmarking/info_collectors.h (100%) rename src/libs/antares/benchmarking/{ => antares}/benchmarking/timer.h (100%) diff --git a/src/libs/antares/benchmarking/CMakeLists.txt b/src/libs/antares/benchmarking/CMakeLists.txt index dd9b4242b1..239e2a7884 100644 --- a/src/libs/antares/benchmarking/CMakeLists.txt +++ b/src/libs/antares/benchmarking/CMakeLists.txt @@ -1,9 +1,9 @@ set(SRC_BENCHMARKING timer.cpp info_collectors.cpp - benchmarking/file_content.h - benchmarking/timer.h - benchmarking/info_collectors.h + antares/benchmarking/file_content.h + antares/benchmarking/timer.h + antares/benchmarking/info_collectors.h file_content.cpp ) source_group("misc\\benchmarking" FILES ${SRC_BENCHMARKING}) diff --git a/src/libs/antares/benchmarking/benchmarking/file_content.h b/src/libs/antares/benchmarking/antares/benchmarking/file_content.h similarity index 100% rename from src/libs/antares/benchmarking/benchmarking/file_content.h rename to src/libs/antares/benchmarking/antares/benchmarking/file_content.h diff --git a/src/libs/antares/benchmarking/benchmarking/info_collectors.h b/src/libs/antares/benchmarking/antares/benchmarking/info_collectors.h similarity index 100% rename from src/libs/antares/benchmarking/benchmarking/info_collectors.h rename to src/libs/antares/benchmarking/antares/benchmarking/info_collectors.h diff --git a/src/libs/antares/benchmarking/benchmarking/timer.h b/src/libs/antares/benchmarking/antares/benchmarking/timer.h similarity index 100% rename from src/libs/antares/benchmarking/benchmarking/timer.h rename to src/libs/antares/benchmarking/antares/benchmarking/timer.h diff --git a/src/libs/antares/benchmarking/file_content.cpp b/src/libs/antares/benchmarking/file_content.cpp index 7cc07af859..fff86c654e 100644 --- a/src/libs/antares/benchmarking/file_content.cpp +++ b/src/libs/antares/benchmarking/file_content.cpp @@ -1,6 +1,6 @@ #include -#include "benchmarking/file_content.h" +#include using namespace std; diff --git a/src/libs/antares/benchmarking/info_collectors.cpp b/src/libs/antares/benchmarking/info_collectors.cpp index 371311f094..34b15d8868 100644 --- a/src/libs/antares/benchmarking/info_collectors.cpp +++ b/src/libs/antares/benchmarking/info_collectors.cpp @@ -1,5 +1,5 @@ #include -#include "benchmarking/info_collectors.h" +#include #include #include #include diff --git a/src/libs/antares/benchmarking/timer.cpp b/src/libs/antares/benchmarking/timer.cpp index 41a45e8db1..1258b835d3 100644 --- a/src/libs/antares/benchmarking/timer.cpp +++ b/src/libs/antares/benchmarking/timer.cpp @@ -25,7 +25,7 @@ ** SPDX-License-Identifier: licenceRef-GPL3_WITH_RTE-Exceptions */ -#include "benchmarking/timer.h" +#include #include using namespace Yuni; diff --git a/src/libs/antares/study/load.cpp b/src/libs/antares/study/load.cpp index 7d34c8070e..503fff0a04 100644 --- a/src/libs/antares/study/load.cpp +++ b/src/libs/antares/study/load.cpp @@ -27,7 +27,7 @@ #include #include "study.h" #include "version.h" -#include +#include #include "scenario-builder/sets.h" #include "ui-runtimeinfos.h" diff --git a/src/libs/antares/study/save.cpp b/src/libs/antares/study/save.cpp index eec3efc00c..6e3e03cb6a 100644 --- a/src/libs/antares/study/save.cpp +++ b/src/libs/antares/study/save.cpp @@ -26,7 +26,7 @@ */ #include "study.h" -#include +#include #include "scenario-builder/sets.h" #include #include diff --git a/src/libs/antares/writer/antares/writer/writer_factory.h b/src/libs/antares/writer/antares/writer/writer_factory.h index f4f5f32eaf..50e414e89b 100644 --- a/src/libs/antares/writer/antares/writer/writer_factory.h +++ b/src/libs/antares/writer/antares/writer/writer_factory.h @@ -5,7 +5,7 @@ #include "i_writer.h" #include "result_format.h" -#include +#include namespace Antares::Solver { diff --git a/src/libs/antares/writer/private/zip_writer.h b/src/libs/antares/writer/private/zip_writer.h index b1f3fcb494..cadc031625 100644 --- a/src/libs/antares/writer/private/zip_writer.h +++ b/src/libs/antares/writer/private/zip_writer.h @@ -8,7 +8,7 @@ #include #include "antares/writer/i_writer.h" -#include "benchmarking/info_collectors.h" +#include namespace Antares::Solver @@ -25,7 +25,7 @@ class ZipWriteJob final : public Yuni::Job::IJob { public: ZipWriteJob(ZipWriter& writer, - const std::string& entryPath, + std::string entryPath, ContentT& content, Benchmarking::IDurationCollector* duration_collector); virtual void onExecute() override; diff --git a/src/libs/antares/writer/zip_writer.cpp b/src/libs/antares/writer/zip_writer.cpp index f642c39c6b..014698b1ff 100644 --- a/src/libs/antares/writer/zip_writer.cpp +++ b/src/libs/antares/writer/zip_writer.cpp @@ -2,7 +2,7 @@ #include // Yuni::IO::File::LoadFromFile #include "private/zip_writer.h" -#include +#include extern "C" { @@ -13,19 +13,20 @@ extern "C" } #include // std::time +#include namespace Antares::Solver { // Class ZipWriteJob template ZipWriteJob::ZipWriteJob(ZipWriter& writer, - const std::string& entryPath, + std::string entryPath, ContentT& content, Benchmarking::IDurationCollector* duration_collector) : pZipHandle(writer.pZipHandle), pZipMutex(writer.pZipMutex), pState(writer.pState), - pEntryPath(entryPath), + pEntryPath(std::move(entryPath)), pContent(std::move(content)), pDurationCollector(duration_collector) { diff --git a/src/solver/application.cpp b/src/solver/application.cpp index 8b3309e5e6..9dfcb340a5 100644 --- a/src/solver/application.cpp +++ b/src/solver/application.cpp @@ -4,7 +4,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/solver/application.h b/src/solver/application.h index 7f095cf351..40caaff1a9 100644 --- a/src/solver/application.h +++ b/src/solver/application.h @@ -3,8 +3,8 @@ #include "misc/options.h" #include #include -#include -#include +#include +#include #include "simulation/simulation.h" #include diff --git a/src/solver/main/adequacy.cpp b/src/solver/main/adequacy.cpp index 2c060418a3..16b8ab1b10 100644 --- a/src/solver/main/adequacy.cpp +++ b/src/solver/main/adequacy.cpp @@ -28,7 +28,7 @@ #include "../application.h" #include "../simulation/solver.h" #include "../simulation/adequacy.h" -#include +#include #include namespace Antares diff --git a/src/solver/main/economy.cpp b/src/solver/main/economy.cpp index ea8588df17..b7f93ce6be 100644 --- a/src/solver/main/economy.cpp +++ b/src/solver/main/economy.cpp @@ -28,7 +28,7 @@ #include "../application.h" #include "../simulation/solver.h" #include "../simulation/economy.h" -#include +#include #include namespace Antares diff --git a/src/solver/simulation/solver.h b/src/solver/simulation/solver.h index 620b2a021e..b64e222694 100644 --- a/src/solver/simulation/solver.h +++ b/src/solver/simulation/solver.h @@ -31,7 +31,7 @@ #include #include #include // PowerFluctuations -#include +#include #include #include diff --git a/src/solver/simulation/solver.hxx b/src/solver/simulation/solver.hxx index 85292f84c3..0e15b0311f 100644 --- a/src/solver/simulation/solver.hxx +++ b/src/solver/simulation/solver.hxx @@ -30,7 +30,7 @@ #include "../variable/constants.h" #include #include -#include +#include #include #include "../variable/print.h" #include diff --git a/src/solver/ts-generator/hydro.cpp b/src/solver/ts-generator/hydro.cpp index 702428fb83..174a0f38c4 100644 --- a/src/solver/ts-generator/hydro.cpp +++ b/src/solver/ts-generator/hydro.cpp @@ -28,7 +28,7 @@ #include #include "../simulation/sim_extern_variables_globales.h" #include "../aleatoire/alea_fonctions.h" -#include +#include #include #include #include "../misc/cholesky.h" From 23825fefbb29c9998da789924cc56b7641ac174d Mon Sep 17 00:00:00 2001 From: Jason Marechal Date: Mon, 14 Aug 2023 15:42:52 +0200 Subject: [PATCH 14/52] Improve Cmake array --- src/libs/antares/array/CMakeLists.txt | 6 +++--- src/libs/antares/array/{ => antares}/array/array1d.h | 0 .../array/{ => antares}/array/matrix-to-buffer.h | 0 .../array/{ => antares}/array/matrix-to-buffer.hxx | 0 src/libs/antares/array/{ => antares}/array/matrix.h | 0 .../antares/array/{ => antares}/array/matrix.hxx | 0 .../correlation/antares/correlation/correlation.h | 2 +- src/libs/antares/correlation/correlation.cpp | 2 +- src/libs/antares/study/area/area.h | 2 +- src/libs/antares/study/area/links.h | 2 +- src/libs/antares/study/area/list.cpp | 12 +++++------- src/libs/antares/study/area/scratchpad.h | 2 +- .../study/binding_constraint/BindingConstraint.h | 2 +- .../antares/study/binding_constraint/EnvForLoading.h | 2 +- src/libs/antares/study/memory-usage.h | 2 +- src/libs/antares/study/parts/common/cluster.h | 2 +- src/libs/antares/study/parts/common/series.h | 2 +- src/libs/antares/study/parts/hydro/container.cpp | 2 +- src/libs/antares/study/parts/hydro/prepro.cpp | 2 +- src/libs/antares/study/parts/hydro/prepro.h | 2 +- src/libs/antares/study/parts/hydro/series.h | 2 +- src/libs/antares/study/parts/load/series.h | 2 +- src/libs/antares/study/parts/renewable/cluster.h | 2 +- src/libs/antares/study/parts/solar/series.h | 2 +- src/libs/antares/study/parts/thermal/cluster.h | 2 +- src/libs/antares/study/parts/thermal/ecoInput.cpp | 2 +- src/libs/antares/study/parts/thermal/ecoInput.h | 2 +- src/libs/antares/study/parts/thermal/prepro.cpp | 2 +- src/libs/antares/study/parts/thermal/prepro.h | 2 +- src/libs/antares/study/parts/wind/series.h | 2 +- src/libs/antares/study/xcast/xcast.h | 10 ++++------ src/solver/misc/cholesky.h | 2 +- src/tests/src/libs/antares/CMakeLists.txt | 4 ++-- src/tests/src/libs/antares/array/fill-matrix.h | 2 +- src/ui/simulator/toolbox/clipboard/clipboard.h | 11 +++++------ .../toolbox/components/datagrid/component.cpp | 2 +- .../windows/output/panel/area-link-renderer.h | 2 +- src/ui/simulator/windows/output/panel/panel.h | 2 +- 38 files changed, 47 insertions(+), 52 deletions(-) rename src/libs/antares/array/{ => antares}/array/array1d.h (100%) rename src/libs/antares/array/{ => antares}/array/matrix-to-buffer.h (100%) rename src/libs/antares/array/{ => antares}/array/matrix-to-buffer.hxx (100%) rename src/libs/antares/array/{ => antares}/array/matrix.h (100%) rename src/libs/antares/array/{ => antares}/array/matrix.hxx (100%) diff --git a/src/libs/antares/array/CMakeLists.txt b/src/libs/antares/array/CMakeLists.txt index afbab94c6f..0b42b73f15 100644 --- a/src/libs/antares/array/CMakeLists.txt +++ b/src/libs/antares/array/CMakeLists.txt @@ -1,8 +1,8 @@ set(SRC_MATRIX - array/matrix.h - array/array1d.h + antares/array/matrix.h + antares/array/array1d.h + antares/array/matrix.hxx matrix.cpp - array/matrix.hxx ) source_group("array" FILES ${SRC_MATRIX}) diff --git a/src/libs/antares/array/array/array1d.h b/src/libs/antares/array/antares/array/array1d.h similarity index 100% rename from src/libs/antares/array/array/array1d.h rename to src/libs/antares/array/antares/array/array1d.h diff --git a/src/libs/antares/array/array/matrix-to-buffer.h b/src/libs/antares/array/antares/array/matrix-to-buffer.h similarity index 100% rename from src/libs/antares/array/array/matrix-to-buffer.h rename to src/libs/antares/array/antares/array/matrix-to-buffer.h diff --git a/src/libs/antares/array/array/matrix-to-buffer.hxx b/src/libs/antares/array/antares/array/matrix-to-buffer.hxx similarity index 100% rename from src/libs/antares/array/array/matrix-to-buffer.hxx rename to src/libs/antares/array/antares/array/matrix-to-buffer.hxx diff --git a/src/libs/antares/array/array/matrix.h b/src/libs/antares/array/antares/array/matrix.h similarity index 100% rename from src/libs/antares/array/array/matrix.h rename to src/libs/antares/array/antares/array/matrix.h diff --git a/src/libs/antares/array/array/matrix.hxx b/src/libs/antares/array/antares/array/matrix.hxx similarity index 100% rename from src/libs/antares/array/array/matrix.hxx rename to src/libs/antares/array/antares/array/matrix.hxx diff --git a/src/libs/antares/correlation/antares/correlation/correlation.h b/src/libs/antares/correlation/antares/correlation/correlation.h index 18f7e80281..532e1b7546 100644 --- a/src/libs/antares/correlation/antares/correlation/correlation.h +++ b/src/libs/antares/correlation/antares/correlation/correlation.h @@ -28,7 +28,7 @@ #define __ANTARES_LIBS_ARRAY_CORRELATION_H__ #include -#include "array/matrix.h" +#include #include #include "../study/fwd.h" #include "../study/version.h" diff --git a/src/libs/antares/correlation/correlation.cpp b/src/libs/antares/correlation/correlation.cpp index a6f6352825..1b861762cf 100644 --- a/src/libs/antares/correlation/correlation.cpp +++ b/src/libs/antares/correlation/correlation.cpp @@ -28,7 +28,7 @@ #include "antares/correlation/correlation.h" #include "antares/study/study.h" #include "antares/study/area/area.h" -#include "array/matrix.h" +#include using namespace Yuni; using namespace Antares; diff --git a/src/libs/antares/study/area/area.h b/src/libs/antares/study/area/area.h index 0a6bbae9d9..0c8531e0c8 100644 --- a/src/libs/antares/study/area/area.h +++ b/src/libs/antares/study/area/area.h @@ -32,7 +32,7 @@ #include #include #include -#include "array/matrix.h" +#include #include "../parts/parts.h" #include #include diff --git a/src/libs/antares/study/area/links.h b/src/libs/antares/study/area/links.h index b444129bf0..8180777366 100644 --- a/src/libs/antares/study/area/links.h +++ b/src/libs/antares/study/area/links.h @@ -31,7 +31,7 @@ #include #include #include "../fwd.h" -#include "array/matrix.h" +#include #include #include diff --git a/src/libs/antares/study/area/list.cpp b/src/libs/antares/study/area/list.cpp index 994e3dbdea..85895cc552 100644 --- a/src/libs/antares/study/area/list.cpp +++ b/src/libs/antares/study/area/list.cpp @@ -29,9 +29,9 @@ #include #include #include "../study.h" -#include +#include #include "area.h" -#include "array/array1d.h" +#include #include "inifile/inifile.h" #include "logs/logs.h" #include "../memory-usage.h" @@ -45,9 +45,7 @@ using namespace Yuni; -namespace Antares -{ -namespace Data +namespace Antares::Data { namespace // anonymous { @@ -1658,5 +1656,5 @@ void AreaList::removeThermalTimeseries() }); } -} // namespace Data -} // namespace Antares +} // namespace Antares::Data + diff --git a/src/libs/antares/study/area/scratchpad.h b/src/libs/antares/study/area/scratchpad.h index 3851c2fab6..7b596f6e20 100644 --- a/src/libs/antares/study/area/scratchpad.h +++ b/src/libs/antares/study/area/scratchpad.h @@ -31,7 +31,7 @@ #include #include #include "../fwd.h" -#include "array/matrix.h" +#include #include #include diff --git a/src/libs/antares/study/binding_constraint/BindingConstraint.h b/src/libs/antares/study/binding_constraint/BindingConstraint.h index 87307da60f..97393616d9 100644 --- a/src/libs/antares/study/binding_constraint/BindingConstraint.h +++ b/src/libs/antares/study/binding_constraint/BindingConstraint.h @@ -33,7 +33,7 @@ #include "../../constants.h" #include "../area/links.h" #include "../parts/thermal/cluster.h" -#include "array/matrix.h" +#include #include "inifile/inifile.h" #include "EnvForLoading.h" #include "antares/study/filter.h" diff --git a/src/libs/antares/study/binding_constraint/EnvForLoading.h b/src/libs/antares/study/binding_constraint/EnvForLoading.h index 65e108255d..c188be4c41 100644 --- a/src/libs/antares/study/binding_constraint/EnvForLoading.h +++ b/src/libs/antares/study/binding_constraint/EnvForLoading.h @@ -6,7 +6,7 @@ #include "yuni/core/fwd.h" #include -#include "array/matrix.h" +#include namespace Antares::Data { diff --git a/src/libs/antares/study/memory-usage.h b/src/libs/antares/study/memory-usage.h index 682b9bb425..c1a04e42c6 100644 --- a/src/libs/antares/study/memory-usage.h +++ b/src/libs/antares/study/memory-usage.h @@ -29,7 +29,7 @@ #include #include "fwd.h" -#include "array/matrix.h" +#include namespace Antares::Data { diff --git a/src/libs/antares/study/parts/common/cluster.h b/src/libs/antares/study/parts/common/cluster.h index 3af3438cdb..221855914e 100644 --- a/src/libs/antares/study/parts/common/cluster.h +++ b/src/libs/antares/study/parts/common/cluster.h @@ -4,7 +4,7 @@ #include #include #include "series.h" -#include "array/matrix.h" +#include #include "../../fwd.h" #include diff --git a/src/libs/antares/study/parts/common/series.h b/src/libs/antares/study/parts/common/series.h index 4e2a7b50f7..0b7df33a72 100644 --- a/src/libs/antares/study/parts/common/series.h +++ b/src/libs/antares/study/parts/common/series.h @@ -27,7 +27,7 @@ #ifndef __ANTARES_LIBS_STUDY_PARTS_COMMON_TIMESERIES_H__ #define __ANTARES_LIBS_STUDY_PARTS_COMMON_TIMESERIES_H__ -#include "array/matrix.h" +#include #include "../../fwd.h" namespace Antares diff --git a/src/libs/antares/study/parts/hydro/container.cpp b/src/libs/antares/study/parts/hydro/container.cpp index 4e9248e284..f54d0ac58d 100644 --- a/src/libs/antares/study/parts/hydro/container.cpp +++ b/src/libs/antares/study/parts/hydro/container.cpp @@ -28,7 +28,7 @@ #include "../../study.h" #include "container.h" #include -#include "array/array1d.h" +#include using namespace Antares; using namespace Yuni; diff --git a/src/libs/antares/study/parts/hydro/prepro.cpp b/src/libs/antares/study/parts/hydro/prepro.cpp index d2d5b36c43..ad265fddee 100644 --- a/src/libs/antares/study/parts/hydro/prepro.cpp +++ b/src/libs/antares/study/parts/hydro/prepro.cpp @@ -32,7 +32,7 @@ #include "../../memory-usage.h" #include "prepro.h" #include -#include "array/array1d.h" +#include #include "logs/logs.h" using namespace Antares; diff --git a/src/libs/antares/study/parts/hydro/prepro.h b/src/libs/antares/study/parts/hydro/prepro.h index 8a62b1afe5..5ef195635e 100644 --- a/src/libs/antares/study/parts/hydro/prepro.h +++ b/src/libs/antares/study/parts/hydro/prepro.h @@ -27,7 +27,7 @@ #ifndef __ANTARES_LIBS_STUDY_PARTS_HYDRO_PREPRO_H__ #define __ANTARES_LIBS_STUDY_PARTS_HYDRO_PREPRO_H__ -#include "array/matrix.h" +#include #include "../../fwd.h" namespace Antares diff --git a/src/libs/antares/study/parts/hydro/series.h b/src/libs/antares/study/parts/hydro/series.h index de0729162e..86cba2c145 100644 --- a/src/libs/antares/study/parts/hydro/series.h +++ b/src/libs/antares/study/parts/hydro/series.h @@ -27,7 +27,7 @@ #ifndef __ANTARES_LIBS_STUDY_PARTS_HYDRO_TIMESERIES_H__ #define __ANTARES_LIBS_STUDY_PARTS_HYDRO_TIMESERIES_H__ -#include "array/matrix.h" +#include #include "../../fwd.h" namespace Antares diff --git a/src/libs/antares/study/parts/load/series.h b/src/libs/antares/study/parts/load/series.h index e11534b821..1f99e1522c 100644 --- a/src/libs/antares/study/parts/load/series.h +++ b/src/libs/antares/study/parts/load/series.h @@ -27,7 +27,7 @@ #ifndef __ANTARES_LIBS_STUDY_PARTS_LOAD_TIMESERIES_H__ #define __ANTARES_LIBS_STUDY_PARTS_LOAD_TIMESERIES_H__ -#include "array/matrix.h" +#include #include "../../fwd.h" namespace Antares diff --git a/src/libs/antares/study/parts/renewable/cluster.h b/src/libs/antares/study/parts/renewable/cluster.h index 9237ee49b8..8405989e08 100644 --- a/src/libs/antares/study/parts/renewable/cluster.h +++ b/src/libs/antares/study/parts/renewable/cluster.h @@ -29,7 +29,7 @@ #include #include -#include "array/matrix.h" +#include #include "defines.h" #include "../common/cluster.h" #include "../../fwd.h" diff --git a/src/libs/antares/study/parts/solar/series.h b/src/libs/antares/study/parts/solar/series.h index edc986159d..e6ae0a654e 100644 --- a/src/libs/antares/study/parts/solar/series.h +++ b/src/libs/antares/study/parts/solar/series.h @@ -27,7 +27,7 @@ #ifndef __ANTARES_LIBS_STUDY_PARTS_SOLAR_TIMESERIES_H__ #define __ANTARES_LIBS_STUDY_PARTS_SOLAR_TIMESERIES_H__ -#include "array/matrix.h" +#include #include "../../fwd.h" namespace Antares diff --git a/src/libs/antares/study/parts/thermal/cluster.h b/src/libs/antares/study/parts/thermal/cluster.h index 1d6f542621..f9955cf96f 100644 --- a/src/libs/antares/study/parts/thermal/cluster.h +++ b/src/libs/antares/study/parts/thermal/cluster.h @@ -29,7 +29,7 @@ #include #include -#include "array/matrix.h" +#include #include "defines.h" #include "prepro.h" #include "ecoInput.h" diff --git a/src/libs/antares/study/parts/thermal/ecoInput.cpp b/src/libs/antares/study/parts/thermal/ecoInput.cpp index fdd189e1ed..a1a2a35b7d 100644 --- a/src/libs/antares/study/parts/thermal/ecoInput.cpp +++ b/src/libs/antares/study/parts/thermal/ecoInput.cpp @@ -33,7 +33,7 @@ #include "../../memory-usage.h" #include "ecoInput.h" #include "logs/logs.h" -#include "array/array1d.h" +#include using namespace Yuni; diff --git a/src/libs/antares/study/parts/thermal/ecoInput.h b/src/libs/antares/study/parts/thermal/ecoInput.h index 3d252a5f01..4124ccd959 100644 --- a/src/libs/antares/study/parts/thermal/ecoInput.h +++ b/src/libs/antares/study/parts/thermal/ecoInput.h @@ -28,7 +28,7 @@ #define __ANTARES_LIBS_STUDY_PARTS_THERMAL_ECOINPUT_H__ #include "cluster.h" -#include "array/matrix.h" +#include #include "defines.h" #include "../../fwd.h" #include diff --git a/src/libs/antares/study/parts/thermal/prepro.cpp b/src/libs/antares/study/parts/thermal/prepro.cpp index 9505b13663..fc2505ad44 100644 --- a/src/libs/antares/study/parts/thermal/prepro.cpp +++ b/src/libs/antares/study/parts/thermal/prepro.cpp @@ -33,7 +33,7 @@ #include "../../memory-usage.h" #include "prepro.h" #include "logs/logs.h" -#include "array/array1d.h" +#include using namespace Yuni; diff --git a/src/libs/antares/study/parts/thermal/prepro.h b/src/libs/antares/study/parts/thermal/prepro.h index 40dfc07cb9..0860fe0967 100644 --- a/src/libs/antares/study/parts/thermal/prepro.h +++ b/src/libs/antares/study/parts/thermal/prepro.h @@ -28,7 +28,7 @@ #define __ANTARES_LIBS_STUDY_PARTS_THERMAL_PREPRO_H__ #include "cluster.h" -#include "array/matrix.h" +#include #include "defines.h" #include "../../fwd.h" #include diff --git a/src/libs/antares/study/parts/wind/series.h b/src/libs/antares/study/parts/wind/series.h index 9193eb4089..1352e51f2f 100644 --- a/src/libs/antares/study/parts/wind/series.h +++ b/src/libs/antares/study/parts/wind/series.h @@ -27,7 +27,7 @@ #ifndef __ANTARES_LIBS_STUDY_PARTS_WIND_TIMESERIES_H__ #define __ANTARES_LIBS_STUDY_PARTS_WIND_TIMESERIES_H__ -#include "array/matrix.h" +#include #include "../../fwd.h" namespace Antares diff --git a/src/libs/antares/study/xcast/xcast.h b/src/libs/antares/study/xcast/xcast.h index 7f76da7b52..3be351e0a7 100644 --- a/src/libs/antares/study/xcast/xcast.h +++ b/src/libs/antares/study/xcast/xcast.h @@ -28,13 +28,11 @@ #define __ANTARES_LIBS_STUDY_XCAST_XCAST_H__ #include -#include "array/matrix.h" +#include #include #include -namespace Antares -{ -namespace Data +namespace Antares::Data { class XCast final : private Yuni::NonCopyable { @@ -217,8 +215,8 @@ class XCast final : private Yuni::NonCopyable }; // class XCast -} // namespace Data -} // namespace Antares +} // namespace Antares::Data + #include "xcast.hxx" diff --git a/src/solver/misc/cholesky.h b/src/solver/misc/cholesky.h index cc869dd0dc..550acc3151 100644 --- a/src/solver/misc/cholesky.h +++ b/src/solver/misc/cholesky.h @@ -29,7 +29,7 @@ #include #include -#include +#include namespace Antares { diff --git a/src/tests/src/libs/antares/CMakeLists.txt b/src/tests/src/libs/antares/CMakeLists.txt index 38a5ca3123..6eac868cb8 100644 --- a/src/tests/src/libs/antares/CMakeLists.txt +++ b/src/tests/src/libs/antares/CMakeLists.txt @@ -7,8 +7,8 @@ set(src_libs_antares "${CMAKE_SOURCE_DIR}/libs/antares") set(SRC_MATRIX_LIB # For confort in IDE, but not necessary - ${src_libs_antares}/array/array/matrix.h - ${src_libs_antares}/array/array/matrix.hxx + ${src_libs_antares}/array/antares/array/matrix.h + ${src_libs_antares}/array/antares/array/matrix.hxx # Necessary cpp files ${src_libs_antares}/jit/jit.cpp diff --git a/src/tests/src/libs/antares/array/fill-matrix.h b/src/tests/src/libs/antares/array/fill-matrix.h index b2005a829d..0f0c10d5d7 100644 --- a/src/tests/src/libs/antares/array/fill-matrix.h +++ b/src/tests/src/libs/antares/array/fill-matrix.h @@ -3,7 +3,7 @@ #ifndef __ANTARES_LIBS_ARRAY_MATRIX_FILL_MTX_H__ #define __ANTARES_LIBS_ARRAY_MATRIX_FILL_MTX_H__ -#include +#include #include using namespace std; diff --git a/src/ui/simulator/toolbox/clipboard/clipboard.h b/src/ui/simulator/toolbox/clipboard/clipboard.h index c3a8ef4b16..02a4f3a969 100644 --- a/src/ui/simulator/toolbox/clipboard/clipboard.h +++ b/src/ui/simulator/toolbox/clipboard/clipboard.h @@ -28,14 +28,13 @@ #define __ANTARES_TOOLBOX_CLIPBOARD_CLIPBOARD_H__ #include -#include +#include #include #include #include "../components/datagrid/gridhelper.h" -namespace Antares -{ -namespace Toolbox + +namespace Antares::Toolbox { class Clipboard final { @@ -93,7 +92,7 @@ class Clipboard final }; // class Clipboard -} // namespace Toolbox -} // namespace Antares +} // namespace Antares::Toolbox + #endif // __ANTARES_TOOLBOX_CLIPBOARD_CLIPBOARD_H__ diff --git a/src/ui/simulator/toolbox/components/datagrid/component.cpp b/src/ui/simulator/toolbox/components/datagrid/component.cpp index 51bd7b8a6b..665fb7606d 100644 --- a/src/ui/simulator/toolbox/components/datagrid/component.cpp +++ b/src/ui/simulator/toolbox/components/datagrid/component.cpp @@ -26,7 +26,7 @@ */ #include -#include +#include #include #ifndef YUNI_OS_WINDOWS #include diff --git a/src/ui/simulator/windows/output/panel/area-link-renderer.h b/src/ui/simulator/windows/output/panel/area-link-renderer.h index db8170cc8d..ceec2411cd 100644 --- a/src/ui/simulator/windows/output/panel/area-link-renderer.h +++ b/src/ui/simulator/windows/output/panel/area-link-renderer.h @@ -30,7 +30,7 @@ #include #include "../../../toolbox/components/datagrid/renderer.h" #include -#include +#include #include "../output.h" namespace Antares diff --git a/src/ui/simulator/windows/output/panel/panel.h b/src/ui/simulator/windows/output/panel/panel.h index d62e396d30..c6a8ed3cb8 100644 --- a/src/ui/simulator/windows/output/panel/panel.h +++ b/src/ui/simulator/windows/output/panel/panel.h @@ -33,7 +33,7 @@ #include #include #include -#include +#include #include #include From 9b5ce544b47708bac269989cc4f0c708c183679a Mon Sep 17 00:00:00 2001 From: Jason Marechal Date: Mon, 14 Aug 2023 16:14:09 +0200 Subject: [PATCH 15/52] Improve Cmake exception --- src/libs/antares/CMakeLists.txt | 27 ++----------------- src/libs/antares/benchmarking/CMakeLists.txt | 1 + src/libs/antares/checks/CMakeLists.txt | 1 + src/libs/antares/exception/CMakeLists.txt | 24 +++++++++++++++++ src/libs/antares/exception/LoadingError.cpp | 2 +- .../exception}/AssertionError.hpp | 0 .../exception}/InitializationError.hpp | 0 .../{ => antares/exception}/LoadingError.hpp | 2 +- .../exception}/UnfeasibleProblemError.hpp | 0 9 files changed, 30 insertions(+), 27 deletions(-) create mode 100644 src/libs/antares/exception/CMakeLists.txt rename src/libs/antares/exception/{ => antares/exception}/AssertionError.hpp (100%) rename src/libs/antares/exception/{ => antares/exception}/InitializationError.hpp (100%) rename src/libs/antares/exception/{ => antares/exception}/LoadingError.hpp (99%) rename src/libs/antares/exception/{ => antares/exception}/UnfeasibleProblemError.hpp (100%) diff --git a/src/libs/antares/CMakeLists.txt b/src/libs/antares/CMakeLists.txt index 318e8a03e1..73cda00c3f 100644 --- a/src/libs/antares/CMakeLists.txt +++ b/src/libs/antares/CMakeLists.txt @@ -337,19 +337,7 @@ source_group("study\\xcast" FILES ${SRC_XCAST}) add_subdirectory(benchmarking) add_subdirectory(io) - -set(SRC_EXCEPTION - exception/AssertionError.cpp - # TODO : should be in a target_include_directories : but need to remove all .h from all SRC - exception/AssertionError.hpp - exception/UnfeasibleProblemError.cpp - # TODO : should be in a target_include_directories : but need to remove all .h from all SRC - exception/UnfeasibleProblemError.hpp - - exception/LoadingError.cpp - exception/LoadingError.hpp - ) -source_group("exception" FILES ${SRC_EXCEPTION}) +add_subdirectory(exception) set(SRC_STDCXX stdcxx/demangle.cpp @@ -493,17 +481,6 @@ set(SRC Enum.hxx ) add_subdirectory(date) -add_library(libantares-core-exceptions - ${SRC_EXCEPTION} -) - -target_link_libraries(libantares-core-exceptions - PRIVATE yuni-static-core) - -target_include_directories(libantares-core-exceptions - PRIVATE - ${CMAKE_SOURCE_DIR}/libs - ) add_subdirectory(checks) @@ -548,7 +525,7 @@ target_link_libraries(libantares-core yuni-static-uuid date logs - libantares-core-exceptions + exception checks libantares-solver-variable-info result_writer diff --git a/src/libs/antares/benchmarking/CMakeLists.txt b/src/libs/antares/benchmarking/CMakeLists.txt index 239e2a7884..3ae4ebf3b2 100644 --- a/src/libs/antares/benchmarking/CMakeLists.txt +++ b/src/libs/antares/benchmarking/CMakeLists.txt @@ -20,6 +20,7 @@ target_include_directories(benchmarking ${CMAKE_SOURCE_DIR}/libs/antares/logs #study -> binding constraint -> matrix -> jit ${CMAKE_SOURCE_DIR}/libs/antares/io #study -> binding constraint -> matrix ${CMAKE_SOURCE_DIR}/libs/antares/writer #study + ${CMAKE_SOURCE_DIR}/libs/antares/exception #enum -> exception PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ) diff --git a/src/libs/antares/checks/CMakeLists.txt b/src/libs/antares/checks/CMakeLists.txt index 1db825b1fd..21d8d4ff2a 100644 --- a/src/libs/antares/checks/CMakeLists.txt +++ b/src/libs/antares/checks/CMakeLists.txt @@ -25,4 +25,5 @@ target_link_libraries(checks PRIVATE logs yuni-static-core + exception ) \ No newline at end of file diff --git a/src/libs/antares/exception/CMakeLists.txt b/src/libs/antares/exception/CMakeLists.txt new file mode 100644 index 0000000000..26ef19a3dd --- /dev/null +++ b/src/libs/antares/exception/CMakeLists.txt @@ -0,0 +1,24 @@ +set(PROJ exception) +set(SRC_PROJ + AssertionError.cpp + LoadingError.cpp + UnfeasibleProblemError.cpp + + antares/exception/AssertionError.hpp + antares/exception/UnfeasibleProblemError.hpp + antares/exception/LoadingError.hpp +) +source_group("exception" FILES ${SRC_EXCEPTION}) + +add_library(${PROJ} ${SRC_PROJ}) + +target_link_libraries(${PROJ} + PRIVATE + yuni-static-core +) + +target_include_directories(${PROJ} + PUBLIC + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_SOURCE_DIR}/libs #fwd +) diff --git a/src/libs/antares/exception/LoadingError.cpp b/src/libs/antares/exception/LoadingError.cpp index 5360957102..5334b0912d 100644 --- a/src/libs/antares/exception/LoadingError.cpp +++ b/src/libs/antares/exception/LoadingError.cpp @@ -1,4 +1,4 @@ -#include "LoadingError.hpp" +#include "antares/exception/LoadingError.hpp" namespace Antares { diff --git a/src/libs/antares/exception/AssertionError.hpp b/src/libs/antares/exception/antares/exception/AssertionError.hpp similarity index 100% rename from src/libs/antares/exception/AssertionError.hpp rename to src/libs/antares/exception/antares/exception/AssertionError.hpp diff --git a/src/libs/antares/exception/InitializationError.hpp b/src/libs/antares/exception/antares/exception/InitializationError.hpp similarity index 100% rename from src/libs/antares/exception/InitializationError.hpp rename to src/libs/antares/exception/antares/exception/InitializationError.hpp diff --git a/src/libs/antares/exception/LoadingError.hpp b/src/libs/antares/exception/antares/exception/LoadingError.hpp similarity index 99% rename from src/libs/antares/exception/LoadingError.hpp rename to src/libs/antares/exception/antares/exception/LoadingError.hpp index 66d79925ae..a9b7b0fa30 100644 --- a/src/libs/antares/exception/LoadingError.hpp +++ b/src/libs/antares/exception/antares/exception/LoadingError.hpp @@ -32,7 +32,7 @@ #include #include -#include +#include "antares/study/fwd.h" namespace Antares { diff --git a/src/libs/antares/exception/UnfeasibleProblemError.hpp b/src/libs/antares/exception/antares/exception/UnfeasibleProblemError.hpp similarity index 100% rename from src/libs/antares/exception/UnfeasibleProblemError.hpp rename to src/libs/antares/exception/antares/exception/UnfeasibleProblemError.hpp From cc33857ccde5c31848623e72ee615b3c069c26e7 Mon Sep 17 00:00:00 2001 From: Jason Marechal Date: Mon, 14 Aug 2023 16:27:29 +0200 Subject: [PATCH 16/52] Improve Cmake inifile --- src/analyzer/atsp/load.cpp | 2 +- src/analyzer/atsp/preflight.cpp | 2 +- src/analyzer/main.cpp | 2 +- src/libs/antares/benchmarking/file_content.cpp | 2 +- .../antares/correlation/antares/correlation/correlation.h | 2 +- src/libs/antares/inifile/CMakeLists.txt | 4 ++-- src/libs/antares/inifile/{ => antares}/inifile/inifile.h | 0 src/libs/antares/inifile/{ => antares}/inifile/inifile.hxx | 0 src/libs/antares/inifile/inifile.cpp | 2 +- src/libs/antares/study/area/list.cpp | 2 +- src/libs/antares/study/area/ui.cpp | 2 +- src/libs/antares/study/binding_constraint/BindingConstraint.h | 2 +- .../antares/study/binding_constraint/BindingConstraintSaver.h | 2 +- src/libs/antares/study/binding_constraint/EnvForLoading.h | 2 +- src/libs/antares/study/cleaner/cleaner-v20.cpp | 2 +- src/libs/antares/study/header.h | 2 +- src/libs/antares/study/layerdata.cpp | 2 +- src/libs/antares/study/parameters.cpp | 2 +- src/libs/antares/study/parameters.h | 2 +- src/libs/antares/study/parameters/adq-patch-params.h | 2 +- src/libs/antares/study/parts/hydro/container.cpp | 2 +- src/libs/antares/study/parts/hydro/prepro.cpp | 2 +- src/libs/antares/study/parts/hydro/series.cpp | 2 +- src/libs/antares/study/parts/renewable/cluster.cpp | 2 +- src/libs/antares/study/parts/renewable/cluster_list.cpp | 2 +- src/libs/antares/study/parts/short-term-storage/cluster.h | 2 +- src/libs/antares/study/parts/short-term-storage/properties.h | 2 +- src/libs/antares/study/parts/thermal/cluster.cpp | 2 +- src/libs/antares/study/sets.h | 2 +- src/libs/antares/study/xcast/xcast.cpp | 2 +- src/libs/antares/sys/policy.cpp | 2 +- src/solver/constraints-builder/load.cpp | 2 +- src/ui/simulator/application/study.cpp | 2 +- src/ui/simulator/windows/analyzer/analyzer.cpp | 2 +- .../windows/constraints-builder/constraintsbuilder.cpp | 2 +- 35 files changed, 34 insertions(+), 34 deletions(-) rename src/libs/antares/inifile/{ => antares}/inifile/inifile.h (100%) rename src/libs/antares/inifile/{ => antares}/inifile/inifile.hxx (100%) diff --git a/src/analyzer/atsp/load.cpp b/src/analyzer/atsp/load.cpp index ca2384da83..f4eb43941a 100644 --- a/src/analyzer/atsp/load.cpp +++ b/src/analyzer/atsp/load.cpp @@ -25,7 +25,7 @@ ** SPDX-License-Identifier: licenceRef-GPL3_WITH_RTE-Exceptions */ #include "atsp.h" -#include +#include #include "../../config.h" using namespace Yuni; diff --git a/src/analyzer/atsp/preflight.cpp b/src/analyzer/atsp/preflight.cpp index 6fb4f95edc..fa41b6e681 100644 --- a/src/analyzer/atsp/preflight.cpp +++ b/src/analyzer/atsp/preflight.cpp @@ -26,7 +26,7 @@ */ #include "atsp.h" -#include +#include #include using namespace Yuni; diff --git a/src/analyzer/main.cpp b/src/analyzer/main.cpp index 985cc73195..a6c351e46e 100644 --- a/src/analyzer/main.cpp +++ b/src/analyzer/main.cpp @@ -34,7 +34,7 @@ #include #include "atsp/atsp.h" #include -#include +#include #include #include #include "../config.h" diff --git a/src/libs/antares/benchmarking/file_content.cpp b/src/libs/antares/benchmarking/file_content.cpp index fff86c654e..3272d4611f 100644 --- a/src/libs/antares/benchmarking/file_content.cpp +++ b/src/libs/antares/benchmarking/file_content.cpp @@ -1,4 +1,4 @@ -#include +#include #include diff --git a/src/libs/antares/correlation/antares/correlation/correlation.h b/src/libs/antares/correlation/antares/correlation/correlation.h index 532e1b7546..f94000535b 100644 --- a/src/libs/antares/correlation/antares/correlation/correlation.h +++ b/src/libs/antares/correlation/antares/correlation/correlation.h @@ -29,7 +29,7 @@ #include #include -#include +#include #include "../study/fwd.h" #include "../study/version.h" diff --git a/src/libs/antares/inifile/CMakeLists.txt b/src/libs/antares/inifile/CMakeLists.txt index 786f7eb5a3..bfa1acb4de 100644 --- a/src/libs/antares/inifile/CMakeLists.txt +++ b/src/libs/antares/inifile/CMakeLists.txt @@ -1,6 +1,6 @@ set(SRC_INI - inifile/inifile.h - inifile/inifile.hxx + antares/inifile/inifile.h + antares/inifile/inifile.hxx inifile.cpp ) diff --git a/src/libs/antares/inifile/inifile/inifile.h b/src/libs/antares/inifile/antares/inifile/inifile.h similarity index 100% rename from src/libs/antares/inifile/inifile/inifile.h rename to src/libs/antares/inifile/antares/inifile/inifile.h diff --git a/src/libs/antares/inifile/inifile/inifile.hxx b/src/libs/antares/inifile/antares/inifile/inifile.hxx similarity index 100% rename from src/libs/antares/inifile/inifile/inifile.hxx rename to src/libs/antares/inifile/antares/inifile/inifile.hxx diff --git a/src/libs/antares/inifile/inifile.cpp b/src/libs/antares/inifile/inifile.cpp index a6a62a38c4..4a11060ddf 100644 --- a/src/libs/antares/inifile/inifile.cpp +++ b/src/libs/antares/inifile/inifile.cpp @@ -25,7 +25,7 @@ ** SPDX-License-Identifier: licenceRef-GPL3_WITH_RTE-Exceptions */ -#include "inifile/inifile.h" +#include "antares/inifile/inifile.h" #include "logs/logs.h" #include "io/statistics.h" diff --git a/src/libs/antares/study/area/list.cpp b/src/libs/antares/study/area/list.cpp index 85895cc552..79e7f7f19b 100644 --- a/src/libs/antares/study/area/list.cpp +++ b/src/libs/antares/study/area/list.cpp @@ -32,7 +32,7 @@ #include #include "area.h" #include -#include "inifile/inifile.h" +#include #include "logs/logs.h" #include "../memory-usage.h" #include "../../config.h" diff --git a/src/libs/antares/study/area/ui.cpp b/src/libs/antares/study/area/ui.cpp index 4e1702fd6d..d4fd56b031 100644 --- a/src/libs/antares/study/area/ui.cpp +++ b/src/libs/antares/study/area/ui.cpp @@ -28,7 +28,7 @@ #include "ui.h" #include "logs/logs.h" #include -#include +#include #include using namespace Yuni; diff --git a/src/libs/antares/study/binding_constraint/BindingConstraint.h b/src/libs/antares/study/binding_constraint/BindingConstraint.h index 97393616d9..8de884ae69 100644 --- a/src/libs/antares/study/binding_constraint/BindingConstraint.h +++ b/src/libs/antares/study/binding_constraint/BindingConstraint.h @@ -34,7 +34,7 @@ #include "../area/links.h" #include "../parts/thermal/cluster.h" #include -#include "inifile/inifile.h" +#include #include "EnvForLoading.h" #include "antares/study/filter.h" #include "BindingConstraintStructures.h" diff --git a/src/libs/antares/study/binding_constraint/BindingConstraintSaver.h b/src/libs/antares/study/binding_constraint/BindingConstraintSaver.h index 7b7a915142..85ddc2e764 100644 --- a/src/libs/antares/study/binding_constraint/BindingConstraintSaver.h +++ b/src/libs/antares/study/binding_constraint/BindingConstraintSaver.h @@ -4,7 +4,7 @@ #pragma once -#include +#include #include "antares/study/fwd.h" namespace Antares::Data { diff --git a/src/libs/antares/study/binding_constraint/EnvForLoading.h b/src/libs/antares/study/binding_constraint/EnvForLoading.h index c188be4c41..5d3409ae2b 100644 --- a/src/libs/antares/study/binding_constraint/EnvForLoading.h +++ b/src/libs/antares/study/binding_constraint/EnvForLoading.h @@ -5,7 +5,7 @@ #pragma once #include "yuni/core/fwd.h" -#include +#include #include namespace Antares::Data { diff --git a/src/libs/antares/study/cleaner/cleaner-v20.cpp b/src/libs/antares/study/cleaner/cleaner-v20.cpp index 9989cfc14c..a0f4dea784 100644 --- a/src/libs/antares/study/cleaner/cleaner-v20.cpp +++ b/src/libs/antares/study/cleaner/cleaner-v20.cpp @@ -28,7 +28,7 @@ #include #include "../study.h" #include "../cleaner.h" -#include +#include using namespace Yuni; using namespace Antares; diff --git a/src/libs/antares/study/header.h b/src/libs/antares/study/header.h index 1805ba24b2..1dd472719f 100644 --- a/src/libs/antares/study/header.h +++ b/src/libs/antares/study/header.h @@ -30,7 +30,7 @@ #include #include #include -#include +#include //! Default author #define STUDYHEADER_DEFAULT_AUTHOR "Unknown" diff --git a/src/libs/antares/study/layerdata.cpp b/src/libs/antares/study/layerdata.cpp index 5dc76149a9..df384a6555 100644 --- a/src/libs/antares/study/layerdata.cpp +++ b/src/libs/antares/study/layerdata.cpp @@ -29,7 +29,7 @@ #include #include -#include +#include #include "layerdata.h" #include "logs/logs.h" diff --git a/src/libs/antares/study/parameters.cpp b/src/libs/antares/study/parameters.cpp index f4d9886f68..ce17100e83 100644 --- a/src/libs/antares/study/parameters.cpp +++ b/src/libs/antares/study/parameters.cpp @@ -35,7 +35,7 @@ #include "../constants.h" #include "parameters.h" -#include +#include #include "logs/logs.h" #include "load-options.h" #include diff --git a/src/libs/antares/study/parameters.h b/src/libs/antares/study/parameters.h index 71b12eca0a..be2bfa2b92 100644 --- a/src/libs/antares/study/parameters.h +++ b/src/libs/antares/study/parameters.h @@ -36,7 +36,7 @@ #include #include "antares/writer/antares/writer/result_format.h" //Conflit between ${CMake_Source_dir}/libs and result_writer findong "antares" #include -#include +#include #include "fwd.h" #include "variable-print-info.h" #include "parameters/adq-patch-params.h" diff --git a/src/libs/antares/study/parameters/adq-patch-params.h b/src/libs/antares/study/parameters/adq-patch-params.h index def0aac8f5..8d097c5198 100644 --- a/src/libs/antares/study/parameters/adq-patch-params.h +++ b/src/libs/antares/study/parameters/adq-patch-params.h @@ -5,7 +5,7 @@ #include #include -#include +#include using namespace Yuni; diff --git a/src/libs/antares/study/parts/hydro/container.cpp b/src/libs/antares/study/parts/hydro/container.cpp index f54d0ac58d..97f7755b38 100644 --- a/src/libs/antares/study/parts/hydro/container.cpp +++ b/src/libs/antares/study/parts/hydro/container.cpp @@ -27,7 +27,7 @@ #include "../../study.h" #include "container.h" -#include +#include #include using namespace Antares; diff --git a/src/libs/antares/study/parts/hydro/prepro.cpp b/src/libs/antares/study/parts/hydro/prepro.cpp index ad265fddee..f9b41afa46 100644 --- a/src/libs/antares/study/parts/hydro/prepro.cpp +++ b/src/libs/antares/study/parts/hydro/prepro.cpp @@ -31,7 +31,7 @@ #include "../../study.h" #include "../../memory-usage.h" #include "prepro.h" -#include +#include #include #include "logs/logs.h" diff --git a/src/libs/antares/study/parts/hydro/series.cpp b/src/libs/antares/study/parts/hydro/series.cpp index 0d4f8bde1b..1c4fd05ae1 100644 --- a/src/libs/antares/study/parts/hydro/series.cpp +++ b/src/libs/antares/study/parts/hydro/series.cpp @@ -29,7 +29,7 @@ #include #include #include "series.h" -#include +#include #include "logs/logs.h" #include "../../study.h" #include "../../memory-usage.h" diff --git a/src/libs/antares/study/parts/renewable/cluster.cpp b/src/libs/antares/study/parts/renewable/cluster.cpp index 46d8b7a1c3..70ba1c4e0d 100644 --- a/src/libs/antares/study/parts/renewable/cluster.cpp +++ b/src/libs/antares/study/parts/renewable/cluster.cpp @@ -33,7 +33,7 @@ #include "../../study.h" #include "../../memory-usage.h" #include "cluster.h" -#include +#include #include "logs/logs.h" #include "../../../utils.h" diff --git a/src/libs/antares/study/parts/renewable/cluster_list.cpp b/src/libs/antares/study/parts/renewable/cluster_list.cpp index d9b8c2cef0..9094f4d47d 100644 --- a/src/libs/antares/study/parts/renewable/cluster_list.cpp +++ b/src/libs/antares/study/parts/renewable/cluster_list.cpp @@ -1,5 +1,5 @@ #include "cluster_list.h" -#include +#include #include "../../study.h" #include "../../area.h" diff --git a/src/libs/antares/study/parts/short-term-storage/cluster.h b/src/libs/antares/study/parts/short-term-storage/cluster.h index acf84b3b3d..4e909962a0 100644 --- a/src/libs/antares/study/parts/short-term-storage/cluster.h +++ b/src/libs/antares/study/parts/short-term-storage/cluster.h @@ -28,7 +28,7 @@ #pragma once #include #include -#include +#include #include "properties.h" #include "series.h" 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 a4da6bfcbd..73c81b0a4e 100644 --- a/src/libs/antares/study/parts/short-term-storage/properties.h +++ b/src/libs/antares/study/parts/short-term-storage/properties.h @@ -30,7 +30,7 @@ #include #include -#include +#include namespace Antares::Data::ShortTermStorage { diff --git a/src/libs/antares/study/parts/thermal/cluster.cpp b/src/libs/antares/study/parts/thermal/cluster.cpp index fa4cc90562..97469bb1ee 100644 --- a/src/libs/antares/study/parts/thermal/cluster.cpp +++ b/src/libs/antares/study/parts/thermal/cluster.cpp @@ -35,7 +35,7 @@ #include "../../study.h" #include "../../memory-usage.h" #include "cluster.h" -#include +#include #include "logs/logs.h" #include "../../../utils.h" diff --git a/src/libs/antares/study/sets.h b/src/libs/antares/study/sets.h index e4425de3fd..1c1abcd2a5 100644 --- a/src/libs/antares/study/sets.h +++ b/src/libs/antares/study/sets.h @@ -33,7 +33,7 @@ #include #include #include -#include +#include #include "logs/logs.h" namespace Antares diff --git a/src/libs/antares/study/xcast/xcast.cpp b/src/libs/antares/study/xcast/xcast.cpp index 93f0830a48..15d94f41e5 100644 --- a/src/libs/antares/study/xcast/xcast.cpp +++ b/src/libs/antares/study/xcast/xcast.cpp @@ -27,7 +27,7 @@ #include "xcast.h" #include "logs/logs.h" -#include +#include #include "../study.h" #include "../memory-usage.h" #include diff --git a/src/libs/antares/sys/policy.cpp b/src/libs/antares/sys/policy.cpp index 2441256ff7..023f2b523d 100644 --- a/src/libs/antares/sys/policy.cpp +++ b/src/libs/antares/sys/policy.cpp @@ -30,7 +30,7 @@ #include #include "appdata.h" #include "logs/logs.h" -#include +#include #include "hostname.hxx" #include "../config.h" #include diff --git a/src/solver/constraints-builder/load.cpp b/src/solver/constraints-builder/load.cpp index d791682c68..aa61fffa6c 100644 --- a/src/solver/constraints-builder/load.cpp +++ b/src/solver/constraints-builder/load.cpp @@ -25,7 +25,7 @@ ** SPDX-License-Identifier: licenceRef-GPL3_WITH_RTE-Exceptions */ #include "cbuilder.h" -#include +#include #include "../../config.h" #include "../../libs/antares/study/area/constants.h" #include diff --git a/src/ui/simulator/application/study.cpp b/src/ui/simulator/application/study.cpp index 8fa0665b31..9aab193282 100644 --- a/src/ui/simulator/application/study.cpp +++ b/src/ui/simulator/application/study.cpp @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/ui/simulator/windows/analyzer/analyzer.cpp b/src/ui/simulator/windows/analyzer/analyzer.cpp index a26c97f39f..a664e7871f 100644 --- a/src/ui/simulator/windows/analyzer/analyzer.cpp +++ b/src/ui/simulator/windows/analyzer/analyzer.cpp @@ -52,7 +52,7 @@ #include "../../application/menus.h" #include "../message.h" #include -#include +#include #include "../../application/study.h" #include #include diff --git a/src/ui/simulator/windows/constraints-builder/constraintsbuilder.cpp b/src/ui/simulator/windows/constraints-builder/constraintsbuilder.cpp index b0382b8344..8b0de4ec74 100644 --- a/src/ui/simulator/windows/constraints-builder/constraintsbuilder.cpp +++ b/src/ui/simulator/windows/constraints-builder/constraintsbuilder.cpp @@ -57,7 +57,7 @@ #include "../message.h" #include #include -#include +#include #include "../../application/study.h" #include #include From 2aed9371f8d92a9abc84405d2f3040ae2a2f5f09 Mon Sep 17 00:00:00 2001 From: Jason Marechal Date: Mon, 14 Aug 2023 16:39:59 +0200 Subject: [PATCH 17/52] Improve Cmake io --- src/libs/antares/array/antares/array/matrix.hxx | 2 +- src/libs/antares/inifile/inifile.cpp | 2 +- src/libs/antares/io/CMakeLists.txt | 4 ++-- src/libs/antares/io/{ => antares}/io/file.h | 0 src/libs/antares/io/{ => antares}/io/statistics.h | 0 src/libs/antares/io/file.cpp | 2 +- src/libs/antares/io/statistics.cpp | 2 +- src/libs/antares/writer/immediate_file_writer.cpp | 2 +- src/solver/variable/surveyresults/surveyresults.cpp | 2 +- src/ui/simulator/application/study.cpp | 2 +- src/ui/simulator/toolbox/jobs/job.cpp | 2 +- src/ui/simulator/windows/analyzer/analyzer.cpp | 2 +- .../windows/constraints-builder/constraintsbuilder.cpp | 2 +- 13 files changed, 12 insertions(+), 12 deletions(-) rename src/libs/antares/io/{ => antares}/io/file.h (100%) rename src/libs/antares/io/{ => antares}/io/statistics.h (100%) diff --git a/src/libs/antares/array/antares/array/matrix.hxx b/src/libs/antares/array/antares/array/matrix.hxx index 3715fc7795..fe28d1403f 100644 --- a/src/libs/antares/array/antares/array/matrix.hxx +++ b/src/libs/antares/array/antares/array/matrix.hxx @@ -33,7 +33,7 @@ #include #include #include -#include "io/statistics.h" +#include #include "matrix-to-buffer.h" #define ANTARES_MATRIX_CSV_COMMA "\t;," diff --git a/src/libs/antares/inifile/inifile.cpp b/src/libs/antares/inifile/inifile.cpp index 4a11060ddf..9a26c5cc04 100644 --- a/src/libs/antares/inifile/inifile.cpp +++ b/src/libs/antares/inifile/inifile.cpp @@ -28,7 +28,7 @@ #include "antares/inifile/inifile.h" #include "logs/logs.h" -#include "io/statistics.h" +#include #include using namespace Yuni; diff --git a/src/libs/antares/io/CMakeLists.txt b/src/libs/antares/io/CMakeLists.txt index 7d90b9e69a..778177e192 100644 --- a/src/libs/antares/io/CMakeLists.txt +++ b/src/libs/antares/io/CMakeLists.txt @@ -1,6 +1,6 @@ set(HEADERS - io/statistics.h - io/file.h + antares/io/statistics.h + antares/io/file.h ) set(SRC_IO ${HEADERS} diff --git a/src/libs/antares/io/io/file.h b/src/libs/antares/io/antares/io/file.h similarity index 100% rename from src/libs/antares/io/io/file.h rename to src/libs/antares/io/antares/io/file.h diff --git a/src/libs/antares/io/io/statistics.h b/src/libs/antares/io/antares/io/statistics.h similarity index 100% rename from src/libs/antares/io/io/statistics.h rename to src/libs/antares/io/antares/io/statistics.h diff --git a/src/libs/antares/io/file.cpp b/src/libs/antares/io/file.cpp index e213c73c7f..7327f68d92 100644 --- a/src/libs/antares/io/file.cpp +++ b/src/libs/antares/io/file.cpp @@ -25,7 +25,7 @@ ** SPDX-License-Identifier: licenceRef-GPL3_WITH_RTE-Exceptions */ -#include "io/file.h" +#include "antares/io/file.h" #include #include #include diff --git a/src/libs/antares/io/statistics.cpp b/src/libs/antares/io/statistics.cpp index 772c12d400..76e5b07873 100644 --- a/src/libs/antares/io/statistics.cpp +++ b/src/libs/antares/io/statistics.cpp @@ -25,7 +25,7 @@ ** SPDX-License-Identifier: licenceRef-GPL3_WITH_RTE-Exceptions */ -#include "io/statistics.h" +#include "antares/io/statistics.h" #include #include "logs/logs.h" diff --git a/src/libs/antares/writer/immediate_file_writer.cpp b/src/libs/antares/writer/immediate_file_writer.cpp index f276ee4f05..33170ee6be 100644 --- a/src/libs/antares/writer/immediate_file_writer.cpp +++ b/src/libs/antares/writer/immediate_file_writer.cpp @@ -2,7 +2,7 @@ #include #include "private/immediate_file_writer.h" -#include +#include #include diff --git a/src/solver/variable/surveyresults/surveyresults.cpp b/src/solver/variable/surveyresults/surveyresults.cpp index 7de049aa27..8952d38e73 100644 --- a/src/solver/variable/surveyresults/surveyresults.cpp +++ b/src/solver/variable/surveyresults/surveyresults.cpp @@ -32,7 +32,7 @@ #include "surveyresults.h" #include #include -#include +#include using namespace Yuni; using namespace Antares; diff --git a/src/ui/simulator/application/study.cpp b/src/ui/simulator/application/study.cpp index 9aab193282..ba92d862e1 100644 --- a/src/ui/simulator/application/study.cpp +++ b/src/ui/simulator/application/study.cpp @@ -30,7 +30,7 @@ #include #include #include -#include +#include #include diff --git a/src/ui/simulator/toolbox/jobs/job.cpp b/src/ui/simulator/toolbox/jobs/job.cpp index 8d85871bc4..9c8ac8c53a 100644 --- a/src/ui/simulator/toolbox/jobs/job.cpp +++ b/src/ui/simulator/toolbox/jobs/job.cpp @@ -53,7 +53,7 @@ #include "../../windows/message.h" #include "../components/refresh.h" #include -#include +#include #define PROGRESSBAR_MAX_RANGE 1000000 #define PROGRESSBAR_MAX_RANGE_F 1000000.0 diff --git a/src/ui/simulator/windows/analyzer/analyzer.cpp b/src/ui/simulator/windows/analyzer/analyzer.cpp index a664e7871f..4822d68c34 100644 --- a/src/ui/simulator/windows/analyzer/analyzer.cpp +++ b/src/ui/simulator/windows/analyzer/analyzer.cpp @@ -55,7 +55,7 @@ #include #include "../../application/study.h" #include -#include +#include using namespace Yuni; diff --git a/src/ui/simulator/windows/constraints-builder/constraintsbuilder.cpp b/src/ui/simulator/windows/constraints-builder/constraintsbuilder.cpp index 8b0de4ec74..30b3733d36 100644 --- a/src/ui/simulator/windows/constraints-builder/constraintsbuilder.cpp +++ b/src/ui/simulator/windows/constraints-builder/constraintsbuilder.cpp @@ -60,7 +60,7 @@ #include #include "../../application/study.h" #include -#include +#include #include "../../application/main.h" using namespace Yuni; From 70cfc64632236589489962bd805aeb8e9d56b499 Mon Sep 17 00:00:00 2001 From: Jason Marechal Date: Mon, 14 Aug 2023 16:59:19 +0200 Subject: [PATCH 18/52] Improve Cmake jit --- src/libs/antares/benchmarking/CMakeLists.txt | 1 + src/libs/antares/checks/CMakeLists.txt | 1 + src/libs/antares/jit.h | 2 +- src/libs/antares/jit/CMakeLists.txt | 4 ++-- src/libs/antares/jit/{ => antares/jit}/jit.h | 0 src/libs/antares/jit/{ => antares/jit}/jit.hxx | 0 src/libs/antares/jit/jit.cpp | 2 +- src/tests/src/libs/antares/CMakeLists.txt | 2 ++ src/tests/src/libs/antares/jit/global_JIT_manager.h | 3 --- 9 files changed, 8 insertions(+), 7 deletions(-) rename src/libs/antares/jit/{ => antares/jit}/jit.h (100%) rename src/libs/antares/jit/{ => antares/jit}/jit.hxx (100%) diff --git a/src/libs/antares/benchmarking/CMakeLists.txt b/src/libs/antares/benchmarking/CMakeLists.txt index 3ae4ebf3b2..4e14e012b6 100644 --- a/src/libs/antares/benchmarking/CMakeLists.txt +++ b/src/libs/antares/benchmarking/CMakeLists.txt @@ -21,6 +21,7 @@ target_include_directories(benchmarking ${CMAKE_SOURCE_DIR}/libs/antares/io #study -> binding constraint -> matrix ${CMAKE_SOURCE_DIR}/libs/antares/writer #study ${CMAKE_SOURCE_DIR}/libs/antares/exception #enum -> exception + ${CMAKE_SOURCE_DIR}/libs/antares/jit # something,something -> jit PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ) diff --git a/src/libs/antares/checks/CMakeLists.txt b/src/libs/antares/checks/CMakeLists.txt index 21d8d4ff2a..78d5d70615 100644 --- a/src/libs/antares/checks/CMakeLists.txt +++ b/src/libs/antares/checks/CMakeLists.txt @@ -17,6 +17,7 @@ target_include_directories(checks ${CMAKE_SOURCE_DIR}/libs/antares/io #area -> matrix -> io ${CMAKE_SOURCE_DIR}/libs/antares/date #area -> parameter -> date ${CMAKE_SOURCE_DIR}/libs/antares/writer #area -> antares/parts/thermal/cluster -> writer + ${CMAKE_SOURCE_DIR}/libs/antares/jit #area -> matrix -> jit PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ) diff --git a/src/libs/antares/jit.h b/src/libs/antares/jit.h index 8a3b939dbc..bc9b10619a 100644 --- a/src/libs/antares/jit.h +++ b/src/libs/antares/jit.h @@ -27,6 +27,6 @@ #ifndef __ANTARES_LIBS_JIT_H__ #define __ANTARES_LIBS_JIT_H__ -#include "jit/jit.h" +#include #endif // __ANTARES_LIBS_JIT_H__ diff --git a/src/libs/antares/jit/CMakeLists.txt b/src/libs/antares/jit/CMakeLists.txt index 5f973fca84..0c9016cf13 100644 --- a/src/libs/antares/jit/CMakeLists.txt +++ b/src/libs/antares/jit/CMakeLists.txt @@ -1,7 +1,7 @@ set(SRC_JIT # JIT (Just in Time) - jit.h - jit.hxx + antares/jit/jit.h + antares/jit/jit.hxx jit.cpp ) source_group("misc\\jit" FILES ${SRC_JIT}) diff --git a/src/libs/antares/jit/jit.h b/src/libs/antares/jit/antares/jit/jit.h similarity index 100% rename from src/libs/antares/jit/jit.h rename to src/libs/antares/jit/antares/jit/jit.h diff --git a/src/libs/antares/jit/jit.hxx b/src/libs/antares/jit/antares/jit/jit.hxx similarity index 100% rename from src/libs/antares/jit/jit.hxx rename to src/libs/antares/jit/antares/jit/jit.hxx diff --git a/src/libs/antares/jit/jit.cpp b/src/libs/antares/jit/jit.cpp index ae5adfc56d..568a95deac 100644 --- a/src/libs/antares/jit/jit.cpp +++ b/src/libs/antares/jit/jit.cpp @@ -28,7 +28,7 @@ #include #include #include -#include "jit.h" +#include "antares/jit/jit.h" bool JIT::enabled = false; diff --git a/src/tests/src/libs/antares/CMakeLists.txt b/src/tests/src/libs/antares/CMakeLists.txt index 6eac868cb8..9f654dcdae 100644 --- a/src/tests/src/libs/antares/CMakeLists.txt +++ b/src/tests/src/libs/antares/CMakeLists.txt @@ -49,6 +49,7 @@ target_include_directories(tests-matrix-save PRIVATE "${src_libs_antares}/array" "${src_libs_antares}/io" + "${src_libs_antares}/jit" "${CMAKE_CURRENT_SOURCE_DIR}/logs" "${CMAKE_CURRENT_SOURCE_DIR}/jit" "${CMAKE_SOURCE_DIR}/tests/src/libs" @@ -82,6 +83,7 @@ target_include_directories(tests-matrix-load PRIVATE "${src_libs_antares}/array" "${src_libs_antares}/io" + "${src_libs_antares}/jit" "${CMAKE_CURRENT_SOURCE_DIR}/logs" "${CMAKE_CURRENT_SOURCE_DIR}/jit" "${CMAKE_SOURCE_DIR}/tests/src/libs" diff --git a/src/tests/src/libs/antares/jit/global_JIT_manager.h b/src/tests/src/libs/antares/jit/global_JIT_manager.h index a758303b3f..c27c8b4d5e 100644 --- a/src/tests/src/libs/antares/jit/global_JIT_manager.h +++ b/src/tests/src/libs/antares/jit/global_JIT_manager.h @@ -1,9 +1,6 @@ #ifndef __ANTARES_TEST_LIBS_JIT_H__ # define __ANTARES_TEST_LIBS_JIT_H__ -#include "../jit/jit.h" - - class global_JIT_manager { public: From 2576f12ed73b79fa6b524389721fcf1422ebf9a8 Mon Sep 17 00:00:00 2001 From: Jason Marechal Date: Mon, 14 Aug 2023 17:18:43 +0200 Subject: [PATCH 19/52] Improve Cmake logs --- src/analyzer/main.cpp | 2 +- src/ext/yuni/src/yuni/core/logs.h | 2 +- src/ext/yuni/src/yuni/core/logs/handler/callback.h | 1 + src/libs/antares/array/antares/array/matrix.hxx | 2 +- src/libs/antares/date/date.cpp | 2 +- src/libs/antares/hostinfo.cpp | 2 +- src/libs/antares/inifile/inifile.cpp | 2 +- src/libs/antares/io/file.cpp | 2 +- src/libs/antares/io/statistics.cpp | 2 +- src/libs/antares/jit/antares/jit/jit.hxx | 2 +- src/libs/antares/logs/CMakeLists.txt | 5 ++++- src/libs/antares/logs/{ => antares}/logs/cleaner.h | 0 src/libs/antares/logs/{ => antares}/logs/logs.h | 8 +++++++- src/libs/antares/logs/{ => antares}/logs/logs.hxx | 0 src/libs/antares/logs/cleaner.cpp | 2 +- src/libs/antares/logs/logs.cpp | 2 +- src/libs/antares/memory/memory.cpp | 2 +- src/libs/antares/memory/new_check.hxx | 2 +- src/libs/antares/paths/list.cpp | 2 +- src/libs/antares/resources/resources.cpp | 2 +- src/libs/antares/study/area/links.cpp | 2 +- src/libs/antares/study/area/list.cpp | 2 +- src/libs/antares/study/area/store-timeseries-numbers.cpp | 2 +- src/libs/antares/study/area/ui.cpp | 2 +- src/libs/antares/study/cleaner/cleaner.cpp | 2 +- src/libs/antares/study/estimate.memory-footprint.cpp | 2 +- src/libs/antares/study/header.cpp | 2 +- src/libs/antares/study/importlogs.cpp | 2 +- src/libs/antares/study/layerdata.cpp | 2 +- src/libs/antares/study/load-options.cpp | 2 +- src/libs/antares/study/parameters.cpp | 2 +- src/libs/antares/study/parameters/adq-patch-params.cpp | 2 +- src/libs/antares/study/parts/common/cluster_list.h | 2 +- src/libs/antares/study/parts/hydro/prepro.cpp | 2 +- src/libs/antares/study/parts/hydro/series.cpp | 2 +- src/libs/antares/study/parts/renewable/cluster.cpp | 2 +- src/libs/antares/study/parts/renewable/container.cpp | 2 +- .../antares/study/parts/short-term-storage/cluster.cpp | 2 +- .../antares/study/parts/short-term-storage/container.cpp | 2 +- .../antares/study/parts/short-term-storage/properties.cpp | 2 +- .../antares/study/parts/short-term-storage/series.cpp | 2 +- src/libs/antares/study/parts/thermal/cluster.cpp | 2 +- src/libs/antares/study/parts/thermal/container.cpp | 2 +- src/libs/antares/study/parts/thermal/ecoInput.cpp | 2 +- src/libs/antares/study/parts/thermal/prepro.cpp | 2 +- src/libs/antares/study/parts/wind/prepro.cpp | 2 +- src/libs/antares/study/progression/progression.cpp | 2 +- src/libs/antares/study/scenario-builder/rules.cpp | 2 +- src/libs/antares/study/scenario-builder/sets.cpp | 2 +- src/libs/antares/study/sets.h | 2 +- src/libs/antares/study/simulation.cpp | 2 +- src/libs/antares/study/xcast/xcast.cpp | 2 +- src/libs/antares/sys/policy.cpp | 2 +- src/libs/antares/writer/immediate_file_writer.cpp | 2 +- src/libs/fswalker/fswalker.cpp | 2 +- src/solver/aleatoire/alea_tirage_au_sort_chroniques.cpp | 2 +- src/solver/infeasible-problem-analysis/report.cpp | 2 +- src/solver/main.cpp | 2 +- src/solver/main/adequacy.cpp | 2 +- src/solver/main/economy.cpp | 2 +- src/solver/misc/options.cpp | 2 +- src/solver/misc/process-priority.cpp | 2 +- src/solver/misc/system-memory.cpp | 2 +- src/solver/misc/write-command-line.cpp | 2 +- .../construct_problem_constraints_RHS.cpp | 2 +- .../optimisation/adequacy_patch_csr/hourly_csr_problem.h | 2 +- .../optimisation/adequacy_patch_csr/solve_problem.cpp | 2 +- .../optimisation/opt_alloc_probleme_a_optimiser.cpp | 2 +- src/solver/optimisation/opt_appel_solveur_lineaire.cpp | 2 +- src/solver/optimisation/opt_appel_solveur_quadratique.cpp | 2 +- .../opt_decompte_variables_et_contraintes.cpp | 2 +- src/solver/optimisation/opt_optimisation_hebdo.cpp | 2 +- src/solver/optimisation/opt_optimisation_lineaire.cpp | 2 +- src/solver/signal-handling/common.cpp | 2 +- src/solver/simulation/common-eco-adq.cpp | 2 +- src/solver/simulation/common-hydro-remix.cpp | 2 +- src/solver/simulation/solver.h | 2 +- src/solver/simulation/solver.hxx | 2 +- src/solver/ts-generator/generator.hxx | 2 +- src/solver/ts-generator/thermal.cpp | 2 +- src/solver/ts-generator/xcast/core.cpp | 2 +- src/solver/ts-generator/xcast/gamma-euler.cpp | 2 +- src/solver/ts-generator/xcast/gamma-inc.cpp | 2 +- src/solver/ts-generator/xcast/math.hxx | 2 +- src/solver/ts-generator/xcast/studydata.hxx | 2 +- src/solver/ts-generator/xcast/xcast.cpp | 2 +- src/solver/utils/ortools_utils.cpp | 2 +- src/solver/variable/commons/spatial-aggregate.h | 2 +- src/solver/variable/container.h | 2 +- src/solver/variable/surveyresults/reportbuilder.hxx | 2 +- src/solver/variable/surveyresults/surveyresults.cpp | 2 +- src/tests/src/libs/antares/CMakeLists.txt | 1 + src/tests/src/libs/antares/logs/{ => antares}/logs/logs.h | 0 src/tests/src/libs/antares/logs/logs.cpp | 2 +- .../thermal-price-definition/thermal-price-definition.cpp | 2 +- src/tools/batchrun/main.cpp | 2 +- src/tools/cleaner/main.cpp | 2 +- src/tools/config/main.cpp | 2 +- src/tools/finder/main.cpp | 2 +- src/tools/kirchhoff-cbuilder/main.cpp | 2 +- src/tools/updater/main.cpp | 2 +- src/tools/vacuum/antares-study.cpp | 2 +- src/tools/vacuum/main.cpp | 2 +- src/tools/vacuum/modified-inode.cpp | 2 +- src/tools/yby-aggregator/job.cpp | 2 +- src/tools/yby-aggregator/main.cpp | 2 +- src/tools/yby-aggregator/output.cpp | 2 +- src/tools/yby-aggregator/progress.cpp | 2 +- src/tools/yby-aggregator/progress.h | 2 +- src/ui/common/component/spotlight/mini-frame.cpp | 2 +- src/ui/common/dispatcher/action.cpp | 2 +- src/ui/common/dispatcher/gui.cpp | 2 +- src/ui/simulator/application/application.cpp | 4 ++-- src/ui/simulator/application/main/analyzer.cpp | 2 +- src/ui/simulator/application/main/create.cpp | 2 +- src/ui/simulator/application/menus.cpp | 2 +- src/ui/simulator/application/recentfiles.cpp | 2 +- src/ui/simulator/application/wait.cpp | 2 +- src/ui/simulator/main.cpp | 2 +- src/ui/simulator/toolbox/components/button/button.cpp | 2 +- .../toolbox/components/datagrid/filter/component.cpp | 2 +- .../components/datagrid/filter/parameter/parameter.cpp | 2 +- .../simulator/toolbox/components/notebook/mapnotebook.cpp | 2 +- .../simulator/toolbox/components/notebook/mapnotebook.h | 2 +- src/ui/simulator/toolbox/components/notebook/notebook.cpp | 2 +- src/ui/simulator/toolbox/create.cpp | 2 +- src/ui/simulator/toolbox/jobs/job.h | 2 +- src/ui/simulator/toolbox/locales.cpp | 2 +- src/ui/simulator/toolbox/resources.cpp | 2 +- src/ui/simulator/toolbox/system/diskfreespace.hxx | 2 +- src/ui/simulator/windows/analyzer/analyzer.cpp | 2 +- src/ui/simulator/windows/cleaner.cpp | 2 +- .../windows/constraints-builder/constraintsbuilder.cpp | 2 +- .../options/adequacy-patch/adequacy-patch-options.cpp | 2 +- src/ui/simulator/windows/options/advanced/advanced.cpp | 2 +- .../windows/options/optimization/optimization.cpp | 2 +- .../simulator/windows/options/temp-folder/temp-folder.cpp | 2 +- src/ui/simulator/windows/output/job.cpp | 2 +- src/ui/simulator/windows/output/mini-frame.cpp | 2 +- 139 files changed, 146 insertions(+), 135 deletions(-) rename src/libs/antares/logs/{ => antares}/logs/cleaner.h (100%) rename src/libs/antares/logs/{ => antares}/logs/logs.h (93%) rename src/libs/antares/logs/{ => antares}/logs/logs.hxx (100%) rename src/tests/src/libs/antares/logs/{ => antares}/logs/logs.h (100%) diff --git a/src/analyzer/main.cpp b/src/analyzer/main.cpp index a6c351e46e..6724951374 100644 --- a/src/analyzer/main.cpp +++ b/src/analyzer/main.cpp @@ -26,7 +26,7 @@ */ #include -#include +#include #include #include "../ui/common/winmain.hxx" #include diff --git a/src/ext/yuni/src/yuni/core/logs.h b/src/ext/yuni/src/yuni/core/logs.h index b7c027de46..c82e450e2d 100644 --- a/src/ext/yuni/src/yuni/core/logs.h +++ b/src/ext/yuni/src/yuni/core/logs.h @@ -9,4 +9,4 @@ ** gitlab: https://gitlab.com/libyuni/libyuni/ (mirror) */ #pragma once -#include "logs/logs.h" +#include diff --git a/src/ext/yuni/src/yuni/core/logs/handler/callback.h b/src/ext/yuni/src/yuni/core/logs/handler/callback.h index ddecc6a843..30ae6e6448 100644 --- a/src/ext/yuni/src/yuni/core/logs/handler/callback.h +++ b/src/ext/yuni/src/yuni/core/logs/handler/callback.h @@ -11,6 +11,7 @@ #pragma once #include "../null.h" #include "../../event/event.h" +#include "yuni/core/logs/verbosity.h" namespace Yuni { diff --git a/src/libs/antares/array/antares/array/matrix.hxx b/src/libs/antares/array/antares/array/matrix.hxx index fe28d1403f..b6c09e92e4 100644 --- a/src/libs/antares/array/antares/array/matrix.hxx +++ b/src/libs/antares/array/antares/array/matrix.hxx @@ -30,7 +30,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/libs/antares/date/date.cpp b/src/libs/antares/date/date.cpp index 71bea2a7f0..a28a78ba00 100644 --- a/src/libs/antares/date/date.cpp +++ b/src/libs/antares/date/date.cpp @@ -32,7 +32,7 @@ #include #include "../study/parameters.h" #include -#include "logs/logs.h" +#include using namespace Yuni; diff --git a/src/libs/antares/hostinfo.cpp b/src/libs/antares/hostinfo.cpp index c437a1720c..2736028e2c 100644 --- a/src/libs/antares/hostinfo.cpp +++ b/src/libs/antares/hostinfo.cpp @@ -28,7 +28,7 @@ #include #include #include "hostinfo.h" -#include "logs/logs.h" +#include #include "sys/hostname.hxx" diff --git a/src/libs/antares/inifile/inifile.cpp b/src/libs/antares/inifile/inifile.cpp index 9a26c5cc04..3559eca996 100644 --- a/src/libs/antares/inifile/inifile.cpp +++ b/src/libs/antares/inifile/inifile.cpp @@ -27,7 +27,7 @@ #include "antares/inifile/inifile.h" -#include "logs/logs.h" +#include #include #include diff --git a/src/libs/antares/io/file.cpp b/src/libs/antares/io/file.cpp index 7327f68d92..d5a8e01480 100644 --- a/src/libs/antares/io/file.cpp +++ b/src/libs/antares/io/file.cpp @@ -37,7 +37,7 @@ #include #endif #include -#include "logs/logs.h" +#include using namespace Yuni; using namespace Antares; diff --git a/src/libs/antares/io/statistics.cpp b/src/libs/antares/io/statistics.cpp index 76e5b07873..0fe4ebb320 100644 --- a/src/libs/antares/io/statistics.cpp +++ b/src/libs/antares/io/statistics.cpp @@ -27,7 +27,7 @@ #include "antares/io/statistics.h" #include -#include "logs/logs.h" +#include using namespace Yuni; diff --git a/src/libs/antares/jit/antares/jit/jit.hxx b/src/libs/antares/jit/antares/jit/jit.hxx index e24d989e77..34170276ad 100644 --- a/src/libs/antares/jit/antares/jit/jit.hxx +++ b/src/libs/antares/jit/antares/jit/jit.hxx @@ -27,7 +27,7 @@ #ifndef __ANTARES_LIBS_JUST_IN_TIME_INFORMATIONS_HXX__ #define __ANTARES_LIBS_JUST_IN_TIME_INFORMATIONS_HXX__ -#include +#include using namespace Antares; diff --git a/src/libs/antares/logs/CMakeLists.txt b/src/libs/antares/logs/CMakeLists.txt index fd9340cd7b..4f9c033ab3 100644 --- a/src/libs/antares/logs/CMakeLists.txt +++ b/src/libs/antares/logs/CMakeLists.txt @@ -1,8 +1,11 @@ set(PROJ logs) set(HEADERS - ${PROJ} + antares/${PROJ}/cleaner.h + antares/${PROJ}/logs.h + antares/${PROJ}/logs.hxx ) set(SRC_LOGS + ${HEADERS} logs.cpp cleaner.cpp ) diff --git a/src/libs/antares/logs/logs/cleaner.h b/src/libs/antares/logs/antares/logs/cleaner.h similarity index 100% rename from src/libs/antares/logs/logs/cleaner.h rename to src/libs/antares/logs/antares/logs/cleaner.h diff --git a/src/libs/antares/logs/logs/logs.h b/src/libs/antares/logs/antares/logs/logs.h similarity index 93% rename from src/libs/antares/logs/logs/logs.h rename to src/libs/antares/logs/antares/logs/logs.h index 187579224b..5744727601 100644 --- a/src/libs/antares/logs/logs/logs.h +++ b/src/libs/antares/logs/antares/logs/logs.h @@ -28,7 +28,13 @@ #define __ANTARES_LIBS_LOGS_LOGS_H__ #include -#include "../../constants.h" +#include "../../../constants.h" +#include "yuni/core/logs/decorators/message.h" +#include "yuni/core/logs/decorators/time.h" +#include "yuni/core/logs/decorators/verbositylevel.h" +#include "yuni/core/logs/handler/file.h" +#include "yuni/core/logs/handler/stdcout.h" +#include "yuni/core/logs/logs.h" /*! ** \defgroup logs Logs diff --git a/src/libs/antares/logs/logs/logs.hxx b/src/libs/antares/logs/antares/logs/logs.hxx similarity index 100% rename from src/libs/antares/logs/logs/logs.hxx rename to src/libs/antares/logs/antares/logs/logs.hxx diff --git a/src/libs/antares/logs/cleaner.cpp b/src/libs/antares/logs/cleaner.cpp index a750650a63..ceaa1cdc32 100644 --- a/src/libs/antares/logs/cleaner.cpp +++ b/src/libs/antares/logs/cleaner.cpp @@ -25,7 +25,7 @@ ** SPDX-License-Identifier: licenceRef-GPL3_WITH_RTE-Exceptions */ -#include "logs/cleaner.h" +#include "antares/logs/cleaner.h" #include "../constants.h" #include #include diff --git a/src/libs/antares/logs/logs.cpp b/src/libs/antares/logs/logs.cpp index 6eb07933e2..978b02fb30 100644 --- a/src/libs/antares/logs/logs.cpp +++ b/src/libs/antares/logs/logs.cpp @@ -25,7 +25,7 @@ ** SPDX-License-Identifier: licenceRef-GPL3_WITH_RTE-Exceptions */ -#include "logs/logs.h" +#include "antares/logs/logs.h" namespace Antares { diff --git a/src/libs/antares/memory/memory.cpp b/src/libs/antares/memory/memory.cpp index 4598a81dc8..73f922b370 100644 --- a/src/libs/antares/memory/memory.cpp +++ b/src/libs/antares/memory/memory.cpp @@ -31,7 +31,7 @@ #include #include #include -#include "logs/logs.h" +#include #ifndef YUNI_OS_WINDOWS #include #include diff --git a/src/libs/antares/memory/new_check.hxx b/src/libs/antares/memory/new_check.hxx index 4f8cc9d15d..3e67f89d51 100644 --- a/src/libs/antares/memory/new_check.hxx +++ b/src/libs/antares/memory/new_check.hxx @@ -1,4 +1,4 @@ -#include +#include #include namespace Antares diff --git a/src/libs/antares/paths/list.cpp b/src/libs/antares/paths/list.cpp index 3cb618a165..d62e373078 100644 --- a/src/libs/antares/paths/list.cpp +++ b/src/libs/antares/paths/list.cpp @@ -33,7 +33,7 @@ #ifdef YUNI_OS_WINDOWS #include #endif -#include "logs/logs.h" +#include using namespace Yuni; using namespace Antares; diff --git a/src/libs/antares/resources/resources.cpp b/src/libs/antares/resources/resources.cpp index 6cc3ab1124..4d9fcb54d1 100644 --- a/src/libs/antares/resources/resources.cpp +++ b/src/libs/antares/resources/resources.cpp @@ -28,7 +28,7 @@ #include #include #include "resources.h" -#include "logs/logs.h" +#include #include "../config.h" using namespace Yuni; diff --git a/src/libs/antares/study/area/links.cpp b/src/libs/antares/study/area/links.cpp index 8376ac7139..c8867899fd 100644 --- a/src/libs/antares/study/area/links.cpp +++ b/src/libs/antares/study/area/links.cpp @@ -30,7 +30,7 @@ #include "../study.h" #include "links.h" #include "area.h" -#include "logs/logs.h" +#include #include "../memory-usage.h" #include "../filter.h" #include "constants.h" diff --git a/src/libs/antares/study/area/list.cpp b/src/libs/antares/study/area/list.cpp index 79e7f7f19b..ed986e68d5 100644 --- a/src/libs/antares/study/area/list.cpp +++ b/src/libs/antares/study/area/list.cpp @@ -33,7 +33,7 @@ #include "area.h" #include #include -#include "logs/logs.h" +#include #include "../memory-usage.h" #include "../../config.h" #include "../filter.h" diff --git a/src/libs/antares/study/area/store-timeseries-numbers.cpp b/src/libs/antares/study/area/store-timeseries-numbers.cpp index bc866ca697..7f595e9f39 100644 --- a/src/libs/antares/study/area/store-timeseries-numbers.cpp +++ b/src/libs/antares/study/area/store-timeseries-numbers.cpp @@ -27,7 +27,7 @@ #include #include "../study.h" -#include "logs/logs.h" +#include #include "store-timeseries-numbers.h" diff --git a/src/libs/antares/study/area/ui.cpp b/src/libs/antares/study/area/ui.cpp index d4fd56b031..ab0adf4d89 100644 --- a/src/libs/antares/study/area/ui.cpp +++ b/src/libs/antares/study/area/ui.cpp @@ -26,7 +26,7 @@ */ #include "ui.h" -#include "logs/logs.h" +#include #include #include #include diff --git a/src/libs/antares/study/cleaner/cleaner.cpp b/src/libs/antares/study/cleaner/cleaner.cpp index 5885874332..51ac5bfb72 100644 --- a/src/libs/antares/study/cleaner/cleaner.cpp +++ b/src/libs/antares/study/cleaner/cleaner.cpp @@ -29,7 +29,7 @@ #include #include "../cleaner.h" #include "versions.h" -#include "logs/logs.h" +#include using namespace Yuni; diff --git a/src/libs/antares/study/estimate.memory-footprint.cpp b/src/libs/antares/study/estimate.memory-footprint.cpp index e8b43934a2..38a0c180b6 100644 --- a/src/libs/antares/study/estimate.memory-footprint.cpp +++ b/src/libs/antares/study/estimate.memory-footprint.cpp @@ -31,7 +31,7 @@ #include "runtime.h" #include "../../../solver/simulation/simulation.h" #include "../../../solver/variable/economy/all.h" -#include "logs/logs.h" +#include #include "../../../solver/simulation/economy.h" #include "../../../solver/simulation/solver.h" diff --git a/src/libs/antares/study/header.cpp b/src/libs/antares/study/header.cpp index 4752c5acad..f8dcbea3c4 100644 --- a/src/libs/antares/study/header.cpp +++ b/src/libs/antares/study/header.cpp @@ -29,7 +29,7 @@ #include #include #include -#include "logs/logs.h" +#include #include "version.h" using namespace Yuni; diff --git a/src/libs/antares/study/importlogs.cpp b/src/libs/antares/study/importlogs.cpp index b621bfdf0c..58665a9042 100644 --- a/src/libs/antares/study/importlogs.cpp +++ b/src/libs/antares/study/importlogs.cpp @@ -28,7 +28,7 @@ #include #include #include "study.h" -#include "logs/logs.h" +#include #include using namespace Yuni; diff --git a/src/libs/antares/study/layerdata.cpp b/src/libs/antares/study/layerdata.cpp index df384a6555..c473176c38 100644 --- a/src/libs/antares/study/layerdata.cpp +++ b/src/libs/antares/study/layerdata.cpp @@ -31,7 +31,7 @@ #include #include "layerdata.h" -#include "logs/logs.h" +#include using namespace Yuni; diff --git a/src/libs/antares/study/load-options.cpp b/src/libs/antares/study/load-options.cpp index 69dc523e75..ed9e57eded 100644 --- a/src/libs/antares/study/load-options.cpp +++ b/src/libs/antares/study/load-options.cpp @@ -26,7 +26,7 @@ */ #include "load-options.h" -#include "logs/logs.h" +#include #include diff --git a/src/libs/antares/study/parameters.cpp b/src/libs/antares/study/parameters.cpp index ce17100e83..b8594ec776 100644 --- a/src/libs/antares/study/parameters.cpp +++ b/src/libs/antares/study/parameters.cpp @@ -36,7 +36,7 @@ #include "../constants.h" #include "parameters.h" #include -#include "logs/logs.h" +#include #include "load-options.h" #include #include diff --git a/src/libs/antares/study/parameters/adq-patch-params.cpp b/src/libs/antares/study/parameters/adq-patch-params.cpp index 3be5796f2a..f49ec22cb7 100644 --- a/src/libs/antares/study/parameters/adq-patch-params.cpp +++ b/src/libs/antares/study/parameters/adq-patch-params.cpp @@ -1,5 +1,5 @@ #include "adq-patch-params.h" -#include "logs/logs.h" +#include #include diff --git a/src/libs/antares/study/parts/common/cluster_list.h b/src/libs/antares/study/parts/common/cluster_list.h index 18aae76662..83f70080aa 100644 --- a/src/libs/antares/study/parts/common/cluster_list.h +++ b/src/libs/antares/study/parts/common/cluster_list.h @@ -2,7 +2,7 @@ #define __ANTARES_LIBS_STUDY_PARTS_COMMON_CLUSTER_LIST_H__ #include "../../memory-usage.h" -#include "logs/logs.h" +#include #include "../../fwd.h" #include diff --git a/src/libs/antares/study/parts/hydro/prepro.cpp b/src/libs/antares/study/parts/hydro/prepro.cpp index f9b41afa46..fbc84482fc 100644 --- a/src/libs/antares/study/parts/hydro/prepro.cpp +++ b/src/libs/antares/study/parts/hydro/prepro.cpp @@ -33,7 +33,7 @@ #include "prepro.h" #include #include -#include "logs/logs.h" +#include using namespace Antares; using namespace Yuni; diff --git a/src/libs/antares/study/parts/hydro/series.cpp b/src/libs/antares/study/parts/hydro/series.cpp index 1c4fd05ae1..7cda0b4f56 100644 --- a/src/libs/antares/study/parts/hydro/series.cpp +++ b/src/libs/antares/study/parts/hydro/series.cpp @@ -30,7 +30,7 @@ #include #include "series.h" #include -#include "logs/logs.h" +#include #include "../../study.h" #include "../../memory-usage.h" diff --git a/src/libs/antares/study/parts/renewable/cluster.cpp b/src/libs/antares/study/parts/renewable/cluster.cpp index 70ba1c4e0d..256ebce044 100644 --- a/src/libs/antares/study/parts/renewable/cluster.cpp +++ b/src/libs/antares/study/parts/renewable/cluster.cpp @@ -34,7 +34,7 @@ #include "../../memory-usage.h" #include "cluster.h" #include -#include "logs/logs.h" +#include #include "../../../utils.h" using namespace Yuni; diff --git a/src/libs/antares/study/parts/renewable/container.cpp b/src/libs/antares/study/parts/renewable/container.cpp index 6bfca56fc1..ad2e336f6f 100644 --- a/src/libs/antares/study/parts/renewable/container.cpp +++ b/src/libs/antares/study/parts/renewable/container.cpp @@ -29,7 +29,7 @@ #include "../../study.h" #include "../../memory-usage.h" #include "container.h" -#include "logs/logs.h" +#include using namespace Yuni; using namespace Antares; diff --git a/src/libs/antares/study/parts/short-term-storage/cluster.cpp b/src/libs/antares/study/parts/short-term-storage/cluster.cpp index 6e57785eef..8d1d236ee9 100644 --- a/src/libs/antares/study/parts/short-term-storage/cluster.cpp +++ b/src/libs/antares/study/parts/short-term-storage/cluster.cpp @@ -25,7 +25,7 @@ ** SPDX-License-Identifier: licenceRef-GPL3_WITH_RTE-Exceptions */ #include -#include +#include #include #include diff --git a/src/libs/antares/study/parts/short-term-storage/container.cpp b/src/libs/antares/study/parts/short-term-storage/container.cpp index 9256f9d8d9..3b0cba2a36 100644 --- a/src/libs/antares/study/parts/short-term-storage/container.cpp +++ b/src/libs/antares/study/parts/short-term-storage/container.cpp @@ -25,7 +25,7 @@ ** SPDX-License-Identifier: licenceRef-GPL3_WITH_RTE-Exceptions */ -#include +#include #include #include #include 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 2b863fd695..1c5e58bee3 100644 --- a/src/libs/antares/study/parts/short-term-storage/properties.cpp +++ b/src/libs/antares/study/parts/short-term-storage/properties.cpp @@ -25,7 +25,7 @@ ** SPDX-License-Identifier: licenceRef-GPL3_WITH_RTE-Exceptions */ -#include +#include #include #include "properties.h" diff --git a/src/libs/antares/study/parts/short-term-storage/series.cpp b/src/libs/antares/study/parts/short-term-storage/series.cpp index db674d6fc1..7f36e35aba 100644 --- a/src/libs/antares/study/parts/short-term-storage/series.cpp +++ b/src/libs/antares/study/parts/short-term-storage/series.cpp @@ -25,7 +25,7 @@ ** SPDX-License-Identifier: licenceRef-GPL3_WITH_RTE-Exceptions */ #include -#include +#include #include #include diff --git a/src/libs/antares/study/parts/thermal/cluster.cpp b/src/libs/antares/study/parts/thermal/cluster.cpp index 97469bb1ee..0d1b7d8bd5 100644 --- a/src/libs/antares/study/parts/thermal/cluster.cpp +++ b/src/libs/antares/study/parts/thermal/cluster.cpp @@ -36,7 +36,7 @@ #include "../../memory-usage.h" #include "cluster.h" #include -#include "logs/logs.h" +#include #include "../../../utils.h" diff --git a/src/libs/antares/study/parts/thermal/container.cpp b/src/libs/antares/study/parts/thermal/container.cpp index e7df8cc900..c9f1ec4000 100644 --- a/src/libs/antares/study/parts/thermal/container.cpp +++ b/src/libs/antares/study/parts/thermal/container.cpp @@ -29,7 +29,7 @@ #include "../../study.h" #include "../../memory-usage.h" #include "container.h" -#include "logs/logs.h" +#include #include #include diff --git a/src/libs/antares/study/parts/thermal/ecoInput.cpp b/src/libs/antares/study/parts/thermal/ecoInput.cpp index a1a2a35b7d..c9e1abcdd7 100644 --- a/src/libs/antares/study/parts/thermal/ecoInput.cpp +++ b/src/libs/antares/study/parts/thermal/ecoInput.cpp @@ -32,7 +32,7 @@ #include "../../study.h" #include "../../memory-usage.h" #include "ecoInput.h" -#include "logs/logs.h" +#include #include using namespace Yuni; diff --git a/src/libs/antares/study/parts/thermal/prepro.cpp b/src/libs/antares/study/parts/thermal/prepro.cpp index fc2505ad44..ee895f39d4 100644 --- a/src/libs/antares/study/parts/thermal/prepro.cpp +++ b/src/libs/antares/study/parts/thermal/prepro.cpp @@ -32,7 +32,7 @@ #include "../../study.h" #include "../../memory-usage.h" #include "prepro.h" -#include "logs/logs.h" +#include #include using namespace Yuni; diff --git a/src/libs/antares/study/parts/wind/prepro.cpp b/src/libs/antares/study/parts/wind/prepro.cpp index 2ea465f2d0..7e0ca5638c 100644 --- a/src/libs/antares/study/parts/wind/prepro.cpp +++ b/src/libs/antares/study/parts/wind/prepro.cpp @@ -29,7 +29,7 @@ #include "prepro.h" #include #include "../../study.h" -#include "logs/logs.h" +#include using namespace Yuni; using namespace Antares; diff --git a/src/libs/antares/study/progression/progression.cpp b/src/libs/antares/study/progression/progression.cpp index 3884ad36d7..72d90ec06c 100644 --- a/src/libs/antares/study/progression/progression.cpp +++ b/src/libs/antares/study/progression/progression.cpp @@ -27,7 +27,7 @@ #include "progression.h" #include "../study.h" -#include "logs/logs.h" +#include using namespace Yuni; diff --git a/src/libs/antares/study/scenario-builder/rules.cpp b/src/libs/antares/study/scenario-builder/rules.cpp index 4b363b1b1c..2d7dc072d5 100644 --- a/src/libs/antares/study/scenario-builder/rules.cpp +++ b/src/libs/antares/study/scenario-builder/rules.cpp @@ -28,7 +28,7 @@ #include #include "rules.h" #include "../study.h" -#include "logs/logs.h" +#include #include "scBuilderUtils.h" #include "TSnumberData.h" diff --git a/src/libs/antares/study/scenario-builder/sets.cpp b/src/libs/antares/study/scenario-builder/sets.cpp index 0e7173077b..a4c49cdb51 100644 --- a/src/libs/antares/study/scenario-builder/sets.cpp +++ b/src/libs/antares/study/scenario-builder/sets.cpp @@ -27,7 +27,7 @@ #include "sets.h" #include "../study.h" -#include "logs/logs.h" +#include using namespace Yuni; diff --git a/src/libs/antares/study/sets.h b/src/libs/antares/study/sets.h index 1c1abcd2a5..f553d05f04 100644 --- a/src/libs/antares/study/sets.h +++ b/src/libs/antares/study/sets.h @@ -34,7 +34,7 @@ #include #include #include -#include "logs/logs.h" +#include namespace Antares { diff --git a/src/libs/antares/study/simulation.cpp b/src/libs/antares/study/simulation.cpp index ec71281d5c..37bf082732 100644 --- a/src/libs/antares/study/simulation.cpp +++ b/src/libs/antares/study/simulation.cpp @@ -32,7 +32,7 @@ #include #include #include "simulation.h" -#include "logs/logs.h" +#include using namespace Yuni; diff --git a/src/libs/antares/study/xcast/xcast.cpp b/src/libs/antares/study/xcast/xcast.cpp index 15d94f41e5..02c6f68681 100644 --- a/src/libs/antares/study/xcast/xcast.cpp +++ b/src/libs/antares/study/xcast/xcast.cpp @@ -26,7 +26,7 @@ */ #include "xcast.h" -#include "logs/logs.h" +#include #include #include "../study.h" #include "../memory-usage.h" diff --git a/src/libs/antares/sys/policy.cpp b/src/libs/antares/sys/policy.cpp index 023f2b523d..9ba67ed658 100644 --- a/src/libs/antares/sys/policy.cpp +++ b/src/libs/antares/sys/policy.cpp @@ -29,7 +29,7 @@ #include #include #include "appdata.h" -#include "logs/logs.h" +#include #include #include "hostname.hxx" #include "../config.h" diff --git a/src/libs/antares/writer/immediate_file_writer.cpp b/src/libs/antares/writer/immediate_file_writer.cpp index 33170ee6be..0240b65743 100644 --- a/src/libs/antares/writer/immediate_file_writer.cpp +++ b/src/libs/antares/writer/immediate_file_writer.cpp @@ -3,7 +3,7 @@ #include "private/immediate_file_writer.h" #include -#include +#include // Create directory hierarchy (incl. root) diff --git a/src/libs/fswalker/fswalker.cpp b/src/libs/fswalker/fswalker.cpp index c33cbc61d9..78a3ce5746 100644 --- a/src/libs/fswalker/fswalker.cpp +++ b/src/libs/fswalker/fswalker.cpp @@ -38,7 +38,7 @@ #include #include "registry.inc.hxx" #include "filejob.inc.hxx" -#include +#include using namespace Yuni; using namespace Antares; diff --git a/src/solver/aleatoire/alea_tirage_au_sort_chroniques.cpp b/src/solver/aleatoire/alea_tirage_au_sort_chroniques.cpp index cb0a72e8d6..7ffd5e8de1 100644 --- a/src/solver/aleatoire/alea_tirage_au_sort_chroniques.cpp +++ b/src/solver/aleatoire/alea_tirage_au_sort_chroniques.cpp @@ -35,7 +35,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/solver/infeasible-problem-analysis/report.cpp b/src/solver/infeasible-problem-analysis/report.cpp index 431fe970fa..96719116a7 100644 --- a/src/solver/infeasible-problem-analysis/report.cpp +++ b/src/solver/infeasible-problem-analysis/report.cpp @@ -1,6 +1,6 @@ #include "report.h" #include "constraint.h" -#include +#include #include static bool compareSlackSolutions(const Antares::Optimization::Constraint& a, diff --git a/src/solver/main.cpp b/src/solver/main.cpp index b4fd01f207..b261d55f9b 100644 --- a/src/solver/main.cpp +++ b/src/solver/main.cpp @@ -26,7 +26,7 @@ */ #include -#include +#include #include "application.h" #include "../ui/common/winmain.hxx" //TODO: remove that reverse dependency to UI diff --git a/src/solver/main/adequacy.cpp b/src/solver/main/adequacy.cpp index 16b8ab1b10..785c7b7a88 100644 --- a/src/solver/main/adequacy.cpp +++ b/src/solver/main/adequacy.cpp @@ -29,7 +29,7 @@ #include "../simulation/solver.h" #include "../simulation/adequacy.h" #include -#include +#include namespace Antares { diff --git a/src/solver/main/economy.cpp b/src/solver/main/economy.cpp index b7f93ce6be..3bc27c90b8 100644 --- a/src/solver/main/economy.cpp +++ b/src/solver/main/economy.cpp @@ -29,7 +29,7 @@ #include "../simulation/solver.h" #include "../simulation/economy.h" #include -#include +#include namespace Antares { diff --git a/src/solver/misc/options.cpp b/src/solver/misc/options.cpp index 571c0f962a..ceeeeab4c6 100644 --- a/src/solver/misc/options.cpp +++ b/src/solver/misc/options.cpp @@ -30,7 +30,7 @@ #include #include -#include +#include #include #include #include diff --git a/src/solver/misc/process-priority.cpp b/src/solver/misc/process-priority.cpp index f99d5b3256..bb1d75f388 100644 --- a/src/solver/misc/process-priority.cpp +++ b/src/solver/misc/process-priority.cpp @@ -29,7 +29,7 @@ #ifdef YUNI_OS_WINDOWS #include #include -#include +#include using namespace Yuni; using namespace Antares; diff --git a/src/solver/misc/system-memory.cpp b/src/solver/misc/system-memory.cpp index 815014198f..224264a152 100644 --- a/src/solver/misc/system-memory.cpp +++ b/src/solver/misc/system-memory.cpp @@ -26,7 +26,7 @@ */ #include "system-memory.h" -#include +#include #include using namespace Yuni; diff --git a/src/solver/misc/write-command-line.cpp b/src/solver/misc/write-command-line.cpp index 6170ac16a3..544cc6bb3b 100644 --- a/src/solver/misc/write-command-line.cpp +++ b/src/solver/misc/write-command-line.cpp @@ -1,4 +1,4 @@ -#include +#include #include namespace Antares::Solver diff --git a/src/solver/optimisation/adequacy_patch_csr/construct_problem_constraints_RHS.cpp b/src/solver/optimisation/adequacy_patch_csr/construct_problem_constraints_RHS.cpp index 8ed25dc02e..64ec416bd2 100644 --- a/src/solver/optimisation/adequacy_patch_csr/construct_problem_constraints_RHS.cpp +++ b/src/solver/optimisation/adequacy_patch_csr/construct_problem_constraints_RHS.cpp @@ -26,7 +26,7 @@ */ #include "hourly_csr_problem.h" -#include +#include #include #include "adequacy_patch_runtime_data.h" diff --git a/src/solver/optimisation/adequacy_patch_csr/hourly_csr_problem.h b/src/solver/optimisation/adequacy_patch_csr/hourly_csr_problem.h index c5357b2ab5..a09bb68de0 100644 --- a/src/solver/optimisation/adequacy_patch_csr/hourly_csr_problem.h +++ b/src/solver/optimisation/adequacy_patch_csr/hourly_csr_problem.h @@ -30,7 +30,7 @@ // TODO[FOM] Remove this, it is only required for PROBLEME_HEBDO // but this problem has nothing to do with PROBLEME_HEBDO #include -#include +#include #include #include "../opt_structure_probleme_a_resoudre.h" diff --git a/src/solver/optimisation/adequacy_patch_csr/solve_problem.cpp b/src/solver/optimisation/adequacy_patch_csr/solve_problem.cpp index afafd27863..a7b3e90af4 100644 --- a/src/solver/optimisation/adequacy_patch_csr/solve_problem.cpp +++ b/src/solver/optimisation/adequacy_patch_csr/solve_problem.cpp @@ -46,7 +46,7 @@ extern "C" #include "pi_fonctions.h" } -#include +#include using namespace Antares; diff --git a/src/solver/optimisation/opt_alloc_probleme_a_optimiser.cpp b/src/solver/optimisation/opt_alloc_probleme_a_optimiser.cpp index b2fb770268..d037c6c0fd 100644 --- a/src/solver/optimisation/opt_alloc_probleme_a_optimiser.cpp +++ b/src/solver/optimisation/opt_alloc_probleme_a_optimiser.cpp @@ -34,7 +34,7 @@ #include "opt_fonctions.h" #include -#include +#include using namespace Antares; diff --git a/src/solver/optimisation/opt_appel_solveur_lineaire.cpp b/src/solver/optimisation/opt_appel_solveur_lineaire.cpp index 6d23c9a50e..fec9694f6d 100644 --- a/src/solver/optimisation/opt_appel_solveur_lineaire.cpp +++ b/src/solver/optimisation/opt_appel_solveur_lineaire.cpp @@ -40,7 +40,7 @@ extern "C" #include "srs_api.h" } -#include +#include #include #include "../utils/mps_utils.h" diff --git a/src/solver/optimisation/opt_appel_solveur_quadratique.cpp b/src/solver/optimisation/opt_appel_solveur_quadratique.cpp index 5aca3121d3..d0a7e2a52c 100644 --- a/src/solver/optimisation/opt_appel_solveur_quadratique.cpp +++ b/src/solver/optimisation/opt_appel_solveur_quadratique.cpp @@ -45,7 +45,7 @@ extern "C" #include "pi_fonctions.h" } -#include +#include using namespace Antares; diff --git a/src/solver/optimisation/opt_decompte_variables_et_contraintes.cpp b/src/solver/optimisation/opt_decompte_variables_et_contraintes.cpp index 3adcd31c5b..778b8a239d 100644 --- a/src/solver/optimisation/opt_decompte_variables_et_contraintes.cpp +++ b/src/solver/optimisation/opt_decompte_variables_et_contraintes.cpp @@ -32,7 +32,7 @@ #include "opt_fonctions.h" -#include +#include #include using namespace Antares; diff --git a/src/solver/optimisation/opt_optimisation_hebdo.cpp b/src/solver/optimisation/opt_optimisation_hebdo.cpp index 578c09e39a..a84f334942 100644 --- a/src/solver/optimisation/opt_optimisation_hebdo.cpp +++ b/src/solver/optimisation/opt_optimisation_hebdo.cpp @@ -32,7 +32,7 @@ #include "opt_fonctions.h" #include -#include +#include #include extern "C" diff --git a/src/solver/optimisation/opt_optimisation_lineaire.cpp b/src/solver/optimisation/opt_optimisation_lineaire.cpp index 5856e37a0e..ea64560372 100644 --- a/src/solver/optimisation/opt_optimisation_lineaire.cpp +++ b/src/solver/optimisation/opt_optimisation_lineaire.cpp @@ -28,7 +28,7 @@ #include "sim_structure_probleme_economique.h" #include "opt_fonctions.h" -#include +#include #include "../utils/filename.h" using namespace Antares; diff --git a/src/solver/signal-handling/common.cpp b/src/solver/signal-handling/common.cpp index f49c10e223..e5962c2d9e 100644 --- a/src/solver/signal-handling/common.cpp +++ b/src/solver/signal-handling/common.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include "common.h" diff --git a/src/solver/simulation/common-eco-adq.cpp b/src/solver/simulation/common-eco-adq.cpp index 4a9f2bfbdc..e2cd83d579 100644 --- a/src/solver/simulation/common-eco-adq.cpp +++ b/src/solver/simulation/common-eco-adq.cpp @@ -33,7 +33,7 @@ #include #include "common-eco-adq.h" -#include +#include #include #include #include "simulation.h" diff --git a/src/solver/simulation/common-hydro-remix.cpp b/src/solver/simulation/common-hydro-remix.cpp index dfd4f247e5..d845911593 100644 --- a/src/solver/simulation/common-hydro-remix.cpp +++ b/src/solver/simulation/common-hydro-remix.cpp @@ -31,7 +31,7 @@ #include #include #include "common-eco-adq.h" -#include +#include #include #include "simulation.h" #include diff --git a/src/solver/simulation/solver.h b/src/solver/simulation/solver.h index b64e222694..9295b5b306 100644 --- a/src/solver/simulation/solver.h +++ b/src/solver/simulation/solver.h @@ -29,7 +29,7 @@ #include #include -#include +#include #include // PowerFluctuations #include diff --git a/src/solver/simulation/solver.hxx b/src/solver/simulation/solver.hxx index 0e15b0311f..5cb8effe43 100644 --- a/src/solver/simulation/solver.hxx +++ b/src/solver/simulation/solver.hxx @@ -28,7 +28,7 @@ #define __SOLVER_SIMULATION_SOLVER_HXX__ #include "../variable/constants.h" -#include +#include #include #include #include diff --git a/src/solver/ts-generator/generator.hxx b/src/solver/ts-generator/generator.hxx index 558b649e72..c3192cec29 100644 --- a/src/solver/ts-generator/generator.hxx +++ b/src/solver/ts-generator/generator.hxx @@ -28,7 +28,7 @@ #define __ANTARES_SOLVER_timeSeries_GENERATOR_HXX__ #include "../aleatoire/alea_fonctions.h" -#include +#include namespace Antares { diff --git a/src/solver/ts-generator/thermal.cpp b/src/solver/ts-generator/thermal.cpp index e885b9c302..c4d37ea7b8 100644 --- a/src/solver/ts-generator/thermal.cpp +++ b/src/solver/ts-generator/thermal.cpp @@ -32,7 +32,7 @@ #include #include -#include +#include #include #include "../simulation/simulation.h" diff --git a/src/solver/ts-generator/xcast/core.cpp b/src/solver/ts-generator/xcast/core.cpp index fae59ffbb9..43c882e016 100644 --- a/src/solver/ts-generator/xcast/core.cpp +++ b/src/solver/ts-generator/xcast/core.cpp @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include "xcast.h" #include "constants.h" #include "../../misc/cholesky.h" diff --git a/src/solver/ts-generator/xcast/gamma-euler.cpp b/src/solver/ts-generator/xcast/gamma-euler.cpp index ee91ef74ad..e894b91663 100644 --- a/src/solver/ts-generator/xcast/gamma-euler.cpp +++ b/src/solver/ts-generator/xcast/gamma-euler.cpp @@ -29,7 +29,7 @@ #include #include "xcast.h" #include -#include +#include #include using namespace Yuni; diff --git a/src/solver/ts-generator/xcast/gamma-inc.cpp b/src/solver/ts-generator/xcast/gamma-inc.cpp index 42cb4faa9b..01e933358b 100644 --- a/src/solver/ts-generator/xcast/gamma-inc.cpp +++ b/src/solver/ts-generator/xcast/gamma-inc.cpp @@ -29,7 +29,7 @@ #include #include "xcast.h" #include -#include +#include using namespace Yuni; diff --git a/src/solver/ts-generator/xcast/math.hxx b/src/solver/ts-generator/xcast/math.hxx index 18e2746136..7fff13c023 100644 --- a/src/solver/ts-generator/xcast/math.hxx +++ b/src/solver/ts-generator/xcast/math.hxx @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include "xcast.h" #include "constants.h" diff --git a/src/solver/ts-generator/xcast/studydata.hxx b/src/solver/ts-generator/xcast/studydata.hxx index 5b69e43f10..2d0f5fd495 100644 --- a/src/solver/ts-generator/xcast/studydata.hxx +++ b/src/solver/ts-generator/xcast/studydata.hxx @@ -29,7 +29,7 @@ #include #include -#include +#include namespace Antares { diff --git a/src/solver/ts-generator/xcast/xcast.cpp b/src/solver/ts-generator/xcast/xcast.cpp index cfb45c80f4..b66dfb7c63 100644 --- a/src/solver/ts-generator/xcast/xcast.cpp +++ b/src/solver/ts-generator/xcast/xcast.cpp @@ -31,7 +31,7 @@ #include #include "xcast.h" #include "predicate.hxx" -#include +#include #include #include #include diff --git a/src/solver/utils/ortools_utils.cpp b/src/solver/utils/ortools_utils.cpp index 2c61eb9869..d58025d968 100644 --- a/src/solver/utils/ortools_utils.cpp +++ b/src/solver/utils/ortools_utils.cpp @@ -1,6 +1,6 @@ #include "ortools_utils.h" -#include +#include #include #include #include diff --git a/src/solver/variable/commons/spatial-aggregate.h b/src/solver/variable/commons/spatial-aggregate.h index 0d79027297..82c39279e5 100644 --- a/src/solver/variable/commons/spatial-aggregate.h +++ b/src/solver/variable/commons/spatial-aggregate.h @@ -28,7 +28,7 @@ #define __SOLVER_VARIABLE_ECONOMY_SPATIAL_AGGREGATE_H__ #include "../variable.h" -// #include // In case it is needed +// #include // In case it is needed namespace Antares { diff --git a/src/solver/variable/container.h b/src/solver/variable/container.h index 249f3b3579..1486745f78 100644 --- a/src/solver/variable/container.h +++ b/src/solver/variable/container.h @@ -31,7 +31,7 @@ #include #include -#include +#include #include "endoflist.h" #include "categories.h" diff --git a/src/solver/variable/surveyresults/reportbuilder.hxx b/src/solver/variable/surveyresults/reportbuilder.hxx index 815649503f..32df647a37 100644 --- a/src/solver/variable/surveyresults/reportbuilder.hxx +++ b/src/solver/variable/surveyresults/reportbuilder.hxx @@ -32,7 +32,7 @@ #include #include -#include +#include #include "../endoflist.h" #include "../categories.h" diff --git a/src/solver/variable/surveyresults/surveyresults.cpp b/src/solver/variable/surveyresults/surveyresults.cpp index 8952d38e73..9952589de1 100644 --- a/src/solver/variable/surveyresults/surveyresults.cpp +++ b/src/solver/variable/surveyresults/surveyresults.cpp @@ -30,7 +30,7 @@ #include #include #include "surveyresults.h" -#include +#include #include #include diff --git a/src/tests/src/libs/antares/CMakeLists.txt b/src/tests/src/libs/antares/CMakeLists.txt index 9f654dcdae..ad8647a964 100644 --- a/src/tests/src/libs/antares/CMakeLists.txt +++ b/src/tests/src/libs/antares/CMakeLists.txt @@ -50,6 +50,7 @@ target_include_directories(tests-matrix-save "${src_libs_antares}/array" "${src_libs_antares}/io" "${src_libs_antares}/jit" + "${src_libs_antares}/logs" "${CMAKE_CURRENT_SOURCE_DIR}/logs" "${CMAKE_CURRENT_SOURCE_DIR}/jit" "${CMAKE_SOURCE_DIR}/tests/src/libs" diff --git a/src/tests/src/libs/antares/logs/logs/logs.h b/src/tests/src/libs/antares/logs/antares/logs/logs.h similarity index 100% rename from src/tests/src/libs/antares/logs/logs/logs.h rename to src/tests/src/libs/antares/logs/antares/logs/logs.h diff --git a/src/tests/src/libs/antares/logs/logs.cpp b/src/tests/src/libs/antares/logs/logs.cpp index 5cc5430360..0576c8e778 100644 --- a/src/tests/src/libs/antares/logs/logs.cpp +++ b/src/tests/src/libs/antares/logs/logs.cpp @@ -1,5 +1,5 @@ -#include "logs/logs.h" +#include "antares/logs/logs.h" diff --git a/src/tests/src/libs/antares/study/thermal-price-definition/thermal-price-definition.cpp b/src/tests/src/libs/antares/study/thermal-price-definition/thermal-price-definition.cpp index e4651a133d..1bc5d418de 100644 --- a/src/tests/src/libs/antares/study/thermal-price-definition/thermal-price-definition.cpp +++ b/src/tests/src/libs/antares/study/thermal-price-definition/thermal-price-definition.cpp @@ -8,7 +8,7 @@ #include #include -#include +#include #include #include diff --git a/src/tools/batchrun/main.cpp b/src/tools/batchrun/main.cpp index 90d14a3832..0f0000b9f5 100644 --- a/src/tools/batchrun/main.cpp +++ b/src/tools/batchrun/main.cpp @@ -26,7 +26,7 @@ */ #include -#include +#include #include #include #include diff --git a/src/tools/cleaner/main.cpp b/src/tools/cleaner/main.cpp index 5a09b5fb78..f4060f9dbd 100644 --- a/src/tools/cleaner/main.cpp +++ b/src/tools/cleaner/main.cpp @@ -25,7 +25,7 @@ ** SPDX-License-Identifier: licenceRef-GPL3_WITH_RTE-Exceptions */ -#include +#include #include #include #include "../../ui/common/winmain.hxx" diff --git a/src/tools/config/main.cpp b/src/tools/config/main.cpp index df3ca350b0..db71549578 100644 --- a/src/tools/config/main.cpp +++ b/src/tools/config/main.cpp @@ -26,7 +26,7 @@ */ #include -#include +#include #include #include #include diff --git a/src/tools/finder/main.cpp b/src/tools/finder/main.cpp index 5271890dbb..0e74044d03 100644 --- a/src/tools/finder/main.cpp +++ b/src/tools/finder/main.cpp @@ -25,7 +25,7 @@ ** SPDX-License-Identifier: licenceRef-GPL3_WITH_RTE-Exceptions */ -#include +#include #include #include #include "../../ui/common/winmain.hxx" diff --git a/src/tools/kirchhoff-cbuilder/main.cpp b/src/tools/kirchhoff-cbuilder/main.cpp index 4fef8c6c7d..6f0a72c52f 100644 --- a/src/tools/kirchhoff-cbuilder/main.cpp +++ b/src/tools/kirchhoff-cbuilder/main.cpp @@ -31,7 +31,7 @@ #include #include #include -#include +#include #include #include "../../solver/constraints-builder/cbuilder.h" diff --git a/src/tools/updater/main.cpp b/src/tools/updater/main.cpp index 370edde9da..acd4fd035b 100644 --- a/src/tools/updater/main.cpp +++ b/src/tools/updater/main.cpp @@ -26,7 +26,7 @@ */ #include -#include +#include #include #include #include "../../ui/common/winmain.hxx" diff --git a/src/tools/vacuum/antares-study.cpp b/src/tools/vacuum/antares-study.cpp index b2669d2ed6..a6fc0e1e4e 100644 --- a/src/tools/vacuum/antares-study.cpp +++ b/src/tools/vacuum/antares-study.cpp @@ -27,7 +27,7 @@ #include "antares-study.h" #include -#include +#include #include #include #include "io.h" diff --git a/src/tools/vacuum/main.cpp b/src/tools/vacuum/main.cpp index 56600c7f2b..dcc04d1c2e 100644 --- a/src/tools/vacuum/main.cpp +++ b/src/tools/vacuum/main.cpp @@ -34,7 +34,7 @@ #include #include #include -#include +#include #include "../../ui/common/winmain.hxx" #include #include diff --git a/src/tools/vacuum/modified-inode.cpp b/src/tools/vacuum/modified-inode.cpp index 57a4c8e8be..ae61b2dd86 100644 --- a/src/tools/vacuum/modified-inode.cpp +++ b/src/tools/vacuum/modified-inode.cpp @@ -29,7 +29,7 @@ #include "modified-inode.h" #include #include -#include +#include #include #include #include "io.h" diff --git a/src/tools/yby-aggregator/job.cpp b/src/tools/yby-aggregator/job.cpp index e181b3d4b4..368c215f4b 100644 --- a/src/tools/yby-aggregator/job.cpp +++ b/src/tools/yby-aggregator/job.cpp @@ -26,7 +26,7 @@ */ #include "job.h" -#include +#include #include "progress.h" using namespace Yuni; diff --git a/src/tools/yby-aggregator/main.cpp b/src/tools/yby-aggregator/main.cpp index 4af77404a0..4b68fdff80 100644 --- a/src/tools/yby-aggregator/main.cpp +++ b/src/tools/yby-aggregator/main.cpp @@ -26,7 +26,7 @@ */ #include -#include +#include #include #include "../../ui/common/winmain.hxx" #include diff --git a/src/tools/yby-aggregator/output.cpp b/src/tools/yby-aggregator/output.cpp index 1a1de0f043..f0d66bb48e 100644 --- a/src/tools/yby-aggregator/output.cpp +++ b/src/tools/yby-aggregator/output.cpp @@ -26,7 +26,7 @@ */ #include "output.h" -#include +#include using namespace Yuni; using namespace Antares; diff --git a/src/tools/yby-aggregator/progress.cpp b/src/tools/yby-aggregator/progress.cpp index 678c9b34f4..6d3a4040df 100644 --- a/src/tools/yby-aggregator/progress.cpp +++ b/src/tools/yby-aggregator/progress.cpp @@ -26,7 +26,7 @@ */ #include "progress.h" -#include +#include using namespace Yuni; using namespace Antares; diff --git a/src/tools/yby-aggregator/progress.h b/src/tools/yby-aggregator/progress.h index 0dabde8563..dfd3a1676c 100644 --- a/src/tools/yby-aggregator/progress.h +++ b/src/tools/yby-aggregator/progress.h @@ -30,7 +30,7 @@ #include #include #include -#include +#include class Progress final : public Yuni::Thread::Timer { diff --git a/src/ui/common/component/spotlight/mini-frame.cpp b/src/ui/common/component/spotlight/mini-frame.cpp index 4a99f0fed4..94a88496c0 100644 --- a/src/ui/common/component/spotlight/mini-frame.cpp +++ b/src/ui/common/component/spotlight/mini-frame.cpp @@ -28,7 +28,7 @@ #include "mini-frame.h" #include "../../dispatcher/gui.h" #include -#include +#include #include #include diff --git a/src/ui/common/dispatcher/action.cpp b/src/ui/common/dispatcher/action.cpp index d947bff18b..ab03ec2f60 100644 --- a/src/ui/common/dispatcher/action.cpp +++ b/src/ui/common/dispatcher/action.cpp @@ -31,7 +31,7 @@ #include #include #include "action.h" -#include +#include #include "settings.h" #include diff --git a/src/ui/common/dispatcher/gui.cpp b/src/ui/common/dispatcher/gui.cpp index 2e1410fc94..1ba4cc4e56 100644 --- a/src/ui/common/dispatcher/gui.cpp +++ b/src/ui/common/dispatcher/gui.cpp @@ -26,7 +26,7 @@ */ #include "gui.h" -#include +#include #include #include #include diff --git a/src/ui/simulator/application/application.cpp b/src/ui/simulator/application/application.cpp index 7a4a5435a1..9b3601b818 100644 --- a/src/ui/simulator/application/application.cpp +++ b/src/ui/simulator/application/application.cpp @@ -36,7 +36,7 @@ #include #include #include -#include +#include #include #include #include "../windows/message.h" @@ -44,7 +44,7 @@ #include #include "study.h" #include -#include +#include #include #ifndef YUNI_OS_WINDOWS #include diff --git a/src/ui/simulator/application/main/analyzer.cpp b/src/ui/simulator/application/main/analyzer.cpp index cc6644d23d..1fd2dc1cf9 100644 --- a/src/ui/simulator/application/main/analyzer.cpp +++ b/src/ui/simulator/application/main/analyzer.cpp @@ -26,7 +26,7 @@ */ #include "main.h" -#include +#include #include "../study.h" #include "../../toolbox/execute/execute.h" #include "../../windows/message.h" diff --git a/src/ui/simulator/application/main/create.cpp b/src/ui/simulator/application/main/create.cpp index 3df180dc1e..c3d6074d45 100644 --- a/src/ui/simulator/application/main/create.cpp +++ b/src/ui/simulator/application/main/create.cpp @@ -35,7 +35,7 @@ #include #include -#include +#include #include "toolbox/resources.h" #include "toolbox/locales.h" #include "internal-data.h" diff --git a/src/ui/simulator/application/menus.cpp b/src/ui/simulator/application/menus.cpp index 023ed1a9f5..5d21e029a2 100644 --- a/src/ui/simulator/application/menus.cpp +++ b/src/ui/simulator/application/menus.cpp @@ -26,7 +26,7 @@ */ #include -#include +#include #include "menus.h" #include #include "../toolbox/resources.h" diff --git a/src/ui/simulator/application/recentfiles.cpp b/src/ui/simulator/application/recentfiles.cpp index 76b88930dd..7efedc8855 100644 --- a/src/ui/simulator/application/recentfiles.cpp +++ b/src/ui/simulator/application/recentfiles.cpp @@ -25,7 +25,7 @@ ** SPDX-License-Identifier: licenceRef-GPL3_WITH_RTE-Exceptions */ -#include +#include #include "recentfiles.h" #include #include diff --git a/src/ui/simulator/application/wait.cpp b/src/ui/simulator/application/wait.cpp index 811d54b47f..6a83db16a2 100644 --- a/src/ui/simulator/application/wait.cpp +++ b/src/ui/simulator/application/wait.cpp @@ -30,7 +30,7 @@ #include #include "main/main.h" #include -#include +#include namespace Antares { diff --git a/src/ui/simulator/main.cpp b/src/ui/simulator/main.cpp index 36039556cc..52991ee1b1 100644 --- a/src/ui/simulator/main.cpp +++ b/src/ui/simulator/main.cpp @@ -34,7 +34,7 @@ #include "../common/winmain.hxx" #include #include -#include +#include #include #ifdef YUNI_OS_MSVC diff --git a/src/ui/simulator/toolbox/components/button/button.cpp b/src/ui/simulator/toolbox/components/button/button.cpp index ff1a9f62e8..968701b03f 100644 --- a/src/ui/simulator/toolbox/components/button/button.cpp +++ b/src/ui/simulator/toolbox/components/button/button.cpp @@ -31,7 +31,7 @@ #include #include #include -#include +#include using namespace Yuni; diff --git a/src/ui/simulator/toolbox/components/datagrid/filter/component.cpp b/src/ui/simulator/toolbox/components/datagrid/filter/component.cpp index 95d6cb2b49..f228d6e53f 100644 --- a/src/ui/simulator/toolbox/components/datagrid/filter/component.cpp +++ b/src/ui/simulator/toolbox/components/datagrid/filter/component.cpp @@ -29,7 +29,7 @@ #include "component.h" #include "../gridhelper.h" #include -#include +#include using namespace Yuni; diff --git a/src/ui/simulator/toolbox/components/datagrid/filter/parameter/parameter.cpp b/src/ui/simulator/toolbox/components/datagrid/filter/parameter/parameter.cpp index 924eb42ad3..038da44b84 100644 --- a/src/ui/simulator/toolbox/components/datagrid/filter/parameter/parameter.cpp +++ b/src/ui/simulator/toolbox/components/datagrid/filter/parameter/parameter.cpp @@ -32,7 +32,7 @@ #include #include #include "../operator.h" -#include +#include namespace Antares { diff --git a/src/ui/simulator/toolbox/components/notebook/mapnotebook.cpp b/src/ui/simulator/toolbox/components/notebook/mapnotebook.cpp index bf28fc557f..ab7c391e55 100644 --- a/src/ui/simulator/toolbox/components/notebook/mapnotebook.cpp +++ b/src/ui/simulator/toolbox/components/notebook/mapnotebook.cpp @@ -31,7 +31,7 @@ #include #include #include "../../components/map/settings.h" -#include +#include #include "../../../application/wait.h" #include #include diff --git a/src/ui/simulator/toolbox/components/notebook/mapnotebook.h b/src/ui/simulator/toolbox/components/notebook/mapnotebook.h index a6b4daf0e7..43a56a1b41 100644 --- a/src/ui/simulator/toolbox/components/notebook/mapnotebook.h +++ b/src/ui/simulator/toolbox/components/notebook/mapnotebook.h @@ -29,7 +29,7 @@ #include "notebook.h" #include -#include "logs/logs.h" +#include namespace Antares { namespace Component diff --git a/src/ui/simulator/toolbox/components/notebook/notebook.cpp b/src/ui/simulator/toolbox/components/notebook/notebook.cpp index 8ccebd8342..a70350d5df 100644 --- a/src/ui/simulator/toolbox/components/notebook/notebook.cpp +++ b/src/ui/simulator/toolbox/components/notebook/notebook.cpp @@ -31,7 +31,7 @@ #include #include #include "../../components/map/settings.h" -#include +#include #include "../../../application/wait.h" #include #include diff --git a/src/ui/simulator/toolbox/create.cpp b/src/ui/simulator/toolbox/create.cpp index 0dab172ed5..60cac27ef4 100644 --- a/src/ui/simulator/toolbox/create.cpp +++ b/src/ui/simulator/toolbox/create.cpp @@ -28,7 +28,7 @@ #include "create.h" #include #include -#include +#include #include namespace Antares diff --git a/src/ui/simulator/toolbox/jobs/job.h b/src/ui/simulator/toolbox/jobs/job.h index ca1f04af4a..8468f66e92 100644 --- a/src/ui/simulator/toolbox/jobs/job.h +++ b/src/ui/simulator/toolbox/jobs/job.h @@ -28,7 +28,7 @@ #define __ANTARES_TOOLBOX_JOB_H__ #include -#include +#include #include #include #include diff --git a/src/ui/simulator/toolbox/locales.cpp b/src/ui/simulator/toolbox/locales.cpp index b1bd0a384e..7092be8056 100644 --- a/src/ui/simulator/toolbox/locales.cpp +++ b/src/ui/simulator/toolbox/locales.cpp @@ -28,7 +28,7 @@ #include #include #include -#include +#include namespace Antares { diff --git a/src/ui/simulator/toolbox/resources.cpp b/src/ui/simulator/toolbox/resources.cpp index 863bde0d89..f3ab32eb1d 100644 --- a/src/ui/simulator/toolbox/resources.cpp +++ b/src/ui/simulator/toolbox/resources.cpp @@ -31,7 +31,7 @@ #include #include #include -#include +#include using namespace Yuni; diff --git a/src/ui/simulator/toolbox/system/diskfreespace.hxx b/src/ui/simulator/toolbox/system/diskfreespace.hxx index 5d1c1a5747..002c1dd361 100644 --- a/src/ui/simulator/toolbox/system/diskfreespace.hxx +++ b/src/ui/simulator/toolbox/system/diskfreespace.hxx @@ -29,7 +29,7 @@ #include #include #include -#include +#include using namespace Yuni; diff --git a/src/ui/simulator/windows/analyzer/analyzer.cpp b/src/ui/simulator/windows/analyzer/analyzer.cpp index 4822d68c34..339e32b3c2 100644 --- a/src/ui/simulator/windows/analyzer/analyzer.cpp +++ b/src/ui/simulator/windows/analyzer/analyzer.cpp @@ -51,7 +51,7 @@ #include "../../application/main/main.h" #include "../../application/menus.h" #include "../message.h" -#include +#include #include #include "../../application/study.h" #include diff --git a/src/ui/simulator/windows/cleaner.cpp b/src/ui/simulator/windows/cleaner.cpp index 45f421bb3c..39dec36887 100644 --- a/src/ui/simulator/windows/cleaner.cpp +++ b/src/ui/simulator/windows/cleaner.cpp @@ -42,7 +42,7 @@ #include "../toolbox/create.h" #include "../application/main.h" #include "../application/wait.h" -#include +#include using namespace Yuni; diff --git a/src/ui/simulator/windows/constraints-builder/constraintsbuilder.cpp b/src/ui/simulator/windows/constraints-builder/constraintsbuilder.cpp index 30b3733d36..f8cd2a3028 100644 --- a/src/ui/simulator/windows/constraints-builder/constraintsbuilder.cpp +++ b/src/ui/simulator/windows/constraints-builder/constraintsbuilder.cpp @@ -55,7 +55,7 @@ #include "../../application/menus.h" #include "../../application/study.h" #include "../message.h" -#include +#include #include #include #include "../../application/study.h" diff --git a/src/ui/simulator/windows/options/adequacy-patch/adequacy-patch-options.cpp b/src/ui/simulator/windows/options/adequacy-patch/adequacy-patch-options.cpp index 89ee181652..090b837699 100644 --- a/src/ui/simulator/windows/options/adequacy-patch/adequacy-patch-options.cpp +++ b/src/ui/simulator/windows/options/adequacy-patch/adequacy-patch-options.cpp @@ -36,7 +36,7 @@ #include "../../../application/menus.h" #include "../../../windows/message.h" #include -#include +#include using namespace Yuni; using namespace Data::AdequacyPatch; diff --git a/src/ui/simulator/windows/options/advanced/advanced.cpp b/src/ui/simulator/windows/options/advanced/advanced.cpp index 3abd26160d..1ab88a48d6 100644 --- a/src/ui/simulator/windows/options/advanced/advanced.cpp +++ b/src/ui/simulator/windows/options/advanced/advanced.cpp @@ -36,7 +36,7 @@ #include "../../../application/menus.h" #include "../../../windows/message.h" #include -#include +#include using namespace Yuni; diff --git a/src/ui/simulator/windows/options/optimization/optimization.cpp b/src/ui/simulator/windows/options/optimization/optimization.cpp index c0727fd462..c690021256 100644 --- a/src/ui/simulator/windows/options/optimization/optimization.cpp +++ b/src/ui/simulator/windows/options/optimization/optimization.cpp @@ -35,7 +35,7 @@ #include "../../../application/study.h" #include "../../../windows/message.h" #include -#include +#include using namespace Yuni; diff --git a/src/ui/simulator/windows/options/temp-folder/temp-folder.cpp b/src/ui/simulator/windows/options/temp-folder/temp-folder.cpp index 11313168c7..56dc9ad5ee 100644 --- a/src/ui/simulator/windows/options/temp-folder/temp-folder.cpp +++ b/src/ui/simulator/windows/options/temp-folder/temp-folder.cpp @@ -37,7 +37,7 @@ #include #include #include -#include +#include #include "../../../toolbox/components/wizardheader.h" #include "../../../toolbox/create.h" #include diff --git a/src/ui/simulator/windows/output/job.cpp b/src/ui/simulator/windows/output/job.cpp index 92158cd126..dda2c59071 100644 --- a/src/ui/simulator/windows/output/job.cpp +++ b/src/ui/simulator/windows/output/job.cpp @@ -26,7 +26,7 @@ */ #include "job.h" -#include +#include #include #include diff --git a/src/ui/simulator/windows/output/mini-frame.cpp b/src/ui/simulator/windows/output/mini-frame.cpp index a71face430..160f244a2d 100644 --- a/src/ui/simulator/windows/output/mini-frame.cpp +++ b/src/ui/simulator/windows/output/mini-frame.cpp @@ -28,7 +28,7 @@ #include "mini-frame.h" #include #include -#include +#include using namespace Yuni; From 188ae0d5771ffbafb7849aa118f927e2d91c5588 Mon Sep 17 00:00:00 2001 From: Jason Marechal Date: Mon, 14 Aug 2023 17:19:36 +0200 Subject: [PATCH 20/52] Fix date cmake --- src/libs/antares/date/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libs/antares/date/CMakeLists.txt b/src/libs/antares/date/CMakeLists.txt index de46a80489..d363d2b58b 100644 --- a/src/libs/antares/date/CMakeLists.txt +++ b/src/libs/antares/date/CMakeLists.txt @@ -1,8 +1,9 @@ set(PROJ date) set(HEADERS - antares/${PROJ} + antares/${PROJ}/date.h ) set(SRC_DATE + ${HEADERS} date.cpp ) source_group("misc\\${PROJ}" FILES ${SRC_DATE}) From 2cc0aa607167ff23c1cac3d7007b2f88202c09c4 Mon Sep 17 00:00:00 2001 From: Jason Marechal Date: Wed, 16 Aug 2023 09:10:02 +0200 Subject: [PATCH 21/52] Fix compil for logs --- src/tests/src/libs/antares/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tests/src/libs/antares/CMakeLists.txt b/src/tests/src/libs/antares/CMakeLists.txt index ad8647a964..0e51308317 100644 --- a/src/tests/src/libs/antares/CMakeLists.txt +++ b/src/tests/src/libs/antares/CMakeLists.txt @@ -36,7 +36,7 @@ set_target_properties(lib-matrix PROPERTIES FOLDER Unit-tests) # Building tests on Matrix save operations set(SRC_TEST_MATRIX_SAVE - logs/logs/logs.h + logs/antares/logs/logs.h array/fill-matrix.h array/matrix-bypass-load.h array/tests-matrix-save.h From 5010eb03641d775beeb59979e0a8478ce9f66cd2 Mon Sep 17 00:00:00 2001 From: Jason Marechal Date: Thu, 17 Aug 2023 10:18:24 +0200 Subject: [PATCH 22/52] Sys wip --- src/libs/antares/sys/CMakeLists.txt | 0 src/libs/antares/sys/{ => include/antares/sys}/appdata.h | 0 src/libs/antares/sys/{ => include/antares/sys}/hostname.hxx | 0 src/libs/antares/sys/{ => include/antares/sys}/policy.h | 0 4 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 src/libs/antares/sys/CMakeLists.txt rename src/libs/antares/sys/{ => include/antares/sys}/appdata.h (100%) rename src/libs/antares/sys/{ => include/antares/sys}/hostname.hxx (100%) rename src/libs/antares/sys/{ => include/antares/sys}/policy.h (100%) diff --git a/src/libs/antares/sys/CMakeLists.txt b/src/libs/antares/sys/CMakeLists.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/libs/antares/sys/appdata.h b/src/libs/antares/sys/include/antares/sys/appdata.h similarity index 100% rename from src/libs/antares/sys/appdata.h rename to src/libs/antares/sys/include/antares/sys/appdata.h diff --git a/src/libs/antares/sys/hostname.hxx b/src/libs/antares/sys/include/antares/sys/hostname.hxx similarity index 100% rename from src/libs/antares/sys/hostname.hxx rename to src/libs/antares/sys/include/antares/sys/hostname.hxx diff --git a/src/libs/antares/sys/policy.h b/src/libs/antares/sys/include/antares/sys/policy.h similarity index 100% rename from src/libs/antares/sys/policy.h rename to src/libs/antares/sys/include/antares/sys/policy.h From 2bec0d9193b8d27c9eee6daf5077cf1394dac8c4 Mon Sep 17 00:00:00 2001 From: Jason Marechal Date: Thu, 17 Aug 2023 10:18:41 +0200 Subject: [PATCH 23/52] Memory wip --- src/libs/antares/CMakeLists.txt | 13 ++------- src/libs/antares/array/CMakeLists.txt | 2 ++ src/libs/antares/array/antares/array/matrix.h | 4 +-- src/libs/antares/array/matrix.cpp | 1 + src/libs/antares/benchmarking/CMakeLists.txt | 1 + src/libs/antares/checks/CMakeLists.txt | 1 + src/libs/antares/memory/CMakeLists.txt | 28 +++++++++++++++++++ .../{ => include/antares/memory}/memory.h | 8 ++---- .../{ => include/antares/memory}/memory.hxx | 0 .../antares/memory}/new_check.hxx | 0 src/libs/antares/memory/memory.cpp | 10 +++---- src/libs/antares/study/memory-usage.h | 2 +- src/tests/src/libs/antares/CMakeLists.txt | 2 ++ 13 files changed, 47 insertions(+), 25 deletions(-) create mode 100644 src/libs/antares/memory/CMakeLists.txt rename src/libs/antares/memory/{ => include/antares/memory}/memory.h (98%) rename src/libs/antares/memory/{ => include/antares/memory}/memory.hxx (100%) rename src/libs/antares/memory/{ => include/antares/memory}/new_check.hxx (100%) diff --git a/src/libs/antares/CMakeLists.txt b/src/libs/antares/CMakeLists.txt index 73cda00c3f..39e671032b 100644 --- a/src/libs/antares/CMakeLists.txt +++ b/src/libs/antares/CMakeLists.txt @@ -2,12 +2,7 @@ OMESSAGE("Antares Core library") add_subdirectory(writer) - -set(SRC_MEMORY - memory/memory.h - memory/memory.hxx - memory/memory.cpp) -source_group("memory" FILES ${SRC_MEMORY}) +add_subdirectory(memory) add_subdirectory(object) @@ -368,9 +363,6 @@ set(SRC solver.h solver.cpp - # new check allocation - memory/new_check.hxx - # appdata sys/appdata.h sys/appdata.cpp @@ -487,8 +479,6 @@ add_subdirectory(checks) add_library(libantares-core antares.h ${SRC} - ${SRC_MEMORY} - ${SRC_BENCHMARKING} ${SRC_AREAS} ${SRC_XCAST} ${SRC_STUDY_AREA_UI} @@ -523,6 +513,7 @@ target_link_libraries(libantares-core PUBLIC yuni-static-core yuni-static-uuid + Antares::memory date logs exception diff --git a/src/libs/antares/array/CMakeLists.txt b/src/libs/antares/array/CMakeLists.txt index 0b42b73f15..0c2ec3d33e 100644 --- a/src/libs/antares/array/CMakeLists.txt +++ b/src/libs/antares/array/CMakeLists.txt @@ -14,11 +14,13 @@ target_link_libraries(array PUBLIC io #matrix.hxx jit #jit.hxx require logs + Antares::memory ) target_include_directories(array PRIVATE ${CMAKE_SOURCE_DIR}/libs #memory usage + ${CMAKE_SOURCE_DIR}/libs/memory/include #memory usage -> memory PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ) \ No newline at end of file diff --git a/src/libs/antares/array/antares/array/matrix.h b/src/libs/antares/array/antares/array/matrix.h index 76b25972ec..4913f99a96 100644 --- a/src/libs/antares/array/antares/array/matrix.h +++ b/src/libs/antares/array/antares/array/matrix.h @@ -29,11 +29,11 @@ #include #include -#include +#include #include "../jit.h" #include "../constants.h" #include -#include "../memory/memory.h" +#include #include "../study/fwd.h" namespace Antares diff --git a/src/libs/antares/array/matrix.cpp b/src/libs/antares/array/matrix.cpp index a9d524cc1d..73897e4f07 100644 --- a/src/libs/antares/array/matrix.cpp +++ b/src/libs/antares/array/matrix.cpp @@ -27,6 +27,7 @@ #include #include "antares/study/memory-usage.h" +#include "antares/jit/antares/jit/jit.h" using namespace Yuni; diff --git a/src/libs/antares/benchmarking/CMakeLists.txt b/src/libs/antares/benchmarking/CMakeLists.txt index 4e14e012b6..91c30bd0c0 100644 --- a/src/libs/antares/benchmarking/CMakeLists.txt +++ b/src/libs/antares/benchmarking/CMakeLists.txt @@ -22,6 +22,7 @@ target_include_directories(benchmarking ${CMAKE_SOURCE_DIR}/libs/antares/writer #study ${CMAKE_SOURCE_DIR}/libs/antares/exception #enum -> exception ${CMAKE_SOURCE_DIR}/libs/antares/jit # something,something -> jit + ${CMAKE_SOURCE_DIR}/libs/antares/memory/include #study -> BC -> link -> memory PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ) diff --git a/src/libs/antares/checks/CMakeLists.txt b/src/libs/antares/checks/CMakeLists.txt index 78d5d70615..84944773c2 100644 --- a/src/libs/antares/checks/CMakeLists.txt +++ b/src/libs/antares/checks/CMakeLists.txt @@ -18,6 +18,7 @@ target_include_directories(checks ${CMAKE_SOURCE_DIR}/libs/antares/date #area -> parameter -> date ${CMAKE_SOURCE_DIR}/libs/antares/writer #area -> antares/parts/thermal/cluster -> writer ${CMAKE_SOURCE_DIR}/libs/antares/jit #area -> matrix -> jit + ${CMAKE_SOURCE_DIR}/libs/antares/memory/include #area -> matrix -> memory PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ) diff --git a/src/libs/antares/memory/CMakeLists.txt b/src/libs/antares/memory/CMakeLists.txt new file mode 100644 index 0000000000..90e7107094 --- /dev/null +++ b/src/libs/antares/memory/CMakeLists.txt @@ -0,0 +1,28 @@ +set(PROJ memory) +set(HEADERS + include/antares/${PROJ}/memory.h + include/antares/${PROJ}/memory.hxx + include/antares/${PROJ}/new_check.hxx +) +set(SRC_MEMORY + ${HEADERS} + memory.cpp) +source_group("memory" FILES ${SRC_MEMORY}) + +add_library(${PROJ} ${SRC_MEMORY}) +add_library(Antares::${PROJ} ALIAS ${PROJ}) + +target_link_libraries(${PROJ} + PRIVATE + yuni-static-core + logs +) + +target_include_directories(${PROJ} + PRIVATE + ${CMAKE_SOURCE_DIR}/libs + ${CMAKE_SOURCE_DIR}/libs/antares/jit #memory-usage -> matrix -> jit + ${CMAKE_SOURCE_DIR}/libs/antares/io #memory-usage -> matrix -> io + PUBLIC + ${CMAKE_CURRENT_SOURCE_DIR}/include +) diff --git a/src/libs/antares/memory/memory.h b/src/libs/antares/memory/include/antares/memory/memory.h similarity index 98% rename from src/libs/antares/memory/memory.h rename to src/libs/antares/memory/include/antares/memory/memory.h index 002b837c7c..92f854cc63 100644 --- a/src/libs/antares/memory/memory.h +++ b/src/libs/antares/memory/include/antares/memory/memory.h @@ -31,13 +31,11 @@ #include #include -namespace Antares -{ -namespace Data +namespace Antares::Data { class StudyMemoryUsage; -} // namespace Data -} // namespace Antares +} // namespace Antares::Data + namespace Antares { diff --git a/src/libs/antares/memory/memory.hxx b/src/libs/antares/memory/include/antares/memory/memory.hxx similarity index 100% rename from src/libs/antares/memory/memory.hxx rename to src/libs/antares/memory/include/antares/memory/memory.hxx diff --git a/src/libs/antares/memory/new_check.hxx b/src/libs/antares/memory/include/antares/memory/new_check.hxx similarity index 100% rename from src/libs/antares/memory/new_check.hxx rename to src/libs/antares/memory/include/antares/memory/new_check.hxx diff --git a/src/libs/antares/memory/memory.cpp b/src/libs/antares/memory/memory.cpp index 73f922b370..58ef2042ae 100644 --- a/src/libs/antares/memory/memory.cpp +++ b/src/libs/antares/memory/memory.cpp @@ -25,29 +25,27 @@ ** SPDX-License-Identifier: licenceRef-GPL3_WITH_RTE-Exceptions */ -#include "memory.h" #include #include #include -#include -#include #include #ifndef YUNI_OS_WINDOWS #include #include -#include +#include #include #include -#include +#include // man 2 kill #include -#include +#include #endif #ifdef YUNI_OS_WINDOWS #include #endif #include "../study/memory-usage.h" #include "../sys/policy.h" +#include "antares/memory/include/antares/memory/memory.h" #include using namespace Yuni; diff --git a/src/libs/antares/study/memory-usage.h b/src/libs/antares/study/memory-usage.h index c1a04e42c6..39a7ce268c 100644 --- a/src/libs/antares/study/memory-usage.h +++ b/src/libs/antares/study/memory-usage.h @@ -29,7 +29,7 @@ #include #include "fwd.h" -#include +#include //TODO namespace Antares::Data { diff --git a/src/tests/src/libs/antares/CMakeLists.txt b/src/tests/src/libs/antares/CMakeLists.txt index 0e51308317..2f90de6d4f 100644 --- a/src/tests/src/libs/antares/CMakeLists.txt +++ b/src/tests/src/libs/antares/CMakeLists.txt @@ -51,6 +51,7 @@ target_include_directories(tests-matrix-save "${src_libs_antares}/io" "${src_libs_antares}/jit" "${src_libs_antares}/logs" + "${src_libs_antares}/memory/include" "${CMAKE_CURRENT_SOURCE_DIR}/logs" "${CMAKE_CURRENT_SOURCE_DIR}/jit" "${CMAKE_SOURCE_DIR}/tests/src/libs" @@ -85,6 +86,7 @@ target_include_directories(tests-matrix-load "${src_libs_antares}/array" "${src_libs_antares}/io" "${src_libs_antares}/jit" + "${src_libs_antares}/memory/include" "${CMAKE_CURRENT_SOURCE_DIR}/logs" "${CMAKE_CURRENT_SOURCE_DIR}/jit" "${CMAKE_SOURCE_DIR}/tests/src/libs" From 2c49732c12e3cdda8bcdc67fb9e6525a146863f4 Mon Sep 17 00:00:00 2001 From: Jason Marechal Date: Thu, 17 Aug 2023 11:25:17 +0200 Subject: [PATCH 24/52] Finish Memory/sys --- src/libs/antares/CMakeLists.txt | 10 +++------ src/libs/antares/hostinfo.cpp | 2 +- src/libs/antares/inifile/CMakeLists.txt | 1 + src/libs/antares/logs/CMakeLists.txt | 1 + src/libs/antares/memory/CMakeLists.txt | 1 + src/libs/antares/memory/memory.cpp | 2 +- src/libs/antares/sys/CMakeLists.txt | 28 +++++++++++++++++++++++++ src/libs/antares/sys/appdata.cpp | 2 +- src/libs/antares/sys/policy.cpp | 6 +++--- 9 files changed, 40 insertions(+), 13 deletions(-) diff --git a/src/libs/antares/CMakeLists.txt b/src/libs/antares/CMakeLists.txt index 39e671032b..1eb2022b0e 100644 --- a/src/libs/antares/CMakeLists.txt +++ b/src/libs/antares/CMakeLists.txt @@ -341,6 +341,8 @@ set(SRC_STDCXX ) source_group("stdcxx" FILES ${SRC_STDCXX}) +add_subdirectory(sys) + set(SRC config.h constants.h @@ -363,13 +365,6 @@ set(SRC solver.h solver.cpp - # appdata - sys/appdata.h - sys/appdata.cpp - sys/policy.h - sys/policy.cpp - sys/hostname.hxx - # Host info hostinfo.h hostinfo.cpp @@ -514,6 +509,7 @@ target_link_libraries(libantares-core yuni-static-core yuni-static-uuid Antares::memory + Antares::sys date logs exception diff --git a/src/libs/antares/hostinfo.cpp b/src/libs/antares/hostinfo.cpp index 2736028e2c..121fdc01f7 100644 --- a/src/libs/antares/hostinfo.cpp +++ b/src/libs/antares/hostinfo.cpp @@ -30,7 +30,7 @@ #include "hostinfo.h" #include -#include "sys/hostname.hxx" +#include "antares/sys/hostname.hxx" using namespace Yuni; using namespace Antares; diff --git a/src/libs/antares/inifile/CMakeLists.txt b/src/libs/antares/inifile/CMakeLists.txt index bfa1acb4de..c324e4c9f9 100644 --- a/src/libs/antares/inifile/CMakeLists.txt +++ b/src/libs/antares/inifile/CMakeLists.txt @@ -9,6 +9,7 @@ source_group("misc\\inifile" FILES ${SRC_INI}) add_library(inifile ${SRC_INI} ) +add_library(Antares::inifile ALIAS inifile) target_link_libraries(inifile PRIVATE diff --git a/src/libs/antares/logs/CMakeLists.txt b/src/libs/antares/logs/CMakeLists.txt index 4f9c033ab3..2fcef3c6a5 100644 --- a/src/libs/antares/logs/CMakeLists.txt +++ b/src/libs/antares/logs/CMakeLists.txt @@ -12,6 +12,7 @@ set(SRC_LOGS source_group("misc\\logs" FILES ${SRC_LOGS}) add_library(${PROJ} ${SRC_LOGS}) +add_library(Antares::${PROJ} ALIAS ${PROJ}) target_link_libraries(${PROJ} PRIVATE diff --git a/src/libs/antares/memory/CMakeLists.txt b/src/libs/antares/memory/CMakeLists.txt index 90e7107094..a8ddb52b0e 100644 --- a/src/libs/antares/memory/CMakeLists.txt +++ b/src/libs/antares/memory/CMakeLists.txt @@ -16,6 +16,7 @@ target_link_libraries(${PROJ} PRIVATE yuni-static-core logs + Antares::sys ) target_include_directories(${PROJ} diff --git a/src/libs/antares/memory/memory.cpp b/src/libs/antares/memory/memory.cpp index 58ef2042ae..f3bc552da9 100644 --- a/src/libs/antares/memory/memory.cpp +++ b/src/libs/antares/memory/memory.cpp @@ -44,7 +44,7 @@ #include #endif #include "../study/memory-usage.h" -#include "../sys/policy.h" +#include #include "antares/memory/include/antares/memory/memory.h" #include diff --git a/src/libs/antares/sys/CMakeLists.txt b/src/libs/antares/sys/CMakeLists.txt index e69de29bb2..05273fb734 100644 --- a/src/libs/antares/sys/CMakeLists.txt +++ b/src/libs/antares/sys/CMakeLists.txt @@ -0,0 +1,28 @@ +set(PROJ sys) +set(HEADERS + include/antares/${PROJ}/appdata.h + include/antares/${PROJ}/policy.h + include/antares/${PROJ}/hostname.hxx +) +set(SRC_PROJ + ${HEADERS} + policy.cpp + appdata.cpp +) +source_group("memory" FILES ${SRC_PROJ}) + +add_library(${PROJ} ${SRC_PROJ}) +add_library(Antares::${PROJ} ALIAS ${PROJ}) + +target_link_libraries(${PROJ} + PRIVATE + yuni-static-core + Antares::logs + Antares::inifile +) + +target_include_directories(${PROJ} + PUBLIC + ${CMAKE_CURRENT_SOURCE_DIR}/include + ${CMAKE_SOURCE_DIR}/libs +) diff --git a/src/libs/antares/sys/appdata.cpp b/src/libs/antares/sys/appdata.cpp index 0338c91301..78f415916e 100644 --- a/src/libs/antares/sys/appdata.cpp +++ b/src/libs/antares/sys/appdata.cpp @@ -25,7 +25,7 @@ ** SPDX-License-Identifier: licenceRef-GPL3_WITH_RTE-Exceptions */ -#include "appdata.h" +#include "antares/sys/appdata.h" #ifdef YUNI_OS_WINDOWS #include #include diff --git a/src/libs/antares/sys/policy.cpp b/src/libs/antares/sys/policy.cpp index 9ba67ed658..05dc41f76f 100644 --- a/src/libs/antares/sys/policy.cpp +++ b/src/libs/antares/sys/policy.cpp @@ -25,13 +25,13 @@ ** SPDX-License-Identifier: licenceRef-GPL3_WITH_RTE-Exceptions */ -#include "policy.h" +#include "antares/sys/policy.h" #include #include -#include "appdata.h" +#include "antares/sys/appdata.h" #include #include -#include "hostname.hxx" +#include "antares/sys/hostname.hxx" #include "../config.h" #include #include From d8b6d49e1b421f654f085f034461b6d221d01c08 Mon Sep 17 00:00:00 2001 From: Jason Marechal Date: Fri, 18 Aug 2023 16:06:45 +0200 Subject: [PATCH 25/52] Fix post merge --- src/libs/antares/study/memory-usage.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/antares/study/memory-usage.h b/src/libs/antares/study/memory-usage.h index c1a04e42c6..39a7ce268c 100644 --- a/src/libs/antares/study/memory-usage.h +++ b/src/libs/antares/study/memory-usage.h @@ -29,7 +29,7 @@ #include #include "fwd.h" -#include +#include //TODO namespace Antares::Data { From 9a81f51e224860874e8074c81373db31f80bc795 Mon Sep 17 00:00:00 2001 From: Jason Marechal Date: Mon, 21 Aug 2023 09:30:55 +0200 Subject: [PATCH 26/52] Remove extra include --- src/libs/antares/array/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/src/libs/antares/array/CMakeLists.txt b/src/libs/antares/array/CMakeLists.txt index 0c2ec3d33e..994969233f 100644 --- a/src/libs/antares/array/CMakeLists.txt +++ b/src/libs/antares/array/CMakeLists.txt @@ -20,7 +20,6 @@ target_link_libraries(array target_include_directories(array PRIVATE ${CMAKE_SOURCE_DIR}/libs #memory usage - ${CMAKE_SOURCE_DIR}/libs/memory/include #memory usage -> memory PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ) \ No newline at end of file From 7a4682816e1cc192d4b78c46bf7d4cbe1bd72721 Mon Sep 17 00:00:00 2001 From: Jason Marechal Date: Mon, 21 Aug 2023 09:35:44 +0200 Subject: [PATCH 27/52] Fix include --- src/libs/antares/array/matrix.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/libs/antares/array/matrix.cpp b/src/libs/antares/array/matrix.cpp index 73897e4f07..73f6f95c6b 100644 --- a/src/libs/antares/array/matrix.cpp +++ b/src/libs/antares/array/matrix.cpp @@ -25,9 +25,8 @@ ** SPDX-License-Identifier: licenceRef-GPL3_WITH_RTE-Exceptions */ -#include #include "antares/study/memory-usage.h" -#include "antares/jit/antares/jit/jit.h" +#include "antares/jit/jit.h" using namespace Yuni; From 45a5f8da1cc7d8e8265c1db06c96037755d78c43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jason=20Mar=C3=A9chal?= <45510813+JasonMarechal25@users.noreply.github.com> Date: Mon, 21 Aug 2023 10:25:39 +0200 Subject: [PATCH 28/52] Remove sys as direct dependency of antares-core (#1561) --- src/analyzer/CMakeLists.txt | 3 ++- src/analyzer/main.cpp | 5 +---- src/libs/antares/CMakeLists.txt | 4 ---- src/libs/antares/date/CMakeLists.txt | 1 + src/libs/antares/logs/CMakeLists.txt | 3 +++ src/libs/antares/{ => logs/antares/logs}/hostinfo.h | 0 src/libs/antares/{ => logs}/hostinfo.cpp | 2 +- src/solver/CMakeLists.txt | 1 + src/solver/application.cpp | 2 +- src/tools/cleaner/CMakeLists.txt | 1 + src/tools/config/CMakeLists.txt | 1 + src/tools/config/main.cpp | 10 ---------- src/tools/kirchhoff-cbuilder/CMakeLists.txt | 2 +- src/tools/kirchhoff-cbuilder/main.cpp | 2 -- src/tools/updater/CMakeLists.txt | 1 + src/tools/yby-aggregator/CMakeLists.txt | 4 +++- src/tools/yby-aggregator/main.cpp | 2 +- src/ui/simulator/application/application.cpp | 2 +- src/ui/simulator/application/main/create.cpp | 2 -- src/ui/simulator/cmake/application.cmake | 1 + src/ui/simulator/cmake/windows-options.cmake | 1 + src/ui/simulator/main.cpp | 2 -- 22 files changed, 21 insertions(+), 31 deletions(-) rename src/libs/antares/{ => logs/antares/logs}/hostinfo.h (100%) rename src/libs/antares/{ => logs}/hostinfo.cpp (98%) diff --git a/src/analyzer/CMakeLists.txt b/src/analyzer/CMakeLists.txt index eca39e2968..ea1f65d7d0 100644 --- a/src/analyzer/CMakeLists.txt +++ b/src/analyzer/CMakeLists.txt @@ -51,7 +51,8 @@ INSTALL(EXPORT antares-analyzer target_link_libraries(antares-${ANTARES_PRG_VERSION}-analyzer PRIVATE libantares-core - date + Antares::date + Antares::sys yuni-static-core ${CMAKE_THREADS_LIBS_INIT} ) diff --git a/src/analyzer/main.cpp b/src/analyzer/main.cpp index 6724951374..fc328791a4 100644 --- a/src/analyzer/main.cpp +++ b/src/analyzer/main.cpp @@ -29,15 +29,12 @@ #include #include #include "../ui/common/winmain.hxx" -#include -#include #include #include "atsp/atsp.h" -#include +#include #include #include #include -#include "../config.h" using namespace Yuni; using namespace Antares; diff --git a/src/libs/antares/CMakeLists.txt b/src/libs/antares/CMakeLists.txt index 497a2e41d7..418b8fa579 100644 --- a/src/libs/antares/CMakeLists.txt +++ b/src/libs/antares/CMakeLists.txt @@ -365,9 +365,6 @@ set(SRC solver.h solver.cpp - # Host info - hostinfo.h hostinfo.cpp - # files & paths paths/list.h paths/list.cpp @@ -510,7 +507,6 @@ target_link_libraries(libantares-core yuni-static-uuid Boost::boost Antares::memory - Antares::sys date logs exception diff --git a/src/libs/antares/date/CMakeLists.txt b/src/libs/antares/date/CMakeLists.txt index d363d2b58b..f78f193975 100644 --- a/src/libs/antares/date/CMakeLists.txt +++ b/src/libs/antares/date/CMakeLists.txt @@ -9,6 +9,7 @@ set(SRC_DATE source_group("misc\\${PROJ}" FILES ${SRC_DATE}) add_library(${PROJ} ${SRC_DATE}) +add_library(Antares::${PROJ} ALIAS ${PROJ}) target_link_libraries(${PROJ} PRIVATE diff --git a/src/libs/antares/logs/CMakeLists.txt b/src/libs/antares/logs/CMakeLists.txt index 2fcef3c6a5..4eebd0483c 100644 --- a/src/libs/antares/logs/CMakeLists.txt +++ b/src/libs/antares/logs/CMakeLists.txt @@ -3,11 +3,13 @@ set(HEADERS antares/${PROJ}/cleaner.h antares/${PROJ}/logs.h antares/${PROJ}/logs.hxx + antares/${PROJ}/hostinfo.h ) set(SRC_LOGS ${HEADERS} logs.cpp cleaner.cpp + hostinfo.cpp ) source_group("misc\\logs" FILES ${SRC_LOGS}) @@ -17,6 +19,7 @@ add_library(Antares::${PROJ} ALIAS ${PROJ}) target_link_libraries(${PROJ} PRIVATE yuni-static-core + Antares::sys ) target_include_directories(${PROJ} diff --git a/src/libs/antares/hostinfo.h b/src/libs/antares/logs/antares/logs/hostinfo.h similarity index 100% rename from src/libs/antares/hostinfo.h rename to src/libs/antares/logs/antares/logs/hostinfo.h diff --git a/src/libs/antares/hostinfo.cpp b/src/libs/antares/logs/hostinfo.cpp similarity index 98% rename from src/libs/antares/hostinfo.cpp rename to src/libs/antares/logs/hostinfo.cpp index 121fdc01f7..9d352541f7 100644 --- a/src/libs/antares/hostinfo.cpp +++ b/src/libs/antares/logs/hostinfo.cpp @@ -27,7 +27,7 @@ #include #include -#include "hostinfo.h" +#include "antares/logs/hostinfo.h" #include #include "antares/sys/hostname.hxx" diff --git a/src/solver/CMakeLists.txt b/src/solver/CMakeLists.txt index 624b75ddc3..14ffd0d705 100644 --- a/src/solver/CMakeLists.txt +++ b/src/solver/CMakeLists.txt @@ -96,6 +96,7 @@ target_link_libraries(antares-solver ${ANTARES_SOLVER_LIBS} benchmarking result_writer + Antares::sys ) target_include_directories(antares-solver diff --git a/src/solver/application.cpp b/src/solver/application.cpp index 9dfcb340a5..672c8c8265 100644 --- a/src/solver/application.cpp +++ b/src/solver/application.cpp @@ -2,7 +2,7 @@ #include #include -#include +#include #include #include diff --git a/src/tools/cleaner/CMakeLists.txt b/src/tools/cleaner/CMakeLists.txt index ba96dd85ee..74a1f9db1e 100644 --- a/src/tools/cleaner/CMakeLists.txt +++ b/src/tools/cleaner/CMakeLists.txt @@ -27,6 +27,7 @@ INSTALL(EXPORT antares-study-cleaner set(CLEANER_LIBS libantares-core yuni-static-core + Antares::sys ${CMAKE_THREADS_LIBS_INIT} ) diff --git a/src/tools/config/CMakeLists.txt b/src/tools/config/CMakeLists.txt index 9206c81451..6e358265f1 100644 --- a/src/tools/config/CMakeLists.txt +++ b/src/tools/config/CMakeLists.txt @@ -44,6 +44,7 @@ target_link_libraries(${execname} PRIVATE ${CONFIG_LIBS} array + Antares::sys ) import_std_libs(${execname}) diff --git a/src/tools/config/main.cpp b/src/tools/config/main.cpp index db71549578..c50c9a9aaf 100644 --- a/src/tools/config/main.cpp +++ b/src/tools/config/main.cpp @@ -28,22 +28,12 @@ #include #include #include -#include #include -#include -#include #include #include "../../ui/common/winmain.hxx" #include -#include -#include -#include #include -#include -#include -#include #include -#include "../../../config.h" #include using namespace Yuni; diff --git a/src/tools/kirchhoff-cbuilder/CMakeLists.txt b/src/tools/kirchhoff-cbuilder/CMakeLists.txt index f8059cb4f4..13787fdd7b 100644 --- a/src/tools/kirchhoff-cbuilder/CMakeLists.txt +++ b/src/tools/kirchhoff-cbuilder/CMakeLists.txt @@ -27,7 +27,7 @@ set(KIRCHHOFF_CBUILDER_LIBS ${CMAKE_THREADS_LIBS_INIT} ) -target_link_libraries(${execname} PRIVATE libantares-solver-constraints-builder) +target_link_libraries(${execname} PRIVATE libantares-solver-constraints-builder Antares::sys) target_link_libraries(${execname} PRIVATE ${KIRCHHOFF_CBUILDER_LIBS} ) import_std_libs(${execname}) diff --git a/src/tools/kirchhoff-cbuilder/main.cpp b/src/tools/kirchhoff-cbuilder/main.cpp index 6f0a72c52f..8036cfa10f 100644 --- a/src/tools/kirchhoff-cbuilder/main.cpp +++ b/src/tools/kirchhoff-cbuilder/main.cpp @@ -27,9 +27,7 @@ #include #include -#include #include -#include #include #include #include diff --git a/src/tools/updater/CMakeLists.txt b/src/tools/updater/CMakeLists.txt index c3ae8e424c..0ca493b531 100644 --- a/src/tools/updater/CMakeLists.txt +++ b/src/tools/updater/CMakeLists.txt @@ -27,6 +27,7 @@ INSTALL(EXPORT antares-study-updater set(UPDATER_LIBS libantares-core yuni-static-core + Antares::sys ${CMAKE_THREADS_LIBS_INIT} ) diff --git a/src/tools/yby-aggregator/CMakeLists.txt b/src/tools/yby-aggregator/CMakeLists.txt index 098b169c81..b83ceb82de 100644 --- a/src/tools/yby-aggregator/CMakeLists.txt +++ b/src/tools/yby-aggregator/CMakeLists.txt @@ -48,8 +48,10 @@ INSTALL(EXPORT antares-ybyaggregator set(YBY_AGGREGATOR_LIBS libantares-core - date + Antares::date + Antares::logs yuni-static-core + Antares::sys ${wxWidgets_LIBRARIES} ${CMAKE_THREADS_LIBS_INIT}) # The new ant library diff --git a/src/tools/yby-aggregator/main.cpp b/src/tools/yby-aggregator/main.cpp index 4b68fdff80..e829a1e943 100644 --- a/src/tools/yby-aggregator/main.cpp +++ b/src/tools/yby-aggregator/main.cpp @@ -38,7 +38,7 @@ #include #include #include -#include +#include #include #include "../../config.h" diff --git a/src/ui/simulator/application/application.cpp b/src/ui/simulator/application/application.cpp index 9b3601b818..da9d6629e7 100644 --- a/src/ui/simulator/application/application.cpp +++ b/src/ui/simulator/application/application.cpp @@ -33,7 +33,7 @@ #include #include #include "../toolbox/resources.h" -#include +#include #include #include #include diff --git a/src/ui/simulator/application/main/create.cpp b/src/ui/simulator/application/main/create.cpp index c3d6074d45..1e2b7f4c4d 100644 --- a/src/ui/simulator/application/main/create.cpp +++ b/src/ui/simulator/application/main/create.cpp @@ -40,12 +40,10 @@ #include "toolbox/locales.h" #include "internal-data.h" #include "windows/version.h" -#include "config.h" #include "drag-drop.hxx" // Antares study #include -#include // Antares memory allocation check #include diff --git a/src/ui/simulator/cmake/application.cmake b/src/ui/simulator/cmake/application.cmake index 646958fd8f..98d18db7d1 100644 --- a/src/ui/simulator/cmake/application.cmake +++ b/src/ui/simulator/cmake/application.cmake @@ -73,5 +73,6 @@ target_link_libraries(libantares-ui-application ${wxWidgets_LIBRARIES} libantares-ui-common libantares-core + Antares::sys ) diff --git a/src/ui/simulator/cmake/windows-options.cmake b/src/ui/simulator/cmake/windows-options.cmake index 10d4a08441..d9a1faf5a0 100644 --- a/src/ui/simulator/cmake/windows-options.cmake +++ b/src/ui/simulator/cmake/windows-options.cmake @@ -31,4 +31,5 @@ target_link_libraries(libantares-ui-windows-options ${wxWidgets_LIBRARIES} PRIVATE libantares-ui-common + Antares::sys ) \ No newline at end of file diff --git a/src/ui/simulator/main.cpp b/src/ui/simulator/main.cpp index 52991ee1b1..3780e5253e 100644 --- a/src/ui/simulator/main.cpp +++ b/src/ui/simulator/main.cpp @@ -29,8 +29,6 @@ #include "application/application.h" #include "application/main.h" #include -#include -#include "../../config.h" #include "../common/winmain.hxx" #include #include From bd96c410830c91a52d85bfb89179737c16b8ecee Mon Sep 17 00:00:00 2001 From: Jason Marechal Date: Mon, 21 Aug 2023 16:32:04 +0200 Subject: [PATCH 29/52] Remove memory usage --- src/libs/antares/CMakeLists.txt | 5 +- src/libs/antares/array/antares/array/matrix.h | 24 - .../antares/array/antares/array/matrix.hxx | 36 -- src/libs/antares/array/matrix.cpp | 104 +--- .../antares/correlation/correlation.h | 5 - src/libs/antares/correlation/correlation.cpp | 13 - src/libs/antares/memory/memory.cpp | 16 - src/libs/antares/memory/memory.h | 19 - src/libs/antares/study/area/area.cpp | 52 +- src/libs/antares/study/area/area.h | 4 +- src/libs/antares/study/area/links.cpp | 10 - src/libs/antares/study/area/links.h | 5 - src/libs/antares/study/area/list.cpp | 18 - .../BindingConstraintsRepository.cpp | 19 - .../BindingConstraintsRepository.h | 5 - .../study/estimate.memory-footprint.cpp | 223 ------- src/libs/antares/study/fwd.h | 1 - src/libs/antares/study/memory-usage.cpp | 176 ------ src/libs/antares/study/memory-usage.h | 129 ---- src/libs/antares/study/parameters.cpp | 3 +- .../study/parts/common/cluster_list.cpp | 8 +- .../antares/study/parts/common/cluster_list.h | 7 - .../antares/study/parts/common/series.cpp | 29 +- src/libs/antares/study/parts/common/series.h | 2 - src/libs/antares/study/parts/hydro/prepro.cpp | 10 - src/libs/antares/study/parts/hydro/prepro.h | 2 +- src/libs/antares/study/parts/hydro/series.cpp | 20 - src/libs/antares/study/parts/hydro/series.h | 2 +- .../antares/study/parts/load/container.cpp | 12 +- src/libs/antares/study/parts/load/prepro.cpp | 14 +- src/libs/antares/study/parts/load/prepro.h | 2 +- src/libs/antares/study/parts/load/prepro.hxx | 16 +- src/libs/antares/study/parts/load/series.cpp | 11 - src/libs/antares/study/parts/load/series.h | 2 +- .../antares/study/parts/renewable/cluster.cpp | 1 - .../study/parts/renewable/cluster_list.cpp | 15 - .../study/parts/renewable/cluster_list.h | 1 - .../study/parts/renewable/container.cpp | 7 - .../antares/study/parts/renewable/container.h | 2 +- src/libs/antares/study/parts/solar/prepro.h | 2 +- src/libs/antares/study/parts/solar/prepro.hxx | 17 +- src/libs/antares/study/parts/solar/series.cpp | 11 - src/libs/antares/study/parts/solar/series.h | 2 +- .../antares/study/parts/thermal/cluster.cpp | 1 - .../study/parts/thermal/cluster_list.cpp | 25 - .../study/parts/thermal/cluster_list.h | 2 - .../antares/study/parts/thermal/container.cpp | 7 - .../antares/study/parts/thermal/container.h | 2 +- .../antares/study/parts/thermal/ecoInput.cpp | 12 - .../antares/study/parts/thermal/ecoInput.h | 2 +- .../antares/study/parts/thermal/prepro.cpp | 10 - src/libs/antares/study/parts/thermal/prepro.h | 2 +- src/libs/antares/study/parts/wind/prepro.h | 14 +- src/libs/antares/study/parts/wind/prepro.hxx | 16 +- src/libs/antares/study/parts/wind/series.cpp | 11 - src/libs/antares/study/parts/wind/series.h | 2 +- src/libs/antares/study/runtime/runtime.cpp | 8 - src/libs/antares/study/runtime/runtime.h | 6 - src/libs/antares/study/study.h | 33 -- src/libs/antares/study/xcast/xcast.cpp | 13 - src/libs/antares/study/xcast/xcast.h | 2 +- src/solver/simulation/common-eco-adq.cpp | 1 - src/solver/simulation/common-hydro-remix.cpp | 1 - src/solver/simulation/solver.h | 11 - src/solver/simulation/solver.hxx | 561 ------------------ src/solver/variable/adequacy/area.cpp | 1 - .../adequacy/area.memory-estimation.cpp | 1 - .../adequacy/bc.memory-estimation.cpp | 1 - src/solver/variable/adequacy/links.cpp | 1 - src/solver/variable/adequacy/overallCost.h | 7 - src/solver/variable/area.h | 5 - .../variable/area.memory-estimation.inc.hxx | 26 - .../variable/bc.memory-estimation.inc.hxx | 31 - src/solver/variable/bindConstraints.h | 4 - src/solver/variable/commons/join.h | 10 - .../variable/commons/links/links.cpp.inc.hxx | 1 - .../variable/commons/links/links.h.inc.hxx | 5 - .../variable/commons/links/links.hxx.inc.hxx | 30 - src/solver/variable/container.h | 6 - src/solver/variable/container.hxx | 8 - .../economy/STStorageInjectionByCluster.h | 26 - .../economy/STStorageLevelsByCluster.h | 26 - .../economy/STStorageWithdrawalByCluster.h | 26 - src/solver/variable/economy/area.cpp | 1 - .../economy/area.memory-estimation.cpp | 1 - .../variable/economy/bc.memory-estimation.cpp | 1 - src/solver/variable/economy/links.cpp | 1 - src/solver/variable/economy/max-mrg.cpp | 1 - .../economy/nbOfDispatchedUnitsByPlant.h | 26 - .../economy/npCostByDispatchablePlant.h | 26 - src/solver/variable/economy/overallCost.h | 7 - .../economy/productionByDispatchablePlant.h | 29 - .../economy/productionByRenewablePlant.h | 26 - src/solver/variable/economy/profitByPlant.h | 26 - src/solver/variable/endoflist.h | 6 - src/solver/variable/setofareas.h | 5 - src/solver/variable/setofareas.hxx | 6 - src/solver/variable/storage/average.h | 8 - src/solver/variable/storage/averagedata.cpp | 1 - src/solver/variable/storage/empty.h | 5 - src/solver/variable/storage/intermediate.cpp | 1 - src/solver/variable/storage/intermediate.h | 2 - src/solver/variable/storage/intermediate.hxx | 5 - src/solver/variable/storage/minmax-data.cpp | 23 +- src/solver/variable/storage/minmax.h | 7 - src/solver/variable/storage/raw.h | 8 - src/solver/variable/storage/results.h | 5 - src/solver/variable/storage/stdDeviation.h | 7 - .../variable/surveyresults/surveyresults.cpp | 28 - .../variable/surveyresults/surveyresults.h | 5 - src/solver/variable/variable.h | 5 - src/solver/variable/variable.hxx | 40 +- .../renderer/bindingconstraint/offsets.cpp | 1 - .../renderer/bindingconstraint/weights.cpp | 2 - .../memorystatistics/memorystatistics.cpp | 163 +---- .../output/provider/output-comparison.cpp | 1 - .../windows/output/provider/outputs.cpp | 1 - .../windows/output/provider/variables.cpp | 1 - src/ui/simulator/windows/simulation/run.cpp | 110 +--- src/ui/simulator/windows/simulation/run.h | 5 - 120 files changed, 68 insertions(+), 2547 deletions(-) delete mode 100644 src/libs/antares/study/estimate.memory-footprint.cpp delete mode 100644 src/libs/antares/study/memory-usage.cpp delete mode 100644 src/libs/antares/study/memory-usage.h diff --git a/src/libs/antares/CMakeLists.txt b/src/libs/antares/CMakeLists.txt index 070242be7f..12579d4a27 100644 --- a/src/libs/antares/CMakeLists.txt +++ b/src/libs/antares/CMakeLists.txt @@ -426,15 +426,12 @@ set(SRC study/runtime.h study/study.h study/study.hxx - study/fwd.h + study/fwd.h study/fwd.cpp study.h - study/estimate.memory-footprint.cpp study/study.cpp study/correlation-updater.hxx study/study.importprepro.cpp - study/memory-usage.h - study/memory-usage.cpp study/importlogs.cpp study/load.cpp study/save.cpp diff --git a/src/libs/antares/array/antares/array/matrix.h b/src/libs/antares/array/antares/array/matrix.h index 76b25972ec..2a5929e601 100644 --- a/src/libs/antares/array/antares/array/matrix.h +++ b/src/libs/antares/array/antares/array/matrix.h @@ -97,11 +97,6 @@ class Matrix filesizeHardLimit = 1536 * 1024 * 1024, // 1.5Go }; - /*! - ** \brief Estimate - */ - static void EstimateMemoryUsage(Antares::Data::StudyMemoryUsage& u, uint w, uint h); - public: //! \name Constructors & Destructor //@{ @@ -416,19 +411,6 @@ class Matrix */ void unloadFromMemory() const; - /*! - ** \brief Try to estimate the memory footprint used by the matrix - */ - void estimateMemoryUsage(Antares::Data::StudyMemoryUsage& u) const; - - /*! - ** \brief Try to estimate the memory footprint used by the matrix (conditional) - ** - ** If the condition is true, the given size will be used instead of the current one. - ** This method is used estimate the memory footprint when time-series are enabled/disabled. - */ - void estimateMemoryUsage(Antares::Data::StudyMemoryUsage& u, bool cond, uint w, uint h) const; - /*! ** \brief Mark the matrix as modified ** @@ -631,12 +613,6 @@ int MatrixTestForPositiveValues_LimitWidth(const char* msg, const Matrix<>* m, u template bool MatrixTestForAtLeastOnePositiveValue(const Matrix& m); -void MatrixEstimateMemoryUsage(size_t sizeofT, Antares::Data::StudyMemoryUsage& u, uint w, uint h); - -void MatrixEstimateMemoryUsageFromJIT(size_t sizeofT, - Antares::Data::StudyMemoryUsage& u, - JIT::Informations* jit); - } // namespace Antares #include "matrix.hxx" diff --git a/src/libs/antares/array/antares/array/matrix.hxx b/src/libs/antares/array/antares/array/matrix.hxx index b6c09e92e4..9a537ecca3 100644 --- a/src/libs/antares/array/antares/array/matrix.hxx +++ b/src/libs/antares/array/antares/array/matrix.hxx @@ -1545,42 +1545,6 @@ void Matrix::unloadFromMemory() const } } -template -inline void Matrix::EstimateMemoryUsage(Antares::Data::StudyMemoryUsage& u, - uint w, - uint h) -{ - MatrixEstimateMemoryUsage(sizeof(T), u, w, h); -} - -template -void Matrix::estimateMemoryUsage(Antares::Data::StudyMemoryUsage& u, - bool cond, - uint w, - uint h) const -{ - if (cond) - EstimateMemoryUsage(u, w, h); - else - estimateMemoryUsage(u); -} - -template -void Matrix::estimateMemoryUsage(Antares::Data::StudyMemoryUsage& u) const -{ - using namespace Yuni; - - // We already have the data. No need to estimate the value. - if (JIT::IsReady(jit)) - { - EstimateMemoryUsage(u, width, height); - return; - } - - // The data are actually not loaded. We will have to rely on the JIT structure - MatrixEstimateMemoryUsageFromJIT(sizeof(T), u, jit); -} - template bool MatrixTestForAtLeastOnePositiveValue(const Matrix& m) { diff --git a/src/libs/antares/array/matrix.cpp b/src/libs/antares/array/matrix.cpp index a9d524cc1d..b253446912 100644 --- a/src/libs/antares/array/matrix.cpp +++ b/src/libs/antares/array/matrix.cpp @@ -26,7 +26,7 @@ */ #include -#include "antares/study/memory-usage.h" +#include "antares/array/matrix.h" using namespace Yuni; @@ -38,86 +38,6 @@ enum + sizeof(void*) * 2 // entry, jit }; -void MatrixEstimateMemoryUsageFromJIT(size_t sizeofT, - Antares::Data::StudyMemoryUsage& u, - JIT::Informations* jit) -{ - if (jit) - { - // But we may already have the estimate value in cache - if (jit->estimatedSize[0] and jit->estimatedSize[1]) - { - MatrixEstimateMemoryUsage(sizeofT, u, jit->estimatedSize[0], jit->estimatedSize[1]); - return; - } - - if (not jit->sourceFilename.empty()) - { - uint64 size; - if (IO::File::Size(jit->sourceFilename, size)) - { - if (size and size < Matrix<>::filesizeHardLimit) - { - IO::File::Stream file(jit->sourceFilename); - if (file.opened()) - { - // Load the data - // Copying the whole buffer - if (!u.buffer) - u.buffer = new Matrix<>::BufferType(); - u.buffer->resize((String::Size)size); - // Read the entire file - if (size == file.read(u.buffer->data(), size)) - { - // Adding a final \n to make sure we have a line return at the end of - // the file - *(u.buffer) += '\n'; - - String::Size offset = u.buffer->find('\n'); - if (offset != String::npos) - { - String::Size n = 0; - uint columns = 1; - while ( - (n = u.buffer->find_first_of(ANTARES_MATRIX_CSV_SEPARATORS, n)) - != String::npos - and n < offset) - { - ++columns; - ++n; - } - jit->estimatedSize[0] = columns; - jit->estimatedSize[1] = (uint)u.buffer->countChar('\n'); - - MatrixEstimateMemoryUsage( - sizeofT, u, jit->estimatedSize[0], jit->estimatedSize[1]); - return; - } - } - } - } - } - } - } // if jit - - // We really don't know. The worst case is not 0. - if (u.gatheringInformationsForInput) - u.requiredMemoryForInput += sizeofMatrix; - else - u.requiredMemoryForOutput += sizeofMatrix; -} - -void MatrixEstimateMemoryUsage(size_t sizeofT, Data::StudyMemoryUsage& u, uint w, uint h) -{ - for (uint i = 0; i != w; ++i) - Antares::Memory::EstimateMemoryUsage(sizeofT, h, u, false); - - if (u.gatheringInformationsForInput) - u.requiredMemoryForInput += sizeofMatrix + sizeof(void*) * w; - else - u.requiredMemoryForOutput += sizeofMatrix + sizeof(void*) * w; -} - int MatrixTestForPositiveValues(const char* msg, const Matrix<>* m) { uint x = 0; @@ -192,28 +112,6 @@ int MatrixTestIfValuesAreLowerThan(const char* msg, const Matrix<>* m, const dou return 1; } -int MatrixTestForNegativeValues(const char* msg, const Matrix<>* m) -{ - logs.debug() << "Checking : " << msg; - if (m->width and m->height) - { - for (uint x = 0; x < m->width; ++x) - { - auto& column = m->entry[x]; - for (uint y = 0; y < m->height; ++y) - { - if (column[y] > 0.) - { - logs.error() << msg << ": positive value detected (at column " << x - << ", row: " << y << ')'; - return 0; - } - } - } - } - return 1; -} - int MatrixTestForPositiveValues_LimitWidth(const char* msg, const Matrix<>* m, uint maxWidth) { logs.debug() << "Checking : " << msg; diff --git a/src/libs/antares/correlation/antares/correlation/correlation.h b/src/libs/antares/correlation/antares/correlation/correlation.h index f94000535b..e9043597e4 100644 --- a/src/libs/antares/correlation/antares/correlation/correlation.h +++ b/src/libs/antares/correlation/antares/correlation/correlation.h @@ -142,11 +142,6 @@ class Correlation final */ Yuni::uint64 memoryUsage() const; - /*! - ** \brief Estimate - */ - void estimateMemoryUsage(StudyMemoryUsage& u) const; - /*! ** \brief Invalidate all matrices */ diff --git a/src/libs/antares/correlation/correlation.cpp b/src/libs/antares/correlation/correlation.cpp index 1b861762cf..0714162625 100644 --- a/src/libs/antares/correlation/correlation.cpp +++ b/src/libs/antares/correlation/correlation.cpp @@ -595,19 +595,6 @@ Yuni::uint64 Correlation::memoryUsage() const return r; } -void Correlation::estimateMemoryUsage(StudyMemoryUsage& u) const -{ - if (pMode == modeAnnual) - { - Matrix<>::EstimateMemoryUsage(u, u.study.areas.size(), u.study.areas.size()); - } - else - { - for (uint i = 0; i != 12; ++i) - Matrix<>::EstimateMemoryUsage(u, u.study.areas.size(), u.study.areas.size()); - } -} - bool Correlation::forceReload(bool reload) const { bool ret = true; diff --git a/src/libs/antares/memory/memory.cpp b/src/libs/antares/memory/memory.cpp index 73f922b370..2ebb4534a4 100644 --- a/src/libs/antares/memory/memory.cpp +++ b/src/libs/antares/memory/memory.cpp @@ -46,7 +46,6 @@ #ifdef YUNI_OS_WINDOWS #include #endif -#include "../study/memory-usage.h" #include "../sys/policy.h" #include @@ -119,21 +118,6 @@ bool Memory::initializeTemporaryFolder() return true; } -void Memory::EstimateMemoryUsage(size_t bytes, - uint count, - Data::StudyMemoryUsage& u, - bool duplicateForParallelYears) -{ - size_t total = bytes * count; - if (duplicateForParallelYears) - total = total * u.nbYearsParallel; - - if (u.gatheringInformationsForInput) - u.requiredMemoryForInput += total; - else - u.requiredMemoryForOutput += total; -} - void Memory::displayInfo() const { #ifdef YUNI_OS_WINDOWS diff --git a/src/libs/antares/memory/memory.h b/src/libs/antares/memory/memory.h index 002b837c7c..91cb90d1a4 100644 --- a/src/libs/antares/memory/memory.h +++ b/src/libs/antares/memory/memory.h @@ -31,14 +31,6 @@ #include #include -namespace Antares -{ -namespace Data -{ -class StudyMemoryUsage; -} // namespace Data -} // namespace Antares - namespace Antares { /*! @@ -131,17 +123,6 @@ class Memory final : public Yuni::Policy::ObjectLevelLockable template static void Release(T*& pointer); - /*! - ** \brief Estimate the memory usage if our managed pointers are used - ** - ** \param bytes A size in bytes - ** \param count The number of element of size `bytes` to allocate - */ - static void EstimateMemoryUsage(size_t bytes, - uint count, - Data::StudyMemoryUsage& u, - bool duplicateForParallelYears); - public: //! \name Constructor & Destructor //@{ diff --git a/src/libs/antares/study/area/area.cpp b/src/libs/antares/study/area/area.cpp index 67052d24c4..a40f4b4f40 100644 --- a/src/libs/antares/study/area/area.cpp +++ b/src/libs/antares/study/area/area.cpp @@ -60,7 +60,7 @@ Area::Area(const AnyString& name) : Antares::TransformNameIntoID(this->name, this->id); } -Area::Area(const AnyString& name, const AnyString& id, uint indx) : +Area::Area(const AnyString& name, const AnyString& id, uint) : reserves(fhrMax, HOURS_PER_YEAR), miscGen(fhhMax, HOURS_PER_YEAR) { @@ -301,56 +301,6 @@ void Area::resizeAllTimeseriesNumbers(uint n) renewable.resizeAllTimeseriesNumbers(n); } -void Area::estimateMemoryUsage(StudyMemoryUsage& u) const -{ - u.requiredMemoryForInput += sizeof(Area); - - // reserves - Matrix<>::EstimateMemoryUsage(u, fhrMax, HOURS_PER_YEAR); - // Misc Gen. - Matrix<>::EstimateMemoryUsage(u, fhhMax, HOURS_PER_YEAR); - - // Load - if (load.series) - load.series->estimateMemoryUsage(u); - if (load.prepro) - load.prepro->estimateMemoryUsage(u); - // Solar - if (solar.series) - solar.series->estimateMemoryUsage(u); - if (solar.prepro) - solar.prepro->estimateMemoryUsage(u); - // Wind - if (wind.series) - wind.series->estimateMemoryUsage(u); - if (wind.prepro) - wind.prepro->estimateMemoryUsage(u); - - // Hydro - if (hydro.series) - hydro.series->estimateMemoryUsage(u); - if (hydro.prepro) - hydro.prepro->estimateMemoryUsage(u); - - // Thermal - thermal.estimateMemoryUsage(u); - - // Renewable - renewable.estimateMemoryUsage(u); - - // Scratchpad - u.requiredMemoryForInput += sizeof(AreaScratchpad) * u.nbYearsParallel; - - // Links - if (not links.empty()) - { - u.requiredMemoryForInput += (sizeof(AreaLink*) * 2) * links.size(); - auto end = links.end(); - for (auto i = links.begin(); i != end; ++i) - (i->second)->estimateMemoryUsage(u); - } -} - bool Area::thermalClustersMinStablePowerValidity(std::vector& output) const { bool noErrorMinStabPow = true; diff --git a/src/libs/antares/study/area/area.h b/src/libs/antares/study/area/area.h index 7752e60a50..1a2c3a2b14 100644 --- a/src/libs/antares/study/area/area.h +++ b/src/libs/antares/study/area/area.h @@ -194,7 +194,7 @@ class Area final : private Yuni::NonCopyable /*! ** \brief Try to estimate the amount of memory required by the area for a simulation */ - void estimateMemoryUsage(StudyMemoryUsage&) const; + //@} //! \name Thermal clusters min stable power validity checking @@ -658,7 +658,7 @@ class AreaList final : public Yuni::NonCopyable /*! ** \brief Try to estimate the amount of memory required by the class for a simulation */ - void estimateMemoryUsage(StudyMemoryUsage&) const; + /*! ** \brief Get the average amount of memory currently used by each area diff --git a/src/libs/antares/study/area/links.cpp b/src/libs/antares/study/area/links.cpp index c8867899fd..edfbe5452c 100644 --- a/src/libs/antares/study/area/links.cpp +++ b/src/libs/antares/study/area/links.cpp @@ -31,7 +31,6 @@ #include "links.h" #include "area.h" #include -#include "../memory-usage.h" #include "../filter.h" #include "constants.h" #include "../fwd.h" @@ -719,15 +718,6 @@ void AreaLinkRemove(AreaLink* link) delete link; } -void AreaLink::estimateMemoryUsage(StudyMemoryUsage& u) const -{ - u.requiredMemoryForInput += sizeof(AreaLink); - Matrix<>::EstimateMemoryUsage(u, fhlMax, HOURS_PER_YEAR); - - // From the solver - u.requiredMemoryForInput += 1 * 1024 * 1024; -} - Yuni::uint64 AreaLink::memoryUsage() const { Yuni::uint64 to_return = sizeof(AreaLink); diff --git a/src/libs/antares/study/area/links.h b/src/libs/antares/study/area/links.h index 8180777366..c200561d1f 100644 --- a/src/libs/antares/study/area/links.h +++ b/src/libs/antares/study/area/links.h @@ -115,11 +115,6 @@ class AreaLink final : public Yuni::NonCopyable ** \brief Get the size (bytes) in memory occupied by a `AreaLink` structure */ Yuni::uint64 memoryUsage() const; - /*! - ** \brief Try to estimate the amount of memory required by the area for a simulation - */ - void estimateMemoryUsage(StudyMemoryUsage& u) const; - //@} bool isVisibleOnLayer(const size_t& layerID) const; diff --git a/src/libs/antares/study/area/list.cpp b/src/libs/antares/study/area/list.cpp index 519ab7b9c3..0a9982f7c1 100644 --- a/src/libs/antares/study/area/list.cpp +++ b/src/libs/antares/study/area/list.cpp @@ -34,7 +34,6 @@ #include #include #include -#include "../memory-usage.h" #include "../../config.h" #include "../filter.h" #include "constants.h" @@ -1362,23 +1361,6 @@ uint64 AreaList::memoryUsage() const return ret; } -void AreaList::estimateMemoryUsage(StudyMemoryUsage& u) const -{ - u.requiredMemoryForInput += (sizeof(void*) * 3) * areas.size(); - each([&](const Data::Area& area) { area.estimateMemoryUsage(u); }); -} - -double AreaList::memoryUsageAveragePerArea() const -{ - if (!areas.empty()) // avoid division by 0 - { - Yuni::uint64 ret = 0; - each([&](const Data::Area& area) { ret += area.memoryUsage(); }); - return (double)((double)ret / (double)areas.size()); - } - return 0; -} - uint AreaList::areaLinkCount() const { uint ret = 0; diff --git a/src/libs/antares/study/binding_constraint/BindingConstraintsRepository.cpp b/src/libs/antares/study/binding_constraint/BindingConstraintsRepository.cpp index f858eb59fc..d56b3e3287 100644 --- a/src/libs/antares/study/binding_constraint/BindingConstraintsRepository.cpp +++ b/src/libs/antares/study/binding_constraint/BindingConstraintsRepository.cpp @@ -323,25 +323,6 @@ BindingConstraintsRepository::const_iterator BindingConstraintsRepository::end() return constraints_.end(); } - -void BindingConstraintsRepository::estimateMemoryUsage(StudyMemoryUsage& u) const -{ - // Disabled by the optimization preferences - if (!u.study.parameters.include.constraints) - return; - - // each constraint... - for (const auto &constraint: constraints_) { - u.requiredMemoryForInput += sizeof(void *) * 2; - uint count = (constraint->operatorType() == BindingConstraint::opBoth) ? 2 : 1; - for (uint constraints_counter = 0; constraints_counter != count; ++constraints_counter) { - u.requiredMemoryForInput += (sizeof(long) + sizeof(double)) * constraint->linkCount(); - u.requiredMemoryForInput += (sizeof(long) + sizeof(double)) * constraint->clusterCount(); - Matrix<>::EstimateMemoryUsage(u, 1, HOURS_PER_YEAR); - } - } -} - void BindingConstraintsRepository::markAsModified() const { for (const auto & i : constraints_) diff --git a/src/libs/antares/study/binding_constraint/BindingConstraintsRepository.h b/src/libs/antares/study/binding_constraint/BindingConstraintsRepository.h index 0822c1e620..fe37e6ad53 100644 --- a/src/libs/antares/study/binding_constraint/BindingConstraintsRepository.h +++ b/src/libs/antares/study/binding_constraint/BindingConstraintsRepository.h @@ -144,11 +144,6 @@ class BindingConstraintsRepository final : public Yuni::NonCopyable. -** -** SPDX-License-Identifier: licenceRef-GPL3_WITH_RTE-Exceptions -*/ - -#include -#include "study.h" -#include "memory-usage.h" -#include "runtime.h" -#include "../../../solver/simulation/simulation.h" -#include "../../../solver/variable/economy/all.h" -#include -#include "../../../solver/simulation/economy.h" -#include "../../../solver/simulation/solver.h" - -using namespace Yuni; -using namespace Antares; - -namespace Antares -{ -namespace Data -{ -class ThreadInputMemoryUsage : public Thread::IThread -{ -public: - ThreadInputMemoryUsage(const Study& study) : pStudy(study) - { - } - - virtual ~ThreadInputMemoryUsage() - { - } - -protected: - virtual bool onStarting() - { - return true; - } - - virtual bool onExecute() - { - Data::StudyMemoryUsage m(pStudy); - auto end = pStudy.areas.end(); - for (auto i = pStudy.areas.begin(); i != end; ++i) - { - auto& area = *(i->second); - // Thermal - { - auto end = area.thermal.list.end(); - for (auto i = area.thermal.list.begin(); i != end; ++i) - { - auto& cluster = *(i->second); - - if (cluster.series) - cluster.series->estimateMemoryUsage(m, timeSeriesThermal); - - if (shouldAbort()) - return false; - - if (cluster.prepro) - cluster.prepro->estimateMemoryUsage(m); - - cluster.ecoInput.estimateMemoryUsage(m); - - if (shouldAbort()) - return false; - } - } - // Renewable - { - auto end = area.renewable.list.end(); - for (auto i = area.renewable.list.begin(); i != end; ++i) - { - auto& cluster = *(i->second); - - if (cluster.series) - cluster.series->estimateMemoryUsage(m, timeSeriesRenewable); - - if (shouldAbort()) - return false; - } - } - area.estimateMemoryUsage(m); - - if (shouldAbort()) - return false; - } - return false; - } - - virtual void onKill() - { - // do nothing - } - -private: - const Data::Study& pStudy; -}; - -Yuni::Thread::IThread::Ptr Study::createThreadToEstimateInputMemoryUsage() const -{ - return new ThreadInputMemoryUsage(*this); -} - -void Study::estimateMemoryUsageForInput(StudyMemoryUsage& u) const -{ - u.gatheringInformationsForInput = true; - - // Base - u.requiredMemoryForInput = sizeof(Study); - // Folder - u.requiredMemoryForInput += folder.capacity(); - - // Strings - // folderInput / folderOutput / folderSettings - // This is a really simple estimation - u.requiredMemoryForInput += ((uint64)folderInput.capacity() + 30u) * 3u; - // Buffer - u.requiredMemoryForInput += (dataBuffer.chunkSize * 2u); // estimation - - // Simulation - u.requiredMemoryForInput += simulationComments.memoryUsage(); - // Areas - areas.estimateMemoryUsage(u); - - // Memory consuming estimation for random numbers containers and solver - Solver::Simulation::ISimulation::estimateMemoryUsage(u); - - // Binding constraints - bindingConstraints.estimateMemoryUsage(u); - - // Correlation - preproLoadCorrelation.estimateMemoryUsage(u); - preproSolarCorrelation.estimateMemoryUsage(u); - preproWindCorrelation.estimateMemoryUsage(u); - preproHydroCorrelation.estimateMemoryUsage(u); - - // Runtime infos - StudyRuntimeInfosEstimateMemoryUsage(u); - - // Tables allocation for simulation. See : sim_allocation_tableaux.cpp. - const size_t sizeOfLongHours = HOURS_PER_YEAR * sizeof(int); - const size_t sizeOfDoubleHours = HOURS_PER_YEAR * sizeof(double); - uint nbLinks = areas.areaLinkCount(); - for (uint i = 0; i != nbLinks; i++) - { - u.requiredMemoryForInput += 7 * sizeOfDoubleHours; - u.requiredMemoryForInput += 2 * sizeOfLongHours; - u.requiredMemoryForInput += parameters.nbYears * sizeof(double); - } - for (uint i = 0; i != bindingConstraints.size(); ++i) - u.requiredMemoryForInput += sizeOfDoubleHours; - - dataBuffer.clear(); - dataBuffer.shrink(); -} - -void Study::estimateMemoryUsageForOutput(StudyMemoryUsage& u) const -{ - u.gatheringInformationsForInput = false; - if (!u.years) - return; - - // Average 2Mo per area - Used by the simplex - // u.requiredMemoryForOutput += (2u * areas.size()) * 1024u * 1024u; - - switch (u.mode) - { - case stdmEconomy: - { - enum - { - maxColumnsForExportation = Solver::Variable::Container::BrowseAllVariables< - Solver::Variable::Economy::AllVariables>::maxValue, - }; - - Solver::Variable::SurveyResults::EstimateMemoryUsage(maxColumnsForExportation, u); - Solver::Variable::Economy::AllVariables::EstimateMemoryUsage(u); - return; - } - case stdmAdequacy: - { - enum - { - maxColumnsForExportation = Solver::Variable::Container::BrowseAllVariables< - Solver::Variable::Economy::AllVariables>::maxValue, - }; - - Solver::Variable::SurveyResults::EstimateMemoryUsage(maxColumnsForExportation, u); - Solver::Variable::Economy::AllVariables::EstimateMemoryUsage(u); - return; - } - case stdmUnknown: - case stdmExpansion: - case stdmMax: - return; - } -} - -} // namespace Data -} // namespace Antares diff --git a/src/libs/antares/study/fwd.h b/src/libs/antares/study/fwd.h index c44ca00c73..42ec1ac0ba 100644 --- a/src/libs/antares/study/fwd.h +++ b/src/libs/antares/study/fwd.h @@ -40,7 +40,6 @@ namespace Data { // Forward declarations class Study; -class StudyMemoryUsage; class StudyLoadOptions; class Area; class AreaLink; diff --git a/src/libs/antares/study/memory-usage.cpp b/src/libs/antares/study/memory-usage.cpp deleted file mode 100644 index 5c5b7d72a5..0000000000 --- a/src/libs/antares/study/memory-usage.cpp +++ /dev/null @@ -1,176 +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 -*/ - -#include "study.h" -#include "memory-usage.h" -#include - -using namespace Yuni; - -namespace Antares -{ -namespace Data -{ -// gp : voir l'impact de la selection des variables ici -StudyMemoryUsage::StudyMemoryUsage(const Study& s) : - mode(s.parameters.mode), - gatheringInformationsForInput(false), - requiredMemory(), - requiredMemoryForInput(), - requiredMemoryForOutput(), - requiredDiskSpace(), - requiredDiskSpaceForOutput(), - study(s), - years(s.parameters.nbYears), - nbYearsParallel(s.maxNbYearsInParallel), - buffer(nullptr), - area(nullptr) -{ - // alias to parameters - auto& parameters = study.parameters; - assert(parameters.yearsFilter.size() == years && "Invalid size for yearsFilter"); - // playlist - if (parameters.userPlaylist && !parameters.yearsFilter.empty()) - { - uint y = 0; - for (uint i = 0; i != years; ++i) - { - if (parameters.yearsFilter[i]) - ++y; - } - years = y; - } - - if (parameters.simulationDays.end > parameters.simulationDays.first) - { - pNbDays = parameters.simulationDays.end - parameters.simulationDays.first; - pNbHours = pNbDays * 24; - pNbWeeks = pNbDays / 7; - pNbMonths = 1 + study.calendar.days[parameters.simulationDays.end - 1].month - - study.calendar.days[parameters.simulationDays.first].month; - } - else - { - pNbHours = 0; - pNbDays = 0; - pNbWeeks = 0; - pNbMonths = 0; - } - - pNbMaxDigitForYear = 1; - - uint y = years; - while ((y /= 10) != 0) - ++pNbMaxDigitForYear; -} - -StudyMemoryUsage::~StudyMemoryUsage() -{ - delete buffer; -} - -StudyMemoryUsage& StudyMemoryUsage::operator+=(const StudyMemoryUsage& rhs) -{ - requiredMemory += rhs.requiredMemory; - requiredMemoryForInput += rhs.requiredMemoryForInput; - requiredMemoryForOutput += rhs.requiredMemoryForOutput; - requiredDiskSpace += rhs.requiredDiskSpace; - requiredDiskSpaceForOutput += rhs.requiredDiskSpaceForOutput; - return *this; -} - -void StudyMemoryUsage::estimate() -{ - study.estimateMemoryUsageForInput(*this); - study.estimateMemoryUsageForOutput(*this); - - // Post-operations - requiredMemory = requiredMemoryForInput + requiredMemoryForOutput; - requiredDiskSpace = requiredDiskSpaceForOutput; -} - -void StudyMemoryUsage::takeIntoConsiderationANewTimeserieForDiskOutput(bool withIDs) -{ - enum - { - o = 7 /*line feed*/ + 8 /*text*/ - }; - - // The number of digits is an estimation - // values hourly - requiredDiskSpaceForOutput += (4 /*digits*/ + 1 /*tab*/) * pNbHours + o; - // values daily - requiredDiskSpaceForOutput += (4 /*digits*/ + 1 /*tab*/) * pNbDays + o; - // values weekly - requiredDiskSpaceForOutput += (6 /*digits*/ + 1 /*tab*/) * pNbWeeks + o; - // values monthly - requiredDiskSpaceForOutput += (6 /*digits*/ + 1 /*tab*/) * pNbMonths + o; - // values annual - requiredDiskSpaceForOutput += (8 /*digits*/ + 1 /*tab*/) * 1 + o; - - if (withIDs) - { - // ID hourly - requiredDiskSpaceForOutput += (pNbMaxDigitForYear + 1 /*tab*/) * pNbHours + o; - // ID daily - requiredDiskSpaceForOutput += (pNbMaxDigitForYear + 1 /*tab*/) * pNbDays + o; - // ID weekly - requiredDiskSpaceForOutput += (pNbMaxDigitForYear + 1 /*tab*/) * pNbWeeks + o; - // ID monthly - requiredDiskSpaceForOutput += (pNbMaxDigitForYear + 1 /*tab*/) * pNbMonths + o; - // ID annual - requiredDiskSpaceForOutput += (pNbMaxDigitForYear + 1 /*tab*/) * 1 + o; - } -} - -Yuni::uint64 computeOverheadDiskSpaceForAnyDataLevelComponent() -{ - // Reminder : a data level can be an area, a link or a binding constraint - Yuni::uint64 diskSpace = 0; - - diskSpace += 160 * 1024; // hourly - diskSpace += 6 * 1024; // daily - diskSpace += 6 * 1024; // weekly - diskSpace += 2 * 1024; // monthly - diskSpace += 1024; // annual - - return diskSpace; -} - -void StudyMemoryUsage::overheadDiskSpaceForSingleAreaOrLink() -{ - // x2 : values + IDs - requiredDiskSpaceForOutput += 2 * computeOverheadDiskSpaceForAnyDataLevelComponent(); -} - -void StudyMemoryUsage::overheadDiskSpaceForSingleBindConstraint() -{ - requiredDiskSpaceForOutput += computeOverheadDiskSpaceForAnyDataLevelComponent(); -} - -} // namespace Data -} // namespace Antares diff --git a/src/libs/antares/study/memory-usage.h b/src/libs/antares/study/memory-usage.h deleted file mode 100644 index c1a04e42c6..0000000000 --- a/src/libs/antares/study/memory-usage.h +++ /dev/null @@ -1,129 +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_MEMORYUSAGE_H__ -#define __ANTARES_LIBS_STUDY_MEMORYUSAGE_H__ - -#include -#include "fwd.h" -#include - -namespace Antares::Data -{ -/*! -** \brief Estimate the amount of memory (RAM, disk) required for a simulation -*/ -class StudyMemoryUsage final -{ -public: - //! \name Constructor - //@{ - //! Default constructor - StudyMemoryUsage(const Study& study); - //! Destructor - ~StudyMemoryUsage(); - //@} - - /*! - ** \brief Estimate the amount memory required - ** - ** The real amount of memory required to launch this study - ** should be less than the returned value, but in the worst case - ** it can be equal (or nearly). - */ - void estimate(); - - /*! - ** \brief Consider in the estimation of the required disk space (output) the overhead produced - *by a timeseries - */ - void takeIntoConsiderationANewTimeserieForDiskOutput(bool withIDs = false); - - /*! - ** \brief Consider in the estimation the overhead produced by a single area or link - */ - void overheadDiskSpaceForSingleAreaOrLink(); - - void overheadDiskSpaceForSingleBindConstraint(); - -public: - //! \name Input data - //@{ - //! Study mode (economy / adequacy / other) - StudyMode mode; - //! For matrices - bool gatheringInformationsForInput; - //@} - - //! \name Output data - //@{ - //! Total Amount of memory required for a simulation (input+output) - Yuni::uint64 requiredMemory; - //! Amount of memory required by the input data for a simulation - Yuni::uint64 requiredMemoryForInput; - //! Amount of memory required by the output data for a simulation - Yuni::uint64 requiredMemoryForOutput; - - //! Total Amount of disk space required for a simulation - Yuni::uint64 requiredDiskSpace; - //! Amount of disk space required by the output for a simulation - Yuni::uint64 requiredDiskSpaceForOutput; - //@} - - //! Reference to the study - const Study& study; - - //! The total number of MC years - uint years; - - //! Number max of parallel years to actually run in a set - uint nbYearsParallel; - - //! A temporary buffer, sometimes used by matrices - Matrix<>::BufferType* buffer; - - StudyMemoryUsage& operator+=(const StudyMemoryUsage& rhs); - - //! The current area - const Area* area; - -private: - //! The number of simulation hours for a year - uint pNbHours; - //! The number of days per year - uint pNbDays; - //! The number of weeks for a year - uint pNbWeeks; - //! The number of months for a year - uint pNbMonths; - uint pNbMaxDigitForYear; - -}; // class StudyMemoryUsage - -} // namespace Antares::Data - - -#endif // __ANTARES_LIBS_STUDY_MEMORYUSAGE_H__ diff --git a/src/libs/antares/study/parameters.cpp b/src/libs/antares/study/parameters.cpp index b8594ec776..e660d18caa 100644 --- a/src/libs/antares/study/parameters.cpp +++ b/src/libs/antares/study/parameters.cpp @@ -38,8 +38,7 @@ #include #include #include "load-options.h" -#include -#include +#include #include "../solver/variable/economy/all.h" #include diff --git a/src/libs/antares/study/parts/common/cluster_list.cpp b/src/libs/antares/study/parts/common/cluster_list.cpp index ce00e17c81..b28b495d78 100644 --- a/src/libs/antares/study/parts/common/cluster_list.cpp +++ b/src/libs/antares/study/parts/common/cluster_list.cpp @@ -15,9 +15,7 @@ struct TSNumbersPredicate }; } // namespace -namespace Antares -{ -namespace Data +namespace Antares::Data { using namespace Antares; @@ -448,5 +446,5 @@ void ClusterList::retrieveTotalCapacityAndUnitCount(double& total, uin template class ClusterList; template class ClusterList; -} // namespace Data -} // namespace Antares +} // namespace Antares::Data + diff --git a/src/libs/antares/study/parts/common/cluster_list.h b/src/libs/antares/study/parts/common/cluster_list.h index 83f70080aa..3d295efffb 100644 --- a/src/libs/antares/study/parts/common/cluster_list.h +++ b/src/libs/antares/study/parts/common/cluster_list.h @@ -1,7 +1,6 @@ #ifndef __ANTARES_LIBS_STUDY_PARTS_COMMON_CLUSTER_LIST_H__ #define __ANTARES_LIBS_STUDY_PARTS_COMMON_CLUSTER_LIST_H__ -#include "../../memory-usage.h" #include #include "../../fwd.h" @@ -219,12 +218,6 @@ class ClusterList */ Yuni::uint64 memoryUsage() const; - /*! - ** \brief Try to estimate the amount of memory which will be used by the solver - */ - virtual void estimateMemoryUsage(StudyMemoryUsage&) const = 0; - //@} - public: //! All clusters by their index ClusterT** byIndex; diff --git a/src/libs/antares/study/parts/common/series.cpp b/src/libs/antares/study/parts/common/series.cpp index 82c5dab017..1d0022078c 100644 --- a/src/libs/antares/study/parts/common/series.cpp +++ b/src/libs/antares/study/parts/common/series.cpp @@ -29,16 +29,14 @@ #include #include #include "../../study.h" -#include "../../memory-usage.h" #include "series.h" using namespace Yuni; #define SEP IO::Separator -namespace Antares -{ -namespace Data + +namespace Antares::Data { bool DataSeriesCommon::forceReload(bool reload) const { @@ -50,25 +48,6 @@ void DataSeriesCommon::markAsModified() const timeSeries.markAsModified(); } -void DataSeriesCommon::estimateMemoryUsage(StudyMemoryUsage& u, enum TimeSeries ts) const -{ - u.requiredMemoryForInput += sizeof(DataSeriesCommon); - timeseriesNumbers.estimateMemoryUsage(u, true, 1, u.years); - uint nbTimeSeries; - switch (ts) - { - case timeSeriesThermal: - nbTimeSeries = u.study.parameters.nbTimeSeriesThermal; - break; - case timeSeriesRenewable: - nbTimeSeries = 1; - break; - default: - nbTimeSeries = 0; - } - timeSeries.estimateMemoryUsage( - u, 0 != (ts & u.study.parameters.timeSeriesToGenerate), nbTimeSeries, HOURS_PER_YEAR); -} -} // namespace Data -} // namespace Antares +} // namespace Antares::Data + diff --git a/src/libs/antares/study/parts/common/series.h b/src/libs/antares/study/parts/common/series.h index 0b7df33a72..962e69b34c 100644 --- a/src/libs/antares/study/parts/common/series.h +++ b/src/libs/antares/study/parts/common/series.h @@ -40,8 +40,6 @@ namespace Data class DataSeriesCommon { public: - void estimateMemoryUsage(StudyMemoryUsage&, enum TimeSeries) const; - bool forceReload(bool reload = false) const; void markAsModified() const; diff --git a/src/libs/antares/study/parts/hydro/prepro.cpp b/src/libs/antares/study/parts/hydro/prepro.cpp index fbc84482fc..6e272b71b7 100644 --- a/src/libs/antares/study/parts/hydro/prepro.cpp +++ b/src/libs/antares/study/parts/hydro/prepro.cpp @@ -29,7 +29,6 @@ #include #include #include "../../study.h" -#include "../../memory-usage.h" #include "prepro.h" #include #include @@ -252,14 +251,5 @@ void PreproHydro::markAsModified() const return data.markAsModified(); } -void PreproHydro::estimateMemoryUsage(StudyMemoryUsage& u) const -{ - if (timeSeriesHydro & u.study.parameters.timeSeriesToGenerate) - { - data.estimateMemoryUsage(u, true, hydroPreproMax, 12); - u.requiredMemoryForInput += sizeof(PreproHydro); - } -} - } // namespace Data } // namespace Antares diff --git a/src/libs/antares/study/parts/hydro/prepro.h b/src/libs/antares/study/parts/hydro/prepro.h index 5ef195635e..b550221564 100644 --- a/src/libs/antares/study/parts/hydro/prepro.h +++ b/src/libs/antares/study/parts/hydro/prepro.h @@ -84,7 +84,7 @@ class PreproHydro PreproHydro(); //@} - void estimateMemoryUsage(StudyMemoryUsage&) const; + /*! ** \brief Reset all data to their default values diff --git a/src/libs/antares/study/parts/hydro/series.cpp b/src/libs/antares/study/parts/hydro/series.cpp index 7cda0b4f56..b964080823 100644 --- a/src/libs/antares/study/parts/hydro/series.cpp +++ b/src/libs/antares/study/parts/hydro/series.cpp @@ -32,7 +32,6 @@ #include #include #include "../../study.h" -#include "../../memory-usage.h" using namespace Yuni; @@ -210,25 +209,6 @@ void DataSeriesHydro::markAsModified() const mingen.markAsModified(); } -void DataSeriesHydro::estimateMemoryUsage(StudyMemoryUsage& u) const -{ - u.requiredMemoryForInput += sizeof(DataSeriesHydro); - timeseriesNumbers.estimateMemoryUsage(u, true, 1, u.years); - // series - if ((timeSeriesHydro & u.study.parameters.timeSeriesToGenerate)) - { - ror.estimateMemoryUsage(u, true, u.study.parameters.nbTimeSeriesHydro, HOURS_PER_YEAR); - storage.estimateMemoryUsage(u, true, u.study.parameters.nbTimeSeriesHydro, 12); - mingen.estimateMemoryUsage(u, true, u.study.parameters.nbTimeSeriesHydro, HOURS_PER_YEAR); - } - else - { - ror.estimateMemoryUsage(u); - storage.estimateMemoryUsage(u); - mingen.estimateMemoryUsage(u); - } -} - void DataSeriesHydro::reset() { ror.reset(1, HOURS_PER_YEAR); diff --git a/src/libs/antares/study/parts/hydro/series.h b/src/libs/antares/study/parts/hydro/series.h index 86cba2c145..0882a787a0 100644 --- a/src/libs/antares/study/parts/hydro/series.h +++ b/src/libs/antares/study/parts/hydro/series.h @@ -97,7 +97,7 @@ class DataSeriesHydro /*! ** \brief Try to estimate the amount of memory required for launching a simulation */ - void estimateMemoryUsage(StudyMemoryUsage&) const; + //@} /*! diff --git a/src/libs/antares/study/parts/load/container.cpp b/src/libs/antares/study/parts/load/container.cpp index 05ef55c984..9cc909edcd 100644 --- a/src/libs/antares/study/parts/load/container.cpp +++ b/src/libs/antares/study/parts/load/container.cpp @@ -32,11 +32,7 @@ using namespace Yuni; -namespace Antares -{ -namespace Data -{ -namespace Load +namespace Antares::Data::Load { Container::Container() : prepro(nullptr), series(nullptr) { @@ -82,6 +78,6 @@ void Container::resetToDefault() prepro->resetToDefault(); } -} // namespace Load -} // namespace Data -} // namespace Antares +} // namespace Antares::Data::Load + + diff --git a/src/libs/antares/study/parts/load/prepro.cpp b/src/libs/antares/study/parts/load/prepro.cpp index f3627e42f6..6ab41a67f0 100644 --- a/src/libs/antares/study/parts/load/prepro.cpp +++ b/src/libs/antares/study/parts/load/prepro.cpp @@ -31,11 +31,9 @@ using namespace Yuni; -namespace Antares -{ -namespace Data -{ -namespace Load + + +namespace Antares::Data::Load { Prepro::Prepro() : xcast(timeSeriesLoad) { @@ -55,6 +53,6 @@ bool Prepro::saveToFolder(const AnyString& folder) const return xcast.saveToFolder(folder); } -} // namespace Load -} // namespace Data -} // namespace Antares +} // namespace Antares::Data::Load + + diff --git a/src/libs/antares/study/parts/load/prepro.h b/src/libs/antares/study/parts/load/prepro.h index 4891a509f2..54e6d29c56 100644 --- a/src/libs/antares/study/parts/load/prepro.h +++ b/src/libs/antares/study/parts/load/prepro.h @@ -54,7 +54,7 @@ class Prepro /*! ** \brief Try to estimate the amount of memory required by this class for a simulation */ - void estimateMemoryUsage(StudyMemoryUsage&) const; + /*! ** \brief Load data from a folder diff --git a/src/libs/antares/study/parts/load/prepro.hxx b/src/libs/antares/study/parts/load/prepro.hxx index 03940d70ea..36b82e2da9 100644 --- a/src/libs/antares/study/parts/load/prepro.hxx +++ b/src/libs/antares/study/parts/load/prepro.hxx @@ -27,16 +27,8 @@ #ifndef __ANTARES_LIBS_STUDY_PARTS_LOAD_PREPRO_HXX__ #define __ANTARES_LIBS_STUDY_PARTS_LOAD_PREPRO_HXX__ -namespace Antares +namespace Antares::Data::Load { -namespace Data -{ -namespace Load -{ -inline void Prepro::estimateMemoryUsage(StudyMemoryUsage& u) const -{ - xcast.estimateMemoryUsage(u); -} inline Yuni::uint64 Prepro::memoryUsage() const { @@ -58,8 +50,8 @@ inline void Prepro::resetToDefault() xcast.resetToDefaultValues(); } -} // namespace Load -} // namespace Data -} // namespace Antares +} // namespace Antares::Data::Load + + #endif // __ANTARES_LIBS_STUDY_PARTS_LOAD_PREPRO_H__ diff --git a/src/libs/antares/study/parts/load/series.cpp b/src/libs/antares/study/parts/load/series.cpp index ed1ab7ddaf..65c7c07359 100644 --- a/src/libs/antares/study/parts/load/series.cpp +++ b/src/libs/antares/study/parts/load/series.cpp @@ -30,7 +30,6 @@ #include #include "series.h" #include "../../study.h" -#include "../../memory-usage.h" using namespace Yuni; @@ -97,15 +96,5 @@ void DataSeriesLoad::markAsModified() const return timeSeries.markAsModified(); } -void DataSeriesLoad::estimateMemoryUsage(StudyMemoryUsage& u) const -{ - u.requiredMemoryForInput += sizeof(DataSeriesLoad); - timeseriesNumbers.estimateMemoryUsage(u, true, 1, u.years); - timeSeries.estimateMemoryUsage(u, - 0 != (timeSeriesLoad & u.study.parameters.timeSeriesToGenerate), - u.study.parameters.nbTimeSeriesLoad, - HOURS_PER_YEAR); -} - } // namespace Data } // namespace Antares diff --git a/src/libs/antares/study/parts/load/series.h b/src/libs/antares/study/parts/load/series.h index 1f99e1522c..8b995d1664 100644 --- a/src/libs/antares/study/parts/load/series.h +++ b/src/libs/antares/study/parts/load/series.h @@ -40,7 +40,7 @@ namespace Data class DataSeriesLoad { public: - void estimateMemoryUsage(StudyMemoryUsage&) const; + bool forceReload(bool reload = false) const; diff --git a/src/libs/antares/study/parts/renewable/cluster.cpp b/src/libs/antares/study/parts/renewable/cluster.cpp index 655c868adf..9a5ea5682f 100644 --- a/src/libs/antares/study/parts/renewable/cluster.cpp +++ b/src/libs/antares/study/parts/renewable/cluster.cpp @@ -32,7 +32,6 @@ #include #include #include "../../study.h" -#include "../../memory-usage.h" #include "cluster.h" #include #include diff --git a/src/libs/antares/study/parts/renewable/cluster_list.cpp b/src/libs/antares/study/parts/renewable/cluster_list.cpp index 9094f4d47d..6f02bfaf38 100644 --- a/src/libs/antares/study/parts/renewable/cluster_list.cpp +++ b/src/libs/antares/study/parts/renewable/cluster_list.cpp @@ -22,21 +22,6 @@ YString RenewableClusterList::typeID() const return "renewables"; } -void RenewableClusterList::estimateMemoryUsage(StudyMemoryUsage& u) const -{ - u.requiredMemoryForInput += (sizeof(void*) * 4 /*overhead map*/) * cluster.size(); - - each([&](const Cluster& cluster) { - u.requiredMemoryForInput += sizeof(RenewableCluster); - u.requiredMemoryForInput += sizeof(void*); - if (cluster.series) - cluster.series->estimateMemoryUsage(u, timeSeriesRenewable /* FIXME */); - - // From the solver - u.requiredMemoryForInput += 70 * 1024; - }); -} - #define SEP IO::Separator bool RenewableClusterList::saveToFolder(const AnyString& folder) const diff --git a/src/libs/antares/study/parts/renewable/cluster_list.h b/src/libs/antares/study/parts/renewable/cluster_list.h index e79a18df7e..15746180fc 100644 --- a/src/libs/antares/study/parts/renewable/cluster_list.h +++ b/src/libs/antares/study/parts/renewable/cluster_list.h @@ -20,7 +20,6 @@ class RenewableClusterList : public ClusterList ~RenewableClusterList(); // Overriden virtual methods YString typeID() const override; - void estimateMemoryUsage(StudyMemoryUsage&) const override; bool loadFromFolder(const AnyString& folder, Area* area); bool saveToFolder(const AnyString& folder) const override; }; // class RenewableClusterList diff --git a/src/libs/antares/study/parts/renewable/container.cpp b/src/libs/antares/study/parts/renewable/container.cpp index ad2e336f6f..1fbde6732c 100644 --- a/src/libs/antares/study/parts/renewable/container.cpp +++ b/src/libs/antares/study/parts/renewable/container.cpp @@ -27,7 +27,6 @@ #include #include "../../study.h" -#include "../../memory-usage.h" #include "container.h" #include @@ -54,12 +53,6 @@ void PartRenewable::markAsModified() const list.markAsModified(); } -void PartRenewable::estimateMemoryUsage(StudyMemoryUsage& u) const -{ - u.requiredMemoryForInput += sizeof(PartRenewable); - list.estimateMemoryUsage(u); -} - PartRenewable::~PartRenewable() { } diff --git a/src/libs/antares/study/parts/renewable/container.h b/src/libs/antares/study/parts/renewable/container.h index f9ba1da01d..11c7489741 100644 --- a/src/libs/antares/study/parts/renewable/container.h +++ b/src/libs/antares/study/parts/renewable/container.h @@ -61,7 +61,7 @@ class PartRenewable */ void resizeAllTimeseriesNumbers(uint n); - void estimateMemoryUsage(StudyMemoryUsage&) const; + /*! ** \brief Create and initialize the list of all clusters (with the mustrun flag or not) diff --git a/src/libs/antares/study/parts/solar/prepro.h b/src/libs/antares/study/parts/solar/prepro.h index 9a18a93537..870dd7a32d 100644 --- a/src/libs/antares/study/parts/solar/prepro.h +++ b/src/libs/antares/study/parts/solar/prepro.h @@ -54,7 +54,7 @@ class Prepro /*! ** \brief Try to estimate the amount of memory required by this class for a simulation */ - void estimateMemoryUsage(StudyMemoryUsage&) const; + /*! ** \brief Solar data from a folder diff --git a/src/libs/antares/study/parts/solar/prepro.hxx b/src/libs/antares/study/parts/solar/prepro.hxx index 992b72dff0..61ddb7dbd2 100644 --- a/src/libs/antares/study/parts/solar/prepro.hxx +++ b/src/libs/antares/study/parts/solar/prepro.hxx @@ -27,17 +27,8 @@ #ifndef __ANTARES_LIBS_STUDY_PARTS_SOLAR_PREPRO_HXX__ #define __ANTARES_LIBS_STUDY_PARTS_SOLAR_PREPRO_HXX__ -namespace Antares +namespace Antares::Data::Solar { -namespace Data -{ -namespace Solar -{ -inline void Prepro::estimateMemoryUsage(StudyMemoryUsage& u) const -{ - xcast.estimateMemoryUsage(u); -} - inline Yuni::uint64 Prepro::memoryUsage() const { return xcast.memoryUsage(); @@ -58,8 +49,8 @@ inline void Prepro::resetToDefault() xcast.resetToDefaultValues(); } -} // namespace Solar -} // namespace Data -} // namespace Antares +} // namespace Antares::Data::Solar + + #endif // __ANTARES_LIBS_STUDY_PARTS_SOLAR_PREPRO_H__ diff --git a/src/libs/antares/study/parts/solar/series.cpp b/src/libs/antares/study/parts/solar/series.cpp index 833a723067..0715721a23 100644 --- a/src/libs/antares/study/parts/solar/series.cpp +++ b/src/libs/antares/study/parts/solar/series.cpp @@ -30,7 +30,6 @@ #include #include "series.h" #include "../../study.h" -#include "../../memory-usage.h" using namespace Yuni; @@ -97,15 +96,5 @@ void DataSeriesSolar::markAsModified() const timeSeries.markAsModified(); } -void DataSeriesSolar::estimateMemoryUsage(StudyMemoryUsage& u) const -{ - u.requiredMemoryForInput += sizeof(DataSeriesSolar); - timeseriesNumbers.estimateMemoryUsage(u, true, 1, u.years); - timeSeries.estimateMemoryUsage(u, - 0 != (timeSeriesSolar & u.study.parameters.timeSeriesToGenerate), - u.study.parameters.nbTimeSeriesSolar, - HOURS_PER_YEAR); -} - } // namespace Data } // namespace Antares diff --git a/src/libs/antares/study/parts/solar/series.h b/src/libs/antares/study/parts/solar/series.h index e6ae0a654e..82abf3d282 100644 --- a/src/libs/antares/study/parts/solar/series.h +++ b/src/libs/antares/study/parts/solar/series.h @@ -40,7 +40,7 @@ namespace Data class DataSeriesSolar { public: - void estimateMemoryUsage(StudyMemoryUsage&) const; + bool forceReload(bool reload = false) const; diff --git a/src/libs/antares/study/parts/thermal/cluster.cpp b/src/libs/antares/study/parts/thermal/cluster.cpp index 4699eee346..f8c5b0276c 100644 --- a/src/libs/antares/study/parts/thermal/cluster.cpp +++ b/src/libs/antares/study/parts/thermal/cluster.cpp @@ -34,7 +34,6 @@ #include #include #include "../../study.h" -#include "../../memory-usage.h" #include "cluster.h" #include #include diff --git a/src/libs/antares/study/parts/thermal/cluster_list.cpp b/src/libs/antares/study/parts/thermal/cluster_list.cpp index b313932991..6d41613f93 100644 --- a/src/libs/antares/study/parts/thermal/cluster_list.cpp +++ b/src/libs/antares/study/parts/thermal/cluster_list.cpp @@ -30,31 +30,6 @@ ThermalClusterList::~ThermalClusterList() clear(); } -void ThermalClusterList::estimateMemoryUsage(StudyMemoryUsage& u) const -{ - u.requiredMemoryForInput += (sizeof(void*) * 4 /*overhead map*/) * cluster.size(); - - each([&](const ThermalCluster& cluster) { - uint prepoCnt = Math::Max(cluster.ecoInput.co2cost.width, cluster.ecoInput.fuelcost.width); - u.requiredMemoryForInput += sizeof(ThermalCluster); - u.requiredMemoryForInput += sizeof(void*); - u.requiredMemoryForInput += sizeof(double) * HOURS_PER_YEAR; // PthetaInf - u.requiredMemoryForInput += sizeof(double) * HOURS_PER_YEAR * prepoCnt; // marketBidCostPerHour - u.requiredMemoryForInput += sizeof(double) * HOURS_PER_YEAR * prepoCnt; // marginalCostPerHour - u.requiredMemoryForInput += sizeof(double) * HOURS_PER_YEAR; // dispatchedUnitsCount - cluster.modulation.estimateMemoryUsage(u, true, thermalModulationMax, HOURS_PER_YEAR); - - if (cluster.series) - cluster.series->estimateMemoryUsage(u, timeSeriesThermal); - if (cluster.prepro) - cluster.prepro->estimateMemoryUsage(u); - cluster.ecoInput.estimateMemoryUsage(u); - - // From the solver - u.requiredMemoryForInput += 70 * 1024; - }); -} - #define SEP IO::Separator static bool ThermalClusterLoadFromSection(const AnyString& filename, diff --git a/src/libs/antares/study/parts/thermal/cluster_list.h b/src/libs/antares/study/parts/thermal/cluster_list.h index 1365e97262..e84849d8a6 100644 --- a/src/libs/antares/study/parts/thermal/cluster_list.h +++ b/src/libs/antares/study/parts/thermal/cluster_list.h @@ -60,8 +60,6 @@ class ThermalClusterList : public ClusterList bool remove(const ClusterName& id) override; - void estimateMemoryUsage(StudyMemoryUsage&) const override; - Map mapping; /*! diff --git a/src/libs/antares/study/parts/thermal/container.cpp b/src/libs/antares/study/parts/thermal/container.cpp index c9f1ec4000..55cebd6440 100644 --- a/src/libs/antares/study/parts/thermal/container.cpp +++ b/src/libs/antares/study/parts/thermal/container.cpp @@ -27,7 +27,6 @@ #include #include "../../study.h" -#include "../../memory-usage.h" #include "container.h" #include @@ -61,12 +60,6 @@ void PartThermal::markAsModified() const mustrunList.markAsModified(); } -void PartThermal::estimateMemoryUsage(StudyMemoryUsage& u) const -{ - u.requiredMemoryForInput += sizeof(PartThermal); - list.estimateMemoryUsage(u); -} - PartThermal::~PartThermal() { } diff --git a/src/libs/antares/study/parts/thermal/container.h b/src/libs/antares/study/parts/thermal/container.h index 028106abf0..0c860abe53 100644 --- a/src/libs/antares/study/parts/thermal/container.h +++ b/src/libs/antares/study/parts/thermal/container.h @@ -59,7 +59,7 @@ class PartThermal */ void resizeAllTimeseriesNumbers(uint n); - void estimateMemoryUsage(StudyMemoryUsage&) const; + /*! ** \brief Create and initialize the list of all clusters (with the mustrun flag or not) diff --git a/src/libs/antares/study/parts/thermal/ecoInput.cpp b/src/libs/antares/study/parts/thermal/ecoInput.cpp index c9e1abcdd7..9c868cfb26 100644 --- a/src/libs/antares/study/parts/thermal/ecoInput.cpp +++ b/src/libs/antares/study/parts/thermal/ecoInput.cpp @@ -30,7 +30,6 @@ #include #include #include "../../study.h" -#include "../../memory-usage.h" #include "ecoInput.h" #include #include @@ -107,17 +106,6 @@ void EconomicInputData::markAsModified() const co2cost.markAsModified(); } -void EconomicInputData::estimateMemoryUsage(StudyMemoryUsage& u) const -{ - if (timeSeriesThermal & u.study.parameters.timeSeriesToGenerate) - { - fuelcost.estimateMemoryUsage(u, true, fuelcost.width, HOURS_PER_YEAR); - u.requiredMemoryForInput += sizeof(EconomicInputData); - co2cost.estimateMemoryUsage(u, true, co2cost.width, HOURS_PER_YEAR); - u.requiredMemoryForInput += sizeof(EconomicInputData); - } -} - void EconomicInputData::reset() { fuelcost.reset(1, HOURS_PER_YEAR, true); diff --git a/src/libs/antares/study/parts/thermal/ecoInput.h b/src/libs/antares/study/parts/thermal/ecoInput.h index 4124ccd959..7f91dc5957 100644 --- a/src/libs/antares/study/parts/thermal/ecoInput.h +++ b/src/libs/antares/study/parts/thermal/ecoInput.h @@ -53,7 +53,7 @@ class EconomicInputData void markAsModified() const; - void estimateMemoryUsage(StudyMemoryUsage&) const; + /*! ** \brief Reset all values to their default ones diff --git a/src/libs/antares/study/parts/thermal/prepro.cpp b/src/libs/antares/study/parts/thermal/prepro.cpp index ee895f39d4..090de14a57 100644 --- a/src/libs/antares/study/parts/thermal/prepro.cpp +++ b/src/libs/antares/study/parts/thermal/prepro.cpp @@ -30,7 +30,6 @@ #include #include #include "../../study.h" -#include "../../memory-usage.h" #include "prepro.h" #include #include @@ -173,15 +172,6 @@ void PreproThermal::markAsModified() const data.markAsModified(); } -void PreproThermal::estimateMemoryUsage(StudyMemoryUsage& u) const -{ - if (timeSeriesThermal & u.study.parameters.timeSeriesToGenerate) - { - data.estimateMemoryUsage(u, true, thermalPreproMax, DAYS_PER_YEAR); - u.requiredMemoryForInput += sizeof(PreproThermal); - } -} - void PreproThermal::reset() { data.reset(thermalPreproMax, DAYS_PER_YEAR, true); diff --git a/src/libs/antares/study/parts/thermal/prepro.h b/src/libs/antares/study/parts/thermal/prepro.h index 0860fe0967..e5e9c953fd 100644 --- a/src/libs/antares/study/parts/thermal/prepro.h +++ b/src/libs/antares/study/parts/thermal/prepro.h @@ -74,7 +74,7 @@ class PreproThermal void markAsModified() const; - void estimateMemoryUsage(StudyMemoryUsage&) const; + /*! ** \brief Reset all values to their default ones diff --git a/src/libs/antares/study/parts/wind/prepro.h b/src/libs/antares/study/parts/wind/prepro.h index bb4256b0f4..75ccd1b628 100644 --- a/src/libs/antares/study/parts/wind/prepro.h +++ b/src/libs/antares/study/parts/wind/prepro.h @@ -30,11 +30,7 @@ #include "../../fwd.h" #include "../../xcast.h" -namespace Antares -{ -namespace Data -{ -namespace Wind +namespace Antares::Data::Wind { /*! ** \brief Prepro Wind @@ -55,7 +51,7 @@ class Prepro /*! ** \brief Try to estimate the amount of memory required by this class for a simulation */ - void estimateMemoryUsage(StudyMemoryUsage&) const; + /*! ** \brief Load data from a folder @@ -89,9 +85,9 @@ class Prepro }; // Prepro -} // namespace Wind -} // namespace Data -} // namespace Antares +} // namespace Antares::Data::Wind + + #include "prepro.hxx" diff --git a/src/libs/antares/study/parts/wind/prepro.hxx b/src/libs/antares/study/parts/wind/prepro.hxx index 8473501ea7..1505988bad 100644 --- a/src/libs/antares/study/parts/wind/prepro.hxx +++ b/src/libs/antares/study/parts/wind/prepro.hxx @@ -27,16 +27,8 @@ #ifndef __ANTARES_LIBS_STUDY_PARTS_WIND_PREPRO_HXX__ #define __ANTARES_LIBS_STUDY_PARTS_WIND_PREPRO_HXX__ -namespace Antares +namespace Antares::Data::Wind { -namespace Data -{ -namespace Wind -{ -inline void Prepro::estimateMemoryUsage(StudyMemoryUsage& u) const -{ - xcast.estimateMemoryUsage(u); -} inline Yuni::uint64 Prepro::memoryUsage() const { @@ -58,8 +50,8 @@ inline void Prepro::resetToDefault() xcast.resetToDefaultValues(); } -} // namespace Wind -} // namespace Data -} // namespace Antares +} // namespace Antares::Data::Wind + + #endif // __ANTARES_LIBS_STUDY_PARTS_WIND_PREPRO_H__ diff --git a/src/libs/antares/study/parts/wind/series.cpp b/src/libs/antares/study/parts/wind/series.cpp index 98ee597667..77042f2489 100644 --- a/src/libs/antares/study/parts/wind/series.cpp +++ b/src/libs/antares/study/parts/wind/series.cpp @@ -29,7 +29,6 @@ #include #include "series.h" #include "../../study.h" -#include "../../memory-usage.h" using namespace Yuni; @@ -83,15 +82,5 @@ void DataSeriesWind::markAsModified() const timeSeries.markAsModified(); } -void DataSeriesWind::estimateMemoryUsage(StudyMemoryUsage& u) const -{ - u.requiredMemoryForInput += sizeof(DataSeriesWind); - timeseriesNumbers.estimateMemoryUsage(u, true, 1, u.years); - timeSeries.estimateMemoryUsage(u, - 0 != (timeSeriesWind & u.study.parameters.timeSeriesToGenerate), - u.study.parameters.nbTimeSeriesWind, - HOURS_PER_YEAR); -} - } // namespace Data } // namespace Antares diff --git a/src/libs/antares/study/parts/wind/series.h b/src/libs/antares/study/parts/wind/series.h index 1352e51f2f..b632474ad3 100644 --- a/src/libs/antares/study/parts/wind/series.h +++ b/src/libs/antares/study/parts/wind/series.h @@ -40,7 +40,7 @@ namespace Data class DataSeriesWind { public: - void estimateMemoryUsage(StudyMemoryUsage&) const; + bool forceReload(bool reload = false) const; diff --git a/src/libs/antares/study/runtime/runtime.cpp b/src/libs/antares/study/runtime/runtime.cpp index 38a76462db..dcc78e260a 100644 --- a/src/libs/antares/study/runtime/runtime.cpp +++ b/src/libs/antares/study/runtime/runtime.cpp @@ -457,14 +457,6 @@ StudyRuntimeInfos::~StudyRuntimeInfos() delete[] timeseriesNumberYear; } -void StudyRuntimeInfosEstimateMemoryUsage(StudyMemoryUsage& u) -{ - u.requiredMemoryForInput += sizeof(StudyRuntimeInfos); - u.study.areas.each([&](const Data::Area& area) { - u.requiredMemoryForInput += sizeof(AreaLink*) * area.links.size(); - }); -} - #ifndef NDEBUG void StudyRangeLimits::checkIntegrity() const { diff --git a/src/libs/antares/study/runtime/runtime.h b/src/libs/antares/study/runtime/runtime.h index 9a305568b1..f6a4fd42f2 100644 --- a/src/libs/antares/study/runtime/runtime.h +++ b/src/libs/antares/study/runtime/runtime.h @@ -160,12 +160,6 @@ class StudyRuntimeInfos void checkThermalTSGeneration(Study& study); }; // struct StudyRuntimeInfos -/*! -** \brief Get the size (bytes) occupied in memory by a StudyRuntimeInfos structure -** \ingroup runtimedata -*/ -void StudyRuntimeInfosEstimateMemoryUsage(StudyMemoryUsage& study); - } // namespace Antares::Data #include "runtime.hxx" diff --git a/src/libs/antares/study/study.h b/src/libs/antares/study/study.h index 05560f6401..6785bddb34 100644 --- a/src/libs/antares/study/study.h +++ b/src/libs/antares/study/study.h @@ -478,39 +478,6 @@ class Study: public Yuni::NonCopyable, public IObject, public LayerData */ Yuni::uint64 memoryUsage() const; - /*! - ** \brief Estimate the memory required by the input to launch a simulation - ** - ** The real amount of memory required to launch this study - ** will be less than the returned value, but in the worst case - ** it can be equal (or nearly). - ** - ** \param mode The mode of the study - ** \return A size in bytes, -1 when an error has occured. - */ - void estimateMemoryUsageForInput(StudyMemoryUsage& u) const; - - /*! - ** \brief Estimate the memory required by the output to launch a simulation - ** - ** The real amount of memory required to launch this study - ** will be less than the returned value, but in the worst case - ** it can be equal (or nearly). - ** - ** \param mode The mode of the study - ** \return A size in bytes, -1 when an error has occured. - */ - void estimateMemoryUsageForOutput(StudyMemoryUsage& u) const; - - /*! - ** \brief Create a thread to estimate the memory footprint of the input - ** - ** This thread is actually a way to process in the background - ** all costly operations and to avoid the freeze from the interface - */ - Yuni::Thread::IThread::Ptr createThreadToEstimateInputMemoryUsage() const; - //@} - //! \name Logs //@{ /*! diff --git a/src/libs/antares/study/xcast/xcast.cpp b/src/libs/antares/study/xcast/xcast.cpp index 02c6f68681..c1bd7e0fb8 100644 --- a/src/libs/antares/study/xcast/xcast.cpp +++ b/src/libs/antares/study/xcast/xcast.cpp @@ -29,7 +29,6 @@ #include #include #include "../study.h" -#include "../memory-usage.h" #include using namespace Yuni; @@ -384,18 +383,6 @@ bool XCast::saveToFolder(const AnyString& folder) const return ini.save(buffer) && ret; } -void XCast::estimateMemoryUsage(StudyMemoryUsage& u) const -{ - if (timeSeries & u.study.parameters.timeSeriesToGenerate) - { - u.requiredMemoryForInput += sizeof(XCast); - data.estimateMemoryUsage(u); - K.estimateMemoryUsage(u); - translation.estimateMemoryUsage(u); - conversion.estimateMemoryUsage(u); - } -} - bool XCast::forceReload(bool reload) const { bool ret = true; diff --git a/src/libs/antares/study/xcast/xcast.h b/src/libs/antares/study/xcast/xcast.h index 3be351e0a7..38476af617 100644 --- a/src/libs/antares/study/xcast/xcast.h +++ b/src/libs/antares/study/xcast/xcast.h @@ -170,7 +170,7 @@ class XCast final : private Yuni::NonCopyable /*! ** \brief Estimate the amount of memory required by this class for a simulation */ - void estimateMemoryUsage(StudyMemoryUsage&) const; + //@} public: diff --git a/src/solver/simulation/common-eco-adq.cpp b/src/solver/simulation/common-eco-adq.cpp index e2cd83d579..30a5591f5f 100644 --- a/src/solver/simulation/common-eco-adq.cpp +++ b/src/solver/simulation/common-eco-adq.cpp @@ -29,7 +29,6 @@ #include #include #include -#include #include #include "common-eco-adq.h" diff --git a/src/solver/simulation/common-hydro-remix.cpp b/src/solver/simulation/common-hydro-remix.cpp index d845911593..f2909ad178 100644 --- a/src/solver/simulation/common-hydro-remix.cpp +++ b/src/solver/simulation/common-hydro-remix.cpp @@ -28,7 +28,6 @@ #include #include #include -#include #include #include "common-eco-adq.h" #include diff --git a/src/solver/simulation/solver.h b/src/solver/simulation/solver.h index 9295b5b306..7b1e217477 100644 --- a/src/solver/simulation/solver.h +++ b/src/solver/simulation/solver.h @@ -27,7 +27,6 @@ #ifndef __SOLVER_SIMULATION_SOLVER_H__ #define __SOLVER_SIMULATION_SOLVER_H__ -#include #include #include #include // PowerFluctuations @@ -87,16 +86,6 @@ class ISimulation : public Impl */ void writeResults(bool synthesis, uint year = 0, uint numSpace = 9999); - static void estimateMemoryUsage(Antares::Data::StudyMemoryUsage& u); - static void estimateMemoryForRandomNumbers(Antares::Data::StudyMemoryUsage& u); - static void estimateMemoryForWeeklyPb(Antares::Data::StudyMemoryUsage& u); - static void estimateMemoryForOptimizationPb(Antares::Data::StudyMemoryUsage& u, - int& nbVars, - int& nbConstraints); - static void estimateMemoryForSplxPb(Antares::Data::StudyMemoryUsage& u, - int& nbVars, - int& nbConstraints); - public: //! Reference to the current study Data::Study& study; diff --git a/src/solver/simulation/solver.hxx b/src/solver/simulation/solver.hxx index 5cb8effe43..f5fda07541 100644 --- a/src/solver/simulation/solver.hxx +++ b/src/solver/simulation/solver.hxx @@ -436,567 +436,6 @@ void ISimulation::writeResults(bool synthesis, uint year, uint numSpace) } } -template -void ISimulation::estimateMemoryUsage(Antares::Data::StudyMemoryUsage& u) -{ - auto& study = u.study; - auto& areas = study.areas; - - // Variable state - u.requiredMemoryForInput += sizeof(Variable::State) * u.nbYearsParallel; - - // Variables "NumeroChroniquesTireesParPays" and "ValeursGenereesParPays" (see : - // sim_allocation_tableaux.cpp) - u.requiredMemoryForInput += u.nbYearsParallel * sizeof(void*) * 2; - - Yuni::uint64 tmpAmountMemory = 0; - tmpAmountMemory += areas.size() * sizeof(void*) * 2; - for (uint i = 0; i < areas.size(); ++i) - { - auto& area = *areas.byIndex[i]; - tmpAmountMemory += sizeof(NUMERO_CHRONIQUES_TIREES_PAR_PAYS); - tmpAmountMemory += sizeof(VALEURS_GENEREES_PAR_PAYS); - tmpAmountMemory += area.thermal.clusterCount() * sizeof(int); - tmpAmountMemory += 366 * sizeof(double); - tmpAmountMemory += area.thermal.clusterCount() * sizeof(double); - } - u.requiredMemoryForInput += u.nbYearsParallel * tmpAmountMemory; - - // Estimation for random numbers - estimateMemoryForRandomNumbers(u); - - // Estimation for resolution problems - int nbVars = 0; - int nbConstraints = 0; - - estimateMemoryForWeeklyPb(u); - estimateMemoryForOptimizationPb(u, nbVars, nbConstraints); - estimateMemoryForSplxPb(u, nbVars, nbConstraints); -} - -template -void ISimulation::estimateMemoryForRandomNumbers(Antares::Data::StudyMemoryUsage& u) -{ - auto& study = u.study; - auto& areas = study.areas; - uint nbAreas = areas.size(); - - // Random numbers - for (uint y = 0; y < u.nbYearsParallel; y++) - { - // See method allocateMemoryForRandomNumbers(...) for details - // General : - u.requiredMemoryForInput += sizeof(size_t) * nbAreas; - - // Thermal noises : - u.requiredMemoryForInput += sizeof(double*) * nbAreas; - for (uint a = 0; a != nbAreas; ++a) - { - auto& area = *(areas.byIndex[a]); - size_t nbClusters = area.thermal.list.mapping.size(); - u.requiredMemoryForInput += sizeof(double) * nbClusters; - } - - // Reservoir levels - u.requiredMemoryForInput += sizeof(double) * nbAreas; - - // Noises on unsupplied energy - u.requiredMemoryForInput += sizeof(double) * nbAreas; - - // Hydro costs noises - u.requiredMemoryForInput += sizeof(double*) * nbAreas; - for (uint a = 0; a != nbAreas; ++a) - u.requiredMemoryForInput += sizeof(double) * 8784; - } // End loop over years -} // End method - -template -void ISimulation::estimateMemoryForWeeklyPb(Antares::Data::StudyMemoryUsage& u) -{ - /* - RAM estimation for the weekly problems (as much as parallel years) - See : sim_alloc_probleme_hebdo.cpp - First : estimation of one weekly problem - Then : multiplying this estimation by the number of years in parallel (== nb of - cores) - */ - - auto& study = u.study; - auto& bindingConstraints = study.bindingConstraints; - uint nbBindingConstraints = bindingConstraints.size(); - uint nbAreas = study.areas.size(); - uint nbLinks = study.areas.areaLinkCount(); - int NombreDePasDeTemps = 168; - - // Total number of clusters - uint thermalPlantTotalCount = 0; - for (uint i = 0; i != study.areas.size(); i++) - { - auto& area = *(study.areas.byIndex[i]); - thermalPlantTotalCount += area.thermal.list.size(); - } - - // Weekly problem size - Yuni::uint64 requiredMemoryForWeeklyPb = 0; - - // ------------------------ - // For maneuverability - // ------------------------ - requiredMemoryForWeeklyPb += 2 * nbLinks * sizeof(double); - requiredMemoryForWeeklyPb += nbAreas * sizeof(double); - - // ------------------------------------------------- - // Memory allocated based on the number of areas - // ------------------------------------------------- - requiredMemoryForWeeklyPb += 3 * nbAreas * sizeof(char); - - requiredMemoryForWeeklyPb += 4 * nbAreas * sizeof(double); - requiredMemoryForWeeklyPb += 8784 * nbAreas * sizeof(double); - - requiredMemoryForWeeklyPb += 7 * nbAreas * sizeof(void*); // For all pointers - - requiredMemoryForWeeklyPb += 5 * nbAreas * sizeof(int); - - for (int k = 0; k < NombreDePasDeTemps; k++) - { - requiredMemoryForWeeklyPb += 16 * nbAreas * sizeof(double); - } - - // ------------------------------------------------------- - // Memory allocated based on the number of clusters - // ------------------------------------------------------- - for (int k = 0; k < NombreDePasDeTemps; k++) - { - requiredMemoryForWeeklyPb += 8 * thermalPlantTotalCount * sizeof(int); - } - - // ------------------------------------------------- - // Memory allocated based on the number of links - // ------------------------------------------------- - requiredMemoryForWeeklyPb += 4 * nbLinks * sizeof(int); - - requiredMemoryForWeeklyPb += nbLinks * sizeof(void*); - - for (int k = 0; k < NombreDePasDeTemps; k++) - { - requiredMemoryForWeeklyPb += 9 * nbLinks * sizeof(double); - requiredMemoryForWeeklyPb += 4 * nbLinks * sizeof(int); - } - - // ---------------------------------------------------------------- - // Memory allocated based on the number of binding constraints - // ---------------------------------------------------------------- - requiredMemoryForWeeklyPb += nbBindingConstraints * sizeof(void*); - - for (int k = 0; k < NombreDePasDeTemps; k++) - { - requiredMemoryForWeeklyPb += nbBindingConstraints * sizeof(int); - } - - for (int k = 0; k < 7; k++) - { - requiredMemoryForWeeklyPb += nbBindingConstraints * sizeof(int); - } - - for (auto i = bindingConstraints.begin(); i != bindingConstraints.end(); ++i) - { - auto& constraint = *(*i); - requiredMemoryForWeeklyPb += 2 * constraint.linkCount() * sizeof(int); - requiredMemoryForWeeklyPb += constraint.linkCount() * sizeof(double); - } - - // ----------------------------------------------------- - // Memory allocated based on the number of time steps - // ----------------------------------------------------- - requiredMemoryForWeeklyPb += 4 * NombreDePasDeTemps * sizeof(int); - - requiredMemoryForWeeklyPb += 8 * NombreDePasDeTemps * sizeof(void*); - - for (int k = 0; k < (int)nbLinks; ++k) - { - requiredMemoryForWeeklyPb += NombreDePasDeTemps * sizeof(COUTS_DE_TRANSPORT); - requiredMemoryForWeeklyPb += 4 * NombreDePasDeTemps * sizeof(double); - } - - for (int k = 0; k < (int)nbBindingConstraints; k++) - { - requiredMemoryForWeeklyPb += 2 * NombreDePasDeTemps * sizeof(int); - } - - for (int k = 0; k < (int)nbAreas; k++) - { - const uint nbPaliers = study.areas.byIndex[k]->thermal.list.size(); - - requiredMemoryForWeeklyPb += 10 * NombreDePasDeTemps * sizeof(double); - requiredMemoryForWeeklyPb += NombreDePasDeTemps * sizeof(void*); - - for (int j = 0; j < (int)nbPaliers; ++j) - { - requiredMemoryForWeeklyPb += 7 * NombreDePasDeTemps * sizeof(double); - requiredMemoryForWeeklyPb += 2 * NombreDePasDeTemps * sizeof(int); - } - } - - // --------------------------------------------- - // Memory allocated based on other things - // --------------------------------------------- - for (int k = 0; k < NombreDePasDeTemps; k++) - { - requiredMemoryForWeeklyPb += 2 * sizeof(VALEURS_DE_NTC_ET_RESISTANCES); - requiredMemoryForWeeklyPb += 2 * sizeof(CONSOMMATIONS_ABATTUES); - requiredMemoryForWeeklyPb += sizeof(SOLDE_MOYEN_DES_ECHANGES); - requiredMemoryForWeeklyPb += sizeof(CORRESPONDANCES_DES_VARIABLES); - requiredMemoryForWeeklyPb += sizeof(CORRESPONDANCES_DES_CONTRAINTES); - requiredMemoryForWeeklyPb += sizeof(VARIABLES_DUALES_INTERCONNEXIONS); - } - - requiredMemoryForWeeklyPb += 7 * sizeof(void*); - - for (int k = 0; k < 7; k++) - requiredMemoryForWeeklyPb += sizeof(CORRESPONDANCES_DES_CONTRAINTES_JOURNALIERES); - - for (int k = 0; k < (int)nbBindingConstraints; k++) - { - requiredMemoryForWeeklyPb += sizeof(CONTRAINTES_COUPLANTES); - } - - for (int k = 0; k < (int)nbAreas; k++) - { - const uint nbPaliers = study.areas.byIndex[k]->thermal.list.size(); - - requiredMemoryForWeeklyPb += sizeof(PALIERS_THERMIQUES); - requiredMemoryForWeeklyPb += sizeof(ENERGIES_ET_PUISSANCES_HYDRAULIQUES); - requiredMemoryForWeeklyPb += sizeof(RESERVE_JMOINS1); - requiredMemoryForWeeklyPb += sizeof(RESULTATS_HORAIRES); - requiredMemoryForWeeklyPb += nbPaliers * sizeof(int); - requiredMemoryForWeeklyPb += 30 * nbPaliers * sizeof(double); - requiredMemoryForWeeklyPb += 6 * nbPaliers * sizeof(int); - requiredMemoryForWeeklyPb += nbPaliers * sizeof(void*); - - for (int j = 0; j < (int)nbPaliers; ++j) - { - requiredMemoryForWeeklyPb += sizeof(PDISP_ET_COUTS_HORAIRES_PAR_PALIER); - } - - for (int j = 0; j < NombreDePasDeTemps; j++) - { - requiredMemoryForWeeklyPb += sizeof(PRODUCTION_THERMIQUE_OPTIMALE); - requiredMemoryForWeeklyPb += 5 * nbPaliers * sizeof(double); - } - } - - requiredMemoryForWeeklyPb += 7 * sizeof(double); // cout optimal de la solution - - // --------------------------------------------- - // Adding memory from weekly problems - // --------------------------------------------- - u.requiredMemoryForInput += requiredMemoryForWeeklyPb * u.nbYearsParallel; -} - -template -void ISimulation::estimateMemoryForOptimizationPb(Antares::Data::StudyMemoryUsage& u, - int& nbVars, - int& nbConstraints) -{ - /* - RAM estimation for the optimization problems (as much as parallel years) - See : opt_alloc_probleme_a_optimiser.cpp - First : estimation of one optimization problem - Then : multiplying this estimation by the number of years in parallel (== nb of - cores) - - Parameters 'nbVars' and 'nbConstraints' are computed and used during this computation. - These parameters are also required for the next estimation part of the solver estimation - (simplex problem). - */ - - auto& study = u.study; - auto& parameters = study.parameters; - auto& bindingConstraints = study.bindingConstraints; - uint nbLinks = study.areas.areaLinkCount(); - uint nbAreas = study.areas.size(); - - // ======================================================================================== - // Some preliminary variables computation before optimization problem RAM estimation - // ======================================================================================== - - // ------------------------------------ - // Preliminary variables initialization - // ------------------------------------ - int NombreDePasDeTempsPourUneOptimisation - = (parameters.simplexOptimizationRange == Data::sorWeek) ? 168 : 24; - - int NombreDeVariables = 0; - int NombreDeContraintes = 0; - int NbTermesContraintesPourLesCoutsDeDemarrage = 0; - int NombreDePasDeTemps = 168; - int NombreDeJoursDansUnIntervalleOptimise = 0; - int mxPaliers = 0; - int NombreDeContraintesCouplantes = 0; - int Sparsity = 0; - int Adder = 0; - - // --------------------------------- - // Preliminary variables computation - // --------------------------------- - /* - Computation of : - - NombreDeVariables - - NombreDeContraintes - - NbTermesContraintesPourLesCoutsDeDemarrage - */ - NombreDeVariables += nbLinks; - NombreDeVariables += 2 * nbLinks; /* Pour pouvoir decomposer en sens O vers E et E vers O */ - - for (uint i = 0; i != study.areas.size(); i++) - { - auto& area = *(study.areas.byIndex[i]); - NombreDeVariables += area.thermal.list.size(); - - if (area.hydro.hydroModulable) - { - NombreDeVariables++; /* La variable de production hydraulique */ - NombreDeVariables++; // pumping - NombreDeVariables++; // levels - NombreDeVariables++; // overflow - } - - NombreDeVariables += 2; /* Les groupes de defaillance positive et negative */ - } - - NombreDeVariables *= NombreDePasDeTempsPourUneOptimisation; - - NombreDeContraintes = nbAreas; /* Contraintes de bilan */ - NombreDeContraintes += nbAreas; /* Contraintes pour eviter l'apparition de charges fictives */ - NombreDeContraintes += nbLinks; /* Contraintes pour modeliser la partie positive/negative du - flux si l'interco est geree avec des couts */ - - for (auto i = bindingConstraints.begin(); i != bindingConstraints.end(); ++i) - { - auto& constraint = *(*i); // The current constraint - if (constraint.type() == Data::BindingConstraint::typeHourly) - NombreDeContraintes++; - } - - NombreDeContraintes *= NombreDePasDeTempsPourUneOptimisation; - - /* Contraintes couplantes journalieres */ - if (NombreDePasDeTempsPourUneOptimisation > 24) - NombreDeJoursDansUnIntervalleOptimise = NombreDePasDeTemps / 24; - else - NombreDeJoursDansUnIntervalleOptimise = 1; - - for (auto i = bindingConstraints.begin(); i != bindingConstraints.end(); ++i) - { - auto& constraint = *(*i); - if (constraint.type() == Data::BindingConstraint::typeDaily) - NombreDeContraintes += NombreDeJoursDansUnIntervalleOptimise; - } - - for (auto i = bindingConstraints.begin(); i != bindingConstraints.end(); ++i) - { - auto& constraint = *(*i); - if (constraint.type() == Data::BindingConstraint::typeWeekly) - NombreDeContraintes++; - } - - for (uint i = 0; i != study.areas.size(); i++) - { - auto& area = *(study.areas.byIndex[i]); - if (area.hydro.hydroModulable) - { - NombreDeContraintes++; /* Contraintes de turbine min */ - NombreDeContraintes++; /* Contraintes de turbine max */ - NombreDeContraintes++; // max energy pump - NombreDeContraintes += NombreDePasDeTempsPourUneOptimisation; // levels - } - } - - if (parameters.power.fluctuations == Data::lssMinimizeRamping) - { - NombreDeVariables += nbAreas * NombreDePasDeTempsPourUneOptimisation * 2; - NombreDeContraintes += nbAreas * NombreDePasDeTempsPourUneOptimisation; - } - else if (parameters.power.fluctuations == Data::lssMinimizeExcursions) - { - NombreDeVariables += nbAreas * 2; - NombreDeContraintes += nbAreas * NombreDePasDeTempsPourUneOptimisation * 2; - } - - // Mode accurate - if (parameters.unitCommitment.ucMode == Antares::Data::ucMILP) - { - for (uint i = 0; i != study.areas.size(); i++) - { - auto& area = *(study.areas.byIndex[i]); - uint nbClusters = (u.mode == Data::stdmEconomy) ? area.thermal.list.size() : 0; - for (uint j = 0; j < nbClusters; j++) - { - for (int Pdt = 0; Pdt < NombreDePasDeTempsPourUneOptimisation; Pdt++) - { - NombreDeVariables += 4; - NombreDeContraintes += 6; - } // End loop time steps - } // End loop clusters - } // End loop areas - - for (uint i = 0; i != study.areas.size(); i++) - { - auto& area = *(study.areas.byIndex[i]); - uint nbClusters = (u.mode == Data::stdmEconomy) ? area.thermal.list.size() : 0; - if (!nbClusters) - break; - for (auto j = area.thermal.list.begin(); j != area.thermal.list.end(); ++j) - { - auto& cluster = *(j->second); - for (int Pdt = 0; Pdt < NombreDePasDeTempsPourUneOptimisation; Pdt++) - { - NbTermesContraintesPourLesCoutsDeDemarrage += 12; - for (int k = Pdt - cluster.minUpTime + 1; k <= Pdt; k++) - NbTermesContraintesPourLesCoutsDeDemarrage += 3; - } // End loop time steps - } // End loop clusters - } // End loop areas - - } // End if mode accurate - - NombreDeVariables - += nbAreas * 3 * NombreDePasDeTempsPourUneOptimisation; // pump, level, overflow - NombreDeContraintes += nbAreas * NombreDePasDeTempsPourUneOptimisation; // level modelling - NombreDeContraintes += nbAreas * 3; // hydro generation min,hydro generation max, pumping max - - /* - Computation of mxPaliers - */ - if (u.mode == Data::stdmEconomy) - { - for (uint i = 0; i != study.areas.size(); i++) - { - auto& area = *(study.areas.byIndex[i]); - uint nbClusters = area.thermal.list.size(); - if ((int)nbClusters > mxPaliers) - mxPaliers = (int)nbClusters; - } - } - - // =============================================== - // Optimization problem RAM estimation itself - // =============================================== - - // Optimization problem size - Yuni::uint64 requiredMemoryForOptPb = 0; - - size_t szNbVarsDouble = NombreDeVariables * sizeof(double); - size_t szNbVarsInt = NombreDeVariables * sizeof(int); - size_t szNbContInt = NombreDeContraintes * sizeof(int); - size_t szNbContDouble = NombreDeContraintes * sizeof(double); - - int NbTermes = 0; - - // Computation of NbTermes : - // ----------------------- - - for (auto i = bindingConstraints.begin(); i != bindingConstraints.end(); ++i) - { - NombreDeContraintesCouplantes++; - } - - Sparsity = (int)mxPaliers * nbAreas; - Sparsity += nbLinks; - if (Sparsity > 100) - Sparsity = 100; /* The average number of non-zero coefficients in binding constraints is - expected to be smaller than 100*/ - - NbTermes = 0; - NbTermes += NombreDeContraintes; // overhead to be safe - should be removable - /* non-zero terms in node balance equations */ - Adder = (int)mxPaliers; /* thermal clusters*/ - Adder += 4; /* hydro generation, positive shedding, negative shedding, pumping*/ - Adder *= nbAreas; /* one balance equation per node...*/ - Adder += 2 * nbLinks; /* Each interconnection appears twice in balance equations*/ - Adder *= NombreDePasDeTempsPourUneOptimisation; /* one balance Equation per time step*/ - - NbTermes += Adder; - - /* Non-zero Terms in node spillage limiting equation */ - - NbTermes += Adder; - - /* non-zero Terms in flow decomposition equations*/ - - Adder - = 3 * nbLinks - * NombreDePasDeTempsPourUneOptimisation; /* Each interconnection flow F, F+,F- may appear - once in flow orientation decomposition*/ - NbTermes += Adder; - - /* non-zero terms in binding constraints equations */ - Adder - = Sparsity - * NombreDeContraintesCouplantes; /* The average number of non-zero coefficients in binding - constraints is assumed to be smaller than 100*/ - Adder *= (NombreDePasDeTempsPourUneOptimisation); /* Best case : all binding constraints are - hourly */ - Adder += Sparsity * (7 + 7) - * NombreDeContraintesCouplantes; /* Worst case : all binding constraints are deily */ - NbTermes += Adder; - - NbTermes += 3 * nbAreas * NombreDePasDeTempsPourUneOptimisation; // hydro min, max, pump - NbTermes += nbAreas * NombreDePasDeTempsPourUneOptimisation * 4; // in case of hydro-smoothing*/ - NbTermes += nbAreas * NombreDePasDeTempsPourUneOptimisation - * 5; // if explicit hydro level and overflow modelling - - /* Les contraintes pour la prise en compte des coûts de demarrage et durees min d'arret/marche - */ - NbTermes += NbTermesContraintesPourLesCoutsDeDemarrage; - - // Actual estimation : - // ----------------- - requiredMemoryForOptPb += NombreDeContraintes * sizeof(char); - requiredMemoryForOptPb += 3 * szNbContInt; - requiredMemoryForOptPb += NbTermes * sizeof(double); - requiredMemoryForOptPb += NbTermes * sizeof(int); - requiredMemoryForOptPb += 7 * szNbVarsDouble; - requiredMemoryForOptPb += 3 * szNbVarsInt; - requiredMemoryForOptPb += 2 * szNbContDouble; - requiredMemoryForOptPb += 2 * NombreDeVariables * sizeof(void*); - requiredMemoryForOptPb += NombreDeContraintes * sizeof(void*); - - // ================================================ - // Adding memory from the optimization problem - // ================================================ - u.requiredMemoryForInput += requiredMemoryForOptPb * u.nbYearsParallel; - - // ========================= - // Settings parameters - // ========================= - nbVars = NombreDeVariables; - nbConstraints = nbVars; - -} // End method : estimateMemoryForOptimizationPb(...) - -template -void ISimulation::estimateMemoryForSplxPb(Antares::Data::StudyMemoryUsage& u, - int& nbVars, - int& nbConstraints) -{ - /* - Simplex problem RAM estimation by an empirical way. - */ - - auto& study = u.study; - auto& parameters = study.parameters; - - int linearCombination = nbVars * (22 * sizeof(double) + 22 * sizeof(int) + 12 * sizeof(char)); - linearCombination - += nbConstraints * (60 * sizeof(double) + 58 * sizeof(int) + 24 * sizeof(char)); - - if (parameters.unitCommitment.ucMode == Antares::Data::ucMILP) - u.requiredMemoryForInput += (uint)(5.51 * linearCombination) * u.nbYearsParallel; - else - u.requiredMemoryForInput += (uint)(5. * linearCombination) * u.nbYearsParallel; -} - template void ISimulation::regenerateTimeSeries(uint year) { diff --git a/src/solver/variable/adequacy/area.cpp b/src/solver/variable/adequacy/area.cpp index a960f21bb6..4071772e65 100644 --- a/src/solver/variable/adequacy/area.cpp +++ b/src/solver/variable/adequacy/area.cpp @@ -25,7 +25,6 @@ ** SPDX-License-Identifier: licenceRef-GPL3_WITH_RTE-Exceptions */ -#include #include "all.h" #define NEXTTYPE Adequacy::VariablesPerArea diff --git a/src/solver/variable/adequacy/area.memory-estimation.cpp b/src/solver/variable/adequacy/area.memory-estimation.cpp index b764a7210a..c3d22076b2 100644 --- a/src/solver/variable/adequacy/area.memory-estimation.cpp +++ b/src/solver/variable/adequacy/area.memory-estimation.cpp @@ -25,7 +25,6 @@ ** SPDX-License-Identifier: licenceRef-GPL3_WITH_RTE-Exceptions */ -#include #include "all.h" using NEXTTYPE = Solver::Variable::Adequacy::VariablesPerArea; diff --git a/src/solver/variable/adequacy/bc.memory-estimation.cpp b/src/solver/variable/adequacy/bc.memory-estimation.cpp index 70503eddfe..510475be9e 100644 --- a/src/solver/variable/adequacy/bc.memory-estimation.cpp +++ b/src/solver/variable/adequacy/bc.memory-estimation.cpp @@ -25,7 +25,6 @@ ** SPDX-License-Identifier: licenceRef-GPL3_WITH_RTE-Exceptions */ -#include #include "all.h" using bc_next_type = Solver::Variable::Adequacy::VariablesPerBindingConstraints; diff --git a/src/solver/variable/adequacy/links.cpp b/src/solver/variable/adequacy/links.cpp index 3e435e22ba..0f0dde8bf0 100644 --- a/src/solver/variable/adequacy/links.cpp +++ b/src/solver/variable/adequacy/links.cpp @@ -25,6 +25,5 @@ ** SPDX-License-Identifier: licenceRef-GPL3_WITH_RTE-Exceptions */ -#include #include "links.h" #include "../commons/links/links.cpp.inc.hxx" diff --git a/src/solver/variable/adequacy/overallCost.h b/src/solver/variable/adequacy/overallCost.h index a05bf26c35..3a501d8f71 100644 --- a/src/solver/variable/adequacy/overallCost.h +++ b/src/solver/variable/adequacy/overallCost.h @@ -136,13 +136,6 @@ class OverallCost : public Variable::IVariable, NextT, VCardO }; }; - static void EstimateMemoryUsage(Data::StudyMemoryUsage& u) - { - Solver::Variable::IntermediateValues::EstimateMemoryUsage(u); - NextType::EstimateMemoryUsage(u); - ResultsType::EstimateMemoryUsage(u); - } - public: ~OverallCost() { diff --git a/src/solver/variable/area.h b/src/solver/variable/area.h index 6f877fe269..f7ec3dbe4a 100644 --- a/src/solver/variable/area.h +++ b/src/solver/variable/area.h @@ -105,11 +105,6 @@ class Areas //: public Variable::IVariable, NextT, VCardAllAreas> }; public: - /*! - ** \brief Try to estimate the memory footprint that the solver will require to make a simulation - */ - static void EstimateMemoryUsage(Data::StudyMemoryUsage& u); - /*! ** \brief Retrieve the list of all individual variables ** diff --git a/src/solver/variable/area.memory-estimation.inc.hxx b/src/solver/variable/area.memory-estimation.inc.hxx index 3b47b8ab93..02501dcf1b 100644 --- a/src/solver/variable/area.memory-estimation.inc.hxx +++ b/src/solver/variable/area.memory-estimation.inc.hxx @@ -49,32 +49,6 @@ uint64 Areas::memoryUsage() const return result; } -template<> -void Areas::EstimateMemoryUsage(Data::StudyMemoryUsage& u) -{ - auto end = u.study.areas.end(); - for (auto area = u.study.areas.begin(); area != end; ++area) - { - u.area = area->second; - - u.requiredMemoryForOutput += sizeof(NextType) + sizeof(void*) /*overhead vector*/; - u.overheadDiskSpaceForSingleAreaOrLink(); - - // year-by-year - if (!u.gatheringInformationsForInput) - { - if (u.study.parameters.yearByYear) - { - for (unsigned int i = 0; i != u.years; ++i) - u.overheadDiskSpaceForSingleAreaOrLink(); - } - } - // next - NextType::EstimateMemoryUsage(u); - } - u.area = nullptr; -} - } // namespace Variable } // namespace Solver } // namespace Antares diff --git a/src/solver/variable/bc.memory-estimation.inc.hxx b/src/solver/variable/bc.memory-estimation.inc.hxx index c14e5e12f5..52ce11a407 100644 --- a/src/solver/variable/bc.memory-estimation.inc.hxx +++ b/src/solver/variable/bc.memory-estimation.inc.hxx @@ -45,37 +45,6 @@ uint64 BindingConstraints::memoryUsage() const return result; } -template<> -void BindingConstraints::EstimateMemoryUsage(Data::StudyMemoryUsage& u) -{ - u.study.bindingConstraints.eachActive([&](const Data::BindingConstraint &constraint) { - if (constraint.operatorType() == Data::BindingConstraint::opEquality) - return; - - int bc_count = 1; - // If the current binding constraint is double (has operators "<" and ">"), it is counted - // twice - if (constraint.operatorType() == Data::BindingConstraint::opBoth) - bc_count = 2; - - for (int i = 0; i < bc_count; i++) { - u.requiredMemoryForOutput += sizeof(NextType) + sizeof(void *) /*overhead vector*/; - u.overheadDiskSpaceForSingleBindConstraint(); - - // year-by-year - if (!u.gatheringInformationsForInput) { - if (u.study.parameters.yearByYear) { - for (unsigned int i = 0; i != u.years; ++i) - u.overheadDiskSpaceForSingleBindConstraint(); - } - } - } - - // next - NextType::EstimateMemoryUsage(u); - }); -} - } // namespace Variable } // namespace Solver } // namespace Antares diff --git a/src/solver/variable/bindConstraints.h b/src/solver/variable/bindConstraints.h index 8daadcda9a..d052d31057 100644 --- a/src/solver/variable/bindConstraints.h +++ b/src/solver/variable/bindConstraints.h @@ -102,10 +102,6 @@ class BindingConstraints }; public: - /*! - ** \brief Try to estimate the memory footprint that the solver will require to make a simulation - */ - static void EstimateMemoryUsage(Data::StudyMemoryUsage& u); /*! ** \brief Retrieve the list of all individual variables diff --git a/src/solver/variable/commons/join.h b/src/solver/variable/commons/join.h index f938a3f139..0076450995 100644 --- a/src/solver/variable/commons/join.h +++ b/src/solver/variable/commons/join.h @@ -131,16 +131,6 @@ class Join : public Variable::IVariable, Yuni::D }; public: - /*! - ** \brief Try to estimate the memory footprint that the solver will require to make a simulation - */ - static void EstimateMemoryUsage(Data::StudyMemoryUsage& u) - { - LeftType::EstimateMemoryUsage(u); - RightType::EstimateMemoryUsage(u); - BindConstType::EstimateMemoryUsage(u); - } - /*! ** \brief Retrieve the list of all individual variables ** diff --git a/src/solver/variable/commons/links/links.cpp.inc.hxx b/src/solver/variable/commons/links/links.cpp.inc.hxx index fd203f86d2..2f79991628 100644 --- a/src/solver/variable/commons/links/links.cpp.inc.hxx +++ b/src/solver/variable/commons/links/links.cpp.inc.hxx @@ -25,7 +25,6 @@ ** SPDX-License-Identifier: licenceRef-GPL3_WITH_RTE-Exceptions */ -#include #include "../../variable.h" #include "../../area.h" #include "../../setofareas.h" diff --git a/src/solver/variable/commons/links/links.h.inc.hxx b/src/solver/variable/commons/links/links.h.inc.hxx index 61fb9df08b..94fdbe5437 100644 --- a/src/solver/variable/commons/links/links.h.inc.hxx +++ b/src/solver/variable/commons/links/links.h.inc.hxx @@ -109,11 +109,6 @@ public: }; public: - /*! - ** \brief Try to estimate the memory footprint that the solver will require to make a simulation - */ - static void EstimateMemoryUsage(Data::StudyMemoryUsage&); - /*! ** \brief Retrieve the list of all individual variables ** diff --git a/src/solver/variable/commons/links/links.hxx.inc.hxx b/src/solver/variable/commons/links/links.hxx.inc.hxx index 9c1c2a879f..4b7033f03b 100644 --- a/src/solver/variable/commons/links/links.hxx.inc.hxx +++ b/src/solver/variable/commons/links/links.hxx.inc.hxx @@ -296,36 +296,6 @@ inline Yuni::uint64 Links::memoryUsage() const } return result; } - -inline void Links::EstimateMemoryUsage(Data::StudyMemoryUsage& u) -{ - if (!u.area) - return; - - // The total number of items - auto count = (uint)u.area->links.size(); - - for (uint i = 0; i != count; ++i) - { - u.requiredMemoryForOutput += sizeof(NextType) + sizeof(void*); - u.overheadDiskSpaceForSingleAreaOrLink(); - - // year-by-year - if (!u.gatheringInformationsForInput) - { - if (u.study.parameters.yearByYear) - { - for (uint i = 0; i != u.years; ++i) - u.overheadDiskSpaceForSingleAreaOrLink(); - } - } - - // Append the amount of data consummed by the varaibles related to - // the links - NextType::EstimateMemoryUsage(u); - } -} - } // namespace LINK_NAMESPACE } // namespace Variable } // namespace Solver diff --git a/src/solver/variable/container.h b/src/solver/variable/container.h index 1486745f78..cac37b34db 100644 --- a/src/solver/variable/container.h +++ b/src/solver/variable/container.h @@ -60,12 +60,6 @@ class List : public NextT count = NextT::count, }; -public: - /*! - ** \brief Try to estimate the memory footprint that the solver will require to make a simulation - */ - static void EstimateMemoryUsage(Data::StudyMemoryUsage& u); - public: //! \name Constructor & Destructor //@{ diff --git a/src/solver/variable/container.hxx b/src/solver/variable/container.hxx index 100a4802b0..ddef78449e 100644 --- a/src/solver/variable/container.hxx +++ b/src/solver/variable/container.hxx @@ -313,14 +313,6 @@ void List::buildDigest(SurveyResults& results, int digestLevel, int dataL NextType::buildDigest(results, digestLevel, dataLevel); } -template -inline void List::EstimateMemoryUsage(Data::StudyMemoryUsage& u) -{ - u.requiredMemoryForOutput += sizeof(ListType); - u.requiredDiskSpaceForOutput += 20 * 1024; // 20Ko - NextType::EstimateMemoryUsage(u); -} - template void List::exportSurveyResults(bool global, const Yuni::String& output, diff --git a/src/solver/variable/economy/STStorageInjectionByCluster.h b/src/solver/variable/economy/STStorageInjectionByCluster.h index 0abae8982f..adb87a745c 100644 --- a/src/solver/variable/economy/STStorageInjectionByCluster.h +++ b/src/solver/variable/economy/STStorageInjectionByCluster.h @@ -128,32 +128,6 @@ class STstorageInjectionByCluster : public Variable::IVariableshortTermStorage.count(); ++i) - { - Solver::Variable::IntermediateValues::EstimateMemoryUsage(u); - ResultsType::EstimateMemoryUsage(u); - u.requiredMemoryForOutput += sizeof(Solver::Variable::IntermediateValues); - u.requiredMemoryForOutput += sizeof(typename VCardType::ResultsType); - u.requiredMemoryForOutput += sizeof(void*) * 2; - - // year-by-year - if (!u.gatheringInformationsForInput) - { - if (u.study.parameters.yearByYear) - { - for (unsigned int i = 0; i != u.years; ++i) - u.takeIntoConsiderationANewTimeserieForDiskOutput(false); - } - } - } - } - NextType::EstimateMemoryUsage(u); - } - public: STstorageInjectionByCluster() : pValuesForTheCurrentYear(nullptr) diff --git a/src/solver/variable/economy/STStorageLevelsByCluster.h b/src/solver/variable/economy/STStorageLevelsByCluster.h index a73047c21d..6526a5f847 100644 --- a/src/solver/variable/economy/STStorageLevelsByCluster.h +++ b/src/solver/variable/economy/STStorageLevelsByCluster.h @@ -128,32 +128,6 @@ class STstorageLevelsByCluster }; }; - static void EstimateMemoryUsage(Data::StudyMemoryUsage& u) - { - if (u.area) - { - for (unsigned int i = 0; i != u.area->shortTermStorage.count(); ++i) - { - Solver::Variable::IntermediateValues::EstimateMemoryUsage(u); - ResultsType::EstimateMemoryUsage(u); - u.requiredMemoryForOutput += sizeof(Solver::Variable::IntermediateValues); - u.requiredMemoryForOutput += sizeof(typename VCardType::ResultsType); - u.requiredMemoryForOutput += sizeof(void*) * 2; - - // year-by-year - if (!u.gatheringInformationsForInput) - { - if (u.study.parameters.yearByYear) - { - for (unsigned int i = 0; i != u.years; ++i) - u.takeIntoConsiderationANewTimeserieForDiskOutput(false); - } - } - } - } - NextType::EstimateMemoryUsage(u); - } - public: STstorageLevelsByCluster() : pValuesForTheCurrentYear(nullptr) diff --git a/src/solver/variable/economy/STStorageWithdrawalByCluster.h b/src/solver/variable/economy/STStorageWithdrawalByCluster.h index b492868253..6933269332 100644 --- a/src/solver/variable/economy/STStorageWithdrawalByCluster.h +++ b/src/solver/variable/economy/STStorageWithdrawalByCluster.h @@ -128,32 +128,6 @@ class STstorageWithdrawalByCluster }; }; - static void EstimateMemoryUsage(Data::StudyMemoryUsage& u) - { - if (u.area) - { - for (unsigned int i = 0; i != u.area->shortTermStorage.count(); ++i) - { - Solver::Variable::IntermediateValues::EstimateMemoryUsage(u); - ResultsType::EstimateMemoryUsage(u); - u.requiredMemoryForOutput += sizeof(Solver::Variable::IntermediateValues); - u.requiredMemoryForOutput += sizeof(typename VCardType::ResultsType); - u.requiredMemoryForOutput += sizeof(void*) * 2; - - // year-by-year - if (!u.gatheringInformationsForInput) - { - if (u.study.parameters.yearByYear) - { - for (unsigned int i = 0; i != u.years; ++i) - u.takeIntoConsiderationANewTimeserieForDiskOutput(false); - } - } - } - } - NextType::EstimateMemoryUsage(u); - } - public: STstorageWithdrawalByCluster() : pValuesForTheCurrentYear(nullptr) diff --git a/src/solver/variable/economy/area.cpp b/src/solver/variable/economy/area.cpp index 9baae58a3d..bfcd9af7dd 100644 --- a/src/solver/variable/economy/area.cpp +++ b/src/solver/variable/economy/area.cpp @@ -25,7 +25,6 @@ ** SPDX-License-Identifier: licenceRef-GPL3_WITH_RTE-Exceptions */ -#include #include "all.h" #define NEXTTYPE Economy::VariablesPerArea diff --git a/src/solver/variable/economy/area.memory-estimation.cpp b/src/solver/variable/economy/area.memory-estimation.cpp index 6e60b0560d..534b0d5c91 100644 --- a/src/solver/variable/economy/area.memory-estimation.cpp +++ b/src/solver/variable/economy/area.memory-estimation.cpp @@ -25,7 +25,6 @@ ** SPDX-License-Identifier: licenceRef-GPL3_WITH_RTE-Exceptions */ -#include #include "all.h" using NEXTTYPE = Solver::Variable::Economy::VariablesPerArea; diff --git a/src/solver/variable/economy/bc.memory-estimation.cpp b/src/solver/variable/economy/bc.memory-estimation.cpp index 2f73b1da3c..6af9ebcb85 100644 --- a/src/solver/variable/economy/bc.memory-estimation.cpp +++ b/src/solver/variable/economy/bc.memory-estimation.cpp @@ -25,7 +25,6 @@ ** SPDX-License-Identifier: licenceRef-GPL3_WITH_RTE-Exceptions */ -#include #include "all.h" using bc_next_type = Solver::Variable::Economy::VariablesPerBindingConstraints; diff --git a/src/solver/variable/economy/links.cpp b/src/solver/variable/economy/links.cpp index 3e435e22ba..0f0dde8bf0 100644 --- a/src/solver/variable/economy/links.cpp +++ b/src/solver/variable/economy/links.cpp @@ -25,6 +25,5 @@ ** SPDX-License-Identifier: licenceRef-GPL3_WITH_RTE-Exceptions */ -#include #include "links.h" #include "../commons/links/links.cpp.inc.hxx" diff --git a/src/solver/variable/economy/max-mrg.cpp b/src/solver/variable/economy/max-mrg.cpp index a468d890df..4beb0185f0 100644 --- a/src/solver/variable/economy/max-mrg.cpp +++ b/src/solver/variable/economy/max-mrg.cpp @@ -27,7 +27,6 @@ #include #include -#include #include "max-mrg.h" #include diff --git a/src/solver/variable/economy/nbOfDispatchedUnitsByPlant.h b/src/solver/variable/economy/nbOfDispatchedUnitsByPlant.h index 553b05e624..1e4735d29e 100644 --- a/src/solver/variable/economy/nbOfDispatchedUnitsByPlant.h +++ b/src/solver/variable/economy/nbOfDispatchedUnitsByPlant.h @@ -137,32 +137,6 @@ class NbOfDispatchedUnitsByPlant : public Variable::IVariablethermal.list.size(); ++i) - { - Solver::Variable::IntermediateValues::EstimateMemoryUsage(u); - ResultsType::EstimateMemoryUsage(u); - u.requiredMemoryForOutput += sizeof(Solver::Variable::IntermediateValues); - u.requiredMemoryForOutput += sizeof(typename VCardType::ResultsType); - u.requiredMemoryForOutput += sizeof(void*) * 2; - - // year-by-year - if (!u.gatheringInformationsForInput) - { - if (u.study.parameters.yearByYear) - { - for (unsigned int i = 0; i != u.years; ++i) - u.takeIntoConsiderationANewTimeserieForDiskOutput(false); - } - } - } - } - NextType::EstimateMemoryUsage(u); - } - public: NbOfDispatchedUnitsByPlant() : pValuesForTheCurrentYear(NULL), pSize(0) { diff --git a/src/solver/variable/economy/npCostByDispatchablePlant.h b/src/solver/variable/economy/npCostByDispatchablePlant.h index 403428bdc4..d28ce151d5 100644 --- a/src/solver/variable/economy/npCostByDispatchablePlant.h +++ b/src/solver/variable/economy/npCostByDispatchablePlant.h @@ -139,32 +139,6 @@ class NonProportionalCostByDispatchablePlant }; }; - static void EstimateMemoryUsage(Data::StudyMemoryUsage& u) - { - if (u.area) - { - for (unsigned int i = 0; i != u.area->thermal.list.size(); ++i) - { - Solver::Variable::IntermediateValues::EstimateMemoryUsage(u); - ResultsType::EstimateMemoryUsage(u); - u.requiredMemoryForOutput += sizeof(Solver::Variable::IntermediateValues); - u.requiredMemoryForOutput += sizeof(typename VCardType::ResultsType); - u.requiredMemoryForOutput += sizeof(void*) * 2; - - // year-by-year - if (!u.gatheringInformationsForInput) - { - if (u.study.parameters.yearByYear) - { - for (unsigned int i = 0; i != u.years; ++i) - u.takeIntoConsiderationANewTimeserieForDiskOutput(false); - } - } - } - } - NextType::EstimateMemoryUsage(u); - } - public: NonProportionalCostByDispatchablePlant() : pValuesForTheCurrentYear(NULL), pSize(0) { diff --git a/src/solver/variable/economy/overallCost.h b/src/solver/variable/economy/overallCost.h index a75541b754..6760bb4311 100644 --- a/src/solver/variable/economy/overallCost.h +++ b/src/solver/variable/economy/overallCost.h @@ -136,13 +136,6 @@ class OverallCost : public Variable::IVariable, NextT, VCardO }; }; - static void EstimateMemoryUsage(Data::StudyMemoryUsage& u) - { - Solver::Variable::IntermediateValues::EstimateMemoryUsage(u); - NextType::EstimateMemoryUsage(u); - ResultsType::EstimateMemoryUsage(u); - } - public: ~OverallCost() { diff --git a/src/solver/variable/economy/productionByDispatchablePlant.h b/src/solver/variable/economy/productionByDispatchablePlant.h index 4eb31862d3..417b40fcaa 100644 --- a/src/solver/variable/economy/productionByDispatchablePlant.h +++ b/src/solver/variable/economy/productionByDispatchablePlant.h @@ -135,35 +135,6 @@ class ProductionByDispatchablePlant }; }; - static void EstimateMemoryUsage(Data::StudyMemoryUsage& u) - { - if (u.area) - { - for (unsigned int i = 0; i != u.area->thermal.list.size(); ++i) - { - Solver::Variable::IntermediateValues::EstimateMemoryUsage(u); - ResultsType::EstimateMemoryUsage(u); - u.requiredMemoryForOutput += sizeof(Solver::Variable::IntermediateValues); - u.requiredMemoryForOutput += sizeof(typename VCardType::ResultsType); - u.requiredMemoryForOutput += sizeof(void*) * 2; - - // See variable "pminOfTheClusterForYear" - u.requiredMemoryForOutput += maxHoursInAYear * u.nbYearsParallel; - - // year-by-year - if (!u.gatheringInformationsForInput) - { - if (u.study.parameters.yearByYear) - { - for (unsigned int i = 0; i != u.years; ++i) - u.takeIntoConsiderationANewTimeserieForDiskOutput(false); - } - } - } - } - NextType::EstimateMemoryUsage(u); - } - public: ProductionByDispatchablePlant() : pValuesForTheCurrentYear(nullptr), pminOfTheClusterForYear(nullptr), pSize(0) diff --git a/src/solver/variable/economy/productionByRenewablePlant.h b/src/solver/variable/economy/productionByRenewablePlant.h index 426dfa0ddb..4728f5b081 100644 --- a/src/solver/variable/economy/productionByRenewablePlant.h +++ b/src/solver/variable/economy/productionByRenewablePlant.h @@ -134,32 +134,6 @@ class ProductionByRenewablePlant : public Variable::IVariablerenewable.list.size(); ++i) - { - Solver::Variable::IntermediateValues::EstimateMemoryUsage(u); - ResultsType::EstimateMemoryUsage(u); - u.requiredMemoryForOutput += sizeof(Solver::Variable::IntermediateValues); - u.requiredMemoryForOutput += sizeof(typename VCardType::ResultsType); - u.requiredMemoryForOutput += sizeof(void*) * 2; - - // year-by-year - if (!u.gatheringInformationsForInput) - { - if (u.study.parameters.yearByYear) - { - for (unsigned int i = 0; i != u.years; ++i) - u.takeIntoConsiderationANewTimeserieForDiskOutput(false); - } - } - } - } - NextType::EstimateMemoryUsage(u); - } - public: ProductionByRenewablePlant() : pValuesForTheCurrentYear(nullptr), pSize(0) { diff --git a/src/solver/variable/economy/profitByPlant.h b/src/solver/variable/economy/profitByPlant.h index 5f28f9306c..2a8f79cde0 100644 --- a/src/solver/variable/economy/profitByPlant.h +++ b/src/solver/variable/economy/profitByPlant.h @@ -132,32 +132,6 @@ class ProfitByPlant : public Variable::IVariable, NextT, VC }; }; - static void EstimateMemoryUsage(Data::StudyMemoryUsage& u) - { - if (u.area) - { - for (unsigned int i = 0; i != u.area->thermal.list.size(); ++i) - { - Solver::Variable::IntermediateValues::EstimateMemoryUsage(u); - ResultsType::EstimateMemoryUsage(u); - u.requiredMemoryForOutput += sizeof(Solver::Variable::IntermediateValues); - u.requiredMemoryForOutput += sizeof(typename VCardType::ResultsType); - u.requiredMemoryForOutput += sizeof(void*) * 2; - - // year-by-year - if (!u.gatheringInformationsForInput) - { - if (u.study.parameters.yearByYear) - { - for (unsigned int i = 0; i != u.years; ++i) - u.takeIntoConsiderationANewTimeserieForDiskOutput(false); - } - } - } - } - NextType::EstimateMemoryUsage(u); - } - public: ProfitByPlant() : pValuesForTheCurrentYear(nullptr), pNbClustersOfArea(0) { diff --git a/src/solver/variable/endoflist.h b/src/solver/variable/endoflist.h index 0c217aa083..6ab335906f 100644 --- a/src/solver/variable/endoflist.h +++ b/src/solver/variable/endoflist.h @@ -65,12 +65,6 @@ class EndOfList }; public: - /*! - ** \brief Try to estimate the memory footprint that the solver will require to make a simulation - */ - static void EstimateMemoryUsage(Data::StudyMemoryUsage&) - { - } /*! ** \brief Retrieve the list of all individual variables diff --git a/src/solver/variable/setofareas.h b/src/solver/variable/setofareas.h index 60953e720c..607b57dc16 100644 --- a/src/solver/variable/setofareas.h +++ b/src/solver/variable/setofareas.h @@ -106,11 +106,6 @@ class SetsOfAreas }; public: - /*! - ** \brief Try to estimate the memory footprint that the solver will require to make a simulation - */ - static void EstimateMemoryUsage(Data::StudyMemoryUsage&); - /*! ** \brief Retrieve the list of all individual variables ** diff --git a/src/solver/variable/setofareas.hxx b/src/solver/variable/setofareas.hxx index 1ab5129831..e04bc62a26 100644 --- a/src/solver/variable/setofareas.hxx +++ b/src/solver/variable/setofareas.hxx @@ -272,12 +272,6 @@ inline Yuni::uint64 SetsOfAreas::memoryUsage() const return result; } -template -inline void SetsOfAreas::EstimateMemoryUsage(Data::StudyMemoryUsage& u) -{ - NextT::EstimateMemoryUsage(u); -} - template template inline void SetsOfAreas::provideInformations(I& infos) diff --git a/src/solver/variable/storage/average.h b/src/solver/variable/storage/average.h index f8a4771024..e0f6b37d94 100644 --- a/src/solver/variable/storage/average.h +++ b/src/solver/variable/storage/average.h @@ -168,14 +168,6 @@ struct Average : public NextT return avgdata.dynamicMemoryUsage() + NextType::memoryUsage(); } - static void EstimateMemoryUsage(Antares::Data::StudyMemoryUsage& u) - { - Antares::Memory::EstimateMemoryUsage(sizeof(double), maxHoursInAYear, u, false); - u.requiredMemoryForOutput += u.years * sizeof(double); - u.takeIntoConsiderationANewTimeserieForDiskOutput(); - NextType::EstimateMemoryUsage(u); - } - template class DecoratorT> Antares::Memory::Stored::ConstReturnType hourlyValuesForSpatialAggregate() const { diff --git a/src/solver/variable/storage/averagedata.cpp b/src/solver/variable/storage/averagedata.cpp index 9ffa1bdcce..8818d8817b 100644 --- a/src/solver/variable/storage/averagedata.cpp +++ b/src/solver/variable/storage/averagedata.cpp @@ -26,7 +26,6 @@ */ #include -#include #include "intermediate.h" #include "averagedata.h" diff --git a/src/solver/variable/storage/empty.h b/src/solver/variable/storage/empty.h index f15fd68d93..c6bbb570ec 100644 --- a/src/solver/variable/storage/empty.h +++ b/src/solver/variable/storage/empty.h @@ -81,11 +81,6 @@ struct Empty return 0; } - static void EstimateMemoryUsage(Data::StudyMemoryUsage&) - { - // Does nothing - } - template class DecoratorT> static Antares::Memory::Stored::ConstReturnType hourlyValuesForSpatialAggregate() { diff --git a/src/solver/variable/storage/intermediate.cpp b/src/solver/variable/storage/intermediate.cpp index 0c7e6a654d..cb87577ca3 100644 --- a/src/solver/variable/storage/intermediate.cpp +++ b/src/solver/variable/storage/intermediate.cpp @@ -27,7 +27,6 @@ #include #include -#include #include #include "intermediate.h" diff --git a/src/solver/variable/storage/intermediate.h b/src/solver/variable/storage/intermediate.h index 225e470d27..2ac21461ab 100644 --- a/src/solver/variable/storage/intermediate.h +++ b/src/solver/variable/storage/intermediate.h @@ -53,8 +53,6 @@ class IntermediateValues final typedef double Type; public: - //! Try to estimate the amount of memory that will be required for a simulation - static void EstimateMemoryUsage(Data::StudyMemoryUsage& u); //! Get the dynamic amount of memory consummed by a simulation // \note This method assumes that you've already have gathered the size // of this class diff --git a/src/solver/variable/storage/intermediate.hxx b/src/solver/variable/storage/intermediate.hxx index a10edf153c..157a00a353 100644 --- a/src/solver/variable/storage/intermediate.hxx +++ b/src/solver/variable/storage/intermediate.hxx @@ -57,11 +57,6 @@ inline const IntermediateValues::Type& IntermediateValues::operator[]( return hour[index]; } -inline void IntermediateValues::EstimateMemoryUsage(Data::StudyMemoryUsage& u) -{ - Antares::Memory::EstimateMemoryUsage(sizeof(double), maxHoursInAYear, u, true); -} - inline Yuni::uint64 IntermediateValues::MemoryUsage() { return +sizeof(Type) * maxHoursInAYear; diff --git a/src/solver/variable/storage/minmax-data.cpp b/src/solver/variable/storage/minmax-data.cpp index f6b7cca4a3..ce68d246cb 100644 --- a/src/solver/variable/storage/minmax-data.cpp +++ b/src/solver/variable/storage/minmax-data.cpp @@ -26,22 +26,13 @@ */ #include -#include #include "intermediate.h" #include "minmax-data.h" -#include +#include using namespace Yuni; -namespace Antares -{ -namespace Solver -{ -namespace Variable -{ -namespace R -{ -namespace AllYears +namespace Antares::Solver::Variable::R::AllYears { namespace // anonymous { @@ -224,8 +215,8 @@ void MinMaxData::mergeSup(uint year, const IntermediateValues& rhs) MergeArray::Do(year, &annual, &rhs.year); } -} // namespace AllYears -} // namespace R -} // namespace Variable -} // namespace Solver -} // namespace Antares +} // namespace Antares::Solver::Variable::R::AllYears + + + + diff --git a/src/solver/variable/storage/minmax.h b/src/solver/variable/storage/minmax.h index 4db24fe50f..970cdc80bf 100644 --- a/src/solver/variable/storage/minmax.h +++ b/src/solver/variable/storage/minmax.h @@ -142,13 +142,6 @@ struct MinMaxBase : public NextT return sizeof(double) * maxHoursInAYear + NextType::memoryUsage(); } - static void EstimateMemoryUsage(Data::StudyMemoryUsage& u) - { - Antares::Memory::EstimateMemoryUsage(sizeof(MinMaxData::Data), maxHoursInAYear, u, false); - u.takeIntoConsiderationANewTimeserieForDiskOutput(true); - NextType::EstimateMemoryUsage(u); - } - template class DecoratorT> Antares::Memory::Stored::ConstReturnType hourlyValuesForSpatialAggregate() const { diff --git a/src/solver/variable/storage/raw.h b/src/solver/variable/storage/raw.h index 9208d5fd05..b4a2eea04a 100644 --- a/src/solver/variable/storage/raw.h +++ b/src/solver/variable/storage/raw.h @@ -165,14 +165,6 @@ struct Raw : public NextT return +sizeof(double) * maxHoursInAYear + NextType::memoryUsage(); } - static void EstimateMemoryUsage(Antares::Data::StudyMemoryUsage& u) - { - u.requiredMemoryForOutput += sizeof(double) * u.years; - Antares::Memory::EstimateMemoryUsage(sizeof(double), maxHoursInAYear, u, false); - u.takeIntoConsiderationANewTimeserieForDiskOutput(); - NextType::EstimateMemoryUsage(u); - } - template class DecoratorT> Antares::Memory::Stored::ConstReturnType hourlyValuesForSpatialAggregate() const { diff --git a/src/solver/variable/storage/results.h b/src/solver/variable/storage/results.h index b46476c100..a181179faa 100644 --- a/src/solver/variable/storage/results.h +++ b/src/solver/variable/storage/results.h @@ -100,11 +100,6 @@ class Results : public FirstDecoratorT return DecoratorType::memoryUsage(); } - static void EstimateMemoryUsage(Antares::Data::StudyMemoryUsage& u) - { - DecoratorType::EstimateMemoryUsage(u); - } - Antares::Memory::Stored::ConstReturnType hourlyValuesForSpatialAggregate() const { return DecoratorType::template hourlyValuesForSpatialAggregate< diff --git a/src/solver/variable/storage/stdDeviation.h b/src/solver/variable/storage/stdDeviation.h index e154e8dfb5..283524300a 100644 --- a/src/solver/variable/storage/stdDeviation.h +++ b/src/solver/variable/storage/stdDeviation.h @@ -171,13 +171,6 @@ struct StdDeviation : public NextT return sizeof(double) * maxHoursInAYear + NextType::memoryUsage(); } - static void EstimateMemoryUsage(Antares::Data::StudyMemoryUsage& u) - { - Memory::EstimateMemoryUsage(sizeof(double), maxHoursInAYear, u, false); - u.takeIntoConsiderationANewTimeserieForDiskOutput(); - NextType::EstimateMemoryUsage(u); - } - template class DecoratorT> Antares::Memory::Stored::ConstReturnType hourlyValuesForSpatialAggregate() const { diff --git a/src/solver/variable/surveyresults/surveyresults.cpp b/src/solver/variable/surveyresults/surveyresults.cpp index 9952589de1..c70a3f23fd 100644 --- a/src/solver/variable/surveyresults/surveyresults.cpp +++ b/src/solver/variable/surveyresults/surveyresults.cpp @@ -28,7 +28,6 @@ #include #include #include -#include #include "surveyresults.h" #include #include @@ -747,33 +746,6 @@ void SurveyResults::saveToFile(int dataLevel, int fileLevel, int precisionLevel) pResultWriter->addEntryFromBuffer(data.filename.c_str(), data.fileBuffer); } -void SurveyResults::EstimateMemoryUsage(uint maxVars, Data::StudyMemoryUsage& u) -{ - if (u.study.parameters.synthesis - || (u.study.parameters.yearByYear)) - { - // TODO : We may have more thermal cluster for an area than the max total of vars - // So we should take into consideration the maximum total of thermal clusters for - // a single area - Yuni::uint64 temporaryMemoryAmount = 0; - // Base - temporaryMemoryAmount += sizeof(SurveyResults); - // values - temporaryMemoryAmount += sizeof(double) * 8760 * maxVars; - temporaryMemoryAmount += sizeof(CaptionType) * 3 * maxVars; - temporaryMemoryAmount += sizeof(PrecisionType) * maxVars; - // data.fileBuffer - temporaryMemoryAmount += 4 * 1024 * 1024; // 4 Mib - // temporary buffers for numeric conversion - temporaryMemoryAmount += 256; - - // Il y a un thread par année MC et chaque thread construit dynamiquement un objet de type - // SurveyResults pour ses outputs (voir container.hxx : void - // List::exportSurveyResults(...)) - u.requiredMemoryForOutput += temporaryMemoryAmount * u.nbYearsParallel; - } -} - void SurveyResults::exportGridInfos() { data.exportGridInfos(pResultWriter); diff --git a/src/solver/variable/surveyresults/surveyresults.h b/src/solver/variable/surveyresults/surveyresults.h index 64aa5bfbb3..c6407bd582 100644 --- a/src/solver/variable/surveyresults/surveyresults.h +++ b/src/solver/variable/surveyresults/surveyresults.h @@ -53,11 +53,6 @@ class SurveyResults //! Caption typedef Yuni::CString<128, false> CaptionType; - /*! - ** \brief Try to estimate theamount of memory required by the class - */ - static void EstimateMemoryUsage(uint maxVars, Data::StudyMemoryUsage& u); - public: //! \name Constructor & Destructor //@{ diff --git a/src/solver/variable/variable.h b/src/solver/variable/variable.h index 5e93ee2de5..dfd53cb063 100644 --- a/src/solver/variable/variable.h +++ b/src/solver/variable/variable.h @@ -91,11 +91,6 @@ class IVariable : protected NextT }; public: - /*! - ** \brief Try to estimate the memory footprint that the solver will require to make a simulation - */ - static void EstimateMemoryUsage(Data::StudyMemoryUsage& u); - /*! ** \brief Initialize the results of the variable ** diff --git a/src/solver/variable/variable.hxx b/src/solver/variable/variable.hxx index 12ec211280..7628c49ba1 100644 --- a/src/solver/variable/variable.hxx +++ b/src/solver/variable/variable.hxx @@ -30,40 +30,8 @@ #include #include -namespace Antares +namespace Antares::Solver::Variable { -namespace Solver -{ -namespace Variable -{ -template -inline void IVariable::EstimateMemoryUsage(Data::StudyMemoryUsage& u) -{ - if ((int)VCardT::columnCount != (int)Category::dynamicColumns) - { - // Results - for (uint i = 0; i != VCardT::columnCount; ++i) - ResultsType::EstimateMemoryUsage(u); - - // Intermediate values - if (VCardT::hasIntermediateValues) - { - for (uint i = 0; i != VCardT::columnCount; ++i) - IntermediateValues::EstimateMemoryUsage(u); - } - - // Year-by-year - if (!u.gatheringInformationsForInput) - { - if (u.study.parameters.yearByYear) - { - for (uint i = 0; i != u.years; ++i) - u.takeIntoConsiderationANewTimeserieForDiskOutput(false); - } - } - } - NextType::EstimateMemoryUsage(u); -} template inline IVariable::IVariable() @@ -780,8 +748,8 @@ inline void IVariable::supplyMaxNumberOfColumns(Data::Stu NextType::supplyMaxNumberOfColumns(study); } -} // namespace Variable -} // namespace Solver -} // namespace Antares +} // namespace Antares::Solver::Variable + + #endif // __SOLVER_VARIABLE_VARIABLE_HXX__ diff --git a/src/ui/simulator/toolbox/components/datagrid/renderer/bindingconstraint/offsets.cpp b/src/ui/simulator/toolbox/components/datagrid/renderer/bindingconstraint/offsets.cpp index 1b0532b773..2e5ebf1277 100644 --- a/src/ui/simulator/toolbox/components/datagrid/renderer/bindingconstraint/offsets.cpp +++ b/src/ui/simulator/toolbox/components/datagrid/renderer/bindingconstraint/offsets.cpp @@ -27,7 +27,6 @@ #include #include -#include #include "offsets.h" #include #include diff --git a/src/ui/simulator/toolbox/components/datagrid/renderer/bindingconstraint/weights.cpp b/src/ui/simulator/toolbox/components/datagrid/renderer/bindingconstraint/weights.cpp index 7753f3d84b..b8f7723275 100644 --- a/src/ui/simulator/toolbox/components/datagrid/renderer/bindingconstraint/weights.cpp +++ b/src/ui/simulator/toolbox/components/datagrid/renderer/bindingconstraint/weights.cpp @@ -27,10 +27,8 @@ #include #include -#include #include "weights.h" #include -#include #include #include "antares/study/ui-runtimeinfos.h" diff --git a/src/ui/simulator/windows/memorystatistics/memorystatistics.cpp b/src/ui/simulator/windows/memorystatistics/memorystatistics.cpp index 031eed1db6..aa7cca7930 100644 --- a/src/ui/simulator/windows/memorystatistics/memorystatistics.cpp +++ b/src/ui/simulator/windows/memorystatistics/memorystatistics.cpp @@ -31,7 +31,6 @@ #include "memorystatistics.h" #include -#include #include "../../application/study.h" #include "../../toolbox/create.h" #include "../../toolbox/resources.h" @@ -61,10 +60,6 @@ class MemoryStatisticsData final MemoryStatisticsData() : stTxtTotal(nullptr), stTxtDiskFree(nullptr), - stTxtSimu(nullptr), - stTxtSimuDisk(nullptr), - stTxtSimuPar(nullptr), - stTxtSimuParDisk(nullptr), stTxtDataDisplay(nullptr), stTxtMemoryCache(nullptr), timer(nullptr) @@ -76,41 +71,27 @@ class MemoryStatisticsData final public: wxStaticText* stTxtTotal; wxStaticText* stTxtDiskFree; - wxStaticText* stTxtSimu; - wxStaticText* stTxtSimuDisk; - wxStaticText* stTxtSimuPar; - wxStaticText* stTxtSimuParDisk; wxStaticText* stTxtDataDisplay; wxStaticText* stTxtMemoryCache; wxTimer* timer; - Yuni::Thread::IThread::Ptr thread; }; // class MemoryStatisticsData MemoryStatisticsData::~MemoryStatisticsData() { - if (!(!thread)) - thread->gracefulStop(); - if (timer) { timer->Stop(); delete timer; } - if (!(!thread)) - { - thread->stop(10000); - thread = nullptr; - } } } // namespace Window } // namespace Private } // namespace Antares -namespace Antares -{ -namespace Window + +namespace Antares::Window { namespace // anonymous { @@ -156,12 +137,6 @@ MemoryStatistics::MemoryStatistics(wxWindow* parent) : wxColour defaultBgColor = GetBackgroundColour(); SetBackgroundColour(wxColour(255, 255, 255)); - if (!(!study)) - { - pData->thread = study->createThreadToEstimateInputMemoryUsage(); - pData->thread->start(); - } - auto* sizer = new wxBoxSizer(wxVERTICAL); sizer->AddSpacer(10); @@ -237,48 +212,6 @@ MemoryStatistics::MemoryStatistics(wxWindow* parent) : this, wxID_ANY, wxT(" Updating..."), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT); gridSizer->Add(pData->stTxtDiskFree, 0, wxRIGHT | wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL); - // Space - { - gridSizer->AddSpacer(10); - gridSizer->AddSpacer(10); - gridSizer->AddSpacer(10); - - auto* st = new wxStaticText( - this, wxID_ANY, wxT("Simulation "), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT); - wxFont f = st->GetFont(); - f.SetWeight(wxFONTWEIGHT_BOLD); - st->SetFont(f); - gridSizer->Add(st, 0, wxRIGHT | wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL); - gridSizer->AddSpacer(5); - gridSizer->AddSpacer(5); - } - - // Required for a simulation (default mode) - auto* stTxtSimuTtl = new wxStaticText( - this, wxID_ANY, wxT("Default : "), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT); - gridSizer->Add(stTxtSimuTtl, 0, wxRIGHT | wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL); - - pData->stTxtSimu = new wxStaticText( - this, wxID_ANY, wxT(" Updating..."), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT); - gridSizer->Add(pData->stTxtSimu, 0, wxRIGHT | wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL); - - pData->stTxtSimuDisk = new wxStaticText( - this, wxID_ANY, wxT(" Updating..."), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT); - gridSizer->Add(pData->stTxtSimuDisk, 0, wxRIGHT | wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL); - - // Parallel mode - auto* stTxtSimuParTtl = new wxStaticText( - this, wxID_ANY, wxT("Parallel : "), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT); - gridSizer->Add(stTxtSimuParTtl, 0, wxRIGHT | wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL); - - pData->stTxtSimuPar = new wxStaticText( - this, wxID_ANY, wxT(" Updating..."), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT); - gridSizer->Add(pData->stTxtSimuPar, 0, wxRIGHT | wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL); - - pData->stTxtSimuParDisk = new wxStaticText( - this, wxID_ANY, wxT(" Updating..."), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT); - gridSizer->Add(pData->stTxtSimuParDisk, 0, wxRIGHT | wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL); - // Machine number of cores { gridSizer->AddSpacer(10); @@ -404,92 +337,6 @@ void MemoryStatistics::refreshInformation() #endif } - if (!(!study)) - { - const bool updating = (not pData->timer or pData->thread->started()); - - if (not updating) - { - // Memory required for a simulation - { - // For default mode, parallel mode is disabled. - study->maxNbYearsInParallel = 1; - - Data::StudyMemoryUsage m(*study); - m.estimate(); - s.clear(); - - if (!pDisplayLogsOnce) - { - logs.info() << "Memory usage: estimate: input: " - << (m.requiredMemoryForInput / (1024 * 1024)) - << "Mo, output: " << (m.requiredMemoryForOutput / (1024 * 1024)) - << "Mo, disk: " << (m.requiredDiskSpace / (1024 * 1024)) << "Mo"; - } - - s << wxT("~ ") << NormalizeAmountOfMemory(m.requiredMemory) << wxT(" Mo"); - pData->stTxtSimu->SetLabel(s); - s.clear(); - if (m.requiredDiskSpace) - s << wxT("~ ") << (m.requiredDiskSpace / (1024 * 1024)) << wxT(" Mo"); - else - s << wxT("0 Mo"); - pData->stTxtSimuDisk->SetLabel(s); - } - - { - // Parallel mode - study->maxNbYearsInParallel = study->maxNbYearsInParallel_save; - - Data::StudyMemoryUsage m(*study); - m.estimate(); - s.clear(); - - if (!pDisplayLogsOnce) - { - logs.info() << "Memory usage: estimate: input: " - << (m.requiredMemoryForInput / (1024 * 1024)) - << "Mo, output: " << (m.requiredMemoryForOutput / (1024 * 1024)) - << "Mo, disk: " << (m.requiredDiskSpace / (1024 * 1024)) << "Mo"; - } - - s << wxT("~ ") << NormalizeAmountOfMemory(m.requiredMemory) << wxT(" Mo"); - pData->stTxtSimuPar->SetLabel(s); - s.clear(); - if (m.requiredDiskSpace) - s << wxT("~ ") << (m.requiredDiskSpace / (1024 * 1024)) << wxT(" Mo"); - else - s << wxT("0 Mo"); - pData->stTxtSimuParDisk->SetLabel(s); - } - - pDisplayLogsOnce = true; - } - else - { - pData->stTxtSimu->SetLabel(wxT("updating")); - pData->stTxtSimuDisk->SetLabel(wxT("updating")); - pData->stTxtSimuPar->SetLabel(wxT("updating")); - pData->stTxtSimuParDisk->SetLabel(wxT("updating")); - } - - // Memory consummed by the study - s.clear(); - if (updating) - s << wxT(" ~ "); - s << (1 + study->memoryUsage() / (1024 * 1024)) << wxT(" Mo"); - pData->stTxtDataDisplay->SetLabel(s); - } - else - { - pData->stTxtDataDisplay->SetLabel(wxT("N/A")); - - pData->stTxtSimu->SetLabel(wxT("N/A")); - pData->stTxtSimuDisk->SetLabel(wxT("N/A")); - pData->stTxtSimuPar->SetLabel(wxT("N/A")); - pData->stTxtSimuParDisk->SetLabel(wxT("N/A")); - } - GetSizer()->Layout(); if (pData->timer) pData->timer->Start(3000); @@ -497,11 +344,9 @@ void MemoryStatistics::refreshInformation() void MemoryStatistics::onClose(void*) { - if (!(!pData->thread)) - pData->thread->gracefulStop(); // ASync close Dispatcher::GUI::Close(this); } -} // namespace Window -} // namespace Antares +} // namespace Antares::Window + diff --git a/src/ui/simulator/windows/output/provider/output-comparison.cpp b/src/ui/simulator/windows/output/provider/output-comparison.cpp index 7ba75a0d6f..2e71b9e9d4 100644 --- a/src/ui/simulator/windows/output/provider/output-comparison.cpp +++ b/src/ui/simulator/windows/output/provider/output-comparison.cpp @@ -32,7 +32,6 @@ #include "../content.h" #include "../../../toolbox/resources.h" #include -#include using namespace Yuni; diff --git a/src/ui/simulator/windows/output/provider/outputs.cpp b/src/ui/simulator/windows/output/provider/outputs.cpp index d3ab9436bc..aa95581337 100644 --- a/src/ui/simulator/windows/output/provider/outputs.cpp +++ b/src/ui/simulator/windows/output/provider/outputs.cpp @@ -33,7 +33,6 @@ #include "../content.h" #include "../../../toolbox/resources.h" #include -#include #include diff --git a/src/ui/simulator/windows/output/provider/variables.cpp b/src/ui/simulator/windows/output/provider/variables.cpp index d30b7549f5..07e0887b77 100644 --- a/src/ui/simulator/windows/output/provider/variables.cpp +++ b/src/ui/simulator/windows/output/provider/variables.cpp @@ -31,7 +31,6 @@ #include "../content.h" #include "../../../toolbox/resources.h" #include -#include #include "../../../../../solver/variable/economy/all.h" #include "variable-collector.h" diff --git a/src/ui/simulator/windows/simulation/run.cpp b/src/ui/simulator/windows/simulation/run.cpp index c8587a1dea..c6a68e868c 100644 --- a/src/ui/simulator/windows/simulation/run.cpp +++ b/src/ui/simulator/windows/simulation/run.cpp @@ -32,7 +32,6 @@ #include #include #include -#include #include #include @@ -119,7 +118,7 @@ class ResourcesInfoTimer final : public wxTimer void Notify() override { - pForm.estimateMemoryUsage(); + } private: @@ -208,9 +207,6 @@ Run::Run(wxWindow* parent, bool preproOnly) : // Informations about the study auto& study = *GetCurrentStudy(); - pThread = study.createThreadToEstimateInputMemoryUsage(); - pThread->start(); - // The main sizer auto* mnSizer = new wxBoxSizer(wxVERTICAL); @@ -431,8 +427,6 @@ Run::Run(wxWindow* parent, bool preproOnly) : updateNbCores(); - estimateMemoryUsage(); - pTimer = new ResourcesInfoTimer(*this); pTimer->Start(150); @@ -462,101 +456,6 @@ Run::~Run() } } -void Run::estimateMemoryUsage() -{ - if (pTimer) - pTimer->Stop(); - - pWarnAboutMemoryLimit = false; - pWarnAboutDiskLimit = false; - - auto studyptr = GetCurrentStudy(); - // The study - if (!studyptr) - return; - auto& study = *studyptr; - - // flag to know if the gui has been updated, to avoid a call to Layout, - // and to avoid flickering - bool guiUpdated = false; - - const bool updating = (!pTimer or (pThread->started())); - if (not updating) - { - // Total of memory available on the system - uint64 memFree = System::Memory::Available(); - uint64 diskFree = DiskFreeSpace(study.folder); - - Data::StudyMemoryUsage m(study); - if (pPreproOnly->GetValue()) - m.years = 0; - - m.estimate(); - - uint64 amountNeeded = m.requiredMemory; - pWarnAboutMemoryLimit = memFree < amountNeeded; - pWarnAboutDiskLimit = (diskFree != (uint64)-1) - and (not study.folder.empty() and (diskFree < m.requiredDiskSpace)); - - wxString s; - s = wxT(" ~"); - BytesToStringW(s, amountNeeded); - UpdateLabel(guiUpdated, pLblEstimation, s); - - s = wxT("/ "); - BytesToStringW(s, memFree) << wxT(" available"); - UpdateLabel(guiUpdated, pLblEstimationAvailable, s); - - s = wxT(" "); - switch (featuresAlias[pFeatureIndex]) - { - case Solver::parallel: - case Solver::standard: - { - s << wxT(" < "); - BytesToStringW(s, m.requiredDiskSpace); - break; - } - default: - break; - } - UpdateLabel(guiUpdated, pLblDiskEstimation, s); - - // Free space - s.clear(); - if (diskFree != (uint64)-1) - { - s = wxT("/ "); - BytesToStringW(s, diskFree) << wxT(" available"); - } - UpdateLabel(guiUpdated, pLblDiskEstimationAvailable, s); - } - else - { - UpdateLabel(guiUpdated, pLblEstimation, wxEmptyString); - UpdateLabel(guiUpdated, pLblDiskEstimation, wxEmptyString); - UpdateLabel(guiUpdated, pLblEstimationAvailable, wxT("updating...")); - UpdateLabel(guiUpdated, pLblDiskEstimationAvailable, wxT("updating...")); - pWarnAboutMemoryLimit = false; - pWarnAboutDiskLimit = false; - } - - // rebuild the layout - if (guiUpdated) - { - auto* sizer = pBigDaddy->GetSizer(); - if (sizer) - sizer->Layout(); - sizer = GetSizer(); - if (sizer) - sizer->Layout(); - } - - // Restoring the timer - if (pTimer) - pTimer->Start(updating ? 500 : timerInterval); -} - void Run::onCancel(void*) { this->Enable(false); @@ -692,9 +591,6 @@ void Run::onRun(void*) } } - // Memory limit - estimateMemoryUsage(); - if (canNotifyUserForLowResources and 1 == checkForLowResources()) return; @@ -761,7 +657,6 @@ void Run::onRun(void*) void Run::evtOnPreprocessorsOnlyClick(wxCommandEvent&) { updateMonteCarloYears(); - estimateMemoryUsage(); } void Run::updateMonteCarloYears() @@ -914,9 +809,6 @@ void Run::onSelectMode(wxCommandEvent& evt) pOptionSpacer->Show(true); } - // Update the estimation of the memory consumption - estimateMemoryUsage(); - // Update the nb of cores in the Run window updateNbCores(); diff --git a/src/ui/simulator/windows/simulation/run.h b/src/ui/simulator/windows/simulation/run.h index 7c55fa4cc7..8c2b44a200 100644 --- a/src/ui/simulator/windows/simulation/run.h +++ b/src/ui/simulator/windows/simulation/run.h @@ -62,11 +62,6 @@ class Run final : public wxDialog virtual ~Run(); //@} - /*! - ** \brief Update all visual components and internal variables about the resources status - */ - void estimateMemoryUsage(); - private: void gridAppend(wxFlexGridSizer& sizer, const wxString& title, From b85e09aeb877b5197df673442b1607bbbdf0fd77 Mon Sep 17 00:00:00 2001 From: Jason Marechal Date: Tue, 22 Aug 2023 10:16:46 +0200 Subject: [PATCH 30/52] Fix merge --- src/libs/antares/memory/memory.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/libs/antares/memory/memory.cpp b/src/libs/antares/memory/memory.cpp index bbd3deb71d..ae8c50fed4 100644 --- a/src/libs/antares/memory/memory.cpp +++ b/src/libs/antares/memory/memory.cpp @@ -43,6 +43,7 @@ #ifdef YUNI_OS_WINDOWS #include #endif +#include "antares/memory/memory.h" #include #include @@ -52,7 +53,8 @@ using namespace Yuni; namespace Antares { -/*extern*/ Memory memory; +/*extern*/ +Memory memory; namespace // anonymous { From f7749d06d5fb1118acce117c5e4ace47eaa67066 Mon Sep 17 00:00:00 2001 From: Jason Marechal Date: Tue, 22 Aug 2023 10:27:32 +0200 Subject: [PATCH 31/52] Remove extra dependency --- src/libs/antares/memory/CMakeLists.txt | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/libs/antares/memory/CMakeLists.txt b/src/libs/antares/memory/CMakeLists.txt index a8ddb52b0e..aaaccc24ab 100644 --- a/src/libs/antares/memory/CMakeLists.txt +++ b/src/libs/antares/memory/CMakeLists.txt @@ -20,10 +20,6 @@ target_link_libraries(${PROJ} ) target_include_directories(${PROJ} - PRIVATE - ${CMAKE_SOURCE_DIR}/libs - ${CMAKE_SOURCE_DIR}/libs/antares/jit #memory-usage -> matrix -> jit - ${CMAKE_SOURCE_DIR}/libs/antares/io #memory-usage -> matrix -> io PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include ) From 2117563737da8e09fdfa7a28a454e4719a6f7fc0 Mon Sep 17 00:00:00 2001 From: Jason Marechal Date: Tue, 22 Aug 2023 10:30:51 +0200 Subject: [PATCH 32/52] Move public dependency as private --- src/libs/antares/sys/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libs/antares/sys/CMakeLists.txt b/src/libs/antares/sys/CMakeLists.txt index 05273fb734..e12dcd47b6 100644 --- a/src/libs/antares/sys/CMakeLists.txt +++ b/src/libs/antares/sys/CMakeLists.txt @@ -24,5 +24,6 @@ target_link_libraries(${PROJ} target_include_directories(${PROJ} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include + PRIVATE ${CMAKE_SOURCE_DIR}/libs ) From c8a6faa6e3ce895e6504a6a51ee07c85e77e4cb2 Mon Sep 17 00:00:00 2001 From: Jason Marechal Date: Tue, 22 Aug 2023 10:53:57 +0200 Subject: [PATCH 33/52] Remove deprecated dependency --- src/libs/antares/array/CMakeLists.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/libs/antares/array/CMakeLists.txt b/src/libs/antares/array/CMakeLists.txt index 994969233f..8f9f865699 100644 --- a/src/libs/antares/array/CMakeLists.txt +++ b/src/libs/antares/array/CMakeLists.txt @@ -18,8 +18,6 @@ target_link_libraries(array ) target_include_directories(array - PRIVATE - ${CMAKE_SOURCE_DIR}/libs #memory usage PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ) \ No newline at end of file From d0bed600b69075e175a5c067b50bc66cd1c07eb8 Mon Sep 17 00:00:00 2001 From: Jason Marechal Date: Tue, 22 Aug 2023 15:07:30 +0200 Subject: [PATCH 34/52] Split Duration collector and StudyInfoCollector --- src/libs/antares/benchmarking/CMakeLists.txt | 15 +++-- .../benchmarking/DurationCollector.cpp | 26 +++++++ ..._collectors.cpp => StudyInfoCollector.cpp} | 67 +++++++------------ .../antares/benchmarking/DurationCollector.h | 54 +++++++++++++++ .../benchmarking/StudyInfoCollector.h} | 62 +++-------------- .../antares/benchmarking/file_content.h | 0 .../antares/benchmarking/timer.h | 0 src/libs/antares/study/fwd.h | 12 ++-- src/libs/antares/study/load.cpp | 2 +- src/libs/antares/study/save.cpp | 2 +- src/libs/antares/study/version.cpp | 8 +-- src/libs/antares/study/version.h | 8 +-- src/libs/antares/writer/CMakeLists.txt | 2 +- .../writer/antares/writer/writer_factory.h | 2 +- src/libs/antares/writer/private/zip_writer.h | 2 +- src/libs/antares/writer/writer_factory.cpp | 8 +-- src/libs/antares/writer/zip_writer.cpp | 2 + src/solver/application.cpp | 9 ++- src/solver/application.h | 2 +- src/solver/main/adequacy.cpp | 2 +- src/solver/main/economy.cpp | 2 +- src/solver/simulation/solver.h | 2 +- src/solver/ts-generator/hydro.cpp | 2 +- 23 files changed, 153 insertions(+), 138 deletions(-) create mode 100644 src/libs/antares/benchmarking/DurationCollector.cpp rename src/libs/antares/benchmarking/{info_collectors.cpp => StudyInfoCollector.cpp} (76%) create mode 100644 src/libs/antares/benchmarking/include/antares/benchmarking/DurationCollector.h rename src/libs/antares/benchmarking/{antares/benchmarking/info_collectors.h => include/antares/benchmarking/StudyInfoCollector.h} (50%) rename src/libs/antares/benchmarking/{ => include}/antares/benchmarking/file_content.h (100%) rename src/libs/antares/benchmarking/{ => include}/antares/benchmarking/timer.h (100%) diff --git a/src/libs/antares/benchmarking/CMakeLists.txt b/src/libs/antares/benchmarking/CMakeLists.txt index 91c30bd0c0..4f86b8cd1b 100644 --- a/src/libs/antares/benchmarking/CMakeLists.txt +++ b/src/libs/antares/benchmarking/CMakeLists.txt @@ -1,16 +1,19 @@ set(SRC_BENCHMARKING timer.cpp - info_collectors.cpp - antares/benchmarking/file_content.h - antares/benchmarking/timer.h - antares/benchmarking/info_collectors.h + DurationCollector.cpp + include/antares/benchmarking/file_content.h + include/antares/benchmarking/timer.h + include/antares/benchmarking/DurationCollector.h file_content.cpp - ) + include/antares/benchmarking/StudyInfoCollector.h + StudyInfoCollector.cpp +) source_group("misc\\benchmarking" FILES ${SRC_BENCHMARKING}) add_library(benchmarking ${SRC_BENCHMARKING} ) +add_library(Antares::benchmarking ALIAS benchmarking) target_include_directories(benchmarking PUBLIC @@ -24,7 +27,7 @@ target_include_directories(benchmarking ${CMAKE_SOURCE_DIR}/libs/antares/jit # something,something -> jit ${CMAKE_SOURCE_DIR}/libs/antares/memory/include #study -> BC -> link -> memory PUBLIC - ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/include ) target_link_libraries(benchmarking diff --git a/src/libs/antares/benchmarking/DurationCollector.cpp b/src/libs/antares/benchmarking/DurationCollector.cpp new file mode 100644 index 0000000000..6676487dc6 --- /dev/null +++ b/src/libs/antares/benchmarking/DurationCollector.cpp @@ -0,0 +1,26 @@ +#include +#include +#include +#include +#include "antares/benchmarking/DurationCollector.h" + +namespace Benchmarking { + +void DurationCollector::addDuration(const std::string& name, int64_t duration) +{ + const std::lock_guard lock(mutex_); + duration_items_[name].push_back(duration); +} + +void DurationCollector::toFileContent(FileContent& file_content) +{ + for (const auto& element : duration_items_) + { + const std::string& name = element.first; + const auto& durations = element.second; + const int64_t duration_sum = accumulate(durations.begin(), durations.end(), (int64_t)0); + + file_content.addDurationItem(name, (unsigned int)duration_sum, (int)durations.size()); + } +} +} // namespace Benchmarking diff --git a/src/libs/antares/benchmarking/info_collectors.cpp b/src/libs/antares/benchmarking/StudyInfoCollector.cpp similarity index 76% rename from src/libs/antares/benchmarking/info_collectors.cpp rename to src/libs/antares/benchmarking/StudyInfoCollector.cpp index 34b15d8868..c9f0700100 100644 --- a/src/libs/antares/benchmarking/info_collectors.cpp +++ b/src/libs/antares/benchmarking/StudyInfoCollector.cpp @@ -1,13 +1,16 @@ -#include -#include -#include -#include -#include +// +// Created by marechaljas on 22/08/23. +// + +#include "antares/benchmarking/StudyInfoCollector.h" +#include "antares/benchmarking/DurationCollector.h" +#include "antares/benchmarking/DurationCollector.h" +#include "antares/benchmarking/file_content.h" +#include "../../../config.h" using namespace Antares::Data; +namespace Benchmarking { -namespace Benchmarking -{ // Collecting data study // --------------------------- void StudyInfoCollector::toFileContent(FileContent& file_content) @@ -82,17 +85,17 @@ void StudyInfoCollector::enabledBindingConstraintsCountToFileContent(FileContent { switch (activeContraints[i]->type()) { - case BindingConstraint::Type::typeHourly: - nbEnabledHourlyBC++; - break; - case BindingConstraint::Type::typeDaily: - nbEnabledDailyBC++; - break; - case BindingConstraint::Type::typeWeekly: - nbEnabledWeeklyBC++; - break; - default: - break; + case BindingConstraint::Type::typeHourly: + nbEnabledHourlyBC++; + break; + case BindingConstraint::Type::typeDaily: + nbEnabledDailyBC++; + break; + case BindingConstraint::Type::typeWeekly: + nbEnabledWeeklyBC++; + break; + default: + break; } } @@ -105,7 +108,7 @@ void StudyInfoCollector::enabledBindingConstraintsCountToFileContent(FileContent void StudyInfoCollector::unitCommitmentModeToFileContent(FileContent& file_content) { const char* unitCommitment - = UnitCommitmentModeToCString(study_.parameters.unitCommitment.ucMode); + = UnitCommitmentModeToCString(study_.parameters.unitCommitment.ucMode); file_content.addItemToSection("study", "unit commitment", unitCommitment); } @@ -118,7 +121,7 @@ void StudyInfoCollector::solverVersionToFileContent(FileContent& file_content) { // Example : 8.3.0 -> 830 const unsigned int version - = 100 * ANTARES_VERSION_HI + 10 * ANTARES_VERSION_LO + ANTARES_VERSION_BUILD; + = 100 * ANTARES_VERSION_HI + 10 * ANTARES_VERSION_LO + ANTARES_VERSION_BUILD; file_content.addItemToSection("study", "antares version", version); } @@ -147,27 +150,7 @@ void SimulationInfoCollector::toFileContent(FileContent& file_content) file_content.addItemToSection("optimization problem", "variables", opt_info_.nbVariables); file_content.addItemToSection("optimization problem", "constraints", opt_info_.nbConstraints); file_content.addItemToSection( - "optimization problem", "non-zero coefficients", opt_info_.nbNonZeroCoeffs); -} - -// Collecting durations from simulation -// ------------------------------------- -void DurationCollector::toFileContent(FileContent& file_content) -{ - for (const auto& element : duration_items_) - { - const std::string& name = element.first; - const auto& durations = element.second; - const int64_t duration_sum = accumulate(durations.begin(), durations.end(), (int64_t)0); - - file_content.addDurationItem(name, (unsigned int)duration_sum, (int)durations.size()); - } -} - -void DurationCollector::addDuration(const std::string& name, int64_t duration) -{ - const std::lock_guard lock(mutex_); - duration_items_[name].push_back(duration); + "optimization problem", "non-zero coefficients", opt_info_.nbNonZeroCoeffs); } -} // namespace Benchmarking +} \ No newline at end of file diff --git a/src/libs/antares/benchmarking/include/antares/benchmarking/DurationCollector.h b/src/libs/antares/benchmarking/include/antares/benchmarking/DurationCollector.h new file mode 100644 index 0000000000..85537e8792 --- /dev/null +++ b/src/libs/antares/benchmarking/include/antares/benchmarking/DurationCollector.h @@ -0,0 +1,54 @@ +#pragma once + +#include +#include +#include +#include + +#include "file_content.h" + +namespace Benchmarking +{ +struct OptimizationInfo +{ + unsigned int nbVariables = 0; + unsigned int nbConstraints = 0; + unsigned int nbNonZeroCoeffs = 0; +}; + +/* + === Info collectors === +*/ + +class IDurationCollector +{ +public: + virtual void addDuration(const std::string& name, int64_t duration) = 0; +}; + +class NullDurationCollector : public IDurationCollector +{ +public: + NullDurationCollector() = default; + void addDuration(const std::string& /* name */, int64_t /* duration */) override + { /* Do nothing */ + } +}; + +class DurationCollector : public IDurationCollector +{ +public: + DurationCollector() = default; + + void toFileContent(FileContent& file_content); + void addDuration(const std::string& name, int64_t duration) override; + +private: + std::map> duration_items_; + + // Durations can be added in a context of multi-threading, so we need to protect + // these additions from thread concurrency + std::mutex mutex_; +}; + +} // namespace Benchmarking diff --git a/src/libs/antares/benchmarking/antares/benchmarking/info_collectors.h b/src/libs/antares/benchmarking/include/antares/benchmarking/StudyInfoCollector.h similarity index 50% rename from src/libs/antares/benchmarking/antares/benchmarking/info_collectors.h rename to src/libs/antares/benchmarking/include/antares/benchmarking/StudyInfoCollector.h index 092decdd04..e419398df4 100644 --- a/src/libs/antares/benchmarking/antares/benchmarking/info_collectors.h +++ b/src/libs/antares/benchmarking/include/antares/benchmarking/StudyInfoCollector.h @@ -1,25 +1,13 @@ +// +// Created by marechaljas on 22/08/23. +// + #pragma once -#include -#include -#include -#include +#include "antares/study/study.h" -#include "file_content.h" -#include - -namespace Benchmarking -{ -struct OptimizationInfo -{ - unsigned int nbVariables = 0; - unsigned int nbConstraints = 0; - unsigned int nbNonZeroCoeffs = 0; -}; - -/* - === Info collectors === -*/ +namespace Benchmarking { +class FileContent; class StudyInfoCollector { @@ -47,6 +35,8 @@ class StudyInfoCollector const Antares::Data::Study& study_; }; +class OptimizationInfo; + class SimulationInfoCollector { public: @@ -57,36 +47,4 @@ class SimulationInfoCollector private: const OptimizationInfo& opt_info_; }; - -class IDurationCollector -{ -public: - virtual void addDuration(const std::string& name, int64_t duration) = 0; -}; - -class NullDurationCollector : public IDurationCollector -{ -public: - NullDurationCollector() = default; - void addDuration(const std::string& /* name */, int64_t /* duration */) override - { /* Do nothing */ - } -}; - -class DurationCollector : public IDurationCollector -{ -public: - DurationCollector() = default; - - void toFileContent(FileContent& file_content); - void addDuration(const std::string& name, int64_t duration) override; - -private: - std::map> duration_items_; - - // Durations can be added in a context of multi-threading, so we need to protect - // these additions from thread concurrency - std::mutex mutex_; -}; - -} // namespace Benchmarking +} \ No newline at end of file diff --git a/src/libs/antares/benchmarking/antares/benchmarking/file_content.h b/src/libs/antares/benchmarking/include/antares/benchmarking/file_content.h similarity index 100% rename from src/libs/antares/benchmarking/antares/benchmarking/file_content.h rename to src/libs/antares/benchmarking/include/antares/benchmarking/file_content.h diff --git a/src/libs/antares/benchmarking/antares/benchmarking/timer.h b/src/libs/antares/benchmarking/include/antares/benchmarking/timer.h similarity index 100% rename from src/libs/antares/benchmarking/antares/benchmarking/timer.h rename to src/libs/antares/benchmarking/include/antares/benchmarking/timer.h diff --git a/src/libs/antares/study/fwd.h b/src/libs/antares/study/fwd.h index 42ec1ac0ba..5c02e62655 100644 --- a/src/libs/antares/study/fwd.h +++ b/src/libs/antares/study/fwd.h @@ -537,19 +537,15 @@ mpsExportStatus stringToMPSexportStatus(const AnyString& value); } // namespace Data } // namespace Antares -namespace Antares -{ -namespace Data -{ -namespace ScenarioBuilder +namespace Antares::Data::ScenarioBuilder { class Rules; class TSNumberRules; class Sets; -} // namespace ScenarioBuilder -} // namespace Data -} // namespace Antares +} // namespace Antares::Data::ScenarioBuilder + + namespace Benchmarking { diff --git a/src/libs/antares/study/load.cpp b/src/libs/antares/study/load.cpp index 503fff0a04..35b9fca6c5 100644 --- a/src/libs/antares/study/load.cpp +++ b/src/libs/antares/study/load.cpp @@ -27,7 +27,7 @@ #include #include "study.h" #include "version.h" -#include +#include #include "scenario-builder/sets.h" #include "ui-runtimeinfos.h" diff --git a/src/libs/antares/study/save.cpp b/src/libs/antares/study/save.cpp index 6e3e03cb6a..f8dea51ebd 100644 --- a/src/libs/antares/study/save.cpp +++ b/src/libs/antares/study/save.cpp @@ -26,7 +26,7 @@ */ #include "study.h" -#include +#include #include "scenario-builder/sets.h" #include #include diff --git a/src/libs/antares/study/version.cpp b/src/libs/antares/study/version.cpp index 86b32779aa..3bdda2ebfb 100644 --- a/src/libs/antares/study/version.cpp +++ b/src/libs/antares/study/version.cpp @@ -44,9 +44,7 @@ enum YUNI_STATIC_ASSERT((uint)versionFromCMake == (uint)Antares::Data::versionLatest, DiscrepancyBetweenCMakeVersionAndAntaresVersion); -namespace Antares -{ -namespace Data +namespace Antares::Data { static inline Version StudyFormatCheck(const String& headerFile) @@ -209,5 +207,5 @@ Version StudyTryToFindTheVersion(const AnyString& folder) bool StudyVersion::isStudyLatestVersion(std::string studyFolder) const { return StudyTryToFindTheVersion(studyFolder) == versionLatest; } -} // namespace Data -} // namespace Antares +} // namespace Antares::Data + diff --git a/src/libs/antares/study/version.h b/src/libs/antares/study/version.h index a56d002a36..c00210bef5 100644 --- a/src/libs/antares/study/version.h +++ b/src/libs/antares/study/version.h @@ -29,9 +29,7 @@ #include -namespace Antares -{ -namespace Data +namespace Antares::Data { /*! ** \brief Version of a study @@ -110,7 +108,7 @@ class StudyVersion { public: [[nodiscard]] bool isStudyLatestVersion(std::string studyFolder) const; }; -} // namespace Data -} // namespace Antares +} // namespace Antares::Data + #endif // __ANTARES_LIBS_STUDY_VERSION_H__ diff --git a/src/libs/antares/writer/CMakeLists.txt b/src/libs/antares/writer/CMakeLists.txt index 6895ef5590..f3ecc9076a 100644 --- a/src/libs/antares/writer/CMakeLists.txt +++ b/src/libs/antares/writer/CMakeLists.txt @@ -29,11 +29,11 @@ target_include_directories(result_writer target_link_libraries(result_writer PRIVATE + Antares::benchmarking yuni-static-core MINIZIP::minizip logs inifile - benchmarking io ) diff --git a/src/libs/antares/writer/antares/writer/writer_factory.h b/src/libs/antares/writer/antares/writer/writer_factory.h index 50e414e89b..2d728d7766 100644 --- a/src/libs/antares/writer/antares/writer/writer_factory.h +++ b/src/libs/antares/writer/antares/writer/writer_factory.h @@ -5,7 +5,7 @@ #include "i_writer.h" #include "result_format.h" -#include +#include namespace Antares::Solver { diff --git a/src/libs/antares/writer/private/zip_writer.h b/src/libs/antares/writer/private/zip_writer.h index cadc031625..cc4c06ce92 100644 --- a/src/libs/antares/writer/private/zip_writer.h +++ b/src/libs/antares/writer/private/zip_writer.h @@ -8,7 +8,7 @@ #include #include "antares/writer/i_writer.h" -#include +#include namespace Antares::Solver diff --git a/src/libs/antares/writer/writer_factory.cpp b/src/libs/antares/writer/writer_factory.cpp index 66ed04d6de..568c9ff87c 100644 --- a/src/libs/antares/writer/writer_factory.cpp +++ b/src/libs/antares/writer/writer_factory.cpp @@ -2,9 +2,7 @@ #include "private/immediate_file_writer.h" #include "private/zip_writer.h" -namespace Antares -{ -namespace Solver +namespace Antares::Solver { IResultWriter::Ptr resultWriterFactory(Antares::Data::ResultFormat fmt, const YString& folderOutput, @@ -21,5 +19,5 @@ IResultWriter::Ptr resultWriterFactory(Antares::Data::ResultFormat fmt, return std::make_shared(folderOutput.c_str()); } } -} // namespace Solver -} // namespace Antares +} // namespace Antares::Solver + diff --git a/src/libs/antares/writer/zip_writer.cpp b/src/libs/antares/writer/zip_writer.cpp index 014698b1ff..0b158b5b1a 100644 --- a/src/libs/antares/writer/zip_writer.cpp +++ b/src/libs/antares/writer/zip_writer.cpp @@ -2,7 +2,9 @@ #include // Yuni::IO::File::LoadFromFile #include "private/zip_writer.h" +#include "antares/logs/logs.h" #include +#include extern "C" { diff --git a/src/solver/application.cpp b/src/solver/application.cpp index 9dfcb340a5..c80853eee7 100644 --- a/src/solver/application.cpp +++ b/src/solver/application.cpp @@ -18,6 +18,7 @@ #include "utils/ortools_utils.h" #include "../config.h" +#include #include #include @@ -39,9 +40,7 @@ void printSolvers() } } // namespace -namespace Antares -{ -namespace Solver +namespace Antares::Solver { Application::Application() { @@ -460,5 +459,5 @@ Application::~Application() LocalPolicy::Close(); } } -} // namespace Solver -} // namespace Antares +} // namespace Antares::Solver + diff --git a/src/solver/application.h b/src/solver/application.h index 40caaff1a9..63afd975aa 100644 --- a/src/solver/application.h +++ b/src/solver/application.h @@ -3,7 +3,7 @@ #include "misc/options.h" #include #include -#include +#include #include #include "simulation/simulation.h" diff --git a/src/solver/main/adequacy.cpp b/src/solver/main/adequacy.cpp index 785c7b7a88..8004d634ab 100644 --- a/src/solver/main/adequacy.cpp +++ b/src/solver/main/adequacy.cpp @@ -28,7 +28,7 @@ #include "../application.h" #include "../simulation/solver.h" #include "../simulation/adequacy.h" -#include +#include #include namespace Antares diff --git a/src/solver/main/economy.cpp b/src/solver/main/economy.cpp index 3bc27c90b8..23c638d087 100644 --- a/src/solver/main/economy.cpp +++ b/src/solver/main/economy.cpp @@ -28,7 +28,7 @@ #include "../application.h" #include "../simulation/solver.h" #include "../simulation/economy.h" -#include +#include #include namespace Antares diff --git a/src/solver/simulation/solver.h b/src/solver/simulation/solver.h index 7b1e217477..abb1b947d8 100644 --- a/src/solver/simulation/solver.h +++ b/src/solver/simulation/solver.h @@ -30,7 +30,7 @@ #include #include #include // PowerFluctuations -#include +#include #include #include diff --git a/src/solver/ts-generator/hydro.cpp b/src/solver/ts-generator/hydro.cpp index 174a0f38c4..cb458bb4ad 100644 --- a/src/solver/ts-generator/hydro.cpp +++ b/src/solver/ts-generator/hydro.cpp @@ -28,7 +28,7 @@ #include #include "../simulation/sim_extern_variables_globales.h" #include "../aleatoire/alea_fonctions.h" -#include +#include #include #include #include "../misc/cholesky.h" From 9f402eea65fba027b1efe65a0c42503474a68a9f Mon Sep 17 00:00:00 2001 From: Jason Marechal Date: Tue, 22 Aug 2023 15:11:39 +0200 Subject: [PATCH 35/52] Move OptimizationInfo in proper place --- .../include/antares/benchmarking/DurationCollector.h | 10 ---------- .../include/antares/benchmarking/StudyInfoCollector.h | 8 +++++++- src/solver/application.h | 9 ++++----- src/solver/simulation/adequacy.h | 1 + src/solver/simulation/economy.h | 1 + 5 files changed, 13 insertions(+), 16 deletions(-) diff --git a/src/libs/antares/benchmarking/include/antares/benchmarking/DurationCollector.h b/src/libs/antares/benchmarking/include/antares/benchmarking/DurationCollector.h index 85537e8792..511cfb554e 100644 --- a/src/libs/antares/benchmarking/include/antares/benchmarking/DurationCollector.h +++ b/src/libs/antares/benchmarking/include/antares/benchmarking/DurationCollector.h @@ -9,16 +9,6 @@ namespace Benchmarking { -struct OptimizationInfo -{ - unsigned int nbVariables = 0; - unsigned int nbConstraints = 0; - unsigned int nbNonZeroCoeffs = 0; -}; - -/* - === Info collectors === -*/ class IDurationCollector { diff --git a/src/libs/antares/benchmarking/include/antares/benchmarking/StudyInfoCollector.h b/src/libs/antares/benchmarking/include/antares/benchmarking/StudyInfoCollector.h index e419398df4..bb3b1f1df8 100644 --- a/src/libs/antares/benchmarking/include/antares/benchmarking/StudyInfoCollector.h +++ b/src/libs/antares/benchmarking/include/antares/benchmarking/StudyInfoCollector.h @@ -35,7 +35,13 @@ class StudyInfoCollector const Antares::Data::Study& study_; }; -class OptimizationInfo; + +struct OptimizationInfo +{ + unsigned int nbVariables = 0; + unsigned int nbConstraints = 0; + unsigned int nbNonZeroCoeffs = 0; +}; class SimulationInfoCollector { diff --git a/src/solver/application.h b/src/solver/application.h index 63afd975aa..3b5018c1d4 100644 --- a/src/solver/application.h +++ b/src/solver/application.h @@ -6,14 +6,13 @@ #include #include #include "simulation/simulation.h" +#include "antares/benchmarking/StudyInfoCollector.h" #include #include -namespace Antares -{ -namespace Solver +namespace Antares::Solver { class Application : public Yuni::IEventObserver { @@ -96,5 +95,5 @@ class Application : public Yuni::IEventObserver Date: Tue, 22 Aug 2023 15:53:10 +0200 Subject: [PATCH 36/52] Split SimulationInfoCollection from Benchmarking --- src/libs/antares/CMakeLists.txt | 1 + .../antares/InfoCollection/CMakeLists.txt | 35 +++++++++++++++++++ .../StudyInfoCollector.cpp | 3 +- .../infoCollection}/StudyInfoCollector.h | 0 src/libs/antares/benchmarking/CMakeLists.txt | 12 ------- .../benchmarking/DurationCollector.cpp | 4 +-- src/solver/CMakeLists.txt | 3 +- src/solver/application.cpp | 2 +- src/solver/application.h | 2 +- src/solver/main/CMakeLists.txt | 12 +++++-- src/solver/simulation/CMakeLists.txt | 9 +++-- src/solver/simulation/adequacy.h | 2 +- src/solver/simulation/economy.h | 2 +- src/tests/end-to-end/utils/CMakeLists.txt | 1 + 14 files changed, 59 insertions(+), 29 deletions(-) create mode 100644 src/libs/antares/InfoCollection/CMakeLists.txt rename src/libs/antares/{benchmarking => InfoCollection}/StudyInfoCollector.cpp (98%) rename src/libs/antares/{benchmarking/include/antares/benchmarking => InfoCollection/include/antares/infoCollection}/StudyInfoCollector.h (100%) diff --git a/src/libs/antares/CMakeLists.txt b/src/libs/antares/CMakeLists.txt index 399b8b2f4a..58ea6f7e82 100644 --- a/src/libs/antares/CMakeLists.txt +++ b/src/libs/antares/CMakeLists.txt @@ -331,6 +331,7 @@ set(SRC_XCAST source_group("study\\xcast" FILES ${SRC_XCAST}) add_subdirectory(benchmarking) +add_subdirectory(InfoCollection) add_subdirectory(io) add_subdirectory(exception) diff --git a/src/libs/antares/InfoCollection/CMakeLists.txt b/src/libs/antares/InfoCollection/CMakeLists.txt new file mode 100644 index 0000000000..ad9266c1ec --- /dev/null +++ b/src/libs/antares/InfoCollection/CMakeLists.txt @@ -0,0 +1,35 @@ +set(PROJ infoCollection) +set(HEADERS + include/antares/${PROJ}/StudyInfoCollector.h +) +set(SRC_PROJ + ${HEADERS} + StudyInfoCollector.cpp +) +source_group("misc\\${PROJ}" FILES ${SRC_PROJ}) + +add_library(${PROJ} ${SRC_PROJ}) +add_library(Antares::${PROJ} ALIAS ${PROJ}) + +target_link_libraries(${PROJ} + PRIVATE + yuni-static-core + PUBLIC + Antares::benchmarking +) + +target_include_directories(${PROJ} + PUBLIC + ${CMAKE_SOURCE_DIR}/libs #study + ${CMAKE_SOURCE_DIR}/libs/antares/date #parameters -> date + ${CMAKE_SOURCE_DIR}/libs/antares/array #links + ${CMAKE_SOURCE_DIR}/libs/antares/logs #study -> binding constraint -> matrix -> jit + ${CMAKE_SOURCE_DIR}/libs/antares/io #study -> binding constraint -> matrix + ${CMAKE_SOURCE_DIR}/libs/antares/writer #study + ${CMAKE_SOURCE_DIR}/libs/antares/exception #enum -> exception + ${CMAKE_SOURCE_DIR}/libs/antares/jit # something,something -> jit + ${CMAKE_SOURCE_DIR}/libs/antares/memory/include #study -> BC -> link -> memory + ${CMAKE_SOURCE_DIR}/libs/antares/inifile #study -> inifile + PUBLIC + ${CMAKE_CURRENT_SOURCE_DIR}/include +) diff --git a/src/libs/antares/benchmarking/StudyInfoCollector.cpp b/src/libs/antares/InfoCollection/StudyInfoCollector.cpp similarity index 98% rename from src/libs/antares/benchmarking/StudyInfoCollector.cpp rename to src/libs/antares/InfoCollection/StudyInfoCollector.cpp index c9f0700100..05f9894f12 100644 --- a/src/libs/antares/benchmarking/StudyInfoCollector.cpp +++ b/src/libs/antares/InfoCollection/StudyInfoCollector.cpp @@ -2,8 +2,7 @@ // Created by marechaljas on 22/08/23. // -#include "antares/benchmarking/StudyInfoCollector.h" -#include "antares/benchmarking/DurationCollector.h" +#include "antares/infoCollection/StudyInfoCollector.h" #include "antares/benchmarking/DurationCollector.h" #include "antares/benchmarking/file_content.h" #include "../../../config.h" diff --git a/src/libs/antares/benchmarking/include/antares/benchmarking/StudyInfoCollector.h b/src/libs/antares/InfoCollection/include/antares/infoCollection/StudyInfoCollector.h similarity index 100% rename from src/libs/antares/benchmarking/include/antares/benchmarking/StudyInfoCollector.h rename to src/libs/antares/InfoCollection/include/antares/infoCollection/StudyInfoCollector.h diff --git a/src/libs/antares/benchmarking/CMakeLists.txt b/src/libs/antares/benchmarking/CMakeLists.txt index 4f86b8cd1b..965272f9c5 100644 --- a/src/libs/antares/benchmarking/CMakeLists.txt +++ b/src/libs/antares/benchmarking/CMakeLists.txt @@ -5,8 +5,6 @@ set(SRC_BENCHMARKING include/antares/benchmarking/timer.h include/antares/benchmarking/DurationCollector.h file_content.cpp - include/antares/benchmarking/StudyInfoCollector.h - StudyInfoCollector.cpp ) source_group("misc\\benchmarking" FILES ${SRC_BENCHMARKING}) @@ -16,16 +14,6 @@ add_library(benchmarking add_library(Antares::benchmarking ALIAS benchmarking) target_include_directories(benchmarking - PUBLIC - ${CMAKE_SOURCE_DIR}/libs #study - ${CMAKE_SOURCE_DIR}/libs/antares/date #parameters -> date - ${CMAKE_SOURCE_DIR}/libs/antares/array #links - ${CMAKE_SOURCE_DIR}/libs/antares/logs #study -> binding constraint -> matrix -> jit - ${CMAKE_SOURCE_DIR}/libs/antares/io #study -> binding constraint -> matrix - ${CMAKE_SOURCE_DIR}/libs/antares/writer #study - ${CMAKE_SOURCE_DIR}/libs/antares/exception #enum -> exception - ${CMAKE_SOURCE_DIR}/libs/antares/jit # something,something -> jit - ${CMAKE_SOURCE_DIR}/libs/antares/memory/include #study -> BC -> link -> memory PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include ) diff --git a/src/libs/antares/benchmarking/DurationCollector.cpp b/src/libs/antares/benchmarking/DurationCollector.cpp index 6676487dc6..c71331038f 100644 --- a/src/libs/antares/benchmarking/DurationCollector.cpp +++ b/src/libs/antares/benchmarking/DurationCollector.cpp @@ -1,7 +1,5 @@ #include -#include -#include -#include +#include #include "antares/benchmarking/DurationCollector.h" namespace Benchmarking { diff --git a/src/solver/CMakeLists.txt b/src/solver/CMakeLists.txt index 624b75ddc3..cd6e57926f 100644 --- a/src/solver/CMakeLists.txt +++ b/src/solver/CMakeLists.txt @@ -94,8 +94,9 @@ set(ANTARES_SOLVER_LIBS ${ANTARES_SOLVER_LIBS} target_link_libraries(antares-solver PRIVATE ${ANTARES_SOLVER_LIBS} - benchmarking + Antares::benchmarking result_writer + Antares::infoCollection ) target_include_directories(antares-solver diff --git a/src/solver/application.cpp b/src/solver/application.cpp index c80853eee7..771c4489e8 100644 --- a/src/solver/application.cpp +++ b/src/solver/application.cpp @@ -18,7 +18,7 @@ #include "utils/ortools_utils.h" #include "../config.h" -#include +#include #include #include diff --git a/src/solver/application.h b/src/solver/application.h index 3b5018c1d4..c436db36f6 100644 --- a/src/solver/application.h +++ b/src/solver/application.h @@ -6,7 +6,7 @@ #include #include #include "simulation/simulation.h" -#include "antares/benchmarking/StudyInfoCollector.h" +#include "antares/infoCollection/StudyInfoCollector.h" #include diff --git a/src/solver/main/CMakeLists.txt b/src/solver/main/CMakeLists.txt index 68e2c804b5..56d046720b 100644 --- a/src/solver/main/CMakeLists.txt +++ b/src/solver/main/CMakeLists.txt @@ -9,7 +9,15 @@ set(SRC_SOLVER_MAIN_ADEQUACY adequacy.cpp) add_library(libantares-solver-main-adequacy ${SRC_SOLVER_MAIN_ADEQUACY}) -target_link_libraries(libantares-solver-main-adequacy PRIVATE libantares-core) +target_link_libraries(libantares-solver-main-adequacy + PRIVATE + libantares-core + Antares::infoCollection +) add_library(libantares-solver-main-economy ${SRC_SOLVER_MAIN_ECONOMY}) -target_link_libraries(libantares-solver-main-economy PRIVATE libantares-core) +target_link_libraries(libantares-solver-main-economy + PRIVATE + libantares-core + Antares::infoCollection +) diff --git a/src/solver/simulation/CMakeLists.txt b/src/solver/simulation/CMakeLists.txt index 0f446ad521..40433de159 100644 --- a/src/solver/simulation/CMakeLists.txt +++ b/src/solver/simulation/CMakeLists.txt @@ -48,10 +48,6 @@ set(SRC_SIMULATION BindingConstraintsTimeSeriesNumbersWriter.h) source_group("simulation" FILES ${SRC_SIMULATION}) - - - - # # --- Library VARIABLES --- # @@ -61,4 +57,7 @@ add_library(libantares-solver-simulation target_include_directories(libantares-solver-simulation PUBLIC ${CMAKE_SOURCE_DIR}/solver/simulation) -target_link_libraries(libantares-solver-simulation PRIVATE libantares-core) +target_link_libraries(libantares-solver-simulation PRIVATE + libantares-core + Antares::infoCollection +) diff --git a/src/solver/simulation/adequacy.h b/src/solver/simulation/adequacy.h index eae3c07f94..ab292fdfdd 100644 --- a/src/solver/simulation/adequacy.h +++ b/src/solver/simulation/adequacy.h @@ -34,7 +34,7 @@ #include "common-eco-adq.h" #include "solver.h" // for definition of type yearRandomNumbers -#include "antares/benchmarking/StudyInfoCollector.h" +#include "antares/infoCollection/StudyInfoCollector.h" namespace Antares::Solver::Simulation { diff --git a/src/solver/simulation/economy.h b/src/solver/simulation/economy.h index 789e94fdc9..818c991c53 100644 --- a/src/solver/simulation/economy.h +++ b/src/solver/simulation/economy.h @@ -35,7 +35,7 @@ #include "base_post_process.h" #include "solver.h" // for definition of type yearRandomNumbers -#include "antares/benchmarking/StudyInfoCollector.h" +#include "antares/infoCollection/StudyInfoCollector.h" namespace Antares::Solver::Simulation { diff --git a/src/tests/end-to-end/utils/CMakeLists.txt b/src/tests/end-to-end/utils/CMakeLists.txt index 3e8cf560e2..e15182d04d 100644 --- a/src/tests/end-to-end/utils/CMakeLists.txt +++ b/src/tests/end-to-end/utils/CMakeLists.txt @@ -9,6 +9,7 @@ target_link_libraries(test_utils libantares-solver-simulation PUBLIC ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY} + Antares::infoCollection ) target_include_directories(test_utils From 0ca7bb9186bf857a9d1a91d9fc776293afd7fd39 Mon Sep 17 00:00:00 2001 From: Jason Marechal Date: Wed, 23 Aug 2023 15:17:24 +0200 Subject: [PATCH 37/52] Split study in CMakefile --- src/analyzer/atsp/atsp.h | 2 +- src/analyzer/main.cpp | 2 +- src/libs/antares/CMakeLists.txt | 439 +---------------- src/libs/antares/Enum.hxx | 12 +- .../antares/InfoCollection/CMakeLists.txt | 1 + src/libs/antares/array/CMakeLists.txt | 1 + src/libs/antares/checks/CMakeLists.txt | 1 + src/libs/antares/correlation/CMakeLists.txt | 2 + src/libs/antares/date/CMakeLists.txt | 4 +- src/libs/antares/date/antares/date/date.h | 86 ++-- src/libs/antares/date/date.cpp | 52 +- src/libs/antares/exception/CMakeLists.txt | 3 +- .../antares/mersenne-twister/CMakeLists.txt | 20 + .../mersenne-twister}/mersenne-twister.h | 0 .../mersenne-twister}/mersenne-twister.hxx | 0 .../mersenne-twister/mersenne-twister.cpp | 2 +- src/libs/antares/paths/CMakeLists.txt | 20 + .../paths/{ => include/antares/paths}/list.h | 2 +- src/libs/antares/paths/list.cpp | 4 +- src/libs/antares/stdcxx/CMakeLists.txt | 21 + .../{ => include/antares/stdcxx}/demangle.hpp | 0 src/libs/antares/study.h | 32 -- src/libs/antares/study/CMakeLists.txt | 446 ++++++++++++++++++ .../study/UnfeasibleProblemBehavior.cpp | 7 +- .../handler/antares-study/area/create.cpp | 18 +- .../antares-study/constraint/create.cpp | 2 +- .../handler/antares-study/link/create.cpp | 2 +- src/libs/antares/study/area/area.hxx | 2 +- .../study/area/store-timeseries-numbers.cpp | 11 +- .../binding_constraint/BindingConstraint.hxx | 2 +- .../BindingConstraintsRepository.cpp | 14 +- .../BindingConstraintsRepository.hxx | 2 +- src/libs/antares/study/cleaner.h | 10 +- src/libs/antares/study/cleaner/cleaner.cpp | 12 +- src/libs/antares/study/load.cpp | 6 +- src/libs/antares/study/parameters.h | 2 +- .../study/parameters/adq-patch-params.cpp | 10 +- .../study/parameters/adq-patch-params.h | 8 +- .../antares/study/parts/common/cluster.cpp | 10 +- .../study/parts/common/cluster_list.cpp | 2 +- .../antares/study/parts/renewable/cluster.cpp | 2 +- .../parts/short-term-storage/cluster.cpp | 2 +- .../antares/study/parts/thermal/cluster.cpp | 2 +- src/libs/antares/study/runtime/runtime.cpp | 6 +- src/libs/antares/study/runtime/runtime.h | 2 +- src/libs/antares/study/study.cpp | 11 +- .../antares/study/variable-print-info.cpp | 2 +- src/libs/antares/utils/CMakeLists.txt | 20 + .../{ => utils/include/antares/utils}/utils.h | 0 .../include/antares/utils}/utils.hxx | 2 +- src/libs/antares/{ => utils}/utils.cpp | 2 +- src/libs/antares/writer/CMakeLists.txt | 5 +- src/solver/application.h | 2 +- src/solver/constraints-builder/cbuilder.h | 2 +- src/solver/constraints-builder/grid.h | 2 +- ...n_matrice_des_contraintes_cas_lineaire.cpp | 2 +- .../optimisation/opt_export_structure.h | 2 +- ...opt_gestion_second_membre_cas_lineaire.cpp | 2 +- ..._gestion_second_membre_couts_demarrage.cpp | 2 +- src/solver/signal-handling/common.cpp | 2 +- src/solver/simulation/apply-scenario.h | 2 +- .../simulation/sim_alloc_probleme_hebdo.cpp | 2 +- .../simulation/sim_calcul_economique.cpp | 2 +- src/solver/simulation/solver.h | 2 +- src/solver/simulation/timeseries-numbers.h | 2 +- src/solver/ts-generator/thermal.cpp | 2 +- src/solver/ts-generator/xcast/core.cpp | 2 +- src/solver/ts-generator/xcast/gamma-euler.cpp | 2 +- src/solver/ts-generator/xcast/gamma-inc.cpp | 2 +- src/solver/ts-generator/xcast/math.hxx | 2 +- src/solver/ts-generator/xcast/studydata.cpp | 2 +- src/solver/ts-generator/xcast/xcast.cpp | 2 +- src/solver/utils/mps_utils.cpp | 4 +- src/solver/variable/economy/max-mrg.cpp | 2 +- .../economy/thermalAirPollutantEmissions.h | 2 +- src/solver/variable/endoflist.h | 2 +- src/solver/variable/setofareas.h | 2 +- src/solver/variable/state.cpp | 2 +- src/solver/variable/storage/averagedata.h | 2 +- src/solver/variable/storage/intermediate.cpp | 2 +- src/solver/variable/storage/intermediate.h | 2 +- src/solver/variable/storage/minmax-data.h | 2 +- src/solver/variable/storage/rawdata.h | 2 +- src/solver/variable/storage/results.h | 2 +- src/solver/variable/surveyresults/data.h | 2 +- .../variable/surveyresults/surveyresults.h | 14 +- src/tests/resources/Antares_Simulator_Tests | 2 +- .../study/constraint/test_constraint.cpp | 2 +- src/tests/src/libs/antares/test_utils.cpp | 2 +- .../solver/simulation/test-time_series.cpp | 2 +- src/tools/cleaner/main.cpp | 2 +- src/tools/finder/main.cpp | 2 +- src/tools/kirchhoff-cbuilder/main.cpp | 4 +- src/tools/updater/main.cpp | 2 +- src/tools/yby-aggregator/main.cpp | 2 +- src/ui/simulator/application/main/create.cpp | 2 +- src/ui/simulator/application/main/main.cpp | 2 +- src/ui/simulator/application/main/main.h | 2 +- src/ui/simulator/application/recentfiles.cpp | 2 +- src/ui/simulator/application/study.cpp | 12 +- src/ui/simulator/application/study.h | 2 +- .../datagrid/renderer/analyzer/areas.cpp | 2 +- .../datagrid/renderer/analyzer/areas.h | 2 +- .../renderer/area/nodal-optimization.h | 2 +- .../datagrid/renderer/area/xcast-allareas.h | 2 +- .../renderer/bindingconstraint/data.cpp | 2 +- .../renderer/bindingconstraint/offsets.cpp | 2 +- .../renderer/bindingconstraint/weights.cpp | 2 +- .../renderer/constraintsbuilder/links.cpp | 2 +- .../renderer/constraintsbuilder/links.h | 2 +- .../datagrid/renderer/correlation.h | 2 +- .../htmllistbox/datasource/cluster-order.h | 2 +- .../components/htmllistbox/item/area.h | 2 +- .../htmllistbox/item/cluster-item.h | 2 +- .../toolbox/components/map/component.h | 2 +- .../toolbox/components/map/manager.cpp | 2 +- .../toolbox/components/map/manager.h | 2 +- .../toolbox/components/map/nodes/node.h | 2 +- src/ui/simulator/toolbox/ext-source/apply.h | 2 +- .../simulator/toolbox/ext-source/performer.h | 2 +- src/ui/simulator/toolbox/ext-source/window.h | 2 +- src/ui/simulator/toolbox/input/connection.cpp | 2 +- src/ui/simulator/toolbox/input/connection.h | 2 +- .../toolbox/input/renewable-cluster.h | 2 +- .../simulator/toolbox/input/thermal-cluster.h | 2 +- src/ui/simulator/toolbox/spotlight/area.h | 2 +- .../simulator/toolbox/spotlight/constraint.h | 2 +- .../windows/bindingconstraint/edit.cpp | 2 +- .../windows/correlation/correlation.h | 2 +- src/ui/simulator/windows/exportmap.h | 2 +- src/ui/simulator/windows/inspector/data.h | 2 +- src/ui/simulator/windows/inspector/frame.h | 2 +- src/ui/simulator/windows/inspector/grid.h | 2 +- .../memorystatistics/memorystatistics.cpp | 2 +- src/ui/simulator/windows/notes.cpp | 2 +- src/ui/simulator/windows/output/job.cpp | 2 +- src/ui/simulator/windows/saveas.h | 2 +- src/ui/simulator/windows/sets.cpp | 2 +- src/ui/simulator/windows/simulation/run.h | 2 +- src/ui/simulator/windows/studylogs.h | 2 +- src/ui/simulator/windows/textinput/input.cpp | 12 +- src/ui/simulator/windows/xcast/xcast.h | 2 +- 142 files changed, 781 insertions(+), 763 deletions(-) create mode 100644 src/libs/antares/mersenne-twister/CMakeLists.txt rename src/libs/antares/mersenne-twister/{ => include/antares/mersenne-twister}/mersenne-twister.h (100%) rename src/libs/antares/mersenne-twister/{ => include/antares/mersenne-twister}/mersenne-twister.hxx (100%) create mode 100644 src/libs/antares/paths/CMakeLists.txt rename src/libs/antares/paths/{ => include/antares/paths}/list.h (99%) create mode 100644 src/libs/antares/stdcxx/CMakeLists.txt rename src/libs/antares/stdcxx/{ => include/antares/stdcxx}/demangle.hpp (100%) delete mode 100644 src/libs/antares/study.h create mode 100644 src/libs/antares/study/CMakeLists.txt create mode 100644 src/libs/antares/utils/CMakeLists.txt rename src/libs/antares/{ => utils/include/antares/utils}/utils.h (100%) rename src/libs/antares/{ => utils/include/antares/utils}/utils.hxx (99%) rename src/libs/antares/{ => utils}/utils.cpp (98%) diff --git a/src/analyzer/atsp/atsp.h b/src/analyzer/atsp/atsp.h index db7c4d0bc9..e7ff1e5dc4 100644 --- a/src/analyzer/atsp/atsp.h +++ b/src/analyzer/atsp/atsp.h @@ -31,7 +31,7 @@ #include #include #include -#include +#include namespace Antares { diff --git a/src/analyzer/main.cpp b/src/analyzer/main.cpp index 6724951374..64c841e5c2 100644 --- a/src/analyzer/main.cpp +++ b/src/analyzer/main.cpp @@ -29,7 +29,7 @@ #include #include #include "../ui/common/winmain.hxx" -#include +#include #include #include #include "atsp/atsp.h" diff --git a/src/libs/antares/CMakeLists.txt b/src/libs/antares/CMakeLists.txt index 58ea6f7e82..c0c05de57c 100644 --- a/src/libs/antares/CMakeLists.txt +++ b/src/libs/antares/CMakeLists.txt @@ -9,339 +9,16 @@ add_subdirectory(object) add_subdirectory(array) add_subdirectory(correlation) -set(SRC_STUDY_SCENARIO_BUILDER - study/scenario-builder/scBuilderDataInterface.h - study/scenario-builder/TSnumberData.h - study/scenario-builder/TSnumberData.cpp - study/scenario-builder/hydroLevelsData.h - study/scenario-builder/hydroLevelsData.cpp - study/scenario-builder/rules.h - study/scenario-builder/rules.hxx - study/scenario-builder/rules.cpp - study/scenario-builder/sets.h - study/scenario-builder/sets.hxx - study/scenario-builder/sets.cpp - study/scenario-builder/updater.hxx - study/scenario-builder/scBuilderUtils.h - study/scenario-builder/scBuilderUtils.cpp - study/scenario-builder/BindingConstraintsTSNumbersData.cpp - study/scenario-builder/NTCTSNumberData.cpp - study/scenario-builder/NTCTSNumberData.h - study/scenario-builder/BindingConstraintsTSNumbersData.h - study/scenario-builder/RenewableTSNumberData.h - study/scenario-builder/RenewableTSNumberData.cpp - study/scenario-builder/ThermalTSNumberData.cpp - study/scenario-builder/ThermalTSNumberData.h - study/scenario-builder/HydroTSNumberData.h - study/scenario-builder/HydroTSNumberData.cpp - study/scenario-builder/SolarTSNumberData.cpp - study/scenario-builder/solarTSNumberData.h - study/scenario-builder/WindTSNumberData.h - study/scenario-builder/WindTSNumberData.cpp - study/scenario-builder/LoadTSNumberData.h - study/scenario-builder/LoadTSNumberData.cpp - study/scenario-builder/applyToMatrix.hxx -) -source_group("study\\scenario builder" FILES ${SRC_MATRIX}) - -set(SRC_STUDY_ACTIONS - study/action/fwd.h - study/action/action.h - study/action/action.hxx - study/action/action.cpp - study/action/text.h - study/action/text.hxx - study/action/settings/suffix-for-area-names.h - study/action/settings/suffix-for-area-names.hxx - study/action/settings/suffix-for-area-names.cpp - study/action/settings/suffix-for-cluster-names.h - study/action/settings/suffix-for-cluster-names.hxx - study/action/settings/suffix-for-cluster-names.cpp - study/action/settings/suffix-for-constraint-names.h - study/action/settings/suffix-for-constraint-names.hxx - study/action/settings/suffix-for-constraint-names.cpp - study/action/settings/decal-area-position.h - study/action/settings/decal-area-position.hxx - study/action/settings/decal-area-position.cpp - study/action/behavior.h - study/action/behavior.cpp - study/action/state.h - study/action/state.cpp - study/action/context.h - study/action/context.cpp) -source_group("study\\actions" FILES ${SRC_STUDY_ACTIONS}) - -set(SRC_STUDY_ACTIONS_HANDLER_ANTARES_STUDY_AREA - study/action/handler/antares-study/area/create.h - study/action/handler/antares-study/area/create.hxx - study/action/handler/antares-study/area/create.cpp - study/action/handler/antares-study/area/position.h - study/action/handler/antares-study/area/position.cpp - study/action/handler/antares-study/area/filtering.h - study/action/handler/antares-study/area/filtering.cpp - study/action/handler/antares-study/area/color.h - study/action/handler/antares-study/area/color.cpp - study/action/handler/antares-study/area/nodal-optimization.h - study/action/handler/antares-study/area/nodal-optimization.cpp - study/action/handler/antares-study/area/reserves.h - study/action/handler/antares-study/area/reserves.cpp - study/action/handler/antares-study/area/misc-gen.h - study/action/handler/antares-study/area/misc-gen.cpp - study/action/handler/antares-study/area/timeseries.h - study/action/handler/antares-study/area/timeseries.cpp - study/action/handler/antares-study/area/ts-generator.h - study/action/handler/antares-study/area/ts-generator.cpp - study/action/handler/antares-study/area/ts-node.h - study/action/handler/antares-study/area/ts-node.hxx - study/action/handler/antares-study/area/ts-node.cpp - study/action/handler/antares-study/area/correlation.h - study/action/handler/antares-study/area/correlation.cpp - study/action/handler/antares-study/area/correlation-post.h - study/action/handler/antares-study/area/correlation-post.hxx - study/action/handler/antares-study/area/correlation-post.cpp - - study/action/handler/antares-study/area/allocation-hydro.h - study/action/handler/antares-study/area/allocation-hydro.cpp - study/action/handler/antares-study/area/allocation-hydro-post.h - study/action/handler/antares-study/area/allocation-hydro-post.hxx - study/action/handler/antares-study/area/allocation-hydro-post.cpp) -source_group("study\\actions\\handler\\antares study\\area" FILES ${SRC_STUDY_ACTIONS_HANDLER_ANTARES_STUDY_AREA}) - -set(SRC_STUDY_ACTIONS_HANDLER_ANTARES_STUDY_LINK - study/action/handler/antares-study/link/create.h - study/action/handler/antares-study/link/create.hxx - study/action/handler/antares-study/link/create.cpp - study/action/handler/antares-study/link/ntc.h - study/action/handler/antares-study/link/ntc.cpp - study/action/handler/antares-study/link/hurdles-cost.h - study/action/handler/antares-study/link/hurdles-cost.cpp - study/action/handler/antares-study/link/impedances.h - study/action/handler/antares-study/link/impedances.cpp - study/action/handler/antares-study/link/comments.h - study/action/handler/antares-study/link/comments.hxx - study/action/handler/antares-study/link/comments.cpp - study/action/handler/antares-study/link/copper-plate.h - study/action/handler/antares-study/link/copper-plate.cpp - study/action/handler/antares-study/link/filtering.h - study/action/handler/antares-study/link/filtering.cpp - study/action/handler/antares-study/link/unload-data.h - study/action/handler/antares-study/link/unload-data.hxx - study/action/handler/antares-study/link/unload-data.cpp) -source_group("study\\actions\\handler\\antares study\\link" FILES ${SRC_STUDY_ACTIONS_HANDLER_ANTARES_STUDY_LINK}) - -set(SRC_STUDY_ACTIONS_HANDLER_ANTARES_STUDY_THERMAL - study/action/handler/antares-study/thermal-cluster/create.h - study/action/handler/antares-study/thermal-cluster/create.hxx - study/action/handler/antares-study/thermal-cluster/create.cpp - study/action/handler/antares-study/thermal-cluster/root-node.h - study/action/handler/antares-study/thermal-cluster/root-node.hxx - study/action/handler/antares-study/thermal-cluster/root-node.cpp - study/action/handler/antares-study/thermal-cluster/common.h - study/action/handler/antares-study/thermal-cluster/common.cpp - ) -source_group("study\\action\\handler\\sntares study\\thermal cluster" FILES ${SRC_STUDY_ACTIONS_HANDLER_ANTARES_STUDY_THERMAL}) - - -set(SRC_STUDY_ACTIONS_HANDLER_ANTARES_STUDY_CONSTRAINT - study/action/handler/antares-study/constraint/create.h - study/action/handler/antares-study/constraint/create.hxx - study/action/handler/antares-study/constraint/create.cpp - study/action/handler/antares-study/constraint/comments.h - study/action/handler/antares-study/constraint/comments.hxx - study/action/handler/antares-study/constraint/comments.cpp - study/action/handler/antares-study/constraint/data.h - study/action/handler/antares-study/constraint/data.hxx - study/action/handler/antares-study/constraint/data.cpp - study/action/handler/antares-study/constraint/weights.h - study/action/handler/antares-study/constraint/weights.cpp - study/action/handler/antares-study/constraint/offsets.h - study/action/handler/antares-study/constraint/offsets.cpp - study/action/handler/antares-study/constraint/enabled.h - study/action/handler/antares-study/constraint/enabled.hxx - study/action/handler/antares-study/constraint/enabled.cpp - ) -source_group("study\\action\\handler\\antares study\\constraint" FILES ${SRC_STUDY_ACTIONS_HANDLER_ANTARES_STUDY_CONSTRAINT}) - - -set(SRC_AREAS - study/area.h - study/area/constants.h - study/area/area.h - study/area/area.hxx - study/area/scratchpad.h - study/area/scratchpad.cpp - study/area/area.cpp - study/area/links.cpp - study/area/links.h - study/area/store-timeseries-numbers.cpp - study/area/store-timeseries-numbers.h - study/area/store-timeseries-numbers.hxx - study/area/list.cpp - ) -source_group("study\\area" FILES ${SRC_AREAS}) - - -set(SRC_STUDY_AREA_UI - study/area/ui.h - study/area/ui.cpp - ) -source_group("study\\area\\ui" FILES ${SRC_STUDY_AREA_UI}) - - -set(SRC_STUDY_PART_COMMON - study/parts/common/series.h - study/parts/common/series.hxx - study/parts/common/series.cpp - study/parts/common/cluster.cpp - study/parts/common/cluster.h - study/parts/common/cluster_list.h - study/parts/common/cluster_list.cpp - ) -source_group("study\\part\\common" FILES ${SRC_STUDY_PART_COMMON}) - -set(SRC_STUDY_PART_THERMAL - study/parts/thermal/container.h - study/parts/thermal/container.hxx - study/parts/thermal/container.cpp - study/parts/thermal/prepro.h - study/parts/thermal/prepro.hxx - study/parts/thermal/prepro.cpp - study/parts/thermal/ecoInput.h - study/parts/thermal/ecoInput.cpp - study/parts/thermal/cluster.h - study/parts/thermal/cluster.hxx - study/parts/thermal/cluster.cpp - study/parts/thermal/cluster_list.h - study/parts/thermal/cluster_list.cpp - study/parts/thermal/pollutant.h - study/parts/thermal/pollutant.cpp - ) -source_group("study\\part\\thermal" FILES ${SRC_STUDY_PART_THERMAL}) - -set(SRC_STUDY_PART_RENEWABLE - study/parts/renewable/container.h - study/parts/renewable/container.hxx - study/parts/renewable/container.cpp - study/parts/renewable/cluster.h - study/parts/renewable/cluster.cpp - study/parts/renewable/cluster_list.h - study/parts/renewable/cluster_list.cpp - ) -source_group("study\\part\\renewable" FILES ${SRC_STUDY_PART_RENEWABLE}) - -set(SRC_STUDY_PART_SHORT_TERM_STORAGE - study/parts/short-term-storage/container.h - study/parts/short-term-storage/container.cpp - study/parts/short-term-storage/properties.h - study/parts/short-term-storage/properties.cpp - study/parts/short-term-storage/series.cpp - study/parts/short-term-storage/series.h - study/parts/short-term-storage/cluster.h - study/parts/short-term-storage/cluster.cpp - study/parts/short-term-storage/STStorageOutputCaptions.h - study/parts/short-term-storage/STStorageOutputCaptions.cpp -) -source_group("study\\part\\short-term-storage" FILES ${SRC_STUDY_PART_SHORT_TERM_SOTRAGE}) - -set(SRC_STUDY_PART_WIND - study/parts/wind/container.h - study/parts/wind/container.cpp - study/parts/wind/series.h - study/parts/wind/series.hxx - study/parts/wind/series.cpp - study/parts/wind/prepro.h - study/parts/wind/prepro.hxx - study/parts/wind/prepro.cpp - ) -source_group("study\\part\\wind" FILES ${SRC_STUDY_PART_WIND}) - -set(SRC_STUDY_PART_HYDRO - study/parts/hydro/container.h - study/parts/hydro/container.cpp - study/parts/hydro/series.h - study/parts/hydro/series.hxx - study/parts/hydro/series.cpp - study/parts/hydro/prepro.h - study/parts/hydro/prepro.cpp - study/parts/hydro/allocation.h - study/parts/hydro/allocation.hxx - study/parts/hydro/allocation.cpp - ) -source_group("study\\part\\hydro" FILES ${SRC_STUDY_PART_HYDRO}) - -set(SRC_STUDY_UI - study/ui-runtimeinfos.h - study/ui-runtimeinfos.cpp - ) -source_group(study\\UI FILES ${SRC_STUDY_UI}) - -set(SRC_STUDY_PARAMETERS - study/parameters.h - study/parameters.cpp - study/parameters/adq-patch-params.h - study/parameters/adq-patch-params.cpp - study/UnfeasibleProblemBehavior.cpp - # TODO JMK : should be in a target_include_directories : but need to remove all .h from all SRC - study/UnfeasibleProblemBehavior.hpp - ) -source_group("study\\general data" FILES ${SRC_STUDY_PARAMETERS}) - - -set(SRC_STUDY_FINDER - study/finder.h - study/finder/finder.cpp - study/finder/finder.h - ) -source_group("study\\finder" FILES ${SRC_STUDY_FINDER}) - - -set(SRC_STUDY_BINDING_CONSTRAINT - study/constraint.h - study/binding_constraint/BindingConstraint.h - study/binding_constraint/BindingConstraint.hxx - study/binding_constraint/BindingConstraint.cpp - study/binding_constraint/BindingConstraintsRepository.h - study/binding_constraint/BindingConstraintsRepository.h - study/binding_constraint/BindingConstraintsRepository.hxx - study/binding_constraint/BindingConstraintsRepository.cpp - study/binding_constraint/BindingConstraintLoader.cpp - study/binding_constraint/BindingConstraintLoader.h - study/binding_constraint/BindingConstraintSaver.cpp - study/binding_constraint/BindingConstraintSaver.h - study/binding_constraint/EnvForLoading.h - study/binding_constraint/BindingConstraintStructures.h - study/binding_constraint/BindingConstraintGroup.cpp - study/binding_constraint/BindingConstraintGroup.h - study/binding_constraint/BindingConstraintGroupRepository.cpp - study/binding_constraint/BindingConstraintGroupRepository.h - ) - -source_group("study\\constraint" FILES ${SRC_STUDY_BINDING_CONSTRAINT}) add_subdirectory(logs) add_subdirectory(jit) add_subdirectory(inifile) -set(SRC_XCAST - study/xcast.h - study/xcast/xcast.h - study/xcast/xcast.hxx - study/xcast/xcast.cpp - ) -source_group("study\\xcast" FILES ${SRC_XCAST}) - add_subdirectory(benchmarking) add_subdirectory(InfoCollection) add_subdirectory(io) add_subdirectory(exception) -set(SRC_STDCXX - stdcxx/demangle.cpp - # TODO : should be in a target_include_directories : but need to remove all .h from all SRC - stdcxx/demangle.hpp - ) -source_group("stdcxx" FILES ${SRC_STDCXX}) - add_subdirectory(sys) set(SRC @@ -369,97 +46,10 @@ set(SRC # Host info hostinfo.h hostinfo.cpp - # files & paths - paths/list.h paths/list.cpp - - # Utils - utils.h utils.hxx utils.cpp - # version version.h version.cpp - # all - study/parts/parts.h - - # Load - study/parts/load/container.h - study/parts/load/container.cpp - study/parts/load/series.h - study/parts/load/series.hxx - study/parts/load/series.cpp - study/parts/load/prepro.cpp - study/parts/load/prepro.h - study/parts/load/prepro.hxx - - # Solar - study/parts/solar/container.h - study/parts/solar/container.cpp - study/parts/solar/series.h - study/parts/solar/series.hxx - study/parts/solar/series.cpp - study/parts/solar/prepro.cpp - study/parts/solar/prepro.h - study/parts/solar/prepro.hxx - - # Study - study/header.h - study/header.hxx - study/header.cpp - study/load-options.h - study/load-options.cpp - study/runtime/runtime.h - study/runtime/runtime.hxx - study/runtime/runtime.cpp - study/runtime.h - study/study.h - study/study.hxx - study/fwd.h - study/fwd.cpp - study.h - study/study.cpp - study/correlation-updater.hxx - study/study.importprepro.cpp - study/importlogs.cpp - study/load.cpp - study/save.cpp - study/study.extra.cpp - study/version.h - study/version.cpp - study/cleaner.h - study/cleaner/cleaner.cpp study/cleaner/versions.h - study/cleaner/cleaner-v20.cpp - study/output.cpp - study/output.h - study/output.hxx - study/layerdata.cpp - study/layerdata.h - - # progression - study/progression/progression.h - study/progression/progression.hxx - study/progression/progression.cpp - - # Simulation - study/simulation.h - study/simulation.cpp - - # Filter - study/filter.h - study/filter.cpp - - mersenne-twister/mersenne-twister.h - mersenne-twister/mersenne-twister.hxx - mersenne-twister/mersenne-twister.cpp - - # Sets - study/sets.h - study/sets.hxx - - # variable selection - study/variable-print-info.h - study/variable-print-info.cpp - # Enum # TODO : should be in a target_include_directories : but need to remove all .h from all SRC Enum.hpp @@ -469,32 +59,17 @@ add_subdirectory(date) add_subdirectory(checks) +add_subdirectory(study) +add_subdirectory(stdcxx) +add_subdirectory(utils) +add_subdirectory(paths) +add_subdirectory(mersenne-twister) + add_library(libantares-core antares.h ${SRC} - ${SRC_AREAS} - ${SRC_XCAST} - ${SRC_STUDY_AREA_UI} - ${SRC_STUDY_ACTIONS} - ${SRC_STUDY_ACTIONS_HANDLER_ANTARES_STUDY_THERMAL} - ${SRC_STUDY_ACTIONS_HANDLER_ANTARES_STUDY_AREA} - ${SRC_STUDY_ACTIONS_HANDLER_ANTARES_STUDY_LINK} - ${SRC_STUDY_ACTIONS_HANDLER_ANTARES_STUDY_CONSTRAINT} - ${SRC_STUDY_UI} - ${SRC_STUDY_PARAMETERS} - ${SRC_STUDY_FINDER} - ${SRC_STUDY_BINDING_CONSTRAINT} - ${SRC_STUDY_PART_WIND} - ${SRC_STUDY_PART_HYDRO} - ${SRC_STUDY_PART_COMMON} - ${SRC_STUDY_PART_THERMAL} - ${SRC_STUDY_PART_RENEWABLE} - ${SRC_STUDY_PART_SHORT_TERM_STORAGE} - ${SRC_STUDY_SCENARIO_BUILDER} - ${SRC_STDCXX} ) - #TODO : needed for include yuni : why yuni must be include first ??? cheat : made it public so everybody will have this include (should be done in yuni) #TODO : needed for include target_include_directories(libantares-core @@ -506,6 +81,7 @@ target_link_libraries(libantares-core PUBLIC yuni-static-core yuni-static-uuid + Antares::study Boost::boost Antares::memory Antares::sys @@ -520,7 +96,6 @@ target_link_libraries(libantares-core array correlation object - benchmarking ) import_std_libs(libantares-core) diff --git a/src/libs/antares/Enum.hxx b/src/libs/antares/Enum.hxx index 9cbb2ecf5a..af78bef493 100644 --- a/src/libs/antares/Enum.hxx +++ b/src/libs/antares/Enum.hxx @@ -36,11 +36,7 @@ #include -namespace Antares -{ -namespace Data -{ -namespace Enum +namespace Antares::Data::Enum { template E fromString(const std::string& name) @@ -81,10 +77,10 @@ std::list enumList() return result; } -} // namespace Enum +} // namespace Antares::Data::Enum + + -} // namespace Data -} // namespace Antares #endif // ANTARES_DATA_ENUM_HXX \ No newline at end of file diff --git a/src/libs/antares/InfoCollection/CMakeLists.txt b/src/libs/antares/InfoCollection/CMakeLists.txt index ad9266c1ec..08daf09625 100644 --- a/src/libs/antares/InfoCollection/CMakeLists.txt +++ b/src/libs/antares/InfoCollection/CMakeLists.txt @@ -16,6 +16,7 @@ target_link_libraries(${PROJ} yuni-static-core PUBLIC Antares::benchmarking + Antares::study ) target_include_directories(${PROJ} diff --git a/src/libs/antares/array/CMakeLists.txt b/src/libs/antares/array/CMakeLists.txt index 8f9f865699..332731259a 100644 --- a/src/libs/antares/array/CMakeLists.txt +++ b/src/libs/antares/array/CMakeLists.txt @@ -7,6 +7,7 @@ set(SRC_MATRIX source_group("array" FILES ${SRC_MATRIX}) add_library(array ${SRC_MATRIX}) +add_library(Antares::array ALIAS array) target_link_libraries(array PRIVATE diff --git a/src/libs/antares/checks/CMakeLists.txt b/src/libs/antares/checks/CMakeLists.txt index 84944773c2..5d9133d4d1 100644 --- a/src/libs/antares/checks/CMakeLists.txt +++ b/src/libs/antares/checks/CMakeLists.txt @@ -28,4 +28,5 @@ target_link_libraries(checks logs yuni-static-core exception + Antares::study # cpp -> area ) \ No newline at end of file diff --git a/src/libs/antares/correlation/CMakeLists.txt b/src/libs/antares/correlation/CMakeLists.txt index deb4226783..5fc2ab1c25 100644 --- a/src/libs/antares/correlation/CMakeLists.txt +++ b/src/libs/antares/correlation/CMakeLists.txt @@ -6,6 +6,7 @@ set(SRC_CORRELATION source_group("correlation" FILES ${SRC_CORRELATION}) add_library(correlation ${SRC_CORRELATION}) +add_library(Antares::correlation ALIAS correlation) target_link_libraries(correlation PRIVATE @@ -14,6 +15,7 @@ target_link_libraries(correlation array PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} + Antares::study #correlation.h -> area.h ) target_include_directories(correlation diff --git a/src/libs/antares/date/CMakeLists.txt b/src/libs/antares/date/CMakeLists.txt index d363d2b58b..3f56483ef1 100644 --- a/src/libs/antares/date/CMakeLists.txt +++ b/src/libs/antares/date/CMakeLists.txt @@ -9,6 +9,7 @@ set(SRC_DATE source_group("misc\\${PROJ}" FILES ${SRC_DATE}) add_library(${PROJ} ${SRC_DATE}) +add_library(Antares::${PROJ} ALIAS ${PROJ}) target_link_libraries(${PROJ} PRIVATE @@ -17,9 +18,6 @@ target_link_libraries(${PROJ} ) target_include_directories(${PROJ} - PRIVATE - ${CMAKE_SOURCE_DIR}/libs/antares/inifile #study/parameters -> inifile - ${CMAKE_SOURCE_DIR}/libs #study/parameters -> fwd PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ) diff --git a/src/libs/antares/date/antares/date/date.h b/src/libs/antares/date/antares/date/date.h index 8d8401c669..4800e4178b 100644 --- a/src/libs/antares/date/antares/date/date.h +++ b/src/libs/antares/date/antares/date/date.h @@ -202,52 +202,6 @@ class Calendar maxWeeksInYear = 54, }; -public: - //!\name Constructor & Destructor - //@{ - /*! - ** \brief Default constructor - */ - Calendar(); - //! Destructor - ~Calendar() - { - } - //@} - - /*! - ** \brief Reset the calendar from the given settings - */ - void reset(); - - /*! - ** \brief Reset the calendar from the given settings - ** - ** Reset the calendar from an instance of the class \p Parameters, - ** \param parameters Simulation settings - */ - void reset(const Data::Parameters& parameters); - - /*! - ** \brief Reset the calendar from the given settings - ** - ** Reset the calendar from an instance of the class \p Parameters, - ** except for the leap year flag, which will be taken - ** from \p leapyear - ** - ** \param parameters Simulation settings - ** \param leapYear Force the value of the leap year - */ - void reset(const Data::Parameters& parameters, bool leapyear); - - /*! - ** \brief Export the whole calendar into a CSV file - ** - ** This method is mainly used for debug purposes - */ - bool saveToCSVFile(const AnyString& filename) const; - -public: //! informations about hours in the year according the current // calendar settings struct @@ -338,7 +292,7 @@ class Calendar } mapping; //! The calendar settings - struct + struct settings { //! Day of the week for the 1rst January DayOfTheWeek weekday1rstJanuary; @@ -348,7 +302,7 @@ class Calendar MonthName firstMonth; //! Leap year ? bool leapYear; - } settings; + }; //! Human string representations for any time interval of our calendar struct @@ -377,6 +331,42 @@ class Calendar std::wstring hours[maxHoursInYear]; } wtext; +public: + //!\name Constructor & Destructor + //@{ + /*! + ** \brief Default constructor + */ + Calendar(); + //! Destructor + ~Calendar() + { + } + //@} + + /*! + ** \brief Reset the calendar from the given settings + */ + void reset(); + + /*! + ** \brief Reset the calendar from the given settings + ** + ** Reset the calendar from an instance of the class \p Parameters, + ** \param parameters Simulation settings + */ + void reset(settings settings); + + /*! + ** \brief Export the whole calendar into a CSV file + ** + ** This method is mainly used for debug purposes + */ + bool saveToCSVFile(const AnyString& filename) const; + +private: + settings settings_; + }; // class Calendar } // namespace Date } // namespace Antares diff --git a/src/libs/antares/date/date.cpp b/src/libs/antares/date/date.cpp index a28a78ba00..f7bd1719dd 100644 --- a/src/libs/antares/date/date.cpp +++ b/src/libs/antares/date/date.cpp @@ -29,8 +29,6 @@ #include #include #include -#include -#include "../study/parameters.h" #include #include @@ -397,34 +395,16 @@ bool Calendar::saveToCSVFile(const AnyString& filename) const Calendar::Calendar() { - settings.weekday1rstJanuary = monday; - settings.firstMonth = january; - settings.leapYear = false; - settings.weekFirstDay = monday; - settings.weekday1rstJanuary = monday; + settings_.weekday1rstJanuary = monday; + settings_.firstMonth = january; + settings_.leapYear = false; + settings_.weekFirstDay = monday; + settings_.weekday1rstJanuary = monday; } -void Calendar::reset(const Data::Parameters& parameters) +void Calendar::reset(settings settings) { - reset(parameters, parameters.leapYear); -} - -void Calendar::reset(const Data::Parameters& parameters, bool leapyear) -{ - // retrieve the new settings - settings.weekday1rstJanuary = parameters.dayOfThe1stJanuary; - settings.firstMonth = parameters.firstMonthInYear; - settings.weekFirstDay = parameters.firstWeekday; - - // We do not retrieve directly the `leapyear` parameters - // A simulation should be made in ignoring this parameter (aka false) - // but the outputs should rely on it (for printing). - // It goes the same for the GUI : since it is _merely_ printing, - // it should be taken into consideration. - // Consequently, we will let the calling code specifying this value - settings.leapYear = leapyear; - - // re-initialize the calendar with the new settings + settings_ = settings; reset(); } @@ -437,9 +417,9 @@ void Calendar::reset() { #ifndef NDEBUG logs.debug() << " reset calendar" - << ", month : " << MonthToString(settings.firstMonth) - << ", january 1rst : " << DayOfTheWeekToString(settings.weekday1rstJanuary) - << ", first weekday : " << DayOfTheWeekToString(settings.weekFirstDay); + << ", month : " << MonthToString(settings_.firstMonth) + << ", january 1rst : " << DayOfTheWeekToString(settings_.weekday1rstJanuary) + << ", first weekday : " << DayOfTheWeekToString(settings_.weekFirstDay); #endif (void)::memset(hours, '\0', sizeof(hours)); @@ -450,7 +430,7 @@ void Calendar::reset() // Reset months relationship for (uint m = 0; m != 12 + 1; ++m) { - uint realmonth = (m + (uint)settings.firstMonth) % 12; + uint realmonth = (m + (uint)settings_.firstMonth) % 12; if (m < 12) mapping.months[realmonth] = m; months[m].days = StandardDaysPerMonths[realmonth]; @@ -463,15 +443,15 @@ void Calendar::reset() } // leap year - if (settings.leapYear) + if (settings_.leapYear) months[mapping.months[february]].days += 1; // looking for the weekday of the first month - auto weekday = settings.weekday1rstJanuary; - if (settings.firstMonth != january) + auto weekday = settings_.weekday1rstJanuary; + if (settings_.firstMonth != january) { // looking for the weekday of the first month of the simulation - for (uint m = 11; m >= (uint)settings.firstMonth; --m) + for (uint m = 11; m >= (uint)settings_.firstMonth; --m) { uint nbdays = (int)months[mapping.months[m]].days; for (uint d = 0; d != nbdays; ++d) @@ -537,7 +517,7 @@ void Calendar::reset() // day of the week rotation weekday = NextDayOfTheWeek(weekday); - if (weekday == settings.weekFirstDay) + if (weekday == settings_.weekFirstDay) { weeks[currentWeek].hours.end = hourYear; weeks[currentWeek].daysYear.end = dayYear; diff --git a/src/libs/antares/exception/CMakeLists.txt b/src/libs/antares/exception/CMakeLists.txt index 26ef19a3dd..823b4acca6 100644 --- a/src/libs/antares/exception/CMakeLists.txt +++ b/src/libs/antares/exception/CMakeLists.txt @@ -8,9 +8,10 @@ set(SRC_PROJ antares/exception/UnfeasibleProblemError.hpp antares/exception/LoadingError.hpp ) -source_group("exception" FILES ${SRC_EXCEPTION}) +source_group("exception" FILES ${SRC_PROJ}) add_library(${PROJ} ${SRC_PROJ}) +add_library(Antares::${PROJ} ALIAS ${PROJ}) target_link_libraries(${PROJ} PRIVATE diff --git a/src/libs/antares/mersenne-twister/CMakeLists.txt b/src/libs/antares/mersenne-twister/CMakeLists.txt new file mode 100644 index 0000000000..a61ba1ac00 --- /dev/null +++ b/src/libs/antares/mersenne-twister/CMakeLists.txt @@ -0,0 +1,20 @@ +set(PROJ mersenne) +set(SRC_PROJ + mersenne-twister.cpp + include/antares/mersenne-twister/mersenne-twister.h + include/antares/mersenne-twister/mersenne-twister.hxx +) +source_group("mersenne-twister" FILES ${SRC_PROJ}) + +add_library(${PROJ} ${SRC_PROJ}) +add_library(Antares::${PROJ} ALIAS ${PROJ}) + +target_link_libraries(${PROJ} + PRIVATE + yuni-static-core +) + +target_include_directories(${PROJ} + PUBLIC + ${CMAKE_CURRENT_SOURCE_DIR}/include +) diff --git a/src/libs/antares/mersenne-twister/mersenne-twister.h b/src/libs/antares/mersenne-twister/include/antares/mersenne-twister/mersenne-twister.h similarity index 100% rename from src/libs/antares/mersenne-twister/mersenne-twister.h rename to src/libs/antares/mersenne-twister/include/antares/mersenne-twister/mersenne-twister.h diff --git a/src/libs/antares/mersenne-twister/mersenne-twister.hxx b/src/libs/antares/mersenne-twister/include/antares/mersenne-twister/mersenne-twister.hxx similarity index 100% rename from src/libs/antares/mersenne-twister/mersenne-twister.hxx rename to src/libs/antares/mersenne-twister/include/antares/mersenne-twister/mersenne-twister.hxx diff --git a/src/libs/antares/mersenne-twister/mersenne-twister.cpp b/src/libs/antares/mersenne-twister/mersenne-twister.cpp index 36371dc069..82cc10f2b3 100644 --- a/src/libs/antares/mersenne-twister/mersenne-twister.cpp +++ b/src/libs/antares/mersenne-twister/mersenne-twister.cpp @@ -30,7 +30,7 @@ ** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "mersenne-twister.h" +#include "antares/mersenne-twister/mersenne-twister.h" #include #define MATRIX_A 0x9908b0dfUL // constant vector a diff --git a/src/libs/antares/paths/CMakeLists.txt b/src/libs/antares/paths/CMakeLists.txt new file mode 100644 index 0000000000..75592e3fab --- /dev/null +++ b/src/libs/antares/paths/CMakeLists.txt @@ -0,0 +1,20 @@ +set(PROJ path) +set(SRC_PROJ + list.cpp + include/antares/paths/list.h +) +source_group("path" FILES ${SRC_PROJ}) + +add_library(${PROJ} ${SRC_PROJ}) +add_library(Antares::${PROJ} ALIAS ${PROJ}) + +target_link_libraries(${PROJ} + PRIVATE + yuni-static-core + Antares::logs +) + +target_include_directories(${PROJ} + PUBLIC + ${CMAKE_CURRENT_SOURCE_DIR}/include +) diff --git a/src/libs/antares/paths/list.h b/src/libs/antares/paths/include/antares/paths/list.h similarity index 99% rename from src/libs/antares/paths/list.h rename to src/libs/antares/paths/include/antares/paths/list.h index 04ae5e2cda..7745c15030 100644 --- a/src/libs/antares/paths/list.h +++ b/src/libs/antares/paths/include/antares/paths/list.h @@ -30,7 +30,7 @@ #include #include #include -#include +#include #include enum PathListOption diff --git a/src/libs/antares/paths/list.cpp b/src/libs/antares/paths/list.cpp index d62e373078..7877672557 100644 --- a/src/libs/antares/paths/list.cpp +++ b/src/libs/antares/paths/list.cpp @@ -28,8 +28,8 @@ #include #include #include -#include "list.h" -#include +#include "antares/paths/list.h" +#include #ifdef YUNI_OS_WINDOWS #include #endif diff --git a/src/libs/antares/stdcxx/CMakeLists.txt b/src/libs/antares/stdcxx/CMakeLists.txt new file mode 100644 index 0000000000..dbff9ebc02 --- /dev/null +++ b/src/libs/antares/stdcxx/CMakeLists.txt @@ -0,0 +1,21 @@ +set(PROJ stdcxx) +set(HEADERS + include/antares/${PROJ}/demangle.hpp +) +set(SRC_PROJ + ${HEADERS} + demangle.cpp +) +source_group("stdcxx" FILES ${SRC_STDCXX}) + +add_library(${PROJ} ${SRC_PROJ}) +add_library(Antares::${PROJ} ALIAS ${PROJ}) + +#target_link_libraries(${PROJ} +# PRIVATE +#) + +target_include_directories(${PROJ} + PUBLIC + ${CMAKE_CURRENT_SOURCE_DIR}/include +) diff --git a/src/libs/antares/stdcxx/demangle.hpp b/src/libs/antares/stdcxx/include/antares/stdcxx/demangle.hpp similarity index 100% rename from src/libs/antares/stdcxx/demangle.hpp rename to src/libs/antares/stdcxx/include/antares/stdcxx/demangle.hpp diff --git a/src/libs/antares/study.h b/src/libs/antares/study.h deleted file mode 100644 index b07ada9b39..0000000000 --- a/src/libs/antares/study.h +++ /dev/null @@ -1,32 +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_H__ -#define __ANTARES_LIBS_STUDY_H__ - -#include "study/study.h" - -#endif // __ANTARES_LIBS_STUDY_H__ diff --git a/src/libs/antares/study/CMakeLists.txt b/src/libs/antares/study/CMakeLists.txt new file mode 100644 index 0000000000..52760dd707 --- /dev/null +++ b/src/libs/antares/study/CMakeLists.txt @@ -0,0 +1,446 @@ +set(SRC_STUDY_SCENARIO_BUILDER + scenario-builder/scBuilderDataInterface.h + scenario-builder/TSnumberData.h + scenario-builder/TSnumberData.cpp + scenario-builder/hydroLevelsData.h + scenario-builder/hydroLevelsData.cpp + scenario-builder/rules.h + scenario-builder/rules.hxx + scenario-builder/rules.cpp + scenario-builder/sets.h + scenario-builder/sets.hxx + scenario-builder/sets.cpp + scenario-builder/updater.hxx + scenario-builder/scBuilderUtils.h + scenario-builder/scBuilderUtils.cpp + scenario-builder/BindingConstraintsTSNumbersData.cpp + scenario-builder/NTCTSNumberData.cpp + scenario-builder/NTCTSNumberData.h + scenario-builder/BindingConstraintsTSNumbersData.h + scenario-builder/RenewableTSNumberData.h + scenario-builder/RenewableTSNumberData.cpp + scenario-builder/ThermalTSNumberData.cpp + scenario-builder/ThermalTSNumberData.h + scenario-builder/HydroTSNumberData.h + scenario-builder/HydroTSNumberData.cpp + scenario-builder/SolarTSNumberData.cpp + scenario-builder/solarTSNumberData.h + scenario-builder/WindTSNumberData.h + scenario-builder/WindTSNumberData.cpp + scenario-builder/LoadTSNumberData.h + scenario-builder/LoadTSNumberData.cpp + scenario-builder/applyToMatrix.hxx +) +source_group("study\\scenario builder" FILES ${SRC_MATRIX}) + +set(SRC_STUDY_ACTIONS + action/fwd.h + action/action.h + action/action.hxx + action/action.cpp + action/text.h + action/text.hxx + action/settings/suffix-for-area-names.h + action/settings/suffix-for-area-names.hxx + action/settings/suffix-for-area-names.cpp + action/settings/suffix-for-cluster-names.h + action/settings/suffix-for-cluster-names.hxx + action/settings/suffix-for-cluster-names.cpp + action/settings/suffix-for-constraint-names.h + action/settings/suffix-for-constraint-names.hxx + action/settings/suffix-for-constraint-names.cpp + action/settings/decal-area-position.h + action/settings/decal-area-position.hxx + action/settings/decal-area-position.cpp + action/behavior.h + action/behavior.cpp + action/state.h + action/state.cpp + action/context.h + action/context.cpp) +source_group("study\\actions" FILES ${SRC_STUDY_ACTIONS}) + +set(SRC_STUDY_ACTIONS_HANDLER_ANTARES_STUDY_AREA + action/handler/antares-study/area/create.h + action/handler/antares-study/area/create.hxx + action/handler/antares-study/area/create.cpp + action/handler/antares-study/area/position.h + action/handler/antares-study/area/position.cpp + action/handler/antares-study/area/filtering.h + action/handler/antares-study/area/filtering.cpp + action/handler/antares-study/area/color.h + action/handler/antares-study/area/color.cpp + action/handler/antares-study/area/nodal-optimization.h + action/handler/antares-study/area/nodal-optimization.cpp + action/handler/antares-study/area/reserves.h + action/handler/antares-study/area/reserves.cpp + action/handler/antares-study/area/misc-gen.h + action/handler/antares-study/area/misc-gen.cpp + action/handler/antares-study/area/timeseries.h + action/handler/antares-study/area/timeseries.cpp + action/handler/antares-study/area/ts-generator.h + action/handler/antares-study/area/ts-generator.cpp + action/handler/antares-study/area/ts-node.h + action/handler/antares-study/area/ts-node.hxx + action/handler/antares-study/area/ts-node.cpp + action/handler/antares-study/area/correlation.h + action/handler/antares-study/area/correlation.cpp + action/handler/antares-study/area/correlation-post.h + action/handler/antares-study/area/correlation-post.hxx + action/handler/antares-study/area/correlation-post.cpp + + action/handler/antares-study/area/allocation-hydro.h + action/handler/antares-study/area/allocation-hydro.cpp + action/handler/antares-study/area/allocation-hydro-post.h + action/handler/antares-study/area/allocation-hydro-post.hxx + action/handler/antares-study/area/allocation-hydro-post.cpp) +source_group("study\\actions\\handler\\antares study\\area" FILES ${SRC_STUDY_ACTIONS_HANDLER_ANTARES_STUDY_AREA}) + +set(SRC_STUDY_ACTIONS_HANDLER_ANTARES_STUDY_LINK + action/handler/antares-study/link/create.h + action/handler/antares-study/link/create.hxx + action/handler/antares-study/link/create.cpp + action/handler/antares-study/link/ntc.h + action/handler/antares-study/link/ntc.cpp + action/handler/antares-study/link/hurdles-cost.h + action/handler/antares-study/link/hurdles-cost.cpp + action/handler/antares-study/link/impedances.h + action/handler/antares-study/link/impedances.cpp + action/handler/antares-study/link/comments.h + action/handler/antares-study/link/comments.hxx + action/handler/antares-study/link/comments.cpp + action/handler/antares-study/link/copper-plate.h + action/handler/antares-study/link/copper-plate.cpp + action/handler/antares-study/link/filtering.h + action/handler/antares-study/link/filtering.cpp + action/handler/antares-study/link/unload-data.h + action/handler/antares-study/link/unload-data.hxx + action/handler/antares-study/link/unload-data.cpp) +source_group("study\\actions\\handler\\antares study\\link" FILES ${SRC_STUDY_ACTIONS_HANDLER_ANTARES_STUDY_LINK}) + +set(SRC_STUDY_ACTIONS_HANDLER_ANTARES_STUDY_THERMAL + action/handler/antares-study/thermal-cluster/create.h + action/handler/antares-study/thermal-cluster/create.hxx + action/handler/antares-study/thermal-cluster/create.cpp + action/handler/antares-study/thermal-cluster/root-node.h + action/handler/antares-study/thermal-cluster/root-node.hxx + action/handler/antares-study/thermal-cluster/root-node.cpp + action/handler/antares-study/thermal-cluster/common.h + action/handler/antares-study/thermal-cluster/common.cpp +) +source_group("study\\action\\handler\\sntares study\\thermal cluster" FILES ${SRC_STUDY_ACTIONS_HANDLER_ANTARES_STUDY_THERMAL}) + + +set(SRC_STUDY_ACTIONS_HANDLER_ANTARES_STUDY_CONSTRAINT + action/handler/antares-study/constraint/create.h + action/handler/antares-study/constraint/create.hxx + action/handler/antares-study/constraint/create.cpp + action/handler/antares-study/constraint/comments.h + action/handler/antares-study/constraint/comments.hxx + action/handler/antares-study/constraint/comments.cpp + action/handler/antares-study/constraint/data.h + action/handler/antares-study/constraint/data.hxx + action/handler/antares-study/constraint/data.cpp + action/handler/antares-study/constraint/weights.h + action/handler/antares-study/constraint/weights.cpp + action/handler/antares-study/constraint/offsets.h + action/handler/antares-study/constraint/offsets.cpp + action/handler/antares-study/constraint/enabled.h + action/handler/antares-study/constraint/enabled.hxx + action/handler/antares-study/constraint/enabled.cpp +) +source_group("study\\action\\handler\\antares study\\constraint" FILES ${SRC_STUDY_ACTIONS_HANDLER_ANTARES_STUDY_CONSTRAINT}) + + +set(SRC_AREAS + area.h + area/constants.h + area/area.h + area/area.hxx + area/scratchpad.h + area/scratchpad.cpp + area/area.cpp + area/links.cpp + area/links.h + area/store-timeseries-numbers.cpp + area/store-timeseries-numbers.h + area/store-timeseries-numbers.hxx + area/list.cpp +) +source_group("study\\area" FILES ${SRC_AREAS}) + + +set(SRC_STUDY_AREA_UI + area/ui.h + area/ui.cpp +) +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 + parts/common/cluster_list.h + parts/common/cluster_list.cpp +) +source_group("study\\part\\common" FILES ${SRC_STUDY_PART_COMMON}) + +set(SRC_STUDY_PART_THERMAL + parts/thermal/container.h + parts/thermal/container.hxx + parts/thermal/container.cpp + parts/thermal/prepro.h + parts/thermal/prepro.hxx + parts/thermal/prepro.cpp + parts/thermal/ecoInput.h + parts/thermal/ecoInput.cpp + parts/thermal/cluster.h + parts/thermal/cluster.hxx + parts/thermal/cluster.cpp + parts/thermal/cluster_list.h + parts/thermal/cluster_list.cpp + parts/thermal/pollutant.h + parts/thermal/pollutant.cpp +) +source_group("study\\part\\thermal" FILES ${SRC_STUDY_PART_THERMAL}) + +set(SRC_STUDY_PART_RENEWABLE + parts/renewable/container.h + parts/renewable/container.hxx + parts/renewable/container.cpp + parts/renewable/cluster.h + parts/renewable/cluster.cpp + parts/renewable/cluster_list.h + parts/renewable/cluster_list.cpp +) +source_group("study\\part\\renewable" FILES ${SRC_STUDY_PART_RENEWABLE}) + +set(SRC_STUDY_PART_SHORT_TERM_STORAGE + parts/short-term-storage/container.h + parts/short-term-storage/container.cpp + parts/short-term-storage/properties.h + parts/short-term-storage/properties.cpp + parts/short-term-storage/series.cpp + parts/short-term-storage/series.h + parts/short-term-storage/cluster.h + parts/short-term-storage/cluster.cpp + parts/short-term-storage/STStorageOutputCaptions.h + parts/short-term-storage/STStorageOutputCaptions.cpp +) +source_group("study\\part\\short-term-storage" FILES ${SRC_STUDY_PART_SHORT_TERM_SOTRAGE}) + +set(SRC_STUDY_PART_WIND + parts/wind/container.h + parts/wind/container.cpp + parts/wind/series.h + parts/wind/series.hxx + parts/wind/series.cpp + parts/wind/prepro.h + parts/wind/prepro.hxx + parts/wind/prepro.cpp +) +source_group("study\\part\\wind" FILES ${SRC_STUDY_PART_WIND}) + +set(SRC_STUDY_PART_HYDRO + parts/hydro/container.h + parts/hydro/container.cpp + parts/hydro/series.h + parts/hydro/series.hxx + parts/hydro/series.cpp + parts/hydro/prepro.h + parts/hydro/prepro.cpp + parts/hydro/allocation.h + parts/hydro/allocation.hxx + parts/hydro/allocation.cpp +) +source_group("study\\part\\hydro" FILES ${SRC_STUDY_PART_HYDRO}) + +set(SRC_STUDY_UI + ui-runtimeinfos.h + ui-runtimeinfos.cpp +) +source_group(study\\UI FILES ${SRC_STUDY_UI}) + +set(SRC_STUDY_PARAMETERS + parameters.h + parameters.cpp + parameters/adq-patch-params.h + parameters/adq-patch-params.cpp + UnfeasibleProblemBehavior.cpp + # TODO JMK : should be in a target_include_directories : but need to remove all .h from all SRC + UnfeasibleProblemBehavior.hpp +) +source_group("study\\general data" FILES ${SRC_STUDY_PARAMETERS}) + + +set(SRC_STUDY_FINDER + finder.h + finder/finder.cpp + finder/finder.h +) +source_group("study\\finder" FILES ${SRC_STUDY_FINDER}) + + +set(SRC_STUDY_BINDING_CONSTRAINT + constraint.h + binding_constraint/BindingConstraint.h + binding_constraint/BindingConstraint.hxx + binding_constraint/BindingConstraint.cpp + binding_constraint/BindingConstraintsRepository.h + binding_constraint/BindingConstraintsRepository.h + binding_constraint/BindingConstraintsRepository.hxx + binding_constraint/BindingConstraintsRepository.cpp + binding_constraint/BindingConstraintLoader.cpp + binding_constraint/BindingConstraintLoader.h + binding_constraint/BindingConstraintSaver.cpp + binding_constraint/BindingConstraintSaver.h + binding_constraint/EnvForLoading.h + binding_constraint/BindingConstraintStructures.h + binding_constraint/BindingConstraintGroup.cpp + binding_constraint/BindingConstraintGroup.h + binding_constraint/BindingConstraintGroupRepository.cpp + binding_constraint/BindingConstraintGroupRepository.h +) + +source_group("study\\constraint" FILES ${SRC_STUDY_BINDING_CONSTRAINT}) + + +set(SRC_XCAST + xcast.h + xcast/xcast.h + xcast/xcast.hxx + xcast/xcast.cpp +) +source_group("study\\xcast" FILES ${SRC_XCAST}) + +set(SRC_STUDY + # all + parts/parts.h + + # Load + parts/load/container.h + parts/load/container.cpp + parts/load/series.h + parts/load/series.hxx + parts/load/series.cpp + parts/load/prepro.cpp + parts/load/prepro.h + parts/load/prepro.hxx + + # Solar + parts/solar/container.h + parts/solar/container.cpp + parts/solar/series.h + parts/solar/series.hxx + parts/solar/series.cpp + parts/solar/prepro.cpp + parts/solar/prepro.h + parts/solar/prepro.hxx + + # Study + header.h + header.hxx + header.cpp + load-options.h + load-options.cpp + runtime/runtime.h + runtime/runtime.hxx + runtime/runtime.cpp + runtime.h + study.h + study.hxx + fwd.h + fwd.cpp + study.h + study.cpp + correlation-updater.hxx + study.importprepro.cpp + importlogs.cpp + load.cpp + save.cpp + study.extra.cpp + version.h + version.cpp + cleaner.h + cleaner/cleaner.cpp cleaner/versions.h + cleaner/cleaner-v20.cpp + output.cpp + output.h + output.hxx + layerdata.cpp + layerdata.h + + # progression + progression/progression.h + progression/progression.hxx + progression/progression.cpp + + # Simulation + simulation.h + simulation.cpp + + # Filter + filter.h + filter.cpp + + # Sets + sets.h + sets.hxx + + # variable selection + variable-print-info.h + variable-print-info.cpp +) + +source_group("study\\study" FILES ${SRC_STUDY}) + +set(SRC_ALL + ${SRC_STDCXX} + ${SRC_AREAS} + ${SRC_XCAST} + ${SRC_STUDY_AREA_UI} + ${SRC_STUDY_ACTIONS} + ${SRC_STUDY_ACTIONS_HANDLER_ANTARES_STUDY_THERMAL} + ${SRC_STUDY_ACTIONS_HANDLER_ANTARES_STUDY_AREA} + ${SRC_STUDY_ACTIONS_HANDLER_ANTARES_STUDY_LINK} + ${SRC_STUDY_ACTIONS_HANDLER_ANTARES_STUDY_CONSTRAINT} + ${SRC_STUDY_UI} + ${SRC_STUDY_PARAMETERS} + ${SRC_STUDY_FINDER} + ${SRC_STUDY_BINDING_CONSTRAINT} + ${SRC_STUDY_PART_WIND} + ${SRC_STUDY_PART_HYDRO} + ${SRC_STUDY_PART_COMMON} + ${SRC_STUDY_PART_THERMAL} + ${SRC_STUDY_PART_RENEWABLE} + ${SRC_STUDY_PART_SHORT_TERM_STORAGE} + ${SRC_STUDY_SCENARIO_BUILDER} + ${SRC_STUDY} +) + +add_library(study ${SRC_ALL}) +add_library(Antares::study ALIAS study) + +target_link_libraries(study + PUBLIC + yuni-static-core + Antares::array #xcast + Antares::date #parameters + Antares::inifile #parameters + Antares::stdcxx #enum.hxx + Antares::utils #area.hxx + Antares::correlation + Antares::path + Antares::mersenne + PRIVATE + result_writer + Antares::exception +) + +target_include_directories(study + PUBLIC + ${CMAKE_CURRENT_SOURCE_DIR}/../.. +) \ No newline at end of file diff --git a/src/libs/antares/study/UnfeasibleProblemBehavior.cpp b/src/libs/antares/study/UnfeasibleProblemBehavior.cpp index e0696c4cb0..c806605865 100644 --- a/src/libs/antares/study/UnfeasibleProblemBehavior.cpp +++ b/src/libs/antares/study/UnfeasibleProblemBehavior.cpp @@ -33,9 +33,7 @@ #include -namespace Antares -{ -namespace Data +namespace Antares::Data { const char* getIcon(const UnfeasibleProblemBehavior& unfeasibleProblemBehavior) { @@ -126,6 +124,5 @@ const std::initializer_list& getNames() } } // namespace Enum -} // namespace Data +} // namespace Antares::Data -} // namespace Antares \ No newline at end of file diff --git a/src/libs/antares/study/action/handler/antares-study/area/create.cpp b/src/libs/antares/study/action/handler/antares-study/area/create.cpp index e2128209d9..6807519258 100644 --- a/src/libs/antares/study/action/handler/antares-study/area/create.cpp +++ b/src/libs/antares/study/action/handler/antares-study/area/create.cpp @@ -26,7 +26,7 @@ */ #include "create.h" -#include "../../../../../utils.h" +#include #include "nodal-optimization.h" #include "reserves.h" #include "misc-gen.h" @@ -44,13 +44,7 @@ using namespace Yuni; -namespace Antares -{ -namespace Action -{ -namespace AntaresStudy -{ -namespace Area +namespace Antares::Action::AntaresStudy::Area { Create::Create(const AnyString& areaname) : pOriginalAreaName(areaname) { @@ -322,7 +316,7 @@ IAction* Create::StandardActionsToCopyThermalCluster(const Data::AreaName& area, return cluster; } -} // namespace Area -} // namespace AntaresStudy -} // namespace Action -} // namespace Antares +} // namespace Antares::Action::AntaresStudy::Area + + + diff --git a/src/libs/antares/study/action/handler/antares-study/constraint/create.cpp b/src/libs/antares/study/action/handler/antares-study/constraint/create.cpp index 832d468c0f..780e12e153 100644 --- a/src/libs/antares/study/action/handler/antares-study/constraint/create.cpp +++ b/src/libs/antares/study/action/handler/antares-study/constraint/create.cpp @@ -27,7 +27,7 @@ #include "create.h" #include -#include "../../../../../utils.h" +#include #include "antares/study/fwd.h" #include "data.h" #include "comments.h" diff --git a/src/libs/antares/study/action/handler/antares-study/link/create.cpp b/src/libs/antares/study/action/handler/antares-study/link/create.cpp index ebf6eb7bff..45f995a8db 100644 --- a/src/libs/antares/study/action/handler/antares-study/link/create.cpp +++ b/src/libs/antares/study/action/handler/antares-study/link/create.cpp @@ -26,7 +26,7 @@ */ #include "create.h" -#include "../../../../../utils.h" +#include #include "ntc.h" #include "hurdles-cost.h" #include "impedances.h" diff --git a/src/libs/antares/study/area/area.hxx b/src/libs/antares/study/area/area.hxx index 15c4123cf4..fc6bd885a5 100644 --- a/src/libs/antares/study/area/area.hxx +++ b/src/libs/antares/study/area/area.hxx @@ -26,7 +26,7 @@ */ #pragma once -#include "../../utils.h" +#include #include "antares/study/parts/parts.h" #include "antares/study/parts/load/prepro.h" diff --git a/src/libs/antares/study/area/store-timeseries-numbers.cpp b/src/libs/antares/study/area/store-timeseries-numbers.cpp index 7f595e9f39..c0b88f5209 100644 --- a/src/libs/antares/study/area/store-timeseries-numbers.cpp +++ b/src/libs/antares/study/area/store-timeseries-numbers.cpp @@ -26,7 +26,7 @@ */ #include -#include "../study.h" +#include #include #include "store-timeseries-numbers.h" @@ -34,9 +34,8 @@ using namespace Yuni; #define SEP IO::Separator -namespace Antares -{ -namespace Data + +namespace Antares::Data { namespace // anonymous { @@ -117,5 +116,5 @@ void storeTimeseriesNumbersForTransmissionCapacities(Solver::IResultWriter::Ptr value->storeTimeseriesNumbers(writer); } } -} // namespace Data -} // namespace Antares +} // namespace Antares::Data + diff --git a/src/libs/antares/study/binding_constraint/BindingConstraint.hxx b/src/libs/antares/study/binding_constraint/BindingConstraint.hxx index 672977ff15..ebf8f9473f 100644 --- a/src/libs/antares/study/binding_constraint/BindingConstraint.hxx +++ b/src/libs/antares/study/binding_constraint/BindingConstraint.hxx @@ -26,7 +26,7 @@ */ #pragma once -#include "../../utils.h" +#include namespace Antares::Data { diff --git a/src/libs/antares/study/binding_constraint/BindingConstraintsRepository.cpp b/src/libs/antares/study/binding_constraint/BindingConstraintsRepository.cpp index d56b3e3287..13dcb6821e 100644 --- a/src/libs/antares/study/binding_constraint/BindingConstraintsRepository.cpp +++ b/src/libs/antares/study/binding_constraint/BindingConstraintsRepository.cpp @@ -8,7 +8,7 @@ #include #include #include "BindingConstraint.h" -#include "antares/study.h" +#include #include "BindingConstraintLoader.h" #include "BindingConstraintSaver.h" @@ -205,11 +205,11 @@ bool BindingConstraintsRepository::internalSaveToFolder(BindingConstraintSaver:: if (constraints_.empty()) { logs.info() << "No binding constraint to export."; - if (!IO::Directory::Create(env.folder)) + if (!Yuni::IO::Directory::Create(env.folder)) return false; // stripping the file env.folder << Yuni::IO::Separator << "bindingconstraints.ini"; - return IO::File::CreateEmptyFile(env.folder); + return Yuni::IO::File::CreateEmptyFile(env.folder); } if (constraints_.size() == 1) @@ -217,14 +217,14 @@ bool BindingConstraintsRepository::internalSaveToFolder(BindingConstraintSaver:: else logs.info() << "Exporting " << constraints_.size() << " binding constraints..."; - if (!IO::Directory::Create(env.folder)) + if (!Yuni::IO::Directory::Create(env.folder)) return false; IniFile ini; bool ret = true; uint index = 0; auto end = constraints_.end(); - ShortString64 text; + Yuni::ShortString64 text; for (auto i = constraints_.begin(); i != end; ++i, ++index) { @@ -242,9 +242,9 @@ void BindingConstraintsRepository::reverseWeightSign(const AreaLink* lnk) each([&lnk](BindingConstraint &constraint) { constraint.reverseWeightSign(lnk); }); } -uint64 BindingConstraintsRepository::memoryUsage() const +Yuni::uint64 BindingConstraintsRepository::memoryUsage() const { - uint64 m = sizeof(BindingConstraintsRepository); + Yuni::uint64 m = sizeof(BindingConstraintsRepository); for (const auto & i : constraints_) m += i->memoryUsage(); return m; diff --git a/src/libs/antares/study/binding_constraint/BindingConstraintsRepository.hxx b/src/libs/antares/study/binding_constraint/BindingConstraintsRepository.hxx index 9e0353cc91..92d178eb2c 100644 --- a/src/libs/antares/study/binding_constraint/BindingConstraintsRepository.hxx +++ b/src/libs/antares/study/binding_constraint/BindingConstraintsRepository.hxx @@ -5,7 +5,7 @@ #pragma once #include -#include "../../utils.h" +#include namespace Antares::Data { diff --git a/src/libs/antares/study/cleaner.h b/src/libs/antares/study/cleaner.h index 3c605fc43d..1331756214 100644 --- a/src/libs/antares/study/cleaner.h +++ b/src/libs/antares/study/cleaner.h @@ -31,11 +31,9 @@ #include #include #include "version.h" -#include "../paths/list.h" +#include -namespace Antares -{ -namespace Data +namespace Antares::Data { class StudyCleaningInfos final { @@ -102,7 +100,7 @@ class StudyCleaningInfos final }; // class StudyCleaningInfos -} // namespace Data -} // namespace Antares +} // namespace Antares::Data + #endif /* __ANTARES_LIBS_STUDY_CLEANER_H__ */ diff --git a/src/libs/antares/study/cleaner/cleaner.cpp b/src/libs/antares/study/cleaner/cleaner.cpp index 51ac5bfb72..dad6e218c6 100644 --- a/src/libs/antares/study/cleaner/cleaner.cpp +++ b/src/libs/antares/study/cleaner/cleaner.cpp @@ -35,9 +35,7 @@ using namespace Yuni; #define STUDY_CLEANER_LOG "[study cleaner] " -namespace Antares -{ -namespace Data +namespace Antares::Data { StudyCleaningInfos::StudyCleaningInfos() { @@ -49,9 +47,7 @@ StudyCleaningInfos::StudyCleaningInfos(const AnyString& path) : folder(path) version = versionUnknown; } -StudyCleaningInfos::~StudyCleaningInfos() -{ -} +StudyCleaningInfos::~StudyCleaningInfos() = default; bool StudyCleaningInfos::analyze() { @@ -135,5 +131,5 @@ void StudyCleaningInfos::setCustomExcludeList(const Yuni::String& c) { customExclude = c; } -} // namespace Data -} // namespace Antares +} // namespace Antares::Data + diff --git a/src/libs/antares/study/load.cpp b/src/libs/antares/study/load.cpp index 35b9fca6c5..b93af9dcea 100644 --- a/src/libs/antares/study/load.cpp +++ b/src/libs/antares/study/load.cpp @@ -143,11 +143,11 @@ void Study::parameterFiller(const StudyLoadOptions& options) // calendar update if (usedByTheSolver) - calendar.reset(parameters, /*force leapyear:*/ false); + calendar.reset({parameters.dayOfThe1stJanuary, parameters.firstWeekday, parameters.firstMonthInYear, false}); else - calendar.reset(parameters); + calendar.reset({parameters.dayOfThe1stJanuary, parameters.firstWeekday, parameters.firstMonthInYear, parameters.leapYear}); - calendarOutput.reset(parameters); + calendarOutput.reset({parameters.dayOfThe1stJanuary, parameters.firstWeekday, parameters.firstMonthInYear, parameters.leapYear}); // In case hydro hot start is enabled, check all conditions are met. // (has to be called after areas load and calendar building) diff --git a/src/libs/antares/study/parameters.h b/src/libs/antares/study/parameters.h index be2bfa2b92..a31c78a2a0 100644 --- a/src/libs/antares/study/parameters.h +++ b/src/libs/antares/study/parameters.h @@ -34,7 +34,7 @@ #include "../constants.h" #include #include -#include "antares/writer/antares/writer/result_format.h" //Conflit between ${CMake_Source_dir}/libs and result_writer findong "antares" +#include #include #include #include "fwd.h" diff --git a/src/libs/antares/study/parameters/adq-patch-params.cpp b/src/libs/antares/study/parameters/adq-patch-params.cpp index f49ec22cb7..4b6d9b33fa 100644 --- a/src/libs/antares/study/parameters/adq-patch-params.cpp +++ b/src/libs/antares/study/parameters/adq-patch-params.cpp @@ -1,7 +1,7 @@ #include "adq-patch-params.h" #include -#include +#include #include @@ -18,7 +18,7 @@ void LocalMatching::reset() setToZeroOutsideOutsideLinks = true; } -bool LocalMatching::updateFromKeyValue(const String& key, const String& value) +bool LocalMatching::updateFromKeyValue(const Yuni::String& key, const Yuni::String& value) { if (key == "set-to-null-ntc-from-physical-out-to-physical-in-for-first-step") return value.to(setToZeroOutsideInsideLinks); @@ -57,7 +57,7 @@ void CurtailmentSharing::resetThresholds() static bool StringToPriceTakingOrder(const AnyString& PTO_as_string, AdequacyPatch::AdqPatchPTO& PTO_as_enum) { - CString<24, false> s = PTO_as_string; + Yuni::CString<24, false> s = PTO_as_string; s.trim(); s.toLower(); if (s == "dens") @@ -76,7 +76,7 @@ static bool StringToPriceTakingOrder(const AnyString& PTO_as_string, AdequacyPat return false; } -bool CurtailmentSharing::updateFromKeyValue(const String& key, const String& value) +bool CurtailmentSharing::updateFromKeyValue(const Yuni::String& key, const Yuni::String& value) { // Price taking order if (key == "price-taking-order") @@ -152,7 +152,7 @@ void AdqPatchParams::addExcludedVariables(std::vector& out) const } -bool AdqPatchParams::updateFromKeyValue(const String& key, const String& value) +bool AdqPatchParams::updateFromKeyValue(const Yuni::String& key, const Yuni::String& value) { if (key == "include-adq-patch") return value.to(enabled); diff --git a/src/libs/antares/study/parameters/adq-patch-params.h b/src/libs/antares/study/parameters/adq-patch-params.h index 8d097c5198..560f8f9d62 100644 --- a/src/libs/antares/study/parameters/adq-patch-params.h +++ b/src/libs/antares/study/parameters/adq-patch-params.h @@ -7,8 +7,6 @@ #include #include -using namespace Yuni; - namespace Antares::Data::AdequacyPatch { @@ -76,7 +74,7 @@ struct LocalMatching ** \brief Reset to default values related to local matching */ void reset(); - bool updateFromKeyValue(const String& key, const String& value); + bool updateFromKeyValue(const Yuni::String& key, const Yuni::String& value); void addProperties(IniFile::Section* section) const; }; @@ -97,7 +95,7 @@ class CurtailmentSharing //! Check CSR cost function prior & after CSR optimization bool checkCsrCostFunction; - bool updateFromKeyValue(const String& key, const String& value); + bool updateFromKeyValue(const Yuni::String& key, const Yuni::String& value); void addProperties(IniFile::Section* section) const; void reset(); @@ -116,7 +114,7 @@ struct AdqPatchParams void reset(); void addExcludedVariables(std::vector&) const; - bool updateFromKeyValue(const String& key, const String& value); + bool updateFromKeyValue(const Yuni::String& key, const Yuni::String& value); void saveToINI(IniFile& ini) const; bool checkAdqPatchParams(const StudyMode studyMode, const AreaList& areas, diff --git a/src/libs/antares/study/parts/common/cluster.cpp b/src/libs/antares/study/parts/common/cluster.cpp index 0d4e283f84..f302675b8a 100644 --- a/src/libs/antares/study/parts/common/cluster.cpp +++ b/src/libs/antares/study/parts/common/cluster.cpp @@ -4,11 +4,9 @@ #include "cluster.h" #include "../../study.h" -#include "../../../utils.h" +#include -namespace Antares -{ -namespace Data +namespace Antares::Data { Cluster::Cluster(Area* parent) : unitCount(0), @@ -122,5 +120,5 @@ bool CompareClusterName::operator()(const Cluster* s1, const Cluster* s2) const return (s1->getFullName() < s2->getFullName()); } -} // namespace Data -} // namespace Antares +} // namespace Antares::Data + diff --git a/src/libs/antares/study/parts/common/cluster_list.cpp b/src/libs/antares/study/parts/common/cluster_list.cpp index b28b495d78..80f9fc5fec 100644 --- a/src/libs/antares/study/parts/common/cluster_list.cpp +++ b/src/libs/antares/study/parts/common/cluster_list.cpp @@ -1,6 +1,6 @@ #include #include "cluster_list.h" -#include "../../../utils.h" +#include #include "../../study.h" using namespace Yuni; diff --git a/src/libs/antares/study/parts/renewable/cluster.cpp b/src/libs/antares/study/parts/renewable/cluster.cpp index 9a5ea5682f..d1b7dc1bd1 100644 --- a/src/libs/antares/study/parts/renewable/cluster.cpp +++ b/src/libs/antares/study/parts/renewable/cluster.cpp @@ -35,7 +35,7 @@ #include "cluster.h" #include #include -#include "../../../utils.h" +#include using namespace Yuni; using namespace Antares; diff --git a/src/libs/antares/study/parts/short-term-storage/cluster.cpp b/src/libs/antares/study/parts/short-term-storage/cluster.cpp index 8d1d236ee9..50789c7435 100644 --- a/src/libs/antares/study/parts/short-term-storage/cluster.cpp +++ b/src/libs/antares/study/parts/short-term-storage/cluster.cpp @@ -24,7 +24,7 @@ ** ** SPDX-License-Identifier: licenceRef-GPL3_WITH_RTE-Exceptions */ -#include +#include #include #include #include diff --git a/src/libs/antares/study/parts/thermal/cluster.cpp b/src/libs/antares/study/parts/thermal/cluster.cpp index f8c5b0276c..7d44a25eda 100644 --- a/src/libs/antares/study/parts/thermal/cluster.cpp +++ b/src/libs/antares/study/parts/thermal/cluster.cpp @@ -37,7 +37,7 @@ #include "cluster.h" #include #include -#include "../../../utils.h" +#include using namespace Yuni; using namespace Antares; diff --git a/src/libs/antares/study/runtime/runtime.cpp b/src/libs/antares/study/runtime/runtime.cpp index dcc78e260a..4c625e14f8 100644 --- a/src/libs/antares/study/runtime/runtime.cpp +++ b/src/libs/antares/study/runtime/runtime.cpp @@ -295,14 +295,14 @@ bool StudyRuntimeInfos::loadFromStudy(Study& study) logs.info() << "Generating calendar informations"; if (study.usedByTheSolver) { - study.calendar.reset(gd, false); + study.calendar.reset({gd.dayOfThe1stJanuary, gd.firstWeekday, gd.firstMonthInYear, false}); } else { - study.calendar.reset(gd); + study.calendar.reset({gd.dayOfThe1stJanuary, gd.firstWeekday, gd.firstMonthInYear, gd.leapYear}); } logs.debug() << " :: generating calendar dedicated to the output"; - study.calendarOutput.reset(gd); + study.calendarOutput.reset({gd.dayOfThe1stJanuary, gd.firstWeekday, gd.firstMonthInYear, gd.leapYear}); initializeRangeLimits(study, rangeLimits); // Removing disabled thermal clusters from solver computations diff --git a/src/libs/antares/study/runtime/runtime.h b/src/libs/antares/study/runtime/runtime.h index f6a4fd42f2..a90820592d 100644 --- a/src/libs/antares/study/runtime/runtime.h +++ b/src/libs/antares/study/runtime/runtime.h @@ -30,7 +30,7 @@ #include #include #include "../study.h" -#include "../../mersenne-twister/mersenne-twister.h" +#include namespace Antares::Data { diff --git a/src/libs/antares/study/study.cpp b/src/libs/antares/study/study.cpp index 0e6514bec6..cd41b0b023 100644 --- a/src/libs/antares/study/study.cpp +++ b/src/libs/antares/study/study.cpp @@ -44,15 +44,14 @@ #include "area/constants.h" #include // For use of Yuni::System::CPU::Count() -#include // For use of floor(...) and ceil(...) +#include // For use of floor(...) and ceil(...) #include #include "ui-runtimeinfos.h" using namespace Yuni; -namespace Antares -{ -namespace Data + +namespace Antares::Data { //! Clear then shrink a string template @@ -1540,5 +1539,5 @@ void Study::prepareWriter(Benchmarking::IDurationCollector* duration_collector) parameters.resultFormat, folderOutput, pQueueService, duration_collector); } -} // namespace Data -} // namespace Antares +} // namespace Antares::Data + diff --git a/src/libs/antares/study/variable-print-info.cpp b/src/libs/antares/study/variable-print-info.cpp index 2ed8d6471a..1b5e20281c 100644 --- a/src/libs/antares/study/variable-print-info.cpp +++ b/src/libs/antares/study/variable-print-info.cpp @@ -28,7 +28,7 @@ #include "variable-print-info.h" #include #include -#include +#include #include "../solver/variable/categories.h" using namespace Antares::Solver::Variable; diff --git a/src/libs/antares/utils/CMakeLists.txt b/src/libs/antares/utils/CMakeLists.txt new file mode 100644 index 0000000000..79b7d4f62f --- /dev/null +++ b/src/libs/antares/utils/CMakeLists.txt @@ -0,0 +1,20 @@ +set(PROJ StudyUtils) +set(SRC_PROJ + utils.cpp + include/antares/utils/utils.h + include/antares/utils/utils.hxx +) +source_group("utils" FILES ${SRC_PROJ}) + +add_library(${PROJ} ${SRC_PROJ}) #utils also used elsewhere +add_library(Antares::utils ALIAS ${PROJ}) + +target_link_libraries(${PROJ} + PRIVATE + yuni-static-core +) + +target_include_directories(${PROJ} + PUBLIC + ${CMAKE_CURRENT_SOURCE_DIR}/include +) diff --git a/src/libs/antares/utils.h b/src/libs/antares/utils/include/antares/utils/utils.h similarity index 100% rename from src/libs/antares/utils.h rename to src/libs/antares/utils/include/antares/utils/utils.h diff --git a/src/libs/antares/utils.hxx b/src/libs/antares/utils/include/antares/utils/utils.hxx similarity index 99% rename from src/libs/antares/utils.hxx rename to src/libs/antares/utils/include/antares/utils/utils.hxx index 23a3f2aa49..e0940b6b4f 100644 --- a/src/libs/antares/utils.hxx +++ b/src/libs/antares/utils/include/antares/utils/utils.hxx @@ -27,7 +27,7 @@ #ifndef __ANTARES_LIBS_UTILS_HXX__ #define __ANTARES_LIBS_UTILS_HXX__ -#include +#include #include namespace Antares diff --git a/src/libs/antares/utils.cpp b/src/libs/antares/utils/utils.cpp similarity index 98% rename from src/libs/antares/utils.cpp rename to src/libs/antares/utils/utils.cpp index d535076876..d400f1d716 100644 --- a/src/libs/antares/utils.cpp +++ b/src/libs/antares/utils/utils.cpp @@ -25,7 +25,7 @@ ** SPDX-License-Identifier: licenceRef-GPL3_WITH_RTE-Exceptions */ -#include "utils.h" +#include "antares/utils/utils.h" using namespace Yuni; diff --git a/src/libs/antares/writer/CMakeLists.txt b/src/libs/antares/writer/CMakeLists.txt index f3ecc9076a..ef7129cc51 100644 --- a/src/libs/antares/writer/CMakeLists.txt +++ b/src/libs/antares/writer/CMakeLists.txt @@ -22,14 +22,17 @@ add_library(result_writer antares/writer/result_format.h ) +add_library(Antares::result_writer ALIAS result_writer) + target_include_directories(result_writer PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ) target_link_libraries(result_writer - PRIVATE + PUBLIC Antares::benchmarking + PRIVATE yuni-static-core MINIZIP::minizip logs diff --git a/src/solver/application.h b/src/solver/application.h index c436db36f6..cb3bd79f99 100644 --- a/src/solver/application.h +++ b/src/solver/application.h @@ -1,7 +1,7 @@ #pragma once #include "misc/options.h" -#include +#include #include #include #include diff --git a/src/solver/constraints-builder/cbuilder.h b/src/solver/constraints-builder/cbuilder.h index a0d501462f..1135e7fff5 100644 --- a/src/solver/constraints-builder/cbuilder.h +++ b/src/solver/constraints-builder/cbuilder.h @@ -29,7 +29,7 @@ #include #include -#include +#include #include "../../libs/antares/study/area/constants.h" #include "grid.h" diff --git a/src/solver/constraints-builder/grid.h b/src/solver/constraints-builder/grid.h index c552bec374..09c689729d 100644 --- a/src/solver/constraints-builder/grid.h +++ b/src/solver/constraints-builder/grid.h @@ -29,7 +29,7 @@ #include #include -#include +#include #include //#include 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 fd59acf897..a9ceb0b93b 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 @@ -31,7 +31,7 @@ #include "opt_rename_problem.h" #include "sim_structure_probleme_economique.h" -#include +#include using namespace Antares::Data; diff --git a/src/solver/optimisation/opt_export_structure.h b/src/solver/optimisation/opt_export_structure.h index e7e00126bc..ef5fbca36b 100644 --- a/src/solver/optimisation/opt_export_structure.h +++ b/src/solver/optimisation/opt_export_structure.h @@ -35,7 +35,7 @@ #include #include "antares/writer/i_writer.h" -#include +#include namespace Antares { 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 1e665c9113..3d786fb742 100644 --- a/src/solver/optimisation/opt_gestion_second_membre_cas_lineaire.cpp +++ b/src/solver/optimisation/opt_gestion_second_membre_cas_lineaire.cpp @@ -31,7 +31,7 @@ #include "../simulation/sim_extern_variables_globales.h" #include "opt_fonctions.h" -#include +#include using namespace Antares; using namespace Antares::Data; 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 e71f8228f9..531570d1e6 100644 --- a/src/solver/optimisation/opt_gestion_second_membre_couts_demarrage.cpp +++ b/src/solver/optimisation/opt_gestion_second_membre_couts_demarrage.cpp @@ -32,7 +32,7 @@ #include "opt_fonctions.h" -#include +#include using namespace Antares; using namespace Antares::Data; diff --git a/src/solver/signal-handling/common.cpp b/src/solver/signal-handling/common.cpp index e5962c2d9e..a708c79d86 100644 --- a/src/solver/signal-handling/common.cpp +++ b/src/solver/signal-handling/common.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include "common.h" using namespace Antares; diff --git a/src/solver/simulation/apply-scenario.h b/src/solver/simulation/apply-scenario.h index f6fd91b2fa..4c4cdd1552 100644 --- a/src/solver/simulation/apply-scenario.h +++ b/src/solver/simulation/apply-scenario.h @@ -27,7 +27,7 @@ #ifndef __SOLVER_SIMULATION_APPLY_SCENARIO_H__ #define __SOLVER_SIMULATION_APPLY_SCENARIO_H__ -#include +#include namespace Antares::Solver { diff --git a/src/solver/simulation/sim_alloc_probleme_hebdo.cpp b/src/solver/simulation/sim_alloc_probleme_hebdo.cpp index b35d3f8b34..d6e30bcd5c 100644 --- a/src/solver/simulation/sim_alloc_probleme_hebdo.cpp +++ b/src/solver/simulation/sim_alloc_probleme_hebdo.cpp @@ -25,7 +25,7 @@ ** SPDX-License-Identifier: licenceRef-GPL3_WITH_RTE-Exceptions */ #include -#include +#include #include "../optimisation/opt_structure_probleme_a_resoudre.h" diff --git a/src/solver/simulation/sim_calcul_economique.cpp b/src/solver/simulation/sim_calcul_economique.cpp index d887cbd8a3..88ae6c07cc 100644 --- a/src/solver/simulation/sim_calcul_economique.cpp +++ b/src/solver/simulation/sim_calcul_economique.cpp @@ -27,7 +27,7 @@ #include -#include +#include #include #include diff --git a/src/solver/simulation/solver.h b/src/solver/simulation/solver.h index abb1b947d8..c75260c8ba 100644 --- a/src/solver/simulation/solver.h +++ b/src/solver/simulation/solver.h @@ -27,7 +27,7 @@ #ifndef __SOLVER_SIMULATION_SOLVER_H__ #define __SOLVER_SIMULATION_SOLVER_H__ -#include +#include #include #include // PowerFluctuations #include diff --git a/src/solver/simulation/timeseries-numbers.h b/src/solver/simulation/timeseries-numbers.h index 9a3bd2ac7c..fc8bb91d46 100644 --- a/src/solver/simulation/timeseries-numbers.h +++ b/src/solver/simulation/timeseries-numbers.h @@ -28,7 +28,7 @@ #define __SOLVER_SIMULATION_GENERATE_TIMESERIES_H__ #include -#include +#include #include #include "ITimeSeriesNumbersWriter.h" diff --git a/src/solver/ts-generator/thermal.cpp b/src/solver/ts-generator/thermal.cpp index c4d37ea7b8..d916e59dac 100644 --- a/src/solver/ts-generator/thermal.cpp +++ b/src/solver/ts-generator/thermal.cpp @@ -31,7 +31,7 @@ #include #include -#include +#include #include #include diff --git a/src/solver/ts-generator/xcast/core.cpp b/src/solver/ts-generator/xcast/core.cpp index 43c882e016..754d898cde 100644 --- a/src/solver/ts-generator/xcast/core.cpp +++ b/src/solver/ts-generator/xcast/core.cpp @@ -26,7 +26,7 @@ */ #include #include -#include +#include #include #include "xcast.h" #include "constants.h" diff --git a/src/solver/ts-generator/xcast/gamma-euler.cpp b/src/solver/ts-generator/xcast/gamma-euler.cpp index e894b91663..c933b737e9 100644 --- a/src/solver/ts-generator/xcast/gamma-euler.cpp +++ b/src/solver/ts-generator/xcast/gamma-euler.cpp @@ -26,7 +26,7 @@ */ #include -#include +#include #include "xcast.h" #include #include diff --git a/src/solver/ts-generator/xcast/gamma-inc.cpp b/src/solver/ts-generator/xcast/gamma-inc.cpp index 01e933358b..fdc2bcef4f 100644 --- a/src/solver/ts-generator/xcast/gamma-inc.cpp +++ b/src/solver/ts-generator/xcast/gamma-inc.cpp @@ -26,7 +26,7 @@ */ #include -#include +#include #include "xcast.h" #include #include diff --git a/src/solver/ts-generator/xcast/math.hxx b/src/solver/ts-generator/xcast/math.hxx index 7fff13c023..42c5105786 100644 --- a/src/solver/ts-generator/xcast/math.hxx +++ b/src/solver/ts-generator/xcast/math.hxx @@ -27,7 +27,7 @@ #include #include -#include +#include #include #include "xcast.h" #include "constants.h" diff --git a/src/solver/ts-generator/xcast/studydata.cpp b/src/solver/ts-generator/xcast/studydata.cpp index 236625af39..b36b889770 100644 --- a/src/solver/ts-generator/xcast/studydata.cpp +++ b/src/solver/ts-generator/xcast/studydata.cpp @@ -26,7 +26,7 @@ */ #include -#include +#include #include "studydata.h" using namespace Yuni; diff --git a/src/solver/ts-generator/xcast/xcast.cpp b/src/solver/ts-generator/xcast/xcast.cpp index b66dfb7c63..d3481bb45c 100644 --- a/src/solver/ts-generator/xcast/xcast.cpp +++ b/src/solver/ts-generator/xcast/xcast.cpp @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include "xcast.h" #include "predicate.hxx" #include diff --git a/src/solver/utils/mps_utils.cpp b/src/solver/utils/mps_utils.cpp index 7d7cb52b1d..99c0ccab87 100644 --- a/src/solver/utils/mps_utils.cpp +++ b/src/solver/utils/mps_utils.cpp @@ -1,4 +1,4 @@ -#include +#include #include "../simulation/simulation.h" @@ -43,7 +43,7 @@ constexpr size_t OPT_APPEL_SOLVEUR_BUFFER_SIZE = 256; ** ** SPDX-License-Identifier: licenceRef-GPL3_WITH_RTE-Exceptions */ -#include +#include #include #include #include diff --git a/src/solver/variable/economy/max-mrg.cpp b/src/solver/variable/economy/max-mrg.cpp index 4beb0185f0..8cf6170685 100644 --- a/src/solver/variable/economy/max-mrg.cpp +++ b/src/solver/variable/economy/max-mrg.cpp @@ -26,7 +26,7 @@ */ #include -#include +#include #include "max-mrg.h" #include diff --git a/src/solver/variable/economy/thermalAirPollutantEmissions.h b/src/solver/variable/economy/thermalAirPollutantEmissions.h index 203af70614..1579dc64d0 100644 --- a/src/solver/variable/economy/thermalAirPollutantEmissions.h +++ b/src/solver/variable/economy/thermalAirPollutantEmissions.h @@ -27,7 +27,7 @@ #ifndef __SOLVER_VARIABLE_ECONOMY_thermalAirPollutantEmissions_H__ #define __SOLVER_VARIABLE_ECONOMY_thermalAirPollutantEmissions_H__ -#include +#include #include "../variable.h" namespace Antares::Solver::Variable::Economy diff --git a/src/solver/variable/endoflist.h b/src/solver/variable/endoflist.h index 6ab335906f..aa0f4105fc 100644 --- a/src/solver/variable/endoflist.h +++ b/src/solver/variable/endoflist.h @@ -28,7 +28,7 @@ #define __SOLVER_END_OF_LIST_END_OF_LIST_H__ #include -#include +#include #include "state.h" #include "surveyresults.h" diff --git a/src/solver/variable/setofareas.h b/src/solver/variable/setofareas.h index 607b57dc16..18e153e597 100644 --- a/src/solver/variable/setofareas.h +++ b/src/solver/variable/setofareas.h @@ -28,7 +28,7 @@ #define __SOLVER_VARIABLE_SET_OF_AREAS_H__ #include "state.h" -#include +#include namespace Antares { diff --git a/src/solver/variable/state.cpp b/src/solver/variable/state.cpp index e43ae77c16..38202fc052 100644 --- a/src/solver/variable/state.cpp +++ b/src/solver/variable/state.cpp @@ -26,7 +26,7 @@ */ #include -#include +#include #include "state.h" using namespace Yuni; diff --git a/src/solver/variable/storage/averagedata.h b/src/solver/variable/storage/averagedata.h index 2560f4765d..03f9976c77 100644 --- a/src/solver/variable/storage/averagedata.h +++ b/src/solver/variable/storage/averagedata.h @@ -27,7 +27,7 @@ #ifndef __SOLVER_VARIABLE_STORAGE_AVERAGE_DATA_H__ #define __SOLVER_VARIABLE_STORAGE_AVERAGE_DATA_H__ -#include +#include namespace Antares { diff --git a/src/solver/variable/storage/intermediate.cpp b/src/solver/variable/storage/intermediate.cpp index cb87577ca3..3cd34effb7 100644 --- a/src/solver/variable/storage/intermediate.cpp +++ b/src/solver/variable/storage/intermediate.cpp @@ -27,7 +27,7 @@ #include #include -#include +#include #include "intermediate.h" using namespace Yuni; diff --git a/src/solver/variable/storage/intermediate.h b/src/solver/variable/storage/intermediate.h index 2ac21461ab..fa2764d2b3 100644 --- a/src/solver/variable/storage/intermediate.h +++ b/src/solver/variable/storage/intermediate.h @@ -30,7 +30,7 @@ #include #include #include "../constants.h" -#include +#include #include "../categories.h" #include "../surveyresults.h" diff --git a/src/solver/variable/storage/minmax-data.h b/src/solver/variable/storage/minmax-data.h index 86f13655b4..96080de2cd 100644 --- a/src/solver/variable/storage/minmax-data.h +++ b/src/solver/variable/storage/minmax-data.h @@ -27,7 +27,7 @@ #ifndef __SOLVER_VARIABLE_STORAGE_MINMAX_DATA_H__ #define __SOLVER_VARIABLE_STORAGE_MINMAX_DATA_H__ -#include +#include #include namespace Antares diff --git a/src/solver/variable/storage/rawdata.h b/src/solver/variable/storage/rawdata.h index e4da33ca45..8601cdc432 100644 --- a/src/solver/variable/storage/rawdata.h +++ b/src/solver/variable/storage/rawdata.h @@ -28,7 +28,7 @@ #define __SOLVER_VARIABLE_STORAGE_RAWDATA_H__ #include -#include +#include #include "intermediate.h" namespace Antares diff --git a/src/solver/variable/storage/results.h b/src/solver/variable/storage/results.h index a181179faa..41efa38bfb 100644 --- a/src/solver/variable/storage/results.h +++ b/src/solver/variable/storage/results.h @@ -27,7 +27,7 @@ #ifndef __SOLVER_VARIABLE_STORAGE_RESULTS_H__ #define __SOLVER_VARIABLE_STORAGE_RESULTS_H__ -#include +#include #include "intermediate.h" #include "../categories.h" #include "fwd.h" diff --git a/src/solver/variable/surveyresults/data.h b/src/solver/variable/surveyresults/data.h index ca3d1eb0d5..e70bbf7447 100644 --- a/src/solver/variable/surveyresults/data.h +++ b/src/solver/variable/surveyresults/data.h @@ -30,7 +30,7 @@ #include #include "../constants.h" #include -#include +#include #include namespace Antares diff --git a/src/solver/variable/surveyresults/surveyresults.h b/src/solver/variable/surveyresults/surveyresults.h index c6407bd582..b5ed7d203f 100644 --- a/src/solver/variable/surveyresults/surveyresults.h +++ b/src/solver/variable/surveyresults/surveyresults.h @@ -30,17 +30,13 @@ #include #include #include "../constants.h" -#include +#include #include "../categories.h" #include "data.h" #include #include -namespace Antares -{ -namespace Solver -{ -namespace Variable +namespace Antares::Solver::Variable { /*! ** \brief Class utility for building CSV results files @@ -157,8 +153,8 @@ class SurveyResults }; // class SurveyResults -} // namespace Variable -} // namespace Solver -} // namespace Antares +} // namespace Antares::Solver::Variable + + #endif // __SOLVER_VARIABLE_SURVEY_RESULTS_SURVEY_RESULTS_H__ diff --git a/src/tests/resources/Antares_Simulator_Tests b/src/tests/resources/Antares_Simulator_Tests index 2d79167609..5c90bbd5c6 160000 --- a/src/tests/resources/Antares_Simulator_Tests +++ b/src/tests/resources/Antares_Simulator_Tests @@ -1 +1 @@ -Subproject commit 2d79167609fc15497085aaa7311698adb63222a2 +Subproject commit 5c90bbd5c6479749f0c5a83473b8a1bd7f3736a5 diff --git a/src/tests/src/libs/antares/study/constraint/test_constraint.cpp b/src/tests/src/libs/antares/study/constraint/test_constraint.cpp index 09fc57a442..a671d7857c 100644 --- a/src/tests/src/libs/antares/study/constraint/test_constraint.cpp +++ b/src/tests/src/libs/antares/study/constraint/test_constraint.cpp @@ -11,7 +11,7 @@ #include #include "antares/study/constraint.h" #include "antares/study/area/area.h" -#include "antares/study.h" +#include #include #include "utils.h" diff --git a/src/tests/src/libs/antares/test_utils.cpp b/src/tests/src/libs/antares/test_utils.cpp index 1ed9196f89..a4cb101c9e 100644 --- a/src/tests/src/libs/antares/test_utils.cpp +++ b/src/tests/src/libs/antares/test_utils.cpp @@ -3,7 +3,7 @@ #include #include -#include +#include namespace { diff --git a/src/tests/src/solver/simulation/test-time_series.cpp b/src/tests/src/solver/simulation/test-time_series.cpp index 29f7c021f3..5896169521 100644 --- a/src/tests/src/solver/simulation/test-time_series.cpp +++ b/src/tests/src/solver/simulation/test-time_series.cpp @@ -6,7 +6,7 @@ #define WIN32_LEAN_AND_MEAN #include -#include "antares/study.h" +#include #include #include #include "utils.h" diff --git a/src/tools/cleaner/main.cpp b/src/tools/cleaner/main.cpp index f4060f9dbd..3282ccbd8b 100644 --- a/src/tools/cleaner/main.cpp +++ b/src/tools/cleaner/main.cpp @@ -29,7 +29,7 @@ #include #include #include "../../ui/common/winmain.hxx" -#include +#include #include #include #include diff --git a/src/tools/finder/main.cpp b/src/tools/finder/main.cpp index 0e74044d03..10dafea6bc 100644 --- a/src/tools/finder/main.cpp +++ b/src/tools/finder/main.cpp @@ -29,7 +29,7 @@ #include #include #include "../../ui/common/winmain.hxx" -#include +#include #include #include diff --git a/src/tools/kirchhoff-cbuilder/main.cpp b/src/tools/kirchhoff-cbuilder/main.cpp index 6f0a72c52f..03dbf0de38 100644 --- a/src/tools/kirchhoff-cbuilder/main.cpp +++ b/src/tools/kirchhoff-cbuilder/main.cpp @@ -29,8 +29,8 @@ #include #include #include -#include -#include +#include +#include #include #include diff --git a/src/tools/updater/main.cpp b/src/tools/updater/main.cpp index acd4fd035b..af67d4c190 100644 --- a/src/tools/updater/main.cpp +++ b/src/tools/updater/main.cpp @@ -30,7 +30,7 @@ #include #include #include "../../ui/common/winmain.hxx" -#include +#include #include #include #include diff --git a/src/tools/yby-aggregator/main.cpp b/src/tools/yby-aggregator/main.cpp index 4b68fdff80..3127d54a83 100644 --- a/src/tools/yby-aggregator/main.cpp +++ b/src/tools/yby-aggregator/main.cpp @@ -29,7 +29,7 @@ #include #include #include "../../ui/common/winmain.hxx" -#include +#include #include #include #include diff --git a/src/ui/simulator/application/main/create.cpp b/src/ui/simulator/application/main/create.cpp index c3d6074d45..dd30c5af6a 100644 --- a/src/ui/simulator/application/main/create.cpp +++ b/src/ui/simulator/application/main/create.cpp @@ -44,7 +44,7 @@ #include "drag-drop.hxx" // Antares study -#include +#include #include // Antares memory allocation check diff --git a/src/ui/simulator/application/main/main.cpp b/src/ui/simulator/application/main/main.cpp index 0df326e541..d4cca35472 100644 --- a/src/ui/simulator/application/main/main.cpp +++ b/src/ui/simulator/application/main/main.cpp @@ -27,7 +27,7 @@ #include "main.h" -#include +#include #include "../menus.h" #include "../study.h" diff --git a/src/ui/simulator/application/main/main.h b/src/ui/simulator/application/main/main.h index 045d7935dd..a870f91fb2 100644 --- a/src/ui/simulator/application/main/main.h +++ b/src/ui/simulator/application/main/main.h @@ -37,7 +37,7 @@ #include "fwd.h" #include "config.h" #include -#include +#include #include namespace Antares diff --git a/src/ui/simulator/application/recentfiles.cpp b/src/ui/simulator/application/recentfiles.cpp index 7efedc8855..37bae37dfb 100644 --- a/src/ui/simulator/application/recentfiles.cpp +++ b/src/ui/simulator/application/recentfiles.cpp @@ -29,7 +29,7 @@ #include "recentfiles.h" #include #include -#include +#include using namespace Yuni; diff --git a/src/ui/simulator/application/study.cpp b/src/ui/simulator/application/study.cpp index ba92d862e1..3a3e7911e3 100644 --- a/src/ui/simulator/application/study.cpp +++ b/src/ui/simulator/application/study.cpp @@ -1074,10 +1074,16 @@ void OpenStudyFromFolder(wxString folder) void StudyRefreshCalendar() { auto studyptr = GetCurrentStudy(); - if (!(!studyptr)) + if (studyptr) { - studyptr->calendar.reset(studyptr->parameters); - studyptr->calendarOutput.reset(studyptr->parameters); + studyptr->calendar.reset({studyptr->parameters.dayOfThe1stJanuary, + studyptr->parameters.firstWeekday, + studyptr->parameters.firstMonthInYear, + studyptr->parameters.leapYear}); + studyptr->calendarOutput.reset({studyptr->parameters.dayOfThe1stJanuary, + studyptr->parameters.firstWeekday, + studyptr->parameters.firstMonthInYear, + studyptr->parameters.leapYear}); } } diff --git a/src/ui/simulator/application/study.h b/src/ui/simulator/application/study.h index 940f26ee27..1da84de8ba 100644 --- a/src/ui/simulator/application/study.h +++ b/src/ui/simulator/application/study.h @@ -29,7 +29,7 @@ #include #include "../toolbox/wx-wrapper.h" -#include +#include #include #include #include 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 836c924652..702766467d 100644 --- a/src/ui/simulator/toolbox/components/datagrid/renderer/analyzer/areas.cpp +++ b/src/ui/simulator/toolbox/components/datagrid/renderer/analyzer/areas.cpp @@ -28,7 +28,7 @@ #include "areas.h" #include "../../../../../application/study.h" #include "../../component.h" -#include +#include using namespace Yuni; 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 56a44342ae..07e3173b70 100644 --- a/src/ui/simulator/toolbox/components/datagrid/renderer/analyzer/areas.h +++ b/src/ui/simulator/toolbox/components/datagrid/renderer/analyzer/areas.h @@ -29,7 +29,7 @@ #include #include "../../renderer.h" -#include +#include #include #include #include diff --git a/src/ui/simulator/toolbox/components/datagrid/renderer/area/nodal-optimization.h b/src/ui/simulator/toolbox/components/datagrid/renderer/area/nodal-optimization.h index 3a0ae765a9..79160457e2 100644 --- a/src/ui/simulator/toolbox/components/datagrid/renderer/area/nodal-optimization.h +++ b/src/ui/simulator/toolbox/components/datagrid/renderer/area/nodal-optimization.h @@ -30,7 +30,7 @@ #include #include "../../gridhelper.h" #include "../../renderer.h" -#include +#include #include namespace Antares 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 d9883d7dbe..9ee19096da 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 @@ -29,7 +29,7 @@ #include #include "../../renderer.h" -#include +#include #include namespace Antares diff --git a/src/ui/simulator/toolbox/components/datagrid/renderer/bindingconstraint/data.cpp b/src/ui/simulator/toolbox/components/datagrid/renderer/bindingconstraint/data.cpp index 8c6b93ae46..cbcd58064a 100644 --- a/src/ui/simulator/toolbox/components/datagrid/renderer/bindingconstraint/data.cpp +++ b/src/ui/simulator/toolbox/components/datagrid/renderer/bindingconstraint/data.cpp @@ -27,7 +27,7 @@ #include "data.h" #include "data.h" -#include +#include #include #include #include diff --git a/src/ui/simulator/toolbox/components/datagrid/renderer/bindingconstraint/offsets.cpp b/src/ui/simulator/toolbox/components/datagrid/renderer/bindingconstraint/offsets.cpp index 2e5ebf1277..f1aefa92c1 100644 --- a/src/ui/simulator/toolbox/components/datagrid/renderer/bindingconstraint/offsets.cpp +++ b/src/ui/simulator/toolbox/components/datagrid/renderer/bindingconstraint/offsets.cpp @@ -26,7 +26,7 @@ */ #include -#include +#include #include "offsets.h" #include #include diff --git a/src/ui/simulator/toolbox/components/datagrid/renderer/bindingconstraint/weights.cpp b/src/ui/simulator/toolbox/components/datagrid/renderer/bindingconstraint/weights.cpp index b8f7723275..e6c6542430 100644 --- a/src/ui/simulator/toolbox/components/datagrid/renderer/bindingconstraint/weights.cpp +++ b/src/ui/simulator/toolbox/components/datagrid/renderer/bindingconstraint/weights.cpp @@ -26,7 +26,7 @@ */ #include -#include +#include #include "weights.h" #include #include diff --git a/src/ui/simulator/toolbox/components/datagrid/renderer/constraintsbuilder/links.cpp b/src/ui/simulator/toolbox/components/datagrid/renderer/constraintsbuilder/links.cpp index 5b03ef6d69..1d20de31e5 100644 --- a/src/ui/simulator/toolbox/components/datagrid/renderer/constraintsbuilder/links.cpp +++ b/src/ui/simulator/toolbox/components/datagrid/renderer/constraintsbuilder/links.cpp @@ -28,7 +28,7 @@ #include "links.h" #include "../../../../../application/study.h" #include "../../component.h" -#include +#include #include using namespace Yuni; diff --git a/src/ui/simulator/toolbox/components/datagrid/renderer/constraintsbuilder/links.h b/src/ui/simulator/toolbox/components/datagrid/renderer/constraintsbuilder/links.h index c4b8ea684a..10aea05575 100644 --- a/src/ui/simulator/toolbox/components/datagrid/renderer/constraintsbuilder/links.h +++ b/src/ui/simulator/toolbox/components/datagrid/renderer/constraintsbuilder/links.h @@ -29,7 +29,7 @@ #include #include "../../renderer.h" -#include +#include #include "../solver/constraints-builder/cbuilder.h" #include #include diff --git a/src/ui/simulator/toolbox/components/datagrid/renderer/correlation.h b/src/ui/simulator/toolbox/components/datagrid/renderer/correlation.h index fbf73c6ebb..6ee5167ab9 100644 --- a/src/ui/simulator/toolbox/components/datagrid/renderer/correlation.h +++ b/src/ui/simulator/toolbox/components/datagrid/renderer/correlation.h @@ -30,7 +30,7 @@ #include #include "../renderer.h" #include -#include +#include namespace Antares { diff --git a/src/ui/simulator/toolbox/components/htmllistbox/datasource/cluster-order.h b/src/ui/simulator/toolbox/components/htmllistbox/datasource/cluster-order.h index 019da0cbb2..851c27efe2 100644 --- a/src/ui/simulator/toolbox/components/htmllistbox/datasource/cluster-order.h +++ b/src/ui/simulator/toolbox/components/htmllistbox/datasource/cluster-order.h @@ -29,7 +29,7 @@ #include "datasource.h" #include -#include +#include #include "../item/cluster-item.h" using namespace Antares::Component::HTMLListbox::Item; diff --git a/src/ui/simulator/toolbox/components/htmllistbox/item/area.h b/src/ui/simulator/toolbox/components/htmllistbox/item/area.h index e6b58e36d6..5db5ad2444 100644 --- a/src/ui/simulator/toolbox/components/htmllistbox/item/area.h +++ b/src/ui/simulator/toolbox/components/htmllistbox/item/area.h @@ -28,7 +28,7 @@ #define __ANTARES_TOOLBOX_COMPONENT_HTMLLISTBOX_ITEM_AREA_H__ #include "item.h" -#include +#include #include diff --git a/src/ui/simulator/toolbox/components/htmllistbox/item/cluster-item.h b/src/ui/simulator/toolbox/components/htmllistbox/item/cluster-item.h index e72191827e..ca231e9295 100644 --- a/src/ui/simulator/toolbox/components/htmllistbox/item/cluster-item.h +++ b/src/ui/simulator/toolbox/components/htmllistbox/item/cluster-item.h @@ -28,7 +28,7 @@ #pragma once #include "item.h" -#include +#include #include diff --git a/src/ui/simulator/toolbox/components/map/component.h b/src/ui/simulator/toolbox/components/map/component.h index 860fdf4e7d..613b3c5f5f 100644 --- a/src/ui/simulator/toolbox/components/map/component.h +++ b/src/ui/simulator/toolbox/components/map/component.h @@ -28,7 +28,7 @@ #define __ANTARES_TOOLBOX_MAP_COMPONENT_H__ #include -#include +#include #include "control.h" #include #include diff --git a/src/ui/simulator/toolbox/components/map/manager.cpp b/src/ui/simulator/toolbox/components/map/manager.cpp index 62f4663581..7193fbef99 100644 --- a/src/ui/simulator/toolbox/components/map/manager.cpp +++ b/src/ui/simulator/toolbox/components/map/manager.cpp @@ -30,7 +30,7 @@ #include "antares/study/binding_constraint/BindingConstraintsRepository.h" #include "nodes/connection.h" #include "component.h" -#include +#include #include "../../../application/main/main.h" #include "../../../application/study.h" #include "../../../windows/inspector.h" diff --git a/src/ui/simulator/toolbox/components/map/manager.h b/src/ui/simulator/toolbox/components/map/manager.h index 234e87fdb7..a0190068f0 100644 --- a/src/ui/simulator/toolbox/components/map/manager.h +++ b/src/ui/simulator/toolbox/components/map/manager.h @@ -28,7 +28,7 @@ #define __ANTARES_TOOLBOX_MAP_CONTAINER_H__ #include -#include +#include #include #include #include "nodes/node.h" diff --git a/src/ui/simulator/toolbox/components/map/nodes/node.h b/src/ui/simulator/toolbox/components/map/nodes/node.h index 8f1b2d85a7..4f02b16292 100644 --- a/src/ui/simulator/toolbox/components/map/nodes/node.h +++ b/src/ui/simulator/toolbox/components/map/nodes/node.h @@ -28,7 +28,7 @@ #define __ANTARES_TOOLBOX_MAP_NODE_H__ #include -#include +#include #include #include "item.h" #include "../drawingcontext.h" diff --git a/src/ui/simulator/toolbox/ext-source/apply.h b/src/ui/simulator/toolbox/ext-source/apply.h index b64ab47b05..17af0e55a8 100644 --- a/src/ui/simulator/toolbox/ext-source/apply.h +++ b/src/ui/simulator/toolbox/ext-source/apply.h @@ -28,7 +28,7 @@ #define __ANTARES_TOOLBOX_EXT_SOURCE_APPLY_H__ #include -#include +#include #include #include diff --git a/src/ui/simulator/toolbox/ext-source/performer.h b/src/ui/simulator/toolbox/ext-source/performer.h index 80aeb198ea..895dadfc3e 100644 --- a/src/ui/simulator/toolbox/ext-source/performer.h +++ b/src/ui/simulator/toolbox/ext-source/performer.h @@ -28,7 +28,7 @@ #define __ANTARES_APPLICATION_EXT_SOURCE_PERFORMER_H__ #include -#include +#include #include #include #include diff --git a/src/ui/simulator/toolbox/ext-source/window.h b/src/ui/simulator/toolbox/ext-source/window.h index f96f21420e..9fc4a7b1cb 100644 --- a/src/ui/simulator/toolbox/ext-source/window.h +++ b/src/ui/simulator/toolbox/ext-source/window.h @@ -28,7 +28,7 @@ #define __ANTARES_APPLICATION_EXT_SOURCE_WINDOW_H__ #include -#include +#include #include #include #include diff --git a/src/ui/simulator/toolbox/input/connection.cpp b/src/ui/simulator/toolbox/input/connection.cpp index 61192cc66d..4c8b0ccfaa 100644 --- a/src/ui/simulator/toolbox/input/connection.cpp +++ b/src/ui/simulator/toolbox/input/connection.cpp @@ -26,7 +26,7 @@ */ #include -#include +#include #include "connection.h" #include "../components/captionpanel.h" #include "../../application/study.h" diff --git a/src/ui/simulator/toolbox/input/connection.h b/src/ui/simulator/toolbox/input/connection.h index ba2ff95dbb..c4de901394 100644 --- a/src/ui/simulator/toolbox/input/connection.h +++ b/src/ui/simulator/toolbox/input/connection.h @@ -29,7 +29,7 @@ #include #include -#include +#include #include "input.h" #include #include diff --git a/src/ui/simulator/toolbox/input/renewable-cluster.h b/src/ui/simulator/toolbox/input/renewable-cluster.h index 8f9f42da23..ac9bf88001 100644 --- a/src/ui/simulator/toolbox/input/renewable-cluster.h +++ b/src/ui/simulator/toolbox/input/renewable-cluster.h @@ -30,7 +30,7 @@ // gp : remove useless header includes // #include #include -// #include +// #include #include "input.h" #include "area.h" // #include diff --git a/src/ui/simulator/toolbox/input/thermal-cluster.h b/src/ui/simulator/toolbox/input/thermal-cluster.h index 698bc8335f..60ecf7f779 100644 --- a/src/ui/simulator/toolbox/input/thermal-cluster.h +++ b/src/ui/simulator/toolbox/input/thermal-cluster.h @@ -29,7 +29,7 @@ #include #include -#include +#include #include "input.h" #include "area.h" #include diff --git a/src/ui/simulator/toolbox/spotlight/area.h b/src/ui/simulator/toolbox/spotlight/area.h index 61ac556378..3becd438f6 100644 --- a/src/ui/simulator/toolbox/spotlight/area.h +++ b/src/ui/simulator/toolbox/spotlight/area.h @@ -29,7 +29,7 @@ #include #include -#include +#include #include diff --git a/src/ui/simulator/toolbox/spotlight/constraint.h b/src/ui/simulator/toolbox/spotlight/constraint.h index e4539fa655..fe12301d84 100644 --- a/src/ui/simulator/toolbox/spotlight/constraint.h +++ b/src/ui/simulator/toolbox/spotlight/constraint.h @@ -29,7 +29,7 @@ #include #include -#include +#include #include diff --git a/src/ui/simulator/windows/bindingconstraint/edit.cpp b/src/ui/simulator/windows/bindingconstraint/edit.cpp index c1f9105434..42b1e30d84 100644 --- a/src/ui/simulator/windows/bindingconstraint/edit.cpp +++ b/src/ui/simulator/windows/bindingconstraint/edit.cpp @@ -32,7 +32,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/ui/simulator/windows/correlation/correlation.h b/src/ui/simulator/windows/correlation/correlation.h index 87c740a81b..7843ddaab1 100644 --- a/src/ui/simulator/windows/correlation/correlation.h +++ b/src/ui/simulator/windows/correlation/correlation.h @@ -30,7 +30,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/ui/simulator/windows/exportmap.h b/src/ui/simulator/windows/exportmap.h index 66de5929f2..a10c5cfcd6 100644 --- a/src/ui/simulator/windows/exportmap.h +++ b/src/ui/simulator/windows/exportmap.h @@ -28,7 +28,7 @@ #define __ANTARES_APPLICATION_WINDOWS_EXPORTMAP_H__ #include -#include +#include #include #include "../application/study.h" #include "../toolbox/components/map/settings.h" diff --git a/src/ui/simulator/windows/inspector/data.h b/src/ui/simulator/windows/inspector/data.h index 060b31e7f2..6a553854fd 100644 --- a/src/ui/simulator/windows/inspector/data.h +++ b/src/ui/simulator/windows/inspector/data.h @@ -30,7 +30,7 @@ #include #include #include "antares/study/binding_constraint/BindingConstraintsRepository.h" -#include +#include namespace Antares { diff --git a/src/ui/simulator/windows/inspector/frame.h b/src/ui/simulator/windows/inspector/frame.h index b5bb2901ed..7582cee43a 100644 --- a/src/ui/simulator/windows/inspector/frame.h +++ b/src/ui/simulator/windows/inspector/frame.h @@ -30,7 +30,7 @@ #include #include -#include +#include #include "../notes.h" #include "data.h" #include diff --git a/src/ui/simulator/windows/inspector/grid.h b/src/ui/simulator/windows/inspector/grid.h index 8b99ec5126..bfd7bed40e 100644 --- a/src/ui/simulator/windows/inspector/grid.h +++ b/src/ui/simulator/windows/inspector/grid.h @@ -28,7 +28,7 @@ #define __ANTARES_WINDOWS_INSPECTOR_GRID_H__ #include -#include +#include #include #include #include diff --git a/src/ui/simulator/windows/memorystatistics/memorystatistics.cpp b/src/ui/simulator/windows/memorystatistics/memorystatistics.cpp index aa7cca7930..dca00ae8b5 100644 --- a/src/ui/simulator/windows/memorystatistics/memorystatistics.cpp +++ b/src/ui/simulator/windows/memorystatistics/memorystatistics.cpp @@ -30,7 +30,7 @@ #include #include "memorystatistics.h" -#include +#include #include "../../application/study.h" #include "../../toolbox/create.h" #include "../../toolbox/resources.h" diff --git a/src/ui/simulator/windows/notes.cpp b/src/ui/simulator/windows/notes.cpp index f6a7d07070..5273971e87 100644 --- a/src/ui/simulator/windows/notes.cpp +++ b/src/ui/simulator/windows/notes.cpp @@ -41,7 +41,7 @@ #include #include #include -#include +#include #include "../application/study.h" using namespace Yuni; diff --git a/src/ui/simulator/windows/output/job.cpp b/src/ui/simulator/windows/output/job.cpp index dda2c59071..66a66c291d 100644 --- a/src/ui/simulator/windows/output/job.cpp +++ b/src/ui/simulator/windows/output/job.cpp @@ -27,7 +27,7 @@ #include "job.h" #include -#include +#include #include using namespace Yuni; diff --git a/src/ui/simulator/windows/saveas.h b/src/ui/simulator/windows/saveas.h index bde4a26e4a..b2ff86e670 100644 --- a/src/ui/simulator/windows/saveas.h +++ b/src/ui/simulator/windows/saveas.h @@ -28,7 +28,7 @@ #define __ANTARES_APPLICATION_WINDOWS_SAVEAS_H__ #include -#include +#include #include "../application/study.h" #include diff --git a/src/ui/simulator/windows/sets.cpp b/src/ui/simulator/windows/sets.cpp index f2ca445f99..421e58b036 100644 --- a/src/ui/simulator/windows/sets.cpp +++ b/src/ui/simulator/windows/sets.cpp @@ -41,7 +41,7 @@ #include #include #include -#include +#include #include "../application/study.h" #include "inspector.h" diff --git a/src/ui/simulator/windows/simulation/run.h b/src/ui/simulator/windows/simulation/run.h index 8c2b44a200..710d0ab2d5 100644 --- a/src/ui/simulator/windows/simulation/run.h +++ b/src/ui/simulator/windows/simulation/run.h @@ -29,7 +29,7 @@ #include #include -#include +#include #include #include diff --git a/src/ui/simulator/windows/studylogs.h b/src/ui/simulator/windows/studylogs.h index fe3b3c74e8..c0ce61013b 100644 --- a/src/ui/simulator/windows/studylogs.h +++ b/src/ui/simulator/windows/studylogs.h @@ -28,7 +28,7 @@ #define __ANTARES_APPLICATION_WINDOWS_STUDY_LOGS_H__ #include -#include +#include #include #include diff --git a/src/ui/simulator/windows/textinput/input.cpp b/src/ui/simulator/windows/textinput/input.cpp index 90108e58f6..bd8357b58b 100644 --- a/src/ui/simulator/windows/textinput/input.cpp +++ b/src/ui/simulator/windows/textinput/input.cpp @@ -31,22 +31,16 @@ #include "../../application/main/main.h" #include "../../toolbox/components/wizardheader.h" #include "../../toolbox/create.h" -#include #include #include -#include -#include #include -#include #include #include using namespace Yuni; -namespace Antares -{ -namespace Window +namespace Antares::Window { namespace // anonymous { @@ -191,5 +185,5 @@ bool AskForInput(wxString& out, const wxString& title, const wxString& caption) return false; } -} // namespace Window -} // namespace Antares +} // namespace Antares::Window + diff --git a/src/ui/simulator/windows/xcast/xcast.h b/src/ui/simulator/windows/xcast/xcast.h index 18976f0c4c..aa3b7c0be2 100644 --- a/src/ui/simulator/windows/xcast/xcast.h +++ b/src/ui/simulator/windows/xcast/xcast.h @@ -32,7 +32,7 @@ #include "../../toolbox/components/datagrid/component.h" #include "../../toolbox/input/area.h" #include -#include +#include #include #include #include From d6e5113a4eebebd87105822eaf7ac8b75c660d3d Mon Sep 17 00:00:00 2001 From: Jason Marechal Date: Wed, 23 Aug 2023 16:24:10 +0200 Subject: [PATCH 38/52] Fix merge --- src/libs/antares/CMakeLists.txt | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/libs/antares/CMakeLists.txt b/src/libs/antares/CMakeLists.txt index 26a2655259..d1b287de14 100644 --- a/src/libs/antares/CMakeLists.txt +++ b/src/libs/antares/CMakeLists.txt @@ -43,9 +43,6 @@ set(SRC solver.h solver.cpp - # Host info - hostinfo.h hostinfo.cpp - # version version.h version.cpp From 40b2c6559939d3ccc04cac44f5594d58438776ea Mon Sep 17 00:00:00 2001 From: Jason Marechal Date: Thu, 24 Aug 2023 10:07:59 +0200 Subject: [PATCH 39/52] Remove lots of libs from core --- src/analyzer/CMakeLists.txt | 2 ++ src/libs/antares/CMakeLists.txt | 20 ++--------- src/libs/antares/checks/CMakeLists.txt | 1 + src/libs/antares/object/CMakeLists.txt | 1 + src/libs/antares/study/CMakeLists.txt | 3 +- src/libs/antares/wx-wrapper.h | 33 ------------------- src/solver/CMakeLists.txt | 1 + src/solver/aleatoire/CMakeLists.txt | 5 ++- src/solver/constraints-builder/CMakeLists.txt | 5 ++- src/solver/hydro/CMakeLists.txt | 9 +++-- .../CMakeLists.txt | 1 + src/solver/ts-generator/CMakeLists.txt | 1 + src/solver/utils/CMakeLists.txt | 2 ++ src/solver/variable/CMakeLists.txt | 8 +++-- src/tests/src/libs/antares/CMakeLists.txt | 1 + .../antares/study/constraint/CMakeLists.txt | 2 ++ .../study/output-folder/CMakeLists.txt | 1 + .../thermal-price-definition/CMakeLists.txt | 1 + .../src/solver/simulation/CMakeLists.txt | 2 ++ src/tools/batchrun/CMakeLists.txt | 1 + src/tools/cleaner/CMakeLists.txt | 1 + src/tools/finder/CMakeLists.txt | 2 ++ src/tools/updater/CMakeLists.txt | 1 + src/tools/vacuum/CMakeLists.txt | 1 + src/tools/yby-aggregator/CMakeLists.txt | 3 ++ src/ui/common/CMakeLists.txt | 3 ++ src/ui/simulator/CMakeLists.txt | 3 +- .../application/main/build/standard-page.hxx | 1 - src/ui/simulator/cmake/application.cmake | 1 + .../simulator/cmake/windows-studyparts.cmake | 6 +++- .../simulator/toolbox/clipboard/clipboard.cpp | 1 - .../simulator/toolbox/clipboard/clipboard.h | 1 - .../toolbox/components/button/button.h | 1 - .../toolbox/components/captionpanel.h | 1 - .../toolbox/components/datagrid/component.cpp | 1 - .../toolbox/components/datagrid/component.h | 1 - .../toolbox/components/datagrid/dbgrid.h | 1 - .../toolbox/components/datagrid/default.h | 1 - .../components/datagrid/filter/all/any.h | 1 - .../datagrid/filter/all/columnindex.h | 1 - .../components/datagrid/filter/all/day.h | 1 - .../components/datagrid/filter/all/dayyear.h | 1 - .../components/datagrid/filter/all/hour.h | 1 - .../components/datagrid/filter/all/houryear.h | 1 - .../components/datagrid/filter/all/month.h | 1 - .../components/datagrid/filter/all/week.h | 1 - .../components/datagrid/filter/all/weekday.h | 1 - .../components/datagrid/filter/component.cpp | 1 - .../components/datagrid/filter/component.h | 1 - .../components/datagrid/filter/filter.cpp | 1 - .../components/datagrid/filter/filter.h | 1 - .../components/datagrid/filter/input.h | 1 - .../components/datagrid/filter/operator.h | 1 - .../datagrid/filter/operator.list.cpp | 1 + .../datagrid/filter/operator.list.h | 2 +- .../datagrid/filter/parameter/parameter.cpp | 1 + .../datagrid/filter/parameter/parameter.h | 1 - .../toolbox/components/datagrid/gridhelper.h | 4 +-- .../toolbox/components/datagrid/renderer.h | 2 +- .../renderer/adequacy-patch-area-grid.h | 1 - .../datagrid/renderer/analyzer/areas.h | 1 - .../components/datagrid/renderer/area.h | 1 - .../renderer/area/common.areasummary.h | 1 - .../renderer/area/creditmodulations.h | 1 - .../components/datagrid/renderer/area/dsm.h | 1 - .../datagrid/renderer/area/hydro/allocation.h | 1 - .../renderer/area/hydromonthlypower.h | 1 - .../datagrid/renderer/area/hydroprepro.h | 1 - .../datagrid/renderer/area/inflowpattern.h | 1 - .../components/datagrid/renderer/area/misc.h | 1 - .../renderer/area/nodal-optimization.h | 1 - .../datagrid/renderer/area/reservoirlevels.h | 1 - .../renderer/area/thermalmodulation.h | 1 - .../datagrid/renderer/area/thermalprepro.h | 1 - .../datagrid/renderer/area/timeseries.h | 1 - .../datagrid/renderer/area/watervalues.h | 1 - .../datagrid/renderer/area/xcast-allareas.h | 1 - .../renderer/area/xcast-coefficients.h | 1 - .../datagrid/renderer/area/xcast-conversion.h | 1 - .../datagrid/renderer/area/xcast-k.h | 1 - .../renderer/area/xcast-translation.h | 1 - .../renderer/bindingconstraint/data.cpp | 1 - .../renderer/bindingconstraint/data.h | 1 - .../renderer/bindingconstraint/offsets.cpp | 1 - .../renderer/bindingconstraint/offsets.h | 1 - .../renderer/bindingconstraint/weights.cpp | 1 - .../renderer/bindingconstraint/weights.h | 1 - .../components/datagrid/renderer/connection.h | 1 - .../renderer/constraintsbuilder/links.h | 1 - .../datagrid/renderer/correlation.h | 2 +- .../components/datagrid/renderer/layers.h | 1 - .../datagrid/renderer/links/summary.cpp | 1 - .../datagrid/renderer/links/summary.h | 1 - .../components/datagrid/renderer/logfile.h | 1 - .../components/datagrid/renderer/matrix.h | 1 - .../datagrid/renderer/mc-playlist.h | 1 - .../datagrid/renderer/select-variables.h | 1 - .../components/datagrid/wxgrid-renderer.h | 1 - .../components/htmllistbox/component.h | 1 - .../htmllistbox/datasource/datasource.h | 2 +- .../components/htmllistbox/item/area.cpp | 1 + .../htmllistbox/item/cluster-item.cpp | 1 + .../components/htmllistbox/item/item.h | 3 +- .../htmllistbox/item/pathlistitem.cpp | 3 +- .../simulator/toolbox/components/mainpanel.h | 1 - .../toolbox/components/map/component.h | 1 - .../toolbox/components/map/control.h | 1 - .../components/map/controls/addtools.h | 1 - .../toolbox/components/map/drawingcontext.h | 1 - .../simulator/toolbox/components/map/infos.h | 1 - .../toolbox/components/map/manager.h | 1 - .../components/map/nodes/bindingconstraint.h | 1 - .../toolbox/components/map/nodes/connection.h | 1 - .../toolbox/components/map/nodes/item.h | 1 - .../toolbox/components/map/nodes/node.h | 1 - .../toolbox/components/map/settings.h | 2 +- .../toolbox/components/map/tools/tool.h | 1 - .../toolbox/components/notebook/notebook.h | 1 - .../toolbox/components/progressbar.h | 1 - src/ui/simulator/toolbox/components/refresh.h | 2 +- .../simulator/toolbox/components/wip-panel.h | 1 - .../toolbox/components/wizardheader.h | 1 - src/ui/simulator/toolbox/create.h | 1 - src/ui/simulator/toolbox/execute/execute.h | 2 +- .../toolbox/ext-source/action-panel.cpp | 1 - .../toolbox/ext-source/action-panel.h | 1 - .../simulator/toolbox/ext-source/performer.h | 1 - src/ui/simulator/toolbox/ext-source/window.h | 1 - src/ui/simulator/toolbox/input/area.h | 1 - .../bindingconstraint/bindingconstraint.cpp | 1 - .../bindingconstraint/bindingconstraint.h | 1 - src/ui/simulator/toolbox/input/connection.h | 1 - src/ui/simulator/toolbox/input/input.h | 1 - .../toolbox/input/renewable-cluster.h | 3 +- .../simulator/toolbox/input/thermal-cluster.h | 1 - src/ui/simulator/toolbox/jobs/job.cpp | 1 - src/ui/simulator/toolbox/jobs/job.h | 1 - src/ui/simulator/toolbox/locales.cpp | 1 - src/ui/simulator/toolbox/resources.cpp | 1 + src/ui/simulator/toolbox/resources.h | 1 - src/ui/simulator/windows/analyzer/analyzer.h | 1 - .../bindingconstraint/bindingconstraint.h | 1 - .../windows/bindingconstraint/edit.h | 2 +- src/ui/simulator/windows/calendar/calendar.h | 1 - src/ui/simulator/windows/cleaner.h | 1 - .../constraints-builder/constraintsbuilder.h | 1 - .../windows/correlation/correlation.h | 1 - src/ui/simulator/windows/exportmap.h | 1 - src/ui/simulator/windows/hydro/allocation.h | 1 - src/ui/simulator/windows/hydro/dailypower.h | 1 - .../simulator/windows/hydro/levelsandvalues.h | 1 - .../simulator/windows/hydro/localdatahydro.h | 1 - src/ui/simulator/windows/hydro/management.h | 1 - src/ui/simulator/windows/hydro/prepro.h | 1 - src/ui/simulator/windows/hydro/series.h | 1 - .../simulator/windows/inspector/constants.h | 2 +- .../windows/inspector/editor-calendar.h | 1 - src/ui/simulator/windows/inspector/frame.cpp | 1 - src/ui/simulator/windows/inspector/frame.h | 1 - src/ui/simulator/windows/inspector/grid.h | 1 - .../simulator/windows/inspector/inspector.cpp | 1 - .../memorystatistics/memorystatistics.h | 1 - src/ui/simulator/windows/message.h | 1 - src/ui/simulator/windows/notes.h | 1 - .../adequacy-patch/adequacy-patch-areas.h | 1 - .../adequacy-patch/adequacy-patch-options.h | 1 - .../windows/options/advanced/advanced.h | 1 - .../options/optimization/optimization.h | 1 - .../windows/options/playlist/playlist.h | 1 - .../options/select-output/select-output.h | 1 - .../windows/options/temp-folder/temp-folder.h | 1 - src/ui/simulator/windows/output/layer.h | 1 - src/ui/simulator/windows/output/output.h | 1 - .../windows/output/panel/area-link-renderer.h | 1 - src/ui/simulator/windows/output/panel/panel.h | 1 - .../output/provider/output-comparison.h | 1 - .../windows/output/provider/outputs.h | 1 - .../windows/output/provider/variables.h | 1 - .../windows/output/spotlight-provider.h | 1 - src/ui/simulator/windows/output/window.h | 1 - src/ui/simulator/windows/renewables/cluster.h | 1 - src/ui/simulator/windows/saveas.h | 1 - .../windows/scenario-builder/panel.h | 1 - src/ui/simulator/windows/sets.h | 1 - src/ui/simulator/windows/simulation/panel.h | 1 - src/ui/simulator/windows/simulation/run.h | 1 - src/ui/simulator/windows/startupwizard.h | 1 - src/ui/simulator/windows/studylogs.h | 1 - src/ui/simulator/windows/textinput/input.cpp | 1 - src/ui/simulator/windows/textinput/input.h | 1 - src/ui/simulator/windows/thermal/cluster.h | 1 - src/ui/simulator/windows/version.h | 3 +- src/ui/simulator/windows/xcast/xcast.h | 1 - 193 files changed, 83 insertions(+), 222 deletions(-) delete mode 100644 src/libs/antares/wx-wrapper.h diff --git a/src/analyzer/CMakeLists.txt b/src/analyzer/CMakeLists.txt index ea1f65d7d0..4fd5736c94 100644 --- a/src/analyzer/CMakeLists.txt +++ b/src/analyzer/CMakeLists.txt @@ -55,6 +55,8 @@ target_link_libraries(antares-${ANTARES_PRG_VERSION}-analyzer Antares::sys yuni-static-core ${CMAKE_THREADS_LIBS_INIT} + PUBLIC + Antares::study #atsp -> xcast ) import_std_libs(antares-${ANTARES_PRG_VERSION}-analyzer) diff --git a/src/libs/antares/CMakeLists.txt b/src/libs/antares/CMakeLists.txt index d1b287de14..0d9760f186 100644 --- a/src/libs/antares/CMakeLists.txt +++ b/src/libs/antares/CMakeLists.txt @@ -33,9 +33,6 @@ set(SRC fatal-error.h - # wx-wrapper - wx-wrapper.h - # resource resources/resources.h resources/resources.cpp @@ -77,21 +74,8 @@ target_include_directories(libantares-core target_link_libraries(libantares-core PUBLIC yuni-static-core - yuni-static-uuid - Antares::study - Boost::boost - Antares::memory - date - logs - exception - checks - libantares-solver-variable-info - result_writer - inifile - io - array - correlation - object + Antares::logs + Antares::exception ) import_std_libs(libantares-core) diff --git a/src/libs/antares/checks/CMakeLists.txt b/src/libs/antares/checks/CMakeLists.txt index 5d9133d4d1..6e5b9f4251 100644 --- a/src/libs/antares/checks/CMakeLists.txt +++ b/src/libs/antares/checks/CMakeLists.txt @@ -7,6 +7,7 @@ source_group("checks" FILES ${SRC_CHECKS}) add_library(checks ${SRC_CHECKS} ) +add_library(Antares::checks ALIAS checks) target_include_directories(checks PRIVATE diff --git a/src/libs/antares/object/CMakeLists.txt b/src/libs/antares/object/CMakeLists.txt index aebaeb7e97..774ec2dfd3 100644 --- a/src/libs/antares/object/CMakeLists.txt +++ b/src/libs/antares/object/CMakeLists.txt @@ -10,6 +10,7 @@ source_group("object" FILES ${SRC_OBJECT}) add_library(object ${SRC_OBJECT}) +add_library(Antares::object ALIAS object) target_link_libraries(object PRIVATE diff --git a/src/libs/antares/study/CMakeLists.txt b/src/libs/antares/study/CMakeLists.txt index 52760dd707..99442a8e7d 100644 --- a/src/libs/antares/study/CMakeLists.txt +++ b/src/libs/antares/study/CMakeLists.txt @@ -435,8 +435,9 @@ target_link_libraries(study Antares::correlation Antares::path Antares::mersenne + Antares::result_writer #study.h + Antares::object PRIVATE - result_writer Antares::exception ) diff --git a/src/libs/antares/wx-wrapper.h b/src/libs/antares/wx-wrapper.h deleted file mode 100644 index 907e101d19..0000000000 --- a/src/libs/antares/wx-wrapper.h +++ /dev/null @@ -1,33 +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_WX_WIDGETS_H__ -#define __ANTARES_LIBS_WX_WIDGETS_H__ - -// \TODO This header should be removed -#include "../ui/simulator/toolbox/wx-wrapper.h" - -#endif // __ANTARES_LIBS_WX_WIDGETS_H__ diff --git a/src/solver/CMakeLists.txt b/src/solver/CMakeLists.txt index acf97067ae..3ec69be700 100644 --- a/src/solver/CMakeLists.txt +++ b/src/solver/CMakeLists.txt @@ -98,6 +98,7 @@ target_link_libraries(antares-solver result_writer Antares::sys Antares::infoCollection + Antares::checks ) target_include_directories(antares-solver diff --git a/src/solver/aleatoire/CMakeLists.txt b/src/solver/aleatoire/CMakeLists.txt index d6bc05c2b1..f705fb6dda 100644 --- a/src/solver/aleatoire/CMakeLists.txt +++ b/src/solver/aleatoire/CMakeLists.txt @@ -11,4 +11,7 @@ target_include_directories(libantares-solver-aleatoire PRIVATE ${CMAKE_SOURCE_DIR}/solver) -target_link_libraries(libantares-solver-aleatoire PRIVATE libantares-core) +target_link_libraries(libantares-solver-aleatoire PRIVATE libantares-core + PUBLIC + Antares::study +) diff --git a/src/solver/constraints-builder/CMakeLists.txt b/src/solver/constraints-builder/CMakeLists.txt index 5e4e97fa72..41bc8f0569 100644 --- a/src/solver/constraints-builder/CMakeLists.txt +++ b/src/solver/constraints-builder/CMakeLists.txt @@ -21,4 +21,7 @@ add_library(libantares-solver-constraints-builder ${SRC_CBUILDER} ) -target_link_libraries(libantares-solver-constraints-builder PRIVATE libantares-core) +target_link_libraries(libantares-solver-constraints-builder PRIVATE libantares-core + PUBLIC + Antares::study +) diff --git a/src/solver/hydro/CMakeLists.txt b/src/solver/hydro/CMakeLists.txt index 57334c0216..c2f3d6f5c1 100644 --- a/src/solver/hydro/CMakeLists.txt +++ b/src/solver/hydro/CMakeLists.txt @@ -66,9 +66,12 @@ add_library(libantares-solver-hydro ${SRC_MANAGEMENT} ) target_link_libraries(libantares-solver-hydro - PRIVATE - libmodel_antares - libantares-solver-variable PUBLIC sirius_solver) + PRIVATE + libmodel_antares + libantares-solver-variable + Antares::study + Antares::mersenne + PUBLIC sirius_solver) target_include_directories(libantares-solver-hydro PRIVATE diff --git a/src/solver/infeasible-problem-analysis/CMakeLists.txt b/src/solver/infeasible-problem-analysis/CMakeLists.txt index 9a5e4a6966..321f24d5b4 100644 --- a/src/solver/infeasible-problem-analysis/CMakeLists.txt +++ b/src/solver/infeasible-problem-analysis/CMakeLists.txt @@ -15,4 +15,5 @@ add_library(infeasible_problem_analysis ${SRC_INFEASIBLE_PROBLEM_ANALYSIS}) target_link_libraries(infeasible_problem_analysis PUBLIC ortools::ortools sirius_solver PRIVATE libantares-core + utils ) diff --git a/src/solver/ts-generator/CMakeLists.txt b/src/solver/ts-generator/CMakeLists.txt index 846f9091ff..d01cf0adf9 100644 --- a/src/solver/ts-generator/CMakeLists.txt +++ b/src/solver/ts-generator/CMakeLists.txt @@ -47,4 +47,5 @@ target_link_libraries(libantares-solver-ts-generator result_writer array benchmarking + Antares::study ) diff --git a/src/solver/utils/CMakeLists.txt b/src/solver/utils/CMakeLists.txt index 5d4bfd160a..1bd26bfb42 100644 --- a/src/solver/utils/CMakeLists.txt +++ b/src/solver/utils/CMakeLists.txt @@ -25,4 +25,6 @@ target_link_libraries(utils ortools::ortools sirius_solver libantares-core + Antares::result_writer + Antares::study ) diff --git a/src/solver/variable/CMakeLists.txt b/src/solver/variable/CMakeLists.txt index aa02301a5c..152e01a218 100644 --- a/src/solver/variable/CMakeLists.txt +++ b/src/solver/variable/CMakeLists.txt @@ -161,7 +161,9 @@ target_include_directories(libantares-solver-variable ${CMAKE_SOURCE_DIR}/libs PUBLIC .) -target_link_libraries(libantares-solver-variable PRIVATE libantares-core) +target_link_libraries(libantares-solver-variable PRIVATE libantares-core + Antares::study +) add_library(libantares-solver-variable-info @@ -180,5 +182,7 @@ target_include_directories(libantares-solver-variable-info PRIVATE ${CMAKE_SOURCE_DIR}/libs ) -target_link_libraries(libantares-solver-variable-info PRIVATE libantares-core result_writer) +target_link_libraries(libantares-solver-variable-info PRIVATE libantares-core + Antares::study +) diff --git a/src/tests/src/libs/antares/CMakeLists.txt b/src/tests/src/libs/antares/CMakeLists.txt index 1c187d8df7..b26ea2d0d3 100644 --- a/src/tests/src/libs/antares/CMakeLists.txt +++ b/src/tests/src/libs/antares/CMakeLists.txt @@ -113,6 +113,7 @@ target_link_libraries(test-utils PRIVATE libantares-core Boost::unit_test_framework + Antares::utils ) add_test(NAME test-utils COMMAND test-utils) diff --git a/src/tests/src/libs/antares/study/constraint/CMakeLists.txt b/src/tests/src/libs/antares/study/constraint/CMakeLists.txt index be1888bde6..c530f6e2da 100644 --- a/src/tests/src/libs/antares/study/constraint/CMakeLists.txt +++ b/src/tests/src/libs/antares/study/constraint/CMakeLists.txt @@ -7,6 +7,7 @@ target_link_libraries(test_constraint libantares-core test_utils_unit Boost::unit_test_framework + Antares::study ) # Storing test_constraint under the folder Unit-tests in the IDE @@ -31,6 +32,7 @@ target_link_libraries(test_groups libantares-core test_utils_unit Boost::unit_test_framework + Antares::study ) # Storing test_constraint under the folder Unit-tests in the IDE diff --git a/src/tests/src/libs/antares/study/output-folder/CMakeLists.txt b/src/tests/src/libs/antares/study/output-folder/CMakeLists.txt index e3fc502356..8544889dd2 100644 --- a/src/tests/src/libs/antares/study/output-folder/CMakeLists.txt +++ b/src/tests/src/libs/antares/study/output-folder/CMakeLists.txt @@ -12,6 +12,7 @@ target_link_libraries(test-folder-output PRIVATE Boost::unit_test_framework libantares-core + Antares::study ) # Linux diff --git a/src/tests/src/libs/antares/study/thermal-price-definition/CMakeLists.txt b/src/tests/src/libs/antares/study/thermal-price-definition/CMakeLists.txt index d8e55c3248..5443c8ba48 100644 --- a/src/tests/src/libs/antares/study/thermal-price-definition/CMakeLists.txt +++ b/src/tests/src/libs/antares/study/thermal-price-definition/CMakeLists.txt @@ -23,6 +23,7 @@ target_link_libraries(thermal-price-definition Boost::unit_test_framework libantares-core checks + Antares::study ) # Linux if(UNIX AND NOT APPLE) diff --git a/src/tests/src/solver/simulation/CMakeLists.txt b/src/tests/src/solver/simulation/CMakeLists.txt index bfab3f6cba..ef9d45950e 100644 --- a/src/tests/src/solver/simulation/CMakeLists.txt +++ b/src/tests/src/solver/simulation/CMakeLists.txt @@ -47,6 +47,7 @@ target_link_libraries(test-store-timeseries-number libantares-core libantares-solver-simulation result_writer + Antares::study ) # Linux @@ -74,6 +75,7 @@ target_link_libraries(test-time_series test_utils_unit libantares-core libantares-solver-simulation + Antares::study ) # Linux diff --git a/src/tools/batchrun/CMakeLists.txt b/src/tools/batchrun/CMakeLists.txt index c7fe1cccbe..e4538d13a8 100644 --- a/src/tools/batchrun/CMakeLists.txt +++ b/src/tools/batchrun/CMakeLists.txt @@ -41,6 +41,7 @@ set(BATCHRUN_LIBS yuni-static-core inifile ${CMAKE_THREADS_LIBS_INIT} + Antares::study ) target_link_libraries(${execname} diff --git a/src/tools/cleaner/CMakeLists.txt b/src/tools/cleaner/CMakeLists.txt index 74a1f9db1e..027770bb81 100644 --- a/src/tools/cleaner/CMakeLists.txt +++ b/src/tools/cleaner/CMakeLists.txt @@ -28,6 +28,7 @@ set(CLEANER_LIBS libantares-core yuni-static-core Antares::sys + Antares::study ${CMAKE_THREADS_LIBS_INIT} ) diff --git a/src/tools/finder/CMakeLists.txt b/src/tools/finder/CMakeLists.txt index 5336857eb1..3908bc8cd8 100644 --- a/src/tools/finder/CMakeLists.txt +++ b/src/tools/finder/CMakeLists.txt @@ -34,6 +34,8 @@ set(FINDER_LIBS target_link_libraries(${execname} PRIVATE ${FINDER_LIBS} + PUBLIC + Antares::study ) import_std_libs(${execname}) diff --git a/src/tools/updater/CMakeLists.txt b/src/tools/updater/CMakeLists.txt index 0ca493b531..641518a45b 100644 --- a/src/tools/updater/CMakeLists.txt +++ b/src/tools/updater/CMakeLists.txt @@ -28,6 +28,7 @@ set(UPDATER_LIBS libantares-core yuni-static-core Antares::sys + Antares::study ${CMAKE_THREADS_LIBS_INIT} ) diff --git a/src/tools/vacuum/CMakeLists.txt b/src/tools/vacuum/CMakeLists.txt index 92789a4482..f02287eb43 100644 --- a/src/tools/vacuum/CMakeLists.txt +++ b/src/tools/vacuum/CMakeLists.txt @@ -37,6 +37,7 @@ set(VACUUM_LIBS libantares-fswalker yuni-static-core ${CMAKE_THREADS_LIBS_INIT} + Antares::study ) target_link_libraries(${execname} diff --git a/src/tools/yby-aggregator/CMakeLists.txt b/src/tools/yby-aggregator/CMakeLists.txt index b83ceb82de..6f1a449532 100644 --- a/src/tools/yby-aggregator/CMakeLists.txt +++ b/src/tools/yby-aggregator/CMakeLists.txt @@ -63,6 +63,9 @@ target_include_directories(${execname} target_link_libraries(${execname} PRIVATE ${YBY_AGGREGATOR_LIBS} + PUBLIC + Antares::memory + Antares::utils ) import_std_libs(${execname}) diff --git a/src/ui/common/CMakeLists.txt b/src/ui/common/CMakeLists.txt index 7fcca3f0b0..ce83765a79 100644 --- a/src/ui/common/CMakeLists.txt +++ b/src/ui/common/CMakeLists.txt @@ -20,6 +20,7 @@ target_link_libraries(libantares-ui-dispatcher PUBLIC ${wxWidgets_LIBRARIES} libantares-core + Antares::study ) # Common @@ -42,6 +43,7 @@ target_link_libraries(libantares-ui-common PUBLIC ${wxWidgets_LIBRARIES} libantares-core + Antares::study ) @@ -115,6 +117,7 @@ target_link_libraries(libantares-ui-component-frame ${wxWidgets_LIBRARIES} PRIVATE libantares-core + Antares::study ) # Scrollbox diff --git a/src/ui/simulator/CMakeLists.txt b/src/ui/simulator/CMakeLists.txt index 4aad2a34d8..0b37655cb1 100644 --- a/src/ui/simulator/CMakeLists.txt +++ b/src/ui/simulator/CMakeLists.txt @@ -146,7 +146,8 @@ set(ANTARES_LIBS libantares-solver-constraints-builder libantares-solver-variable-info libantares-core - date + Antares::date + Antares::study yuni-static-core yuni-static-uuid libmodel_antares diff --git a/src/ui/simulator/application/main/build/standard-page.hxx b/src/ui/simulator/application/main/build/standard-page.hxx index d5c88ffff0..4ad731c356 100644 --- a/src/ui/simulator/application/main/build/standard-page.hxx +++ b/src/ui/simulator/application/main/build/standard-page.hxx @@ -27,7 +27,6 @@ #ifndef ANTARES_APPLICATION_MAIN_BUILD_STANDARD_PAGE_HXX__ #define ANTARES_APPLICATION_MAIN_BUILD_STANDARD_PAGE_HXX__ -#include #include "../../../toolbox/components/notebook/notebook.h" #include "../../../toolbox/create.h" #include diff --git a/src/ui/simulator/cmake/application.cmake b/src/ui/simulator/cmake/application.cmake index 98d18db7d1..7b66512413 100644 --- a/src/ui/simulator/cmake/application.cmake +++ b/src/ui/simulator/cmake/application.cmake @@ -74,5 +74,6 @@ target_link_libraries(libantares-ui-application libantares-ui-common libantares-core Antares::sys + Antares::study ) diff --git a/src/ui/simulator/cmake/windows-studyparts.cmake b/src/ui/simulator/cmake/windows-studyparts.cmake index 6f6155a437..fbe77982ee 100644 --- a/src/ui/simulator/cmake/windows-studyparts.cmake +++ b/src/ui/simulator/cmake/windows-studyparts.cmake @@ -42,6 +42,10 @@ set(SRC_UI_WINDOWS_STUDYPARTS add_Library(libantares-ui-windows-studyparts ${SRC_UI_WINDOWS_STUDYPARTS}) -target_link_libraries(libantares-ui-windows-studyparts PUBLIC ${wxWidgets_LIBRARIES}) +target_link_libraries(libantares-ui-windows-studyparts + PUBLIC + ${wxWidgets_LIBRARIES} + Antares::study +) target_link_libraries(libantares-ui-windows-studyparts PRIVATE libantares-ui-common) diff --git a/src/ui/simulator/toolbox/clipboard/clipboard.cpp b/src/ui/simulator/toolbox/clipboard/clipboard.cpp index e12dc53a18..8be58abed2 100644 --- a/src/ui/simulator/toolbox/clipboard/clipboard.cpp +++ b/src/ui/simulator/toolbox/clipboard/clipboard.cpp @@ -25,7 +25,6 @@ ** SPDX-License-Identifier: licenceRef-GPL3_WITH_RTE-Exceptions */ -#include #include "clipboard.h" #include #include "../locales.h" diff --git a/src/ui/simulator/toolbox/clipboard/clipboard.h b/src/ui/simulator/toolbox/clipboard/clipboard.h index 02a4f3a969..78397b6a19 100644 --- a/src/ui/simulator/toolbox/clipboard/clipboard.h +++ b/src/ui/simulator/toolbox/clipboard/clipboard.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_TOOLBOX_CLIPBOARD_CLIPBOARD_H__ #define __ANTARES_TOOLBOX_CLIPBOARD_CLIPBOARD_H__ -#include #include #include #include diff --git a/src/ui/simulator/toolbox/components/button/button.h b/src/ui/simulator/toolbox/components/button/button.h index 854822a2a8..a3b65a7176 100644 --- a/src/ui/simulator/toolbox/components/button/button.h +++ b/src/ui/simulator/toolbox/components/button/button.h @@ -28,7 +28,6 @@ #define __ANTARES_TOOLBOX_COMPONENTS_BUTTON_BUTTON_H__ #include -#include #include #include #include diff --git a/src/ui/simulator/toolbox/components/captionpanel.h b/src/ui/simulator/toolbox/components/captionpanel.h index 372ff0e558..27a023987c 100644 --- a/src/ui/simulator/toolbox/components/captionpanel.h +++ b/src/ui/simulator/toolbox/components/captionpanel.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_TOOLBOX_COMPONENTS_CAPTIONPANEL_H__ #define __ANTARES_TOOLBOX_COMPONENTS_CAPTIONPANEL_H__ -#include #include namespace Antares diff --git a/src/ui/simulator/toolbox/components/datagrid/component.cpp b/src/ui/simulator/toolbox/components/datagrid/component.cpp index 665fb7606d..7a2b6df99f 100644 --- a/src/ui/simulator/toolbox/components/datagrid/component.cpp +++ b/src/ui/simulator/toolbox/components/datagrid/component.cpp @@ -25,7 +25,6 @@ ** SPDX-License-Identifier: licenceRef-GPL3_WITH_RTE-Exceptions */ -#include #include #include #ifndef YUNI_OS_WINDOWS diff --git a/src/ui/simulator/toolbox/components/datagrid/component.h b/src/ui/simulator/toolbox/components/datagrid/component.h index ab5df996d9..facd6a83e9 100644 --- a/src/ui/simulator/toolbox/components/datagrid/component.h +++ b/src/ui/simulator/toolbox/components/datagrid/component.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_TOOLBOX_COMPONENT_DATAGRID_COMPONENT_H__ #define __ANTARES_TOOLBOX_COMPONENT_DATAGRID_COMPONENT_H__ -#include #include #include diff --git a/src/ui/simulator/toolbox/components/datagrid/dbgrid.h b/src/ui/simulator/toolbox/components/datagrid/dbgrid.h index 98742b7507..72169d7a04 100644 --- a/src/ui/simulator/toolbox/components/datagrid/dbgrid.h +++ b/src/ui/simulator/toolbox/components/datagrid/dbgrid.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_TOOLBOX_COMPONENT_DATAGRID_DBGRID_H__ #define __ANTARES_TOOLBOX_COMPONENT_DATAGRID_DBGRID_H__ -#include #include namespace Antares diff --git a/src/ui/simulator/toolbox/components/datagrid/default.h b/src/ui/simulator/toolbox/components/datagrid/default.h index 56be8fa418..f56a42676e 100644 --- a/src/ui/simulator/toolbox/components/datagrid/default.h +++ b/src/ui/simulator/toolbox/components/datagrid/default.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_TOOLBOX_COMPONENT_DATAGRID_DEFAULT_H__ #define __ANTARES_TOOLBOX_COMPONENT_DATAGRID_DEFAULT_H__ -#include namespace Antares { diff --git a/src/ui/simulator/toolbox/components/datagrid/filter/all/any.h b/src/ui/simulator/toolbox/components/datagrid/filter/all/any.h index a8eba25882..7510a44f45 100644 --- a/src/ui/simulator/toolbox/components/datagrid/filter/all/any.h +++ b/src/ui/simulator/toolbox/components/datagrid/filter/all/any.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_TOOLBOX_FILTER_ALL_ANY_H__ #define __ANTARES_TOOLBOX_FILTER_ALL_ANY_H__ -#include #include "../filter.h" namespace Antares diff --git a/src/ui/simulator/toolbox/components/datagrid/filter/all/columnindex.h b/src/ui/simulator/toolbox/components/datagrid/filter/all/columnindex.h index 2d74cd0a95..1a333aba0a 100644 --- a/src/ui/simulator/toolbox/components/datagrid/filter/all/columnindex.h +++ b/src/ui/simulator/toolbox/components/datagrid/filter/all/columnindex.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_TOOLBOX_COMPONENTS_DATAGRID_FILTER_ALL_COLUMN_INDEX_H__ #define __ANTARES_TOOLBOX_COMPONENTS_DATAGRID_FILTER_ALL_COLUMN_INDEX_H__ -#include #include "../filter.h" #include diff --git a/src/ui/simulator/toolbox/components/datagrid/filter/all/day.h b/src/ui/simulator/toolbox/components/datagrid/filter/all/day.h index 9f79924e87..0014cca8f5 100644 --- a/src/ui/simulator/toolbox/components/datagrid/filter/all/day.h +++ b/src/ui/simulator/toolbox/components/datagrid/filter/all/day.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_TOOLBOX_COMPONENTS_DATAGRID_FILTER_ALL_DAY_H__ #define __ANTARES_TOOLBOX_COMPONENTS_DATAGRID_FILTER_ALL_DAY_H__ -#include #include "../filter.h" #include diff --git a/src/ui/simulator/toolbox/components/datagrid/filter/all/dayyear.h b/src/ui/simulator/toolbox/components/datagrid/filter/all/dayyear.h index 073d7170f8..03c8957e76 100644 --- a/src/ui/simulator/toolbox/components/datagrid/filter/all/dayyear.h +++ b/src/ui/simulator/toolbox/components/datagrid/filter/all/dayyear.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_TOOLBOX_COMPONENTS_DATAGRID_FILTER_ALL_DAYYEAR_H__ #define __ANTARES_TOOLBOX_COMPONENTS_DATAGRID_FILTER_ALL_DAYYEAR_H__ -#include #include "../filter.h" #include diff --git a/src/ui/simulator/toolbox/components/datagrid/filter/all/hour.h b/src/ui/simulator/toolbox/components/datagrid/filter/all/hour.h index 6e37e3620b..fe260a0ae6 100644 --- a/src/ui/simulator/toolbox/components/datagrid/filter/all/hour.h +++ b/src/ui/simulator/toolbox/components/datagrid/filter/all/hour.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_TOOLBOX_COMPONENTS_DATAGRID_FILTER_ALL_HOUR_H__ #define __ANTARES_TOOLBOX_COMPONENTS_DATAGRID_FILTER_ALL_HOUR_H__ -#include #include "../filter.h" #include diff --git a/src/ui/simulator/toolbox/components/datagrid/filter/all/houryear.h b/src/ui/simulator/toolbox/components/datagrid/filter/all/houryear.h index 0cdadde1da..8a7069c98e 100644 --- a/src/ui/simulator/toolbox/components/datagrid/filter/all/houryear.h +++ b/src/ui/simulator/toolbox/components/datagrid/filter/all/houryear.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_TOOLBOX_FILTER_ALL_HOUR_YEAR_H__ #define __ANTARES_TOOLBOX_FILTER_ALL_HOUR_YEAR_H__ -#include #include "../filter.h" namespace Antares diff --git a/src/ui/simulator/toolbox/components/datagrid/filter/all/month.h b/src/ui/simulator/toolbox/components/datagrid/filter/all/month.h index 6921e7706b..ffd15b5573 100644 --- a/src/ui/simulator/toolbox/components/datagrid/filter/all/month.h +++ b/src/ui/simulator/toolbox/components/datagrid/filter/all/month.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_TOOLBOX_COMPONENTS_DATAGRID_FILTER_ALL_MONTH_H__ #define __ANTARES_TOOLBOX_COMPONENTS_DATAGRID_FILTER_ALL_MONTH_H__ -#include #include "../filter.h" namespace Antares diff --git a/src/ui/simulator/toolbox/components/datagrid/filter/all/week.h b/src/ui/simulator/toolbox/components/datagrid/filter/all/week.h index 2f2548c4a1..0caed18db8 100644 --- a/src/ui/simulator/toolbox/components/datagrid/filter/all/week.h +++ b/src/ui/simulator/toolbox/components/datagrid/filter/all/week.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_TOOLBOX_COMPONENTS_DATAGRID_FILTER_ALL_WEEK_H__ #define __ANTARES_TOOLBOX_COMPONENTS_DATAGRID_FILTER_ALL_WEEK_H__ -#include #include "../filter.h" namespace Antares diff --git a/src/ui/simulator/toolbox/components/datagrid/filter/all/weekday.h b/src/ui/simulator/toolbox/components/datagrid/filter/all/weekday.h index 01ae2aedf3..19780d297e 100644 --- a/src/ui/simulator/toolbox/components/datagrid/filter/all/weekday.h +++ b/src/ui/simulator/toolbox/components/datagrid/filter/all/weekday.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_TOOLBOX_COMPONENTS_DATAGRID_FILTER_ALL_WEEKDAY_H__ #define __ANTARES_TOOLBOX_COMPONENTS_DATAGRID_FILTER_ALL_WEEKDAY_H__ -#include #include "../filter.h" #include #include diff --git a/src/ui/simulator/toolbox/components/datagrid/filter/component.cpp b/src/ui/simulator/toolbox/components/datagrid/filter/component.cpp index f228d6e53f..a25ab49944 100644 --- a/src/ui/simulator/toolbox/components/datagrid/filter/component.cpp +++ b/src/ui/simulator/toolbox/components/datagrid/filter/component.cpp @@ -25,7 +25,6 @@ ** SPDX-License-Identifier: licenceRef-GPL3_WITH_RTE-Exceptions */ -#include #include "component.h" #include "../gridhelper.h" #include diff --git a/src/ui/simulator/toolbox/components/datagrid/filter/component.h b/src/ui/simulator/toolbox/components/datagrid/filter/component.h index d59433f3a8..3e31a1e652 100644 --- a/src/ui/simulator/toolbox/components/datagrid/filter/component.h +++ b/src/ui/simulator/toolbox/components/datagrid/filter/component.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_TOOLBOX_FILTER_COMPONENT_H__ #define __ANTARES_TOOLBOX_FILTER_COMPONENT_H__ -#include #include #include #include diff --git a/src/ui/simulator/toolbox/components/datagrid/filter/filter.cpp b/src/ui/simulator/toolbox/components/datagrid/filter/filter.cpp index 1023aaf9f4..145fe02137 100644 --- a/src/ui/simulator/toolbox/components/datagrid/filter/filter.cpp +++ b/src/ui/simulator/toolbox/components/datagrid/filter/filter.cpp @@ -25,7 +25,6 @@ ** SPDX-License-Identifier: licenceRef-GPL3_WITH_RTE-Exceptions */ -#include #include "operator.h" #include "filter.h" #include diff --git a/src/ui/simulator/toolbox/components/datagrid/filter/filter.h b/src/ui/simulator/toolbox/components/datagrid/filter/filter.h index 4991b88d66..c5631fa69b 100644 --- a/src/ui/simulator/toolbox/components/datagrid/filter/filter.h +++ b/src/ui/simulator/toolbox/components/datagrid/filter/filter.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_TOOLBOX_FILTER_FILTER_H__ #define __ANTARES_TOOLBOX_FILTER_FILTER_H__ -#include #include #include "operator.h" #include "operator.list.h" diff --git a/src/ui/simulator/toolbox/components/datagrid/filter/input.h b/src/ui/simulator/toolbox/components/datagrid/filter/input.h index daac6b78aa..5fdc0b2c42 100644 --- a/src/ui/simulator/toolbox/components/datagrid/filter/input.h +++ b/src/ui/simulator/toolbox/components/datagrid/filter/input.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_TOOLBOX_FILTER_INPUT_H__ #define __ANTARES_TOOLBOX_FILTER_INPUT_H__ -#include #include #include "filter.h" #include "component/panel.h" diff --git a/src/ui/simulator/toolbox/components/datagrid/filter/operator.h b/src/ui/simulator/toolbox/components/datagrid/filter/operator.h index cb038ee38f..526d34b39f 100644 --- a/src/ui/simulator/toolbox/components/datagrid/filter/operator.h +++ b/src/ui/simulator/toolbox/components/datagrid/filter/operator.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_TOOLBOX_FILTER_OPERATION_H__ #define __ANTARES_TOOLBOX_FILTER_OPERATION_H__ -#include #include #include "filter.h" #include "parameter/parameter.h" diff --git a/src/ui/simulator/toolbox/components/datagrid/filter/operator.list.cpp b/src/ui/simulator/toolbox/components/datagrid/filter/operator.list.cpp index a70a793db0..4615d2bead 100644 --- a/src/ui/simulator/toolbox/components/datagrid/filter/operator.list.cpp +++ b/src/ui/simulator/toolbox/components/datagrid/filter/operator.list.cpp @@ -28,6 +28,7 @@ #include "operator.list.h" #include "operator/all.h" #include "filter.h" +#include "wx-wrapper.h" #include namespace Antares diff --git a/src/ui/simulator/toolbox/components/datagrid/filter/operator.list.h b/src/ui/simulator/toolbox/components/datagrid/filter/operator.list.h index be9ea634dd..9f1649845b 100644 --- a/src/ui/simulator/toolbox/components/datagrid/filter/operator.list.h +++ b/src/ui/simulator/toolbox/components/datagrid/filter/operator.list.h @@ -27,8 +27,8 @@ #ifndef __ANTARES_TOOLBOX_FILTER_OPERATOR_LIST_H__ #define __ANTARES_TOOLBOX_FILTER_OPERATOR_LIST_H__ +#include #include -#include namespace Antares { diff --git a/src/ui/simulator/toolbox/components/datagrid/filter/parameter/parameter.cpp b/src/ui/simulator/toolbox/components/datagrid/filter/parameter/parameter.cpp index 038da44b84..ea0256742d 100644 --- a/src/ui/simulator/toolbox/components/datagrid/filter/parameter/parameter.cpp +++ b/src/ui/simulator/toolbox/components/datagrid/filter/parameter/parameter.cpp @@ -32,6 +32,7 @@ #include #include #include "../operator.h" +#include "wx-wrapper.h" #include namespace Antares diff --git a/src/ui/simulator/toolbox/components/datagrid/filter/parameter/parameter.h b/src/ui/simulator/toolbox/components/datagrid/filter/parameter/parameter.h index 8037e35515..6f27de2865 100644 --- a/src/ui/simulator/toolbox/components/datagrid/filter/parameter/parameter.h +++ b/src/ui/simulator/toolbox/components/datagrid/filter/parameter/parameter.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_TOOLBOX_FILTER_PARAMETER_H__ #define __ANTARES_TOOLBOX_FILTER_PARAMETER_H__ -#include #include #include diff --git a/src/ui/simulator/toolbox/components/datagrid/gridhelper.h b/src/ui/simulator/toolbox/components/datagrid/gridhelper.h index 2a2a70df27..16108c890f 100644 --- a/src/ui/simulator/toolbox/components/datagrid/gridhelper.h +++ b/src/ui/simulator/toolbox/components/datagrid/gridhelper.h @@ -27,17 +27,17 @@ #ifndef __ANTARES_TOOLBOX_COMPONENTS_DATAGRID__GRID_HELPER_H__ #define __ANTARES_TOOLBOX_COMPONENTS_DATAGRID__GRID_HELPER_H__ -#include #include #include -#include "renderer.h" #include #include +#include "renderer.h" namespace Antares { namespace Component { + namespace Datagrid { /*! diff --git a/src/ui/simulator/toolbox/components/datagrid/renderer.h b/src/ui/simulator/toolbox/components/datagrid/renderer.h index f1fe97d1e2..e3624fddf9 100644 --- a/src/ui/simulator/toolbox/components/datagrid/renderer.h +++ b/src/ui/simulator/toolbox/components/datagrid/renderer.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_H__ #define __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_H__ -#include #include #include #include @@ -45,6 +44,7 @@ namespace Component { namespace Datagrid { + class VGridHelper; namespace Renderer { /*! diff --git a/src/ui/simulator/toolbox/components/datagrid/renderer/adequacy-patch-area-grid.h b/src/ui/simulator/toolbox/components/datagrid/renderer/adequacy-patch-area-grid.h index 7c6f14770c..a0b2be5d11 100644 --- a/src/ui/simulator/toolbox/components/datagrid/renderer/adequacy-patch-area-grid.h +++ b/src/ui/simulator/toolbox/components/datagrid/renderer/adequacy-patch-area-grid.h @@ -28,7 +28,6 @@ #ifndef __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_ADEQUACY_PATCH_AREAS_GRID_H__ #define __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_ADEQUACY_PATCH_AREAS_GRID_H__ -#include #include "../renderer.h" #include "../../../../application/study.h" 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 07e3173b70..c09c04de9d 100644 --- a/src/ui/simulator/toolbox/components/datagrid/renderer/analyzer/areas.h +++ b/src/ui/simulator/toolbox/components/datagrid/renderer/analyzer/areas.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_AREA_CORRELATION_H__ #define __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_AREA_CORRELATION_H__ -#include #include "../../renderer.h" #include #include diff --git a/src/ui/simulator/toolbox/components/datagrid/renderer/area.h b/src/ui/simulator/toolbox/components/datagrid/renderer/area.h index ba6ee42448..7a69b7f3b6 100644 --- a/src/ui/simulator/toolbox/components/datagrid/renderer/area.h +++ b/src/ui/simulator/toolbox/components/datagrid/renderer/area.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_AREA_H__ #define __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_AREA_H__ -#include #include "../../../input/area.h" #include "../renderer.h" #include diff --git a/src/ui/simulator/toolbox/components/datagrid/renderer/area/common.areasummary.h b/src/ui/simulator/toolbox/components/datagrid/renderer/area/common.areasummary.h index a9579ffacf..170af053fd 100644 --- a/src/ui/simulator/toolbox/components/datagrid/renderer/area/common.areasummary.h +++ b/src/ui/simulator/toolbox/components/datagrid/renderer/area/common.areasummary.h @@ -27,7 +27,6 @@ #pragma once -#include #include "../../renderer.h" #include "../../../../input/area.h" #include "../../../../../application/study.h" diff --git a/src/ui/simulator/toolbox/components/datagrid/renderer/area/creditmodulations.h b/src/ui/simulator/toolbox/components/datagrid/renderer/area/creditmodulations.h index a5790a8e82..4066a40fd8 100644 --- a/src/ui/simulator/toolbox/components/datagrid/renderer/area/creditmodulations.h +++ b/src/ui/simulator/toolbox/components/datagrid/renderer/area/creditmodulations.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_AREA_CREDITMODULATIONS_H__ #define __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_AREA_CREDITMODULATIONS_H__ -#include #include "../area.h" #include "../matrix.h" #include diff --git a/src/ui/simulator/toolbox/components/datagrid/renderer/area/dsm.h b/src/ui/simulator/toolbox/components/datagrid/renderer/area/dsm.h index 82b0175cb7..c5e4e65ac7 100644 --- a/src/ui/simulator/toolbox/components/datagrid/renderer/area/dsm.h +++ b/src/ui/simulator/toolbox/components/datagrid/renderer/area/dsm.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_AREA_DSM_H__ #define __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_AREA_DSM_H__ -#include #include "../area.h" #include "../matrix.h" #include diff --git a/src/ui/simulator/toolbox/components/datagrid/renderer/area/hydro/allocation.h b/src/ui/simulator/toolbox/components/datagrid/renderer/area/hydro/allocation.h index b940f792a8..c0bc98649d 100644 --- a/src/ui/simulator/toolbox/components/datagrid/renderer/area/hydro/allocation.h +++ b/src/ui/simulator/toolbox/components/datagrid/renderer/area/hydro/allocation.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_AREA_HYDRO_ALLOCATION_H__ #define __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_AREA_HYDRO_ALLOCATION_H__ -#include #include #include #include "../../../renderer.h" diff --git a/src/ui/simulator/toolbox/components/datagrid/renderer/area/hydromonthlypower.h b/src/ui/simulator/toolbox/components/datagrid/renderer/area/hydromonthlypower.h index 62d717ab0e..9acd8213f2 100644 --- a/src/ui/simulator/toolbox/components/datagrid/renderer/area/hydromonthlypower.h +++ b/src/ui/simulator/toolbox/components/datagrid/renderer/area/hydromonthlypower.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_AREA_HYDRO_MONTHLY_POWER_H__ #define __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_AREA_HYDRO_MONTHLY_POWER_H__ -#include #include "../area.h" #include "../matrix.h" #include diff --git a/src/ui/simulator/toolbox/components/datagrid/renderer/area/hydroprepro.h b/src/ui/simulator/toolbox/components/datagrid/renderer/area/hydroprepro.h index 425e5f53c6..caf8784067 100644 --- a/src/ui/simulator/toolbox/components/datagrid/renderer/area/hydroprepro.h +++ b/src/ui/simulator/toolbox/components/datagrid/renderer/area/hydroprepro.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_AREA_HYDROPREPRO_H__ #define __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_AREA_HYDROPREPRO_H__ -#include #include "../area.h" #include "../matrix.h" #include diff --git a/src/ui/simulator/toolbox/components/datagrid/renderer/area/inflowpattern.h b/src/ui/simulator/toolbox/components/datagrid/renderer/area/inflowpattern.h index eb48fe9789..6c237cbcde 100644 --- a/src/ui/simulator/toolbox/components/datagrid/renderer/area/inflowpattern.h +++ b/src/ui/simulator/toolbox/components/datagrid/renderer/area/inflowpattern.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_AREA_INFLOWPATTERN_H__ #define __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_AREA_INFLOWPATTERN_H__ -#include #include "../area.h" #include "../matrix.h" #include diff --git a/src/ui/simulator/toolbox/components/datagrid/renderer/area/misc.h b/src/ui/simulator/toolbox/components/datagrid/renderer/area/misc.h index 77bd513d82..7042f57258 100644 --- a/src/ui/simulator/toolbox/components/datagrid/renderer/area/misc.h +++ b/src/ui/simulator/toolbox/components/datagrid/renderer/area/misc.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_AREA_MISC_H__ #define __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_AREA_MISC_H__ -#include #include "../area.h" #include "../matrix.h" diff --git a/src/ui/simulator/toolbox/components/datagrid/renderer/area/nodal-optimization.h b/src/ui/simulator/toolbox/components/datagrid/renderer/area/nodal-optimization.h index 79160457e2..0c62d53437 100644 --- a/src/ui/simulator/toolbox/components/datagrid/renderer/area/nodal-optimization.h +++ b/src/ui/simulator/toolbox/components/datagrid/renderer/area/nodal-optimization.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_AREA_NODAL_OPTIMIZATION_H__ #define __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_AREA_NODAL_OPTIMIZATION_H__ -#include #include "../../gridhelper.h" #include "../../renderer.h" #include diff --git a/src/ui/simulator/toolbox/components/datagrid/renderer/area/reservoirlevels.h b/src/ui/simulator/toolbox/components/datagrid/renderer/area/reservoirlevels.h index 3826b17ad2..7294668108 100644 --- a/src/ui/simulator/toolbox/components/datagrid/renderer/area/reservoirlevels.h +++ b/src/ui/simulator/toolbox/components/datagrid/renderer/area/reservoirlevels.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_AREA_RESERVOIRLEVELS_H__ #define __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_AREA_RESERVOIRLEVELS_H__ -#include #include "../area.h" #include "../matrix.h" #include diff --git a/src/ui/simulator/toolbox/components/datagrid/renderer/area/thermalmodulation.h b/src/ui/simulator/toolbox/components/datagrid/renderer/area/thermalmodulation.h index 544b054fb7..55e1c5a10b 100644 --- a/src/ui/simulator/toolbox/components/datagrid/renderer/area/thermalmodulation.h +++ b/src/ui/simulator/toolbox/components/datagrid/renderer/area/thermalmodulation.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_AREA_THERMAL_COMMON_MODULATION_H__ #define __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_AREA_THERMAL_COMMON_MODULATION_H__ -#include #include "../../../../input/thermal-cluster.h" #include "../matrix.h" #include diff --git a/src/ui/simulator/toolbox/components/datagrid/renderer/area/thermalprepro.h b/src/ui/simulator/toolbox/components/datagrid/renderer/area/thermalprepro.h index fd661d620d..197b9c9f63 100644 --- a/src/ui/simulator/toolbox/components/datagrid/renderer/area/thermalprepro.h +++ b/src/ui/simulator/toolbox/components/datagrid/renderer/area/thermalprepro.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_AREA_THERMALPREPRO_H__ #define __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_AREA_THERMALPREPRO_H__ -#include #include "../../../../input/thermal-cluster.h" #include "../matrix.h" #include diff --git a/src/ui/simulator/toolbox/components/datagrid/renderer/area/timeseries.h b/src/ui/simulator/toolbox/components/datagrid/renderer/area/timeseries.h index dadc06c850..74f5439140 100644 --- a/src/ui/simulator/toolbox/components/datagrid/renderer/area/timeseries.h +++ b/src/ui/simulator/toolbox/components/datagrid/renderer/area/timeseries.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_AREA_TIMESERIES_H__ #define __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_AREA_TIMESERIES_H__ -#include #include "../area.h" #include "../matrix.h" #include "../../../../input/thermal-cluster.h" diff --git a/src/ui/simulator/toolbox/components/datagrid/renderer/area/watervalues.h b/src/ui/simulator/toolbox/components/datagrid/renderer/area/watervalues.h index 803bef8b80..7ca9d2e7f0 100644 --- a/src/ui/simulator/toolbox/components/datagrid/renderer/area/watervalues.h +++ b/src/ui/simulator/toolbox/components/datagrid/renderer/area/watervalues.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_AREA_WATERVALUES_H__ #define __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_AREA_WATERVALUES_H__ -#include #include "../area.h" #include "../matrix.h" #include 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 9ee19096da..2ad82aaae7 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 @@ -27,7 +27,6 @@ #ifndef __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_AREA_XCAST_ALL_AREAS_H__ #define __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_AREA_XCAST_ALL_AREAS_H__ -#include #include "../../renderer.h" #include #include 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 a57aa710ff..1ec31c6a15 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 @@ -27,7 +27,6 @@ #ifndef __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_AREA_XCAST_COEFFICIENTS_H__ #define __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_AREA_XCAST_COEFFICIENTS_H__ -#include #include "../area.h" #include "../matrix.h" 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 38cd132aaa..123663ee1e 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 @@ -27,7 +27,6 @@ #ifndef __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_AREA_XCAST_CONVERTION_H__ #define __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_AREA_XCAST_CONVERTION_H__ -#include #include "../area.h" #include "../matrix.h" 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 9c38d2f557..89b2ce486a 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 @@ -27,7 +27,6 @@ #ifndef __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_AREA_XCAST_K_H__ #define __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_AREA_XCAST_K_H__ -#include #include "../area.h" #include "../matrix.h" 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 56f1a34134..d5a412a462 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 @@ -27,7 +27,6 @@ #ifndef __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_AREA_XCAST_TRANSLATION_H__ #define __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_AREA_XCAST_TRANSLATION_H__ -#include #include "../area.h" #include "../matrix.h" diff --git a/src/ui/simulator/toolbox/components/datagrid/renderer/bindingconstraint/data.cpp b/src/ui/simulator/toolbox/components/datagrid/renderer/bindingconstraint/data.cpp index cbcd58064a..45b2a5b009 100644 --- a/src/ui/simulator/toolbox/components/datagrid/renderer/bindingconstraint/data.cpp +++ b/src/ui/simulator/toolbox/components/datagrid/renderer/bindingconstraint/data.cpp @@ -28,7 +28,6 @@ #include "data.h" #include -#include #include #include #include "antares/study/ui-runtimeinfos.h" diff --git a/src/ui/simulator/toolbox/components/datagrid/renderer/bindingconstraint/data.h b/src/ui/simulator/toolbox/components/datagrid/renderer/bindingconstraint/data.h index e9707d9a31..648f079e4d 100644 --- a/src/ui/simulator/toolbox/components/datagrid/renderer/bindingconstraint/data.h +++ b/src/ui/simulator/toolbox/components/datagrid/renderer/bindingconstraint/data.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_BINDINGCONSTRAINT_DATA_H__ #define __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_BINDINGCONSTRAINT_DATA_H__ -#include #include "../../gridhelper.h" #include "../../renderer.h" #include diff --git a/src/ui/simulator/toolbox/components/datagrid/renderer/bindingconstraint/offsets.cpp b/src/ui/simulator/toolbox/components/datagrid/renderer/bindingconstraint/offsets.cpp index f1aefa92c1..99d4e587b1 100644 --- a/src/ui/simulator/toolbox/components/datagrid/renderer/bindingconstraint/offsets.cpp +++ b/src/ui/simulator/toolbox/components/datagrid/renderer/bindingconstraint/offsets.cpp @@ -28,7 +28,6 @@ #include #include #include "offsets.h" -#include #include #include #include "antares/study/ui-runtimeinfos.h" diff --git a/src/ui/simulator/toolbox/components/datagrid/renderer/bindingconstraint/offsets.h b/src/ui/simulator/toolbox/components/datagrid/renderer/bindingconstraint/offsets.h index 4d58fe8d5f..317701100c 100644 --- a/src/ui/simulator/toolbox/components/datagrid/renderer/bindingconstraint/offsets.h +++ b/src/ui/simulator/toolbox/components/datagrid/renderer/bindingconstraint/offsets.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_BINDINGCONSTRAINT_OFFSET_H__ #define __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_BINDINGCONSTRAINT_OFFSET_H__ -#include #include "../../gridhelper.h" #include "../../renderer.h" #include diff --git a/src/ui/simulator/toolbox/components/datagrid/renderer/bindingconstraint/weights.cpp b/src/ui/simulator/toolbox/components/datagrid/renderer/bindingconstraint/weights.cpp index e6c6542430..47f8d8dc39 100644 --- a/src/ui/simulator/toolbox/components/datagrid/renderer/bindingconstraint/weights.cpp +++ b/src/ui/simulator/toolbox/components/datagrid/renderer/bindingconstraint/weights.cpp @@ -28,7 +28,6 @@ #include #include #include "weights.h" -#include #include #include "antares/study/ui-runtimeinfos.h" diff --git a/src/ui/simulator/toolbox/components/datagrid/renderer/bindingconstraint/weights.h b/src/ui/simulator/toolbox/components/datagrid/renderer/bindingconstraint/weights.h index 17a8fe2d27..67230e3b5e 100644 --- a/src/ui/simulator/toolbox/components/datagrid/renderer/bindingconstraint/weights.h +++ b/src/ui/simulator/toolbox/components/datagrid/renderer/bindingconstraint/weights.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_BINDINGCONSTRAINT_WEIGHT_H__ #define __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_BINDINGCONSTRAINT_WEIGHT_H__ -#include #include "../../gridhelper.h" #include "../../renderer.h" #include diff --git a/src/ui/simulator/toolbox/components/datagrid/renderer/connection.h b/src/ui/simulator/toolbox/components/datagrid/renderer/connection.h index 3319dfde4a..955a2e3111 100644 --- a/src/ui/simulator/toolbox/components/datagrid/renderer/connection.h +++ b/src/ui/simulator/toolbox/components/datagrid/renderer/connection.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_CONNECTION_H__ #define __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_CONNECTION_H__ -#include #include "../../../input/connection.h" #include "../renderer.h" #include diff --git a/src/ui/simulator/toolbox/components/datagrid/renderer/constraintsbuilder/links.h b/src/ui/simulator/toolbox/components/datagrid/renderer/constraintsbuilder/links.h index 10aea05575..79b4d90de3 100644 --- a/src/ui/simulator/toolbox/components/datagrid/renderer/constraintsbuilder/links.h +++ b/src/ui/simulator/toolbox/components/datagrid/renderer/constraintsbuilder/links.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_LINKS_H__ #define __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_LINKS_H__ -#include #include "../../renderer.h" #include #include "../solver/constraints-builder/cbuilder.h" diff --git a/src/ui/simulator/toolbox/components/datagrid/renderer/correlation.h b/src/ui/simulator/toolbox/components/datagrid/renderer/correlation.h index 6ee5167ab9..1ad2498663 100644 --- a/src/ui/simulator/toolbox/components/datagrid/renderer/correlation.h +++ b/src/ui/simulator/toolbox/components/datagrid/renderer/correlation.h @@ -27,11 +27,11 @@ #ifndef __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_AREA_CORRELATION_H__ #define __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_AREA_CORRELATION_H__ -#include #include "../renderer.h" #include #include +class wxWindow; namespace Antares { namespace Component diff --git a/src/ui/simulator/toolbox/components/datagrid/renderer/layers.h b/src/ui/simulator/toolbox/components/datagrid/renderer/layers.h index 824af37030..ef7a55a98f 100644 --- a/src/ui/simulator/toolbox/components/datagrid/renderer/layers.h +++ b/src/ui/simulator/toolbox/components/datagrid/renderer/layers.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_LAYERS_H__ #define __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_LAYERS_H__ -#include #include "../renderer.h" #include "../../../../application/study.h" #include "../../../../toolbox/input/area.h" diff --git a/src/ui/simulator/toolbox/components/datagrid/renderer/links/summary.cpp b/src/ui/simulator/toolbox/components/datagrid/renderer/links/summary.cpp index 11525a4478..08fe84de68 100644 --- a/src/ui/simulator/toolbox/components/datagrid/renderer/links/summary.cpp +++ b/src/ui/simulator/toolbox/components/datagrid/renderer/links/summary.cpp @@ -26,7 +26,6 @@ */ #include "summary.h" -#include #include #include #include "antares/study/ui-runtimeinfos.h" diff --git a/src/ui/simulator/toolbox/components/datagrid/renderer/links/summary.h b/src/ui/simulator/toolbox/components/datagrid/renderer/links/summary.h index 5db45d63b0..f4f4ff1712 100644 --- a/src/ui/simulator/toolbox/components/datagrid/renderer/links/summary.h +++ b/src/ui/simulator/toolbox/components/datagrid/renderer/links/summary.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_LINKS_SUMMARY_H__ #define __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_LINKS_SUMMARY_H__ -#include #include "../../renderer.h" #include #include "../../../../../application/study.h" diff --git a/src/ui/simulator/toolbox/components/datagrid/renderer/logfile.h b/src/ui/simulator/toolbox/components/datagrid/renderer/logfile.h index 6e47a6ffda..564562e29d 100644 --- a/src/ui/simulator/toolbox/components/datagrid/renderer/logfile.h +++ b/src/ui/simulator/toolbox/components/datagrid/renderer/logfile.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_MC_PLAYLIST_H__ #define __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_MC_PLAYLIST_H__ -#include #include "../renderer.h" #include "../../../../application/study.h" #include diff --git a/src/ui/simulator/toolbox/components/datagrid/renderer/matrix.h b/src/ui/simulator/toolbox/components/datagrid/renderer/matrix.h index 3fada3aa15..36ade4c3c0 100644 --- a/src/ui/simulator/toolbox/components/datagrid/renderer/matrix.h +++ b/src/ui/simulator/toolbox/components/datagrid/renderer/matrix.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_MATRIX_H__ #define __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_MATRIX_H__ -#include #include "../renderer.h" #include "../../../input/area.h" diff --git a/src/ui/simulator/toolbox/components/datagrid/renderer/mc-playlist.h b/src/ui/simulator/toolbox/components/datagrid/renderer/mc-playlist.h index f7e4d4c579..dea0be4e4f 100644 --- a/src/ui/simulator/toolbox/components/datagrid/renderer/mc-playlist.h +++ b/src/ui/simulator/toolbox/components/datagrid/renderer/mc-playlist.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_MC_PLAYLIST_H__ #define __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_MC_PLAYLIST_H__ -#include #include "../renderer.h" #include "../../../../application/study.h" diff --git a/src/ui/simulator/toolbox/components/datagrid/renderer/select-variables.h b/src/ui/simulator/toolbox/components/datagrid/renderer/select-variables.h index f72022e31c..ea9e8a9d2d 100644 --- a/src/ui/simulator/toolbox/components/datagrid/renderer/select-variables.h +++ b/src/ui/simulator/toolbox/components/datagrid/renderer/select-variables.h @@ -1,7 +1,6 @@ #ifndef __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_SELECT_VARIABLES_H__ #define __ANTARES_TOOLBOX_COMPONENT_DATAGRID_RENDERER_SELECT_VARIABLES_H__ -#include #include "../renderer.h" #include "../../../../application/study.h" diff --git a/src/ui/simulator/toolbox/components/datagrid/wxgrid-renderer.h b/src/ui/simulator/toolbox/components/datagrid/wxgrid-renderer.h index e1a789e7ca..a167876cf2 100644 --- a/src/ui/simulator/toolbox/components/datagrid/wxgrid-renderer.h +++ b/src/ui/simulator/toolbox/components/datagrid/wxgrid-renderer.h @@ -29,7 +29,6 @@ #include #include -#include #include #include "renderer.h" diff --git a/src/ui/simulator/toolbox/components/htmllistbox/component.h b/src/ui/simulator/toolbox/components/htmllistbox/component.h index 6f4c26f43f..5239354c99 100644 --- a/src/ui/simulator/toolbox/components/htmllistbox/component.h +++ b/src/ui/simulator/toolbox/components/htmllistbox/component.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_TOOLBOX_COMPONENT_HTMLLISTBOX_COMPONENT_H__ #define __ANTARES_TOOLBOX_COMPONENT_HTMLLISTBOX_COMPONENT_H__ -#include #include #include "item/item.h" #include "sort.h" diff --git a/src/ui/simulator/toolbox/components/htmllistbox/datasource/datasource.h b/src/ui/simulator/toolbox/components/htmllistbox/datasource/datasource.h index 2d2d118c62..4d642a1a2f 100644 --- a/src/ui/simulator/toolbox/components/htmllistbox/datasource/datasource.h +++ b/src/ui/simulator/toolbox/components/htmllistbox/datasource/datasource.h @@ -27,8 +27,8 @@ #ifndef __ANTARES_TOOLBOX_COMPONENT_HTMLLISTBOX_DATASOURCE_H__ #define __ANTARES_TOOLBOX_COMPONENT_HTMLLISTBOX_DATASOURCE_H__ -#include #include +#include namespace Antares { diff --git a/src/ui/simulator/toolbox/components/htmllistbox/item/area.cpp b/src/ui/simulator/toolbox/components/htmllistbox/item/area.cpp index 77078cda70..9b522d9e8d 100644 --- a/src/ui/simulator/toolbox/components/htmllistbox/item/area.cpp +++ b/src/ui/simulator/toolbox/components/htmllistbox/item/area.cpp @@ -26,6 +26,7 @@ */ #include "area.h" +#include "wx-wrapper.h" #include namespace Antares diff --git a/src/ui/simulator/toolbox/components/htmllistbox/item/cluster-item.cpp b/src/ui/simulator/toolbox/components/htmllistbox/item/cluster-item.cpp index d993bd063b..cc4ed95afb 100644 --- a/src/ui/simulator/toolbox/components/htmllistbox/item/cluster-item.cpp +++ b/src/ui/simulator/toolbox/components/htmllistbox/item/cluster-item.cpp @@ -27,6 +27,7 @@ #include "cluster-item.h" #include "../../../resources.h" +#include "wx-wrapper.h" using namespace Yuni; diff --git a/src/ui/simulator/toolbox/components/htmllistbox/item/item.h b/src/ui/simulator/toolbox/components/htmllistbox/item/item.h index a8db4b887f..30600dd761 100644 --- a/src/ui/simulator/toolbox/components/htmllistbox/item/item.h +++ b/src/ui/simulator/toolbox/components/htmllistbox/item/item.h @@ -27,9 +27,10 @@ #ifndef __ANTARES_TOOLBOX_COMPONENT_HTMLLISTBOX_ITEM_H__ #define __ANTARES_TOOLBOX_COMPONENT_HTMLLISTBOX_ITEM_H__ -#include #include +#include +#include namespace Antares { diff --git a/src/ui/simulator/toolbox/components/htmllistbox/item/pathlistitem.cpp b/src/ui/simulator/toolbox/components/htmllistbox/item/pathlistitem.cpp index 14cc9c0dc6..44b452d1d3 100644 --- a/src/ui/simulator/toolbox/components/htmllistbox/item/pathlistitem.cpp +++ b/src/ui/simulator/toolbox/components/htmllistbox/item/pathlistitem.cpp @@ -26,7 +26,8 @@ */ #include "pathlistitem.h" -#include +#include "wx-wrapper.h" +#include using namespace Yuni; diff --git a/src/ui/simulator/toolbox/components/mainpanel.h b/src/ui/simulator/toolbox/components/mainpanel.h index 8a94843ddc..3f69216908 100644 --- a/src/ui/simulator/toolbox/components/mainpanel.h +++ b/src/ui/simulator/toolbox/components/mainpanel.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_TOOLBOX_COMPONENT_MAIN_PANEL_H__ #define __ANTARES_TOOLBOX_COMPONENT_MAIN_PANEL_H__ -#include #include #include diff --git a/src/ui/simulator/toolbox/components/map/component.h b/src/ui/simulator/toolbox/components/map/component.h index 613b3c5f5f..5971629f1c 100644 --- a/src/ui/simulator/toolbox/components/map/component.h +++ b/src/ui/simulator/toolbox/components/map/component.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_TOOLBOX_MAP_COMPONENT_H__ #define __ANTARES_TOOLBOX_MAP_COMPONENT_H__ -#include #include #include "control.h" #include diff --git a/src/ui/simulator/toolbox/components/map/control.h b/src/ui/simulator/toolbox/components/map/control.h index 43b3f100da..af86d27b7c 100644 --- a/src/ui/simulator/toolbox/components/map/control.h +++ b/src/ui/simulator/toolbox/components/map/control.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_TOOLBOX_MAP_CONTROL_H__ #define __ANTARES_TOOLBOX_MAP_CONTROL_H__ -#include #include #include "nodes/node.h" #include "manager.h" diff --git a/src/ui/simulator/toolbox/components/map/controls/addtools.h b/src/ui/simulator/toolbox/components/map/controls/addtools.h index 7df395346d..9472821490 100644 --- a/src/ui/simulator/toolbox/components/map/controls/addtools.h +++ b/src/ui/simulator/toolbox/components/map/controls/addtools.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_TOOLBOX_MAP_CONTROLS_ADD_TOOLS_H__ #define __ANTARES_TOOLBOX_MAP_CONTROLS_ADD_TOOLS_H__ -#include #include "../tools/tool.h" #include "../manager.h" diff --git a/src/ui/simulator/toolbox/components/map/drawingcontext.h b/src/ui/simulator/toolbox/components/map/drawingcontext.h index 1c7aaa73ed..398a930a93 100644 --- a/src/ui/simulator/toolbox/components/map/drawingcontext.h +++ b/src/ui/simulator/toolbox/components/map/drawingcontext.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_TOOLBOX_MAP_DRAWING_CONTEXT_H__ #define __ANTARES_TOOLBOX_MAP_DRAWING_CONTEXT_H__ -#include #include #include #include "nodes/node.h" diff --git a/src/ui/simulator/toolbox/components/map/infos.h b/src/ui/simulator/toolbox/components/map/infos.h index 3b00ca6f52..d502dd32c0 100644 --- a/src/ui/simulator/toolbox/components/map/infos.h +++ b/src/ui/simulator/toolbox/components/map/infos.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_TOOLBOX_MAP_PANEL_INFOS_H__ #define __ANTARES_TOOLBOX_MAP_PANEL_INFOS_H__ -#include #include #include #include "nodes/item.h" diff --git a/src/ui/simulator/toolbox/components/map/manager.h b/src/ui/simulator/toolbox/components/map/manager.h index a0190068f0..3c8ae96791 100644 --- a/src/ui/simulator/toolbox/components/map/manager.h +++ b/src/ui/simulator/toolbox/components/map/manager.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_TOOLBOX_MAP_CONTAINER_H__ #define __ANTARES_TOOLBOX_MAP_CONTAINER_H__ -#include #include #include #include diff --git a/src/ui/simulator/toolbox/components/map/nodes/bindingconstraint.h b/src/ui/simulator/toolbox/components/map/nodes/bindingconstraint.h index cf67629ed5..e1d831febe 100644 --- a/src/ui/simulator/toolbox/components/map/nodes/bindingconstraint.h +++ b/src/ui/simulator/toolbox/components/map/nodes/bindingconstraint.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_TOOLBOX_MAP_BINDING_CONSTRAINT_H__ #define __ANTARES_TOOLBOX_MAP_BINDING_CONSTRAINT_H__ -#include #include "item.h" namespace Antares diff --git a/src/ui/simulator/toolbox/components/map/nodes/connection.h b/src/ui/simulator/toolbox/components/map/nodes/connection.h index 7315790376..9cd8e249bf 100644 --- a/src/ui/simulator/toolbox/components/map/nodes/connection.h +++ b/src/ui/simulator/toolbox/components/map/nodes/connection.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_TOOLBOX_MAP_CONNECTION_H__ #define __ANTARES_TOOLBOX_MAP_CONNECTION_H__ -#include #include "item.h" #include "node.h" #include "../tools/tool.h" diff --git a/src/ui/simulator/toolbox/components/map/nodes/item.h b/src/ui/simulator/toolbox/components/map/nodes/item.h index ec9fbf1332..012ee3dc85 100644 --- a/src/ui/simulator/toolbox/components/map/nodes/item.h +++ b/src/ui/simulator/toolbox/components/map/nodes/item.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_TOOLBOX_MAP_ITEM_H__ #define __ANTARES_TOOLBOX_MAP_ITEM_H__ -#include #include #include #include diff --git a/src/ui/simulator/toolbox/components/map/nodes/node.h b/src/ui/simulator/toolbox/components/map/nodes/node.h index 4f02b16292..2cfb2d50b8 100644 --- a/src/ui/simulator/toolbox/components/map/nodes/node.h +++ b/src/ui/simulator/toolbox/components/map/nodes/node.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_TOOLBOX_MAP_NODE_H__ #define __ANTARES_TOOLBOX_MAP_NODE_H__ -#include #include #include #include "item.h" diff --git a/src/ui/simulator/toolbox/components/map/settings.h b/src/ui/simulator/toolbox/components/map/settings.h index e818d62c1e..89539fde7e 100644 --- a/src/ui/simulator/toolbox/components/map/settings.h +++ b/src/ui/simulator/toolbox/components/map/settings.h @@ -27,10 +27,10 @@ #ifndef __ANTARES_TOOLBOX_MAP_SETTINGS_H__ #define __ANTARES_TOOLBOX_MAP_SETTINGS_H__ -#include #include #include #include +#include namespace Antares { diff --git a/src/ui/simulator/toolbox/components/map/tools/tool.h b/src/ui/simulator/toolbox/components/map/tools/tool.h index 41b62b3ae0..0e2bb33cde 100644 --- a/src/ui/simulator/toolbox/components/map/tools/tool.h +++ b/src/ui/simulator/toolbox/components/map/tools/tool.h @@ -28,7 +28,6 @@ #define __ANTARES_TOOLBOX_MAP_TOOLS_TOOL_H__ #include -#include #include "../drawingcontext.h" namespace Antares diff --git a/src/ui/simulator/toolbox/components/notebook/notebook.h b/src/ui/simulator/toolbox/components/notebook/notebook.h index 1ab5495108..74deedf38d 100644 --- a/src/ui/simulator/toolbox/components/notebook/notebook.h +++ b/src/ui/simulator/toolbox/components/notebook/notebook.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_TOOLBOX_COMPONENT_NOTEBOOK_H__ #define __ANTARES_TOOLBOX_COMPONENT_NOTEBOOK_H__ -#include #include #include #include diff --git a/src/ui/simulator/toolbox/components/progressbar.h b/src/ui/simulator/toolbox/components/progressbar.h index e4726c2d20..fd8be4a1bb 100644 --- a/src/ui/simulator/toolbox/components/progressbar.h +++ b/src/ui/simulator/toolbox/components/progressbar.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_TOOLBOX_COMPONENTS_PROGRESSBAR_H__ #define __ANTARES_TOOLBOX_COMPONENTS_PROGRESSBAR_H__ -#include #include namespace Antares diff --git a/src/ui/simulator/toolbox/components/refresh.h b/src/ui/simulator/toolbox/components/refresh.h index 323d1a1731..6f1c1d6050 100644 --- a/src/ui/simulator/toolbox/components/refresh.h +++ b/src/ui/simulator/toolbox/components/refresh.h @@ -27,7 +27,7 @@ #ifndef __ANTARES_TOOLBOX_COMPONENTS_REFRESH_H__ #define __ANTARES_TOOLBOX_COMPONENTS_REFRESH_H__ -#include +class wxWindow; namespace Antares { diff --git a/src/ui/simulator/toolbox/components/wip-panel.h b/src/ui/simulator/toolbox/components/wip-panel.h index 612f175f68..a7e31cc360 100644 --- a/src/ui/simulator/toolbox/components/wip-panel.h +++ b/src/ui/simulator/toolbox/components/wip-panel.h @@ -28,7 +28,6 @@ #define __ANTARES_TOOLBOX_COMPONENTS_WIP_PANEL_WIP_PANEL_H__ #include -#include #include #include diff --git a/src/ui/simulator/toolbox/components/wizardheader.h b/src/ui/simulator/toolbox/components/wizardheader.h index 95238b7cf8..97d3ef0ccf 100644 --- a/src/ui/simulator/toolbox/components/wizardheader.h +++ b/src/ui/simulator/toolbox/components/wizardheader.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_TOOLBOX_COMPONENTS_H__ #define __ANTARES_TOOLBOX_COMPONENTS_H__ -#include #include namespace Antares diff --git a/src/ui/simulator/toolbox/create.h b/src/ui/simulator/toolbox/create.h index 794bd82342..21aa3ec460 100644 --- a/src/ui/simulator/toolbox/create.h +++ b/src/ui/simulator/toolbox/create.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_TOOLBOX_CREATE_H__ #define __ANTARES_TOOLBOX_CREATE_H__ -#include #include #include #include diff --git a/src/ui/simulator/toolbox/execute/execute.h b/src/ui/simulator/toolbox/execute/execute.h index 5ccd5bf9d0..114f4e0242 100644 --- a/src/ui/simulator/toolbox/execute/execute.h +++ b/src/ui/simulator/toolbox/execute/execute.h @@ -27,7 +27,7 @@ #ifndef __ANTARES_TOOLBOX_E_EXECUTE_H__ #define __ANTARES_TOOLBOX_E_EXECUTE_H__ -#include +#include namespace Antares { diff --git a/src/ui/simulator/toolbox/ext-source/action-panel.cpp b/src/ui/simulator/toolbox/ext-source/action-panel.cpp index 87c9feb5cb..d4d4979b1b 100644 --- a/src/ui/simulator/toolbox/ext-source/action-panel.cpp +++ b/src/ui/simulator/toolbox/ext-source/action-panel.cpp @@ -25,7 +25,6 @@ ** SPDX-License-Identifier: licenceRef-GPL3_WITH_RTE-Exceptions */ -#include #include #include diff --git a/src/ui/simulator/toolbox/ext-source/action-panel.h b/src/ui/simulator/toolbox/ext-source/action-panel.h index fdc48f3d99..4d13b05212 100644 --- a/src/ui/simulator/toolbox/ext-source/action-panel.h +++ b/src/ui/simulator/toolbox/ext-source/action-panel.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_TOOLBOX_EXT_SOURCE_ACTION_PANEL_H__ #define __ANTARES_TOOLBOX_EXT_SOURCE_ACTION_PANEL_H__ -#include #include #include #include diff --git a/src/ui/simulator/toolbox/ext-source/performer.h b/src/ui/simulator/toolbox/ext-source/performer.h index 895dadfc3e..049abbe1c6 100644 --- a/src/ui/simulator/toolbox/ext-source/performer.h +++ b/src/ui/simulator/toolbox/ext-source/performer.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_APPLICATION_EXT_SOURCE_PERFORMER_H__ #define __ANTARES_APPLICATION_EXT_SOURCE_PERFORMER_H__ -#include #include #include #include diff --git a/src/ui/simulator/toolbox/ext-source/window.h b/src/ui/simulator/toolbox/ext-source/window.h index 9fc4a7b1cb..f84cb07d65 100644 --- a/src/ui/simulator/toolbox/ext-source/window.h +++ b/src/ui/simulator/toolbox/ext-source/window.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_APPLICATION_EXT_SOURCE_WINDOW_H__ #define __ANTARES_APPLICATION_EXT_SOURCE_WINDOW_H__ -#include #include #include #include diff --git a/src/ui/simulator/toolbox/input/area.h b/src/ui/simulator/toolbox/input/area.h index 3a487cbc1b..7e6d4472db 100644 --- a/src/ui/simulator/toolbox/input/area.h +++ b/src/ui/simulator/toolbox/input/area.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_TOOLBOX_INPUT_AREA_H__ #define __ANTARES_TOOLBOX_INPUT_AREA_H__ -#include #include #include #include diff --git a/src/ui/simulator/toolbox/input/bindingconstraint/bindingconstraint.cpp b/src/ui/simulator/toolbox/input/bindingconstraint/bindingconstraint.cpp index e0188c4cae..56c8b980d1 100644 --- a/src/ui/simulator/toolbox/input/bindingconstraint/bindingconstraint.cpp +++ b/src/ui/simulator/toolbox/input/bindingconstraint/bindingconstraint.cpp @@ -25,7 +25,6 @@ ** SPDX-License-Identifier: licenceRef-GPL3_WITH_RTE-Exceptions */ -#include #include "bindingconstraint.h" #include #include diff --git a/src/ui/simulator/toolbox/input/bindingconstraint/bindingconstraint.h b/src/ui/simulator/toolbox/input/bindingconstraint/bindingconstraint.h index ab02e31987..412952da84 100644 --- a/src/ui/simulator/toolbox/input/bindingconstraint/bindingconstraint.h +++ b/src/ui/simulator/toolbox/input/bindingconstraint/bindingconstraint.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_TOOLBOX_INPUT_BINDING_CONSTRAINT_BINDING_CONSTRAINT_H__ #define __ANTARES_TOOLBOX_INPUT_BINDING_CONSTRAINT_BINDING_CONSTRAINT_H__ -#include #include #include #include "../input.h" diff --git a/src/ui/simulator/toolbox/input/connection.h b/src/ui/simulator/toolbox/input/connection.h index c4de901394..e1e2488ede 100644 --- a/src/ui/simulator/toolbox/input/connection.h +++ b/src/ui/simulator/toolbox/input/connection.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_TOOLBOX_INPUT_CONNECTIONS_H__ #define __ANTARES_TOOLBOX_INPUT_CONNECTIONS_H__ -#include #include #include #include "input.h" diff --git a/src/ui/simulator/toolbox/input/input.h b/src/ui/simulator/toolbox/input/input.h index eb29804853..bc3de0a775 100644 --- a/src/ui/simulator/toolbox/input/input.h +++ b/src/ui/simulator/toolbox/input/input.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_TOOLBOX_INPUT_H__ #define __ANTARES_TOOLBOX_INPUT_H__ -#include #include namespace Antares diff --git a/src/ui/simulator/toolbox/input/renewable-cluster.h b/src/ui/simulator/toolbox/input/renewable-cluster.h index ac9bf88001..58d18bc865 100644 --- a/src/ui/simulator/toolbox/input/renewable-cluster.h +++ b/src/ui/simulator/toolbox/input/renewable-cluster.h @@ -28,8 +28,7 @@ #define __ANTARES_TOOLBOX_INPUT_RENEWABLE_CLUSTER_H__ // gp : remove useless header includes -// #include -#include +// #include // #include #include "input.h" #include "area.h" diff --git a/src/ui/simulator/toolbox/input/thermal-cluster.h b/src/ui/simulator/toolbox/input/thermal-cluster.h index 60ecf7f779..02a6e37759 100644 --- a/src/ui/simulator/toolbox/input/thermal-cluster.h +++ b/src/ui/simulator/toolbox/input/thermal-cluster.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_TOOLBOX_INPUT_THERMAL_CLUSTER_H__ #define __ANTARES_TOOLBOX_INPUT_THERMAL_CLUSTER_H__ -#include #include #include #include "input.h" diff --git a/src/ui/simulator/toolbox/jobs/job.cpp b/src/ui/simulator/toolbox/jobs/job.cpp index 9c8ac8c53a..6d501d1467 100644 --- a/src/ui/simulator/toolbox/jobs/job.cpp +++ b/src/ui/simulator/toolbox/jobs/job.cpp @@ -26,7 +26,6 @@ */ #include -#include #include #include diff --git a/src/ui/simulator/toolbox/jobs/job.h b/src/ui/simulator/toolbox/jobs/job.h index 8468f66e92..d493158b3f 100644 --- a/src/ui/simulator/toolbox/jobs/job.h +++ b/src/ui/simulator/toolbox/jobs/job.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_TOOLBOX_JOB_H__ #define __ANTARES_TOOLBOX_JOB_H__ -#include #include #include #include diff --git a/src/ui/simulator/toolbox/locales.cpp b/src/ui/simulator/toolbox/locales.cpp index 7092be8056..978e5d9fa9 100644 --- a/src/ui/simulator/toolbox/locales.cpp +++ b/src/ui/simulator/toolbox/locales.cpp @@ -25,7 +25,6 @@ ** SPDX-License-Identifier: licenceRef-GPL3_WITH_RTE-Exceptions */ -#include #include #include #include diff --git a/src/ui/simulator/toolbox/resources.cpp b/src/ui/simulator/toolbox/resources.cpp index f3ab32eb1d..81e7b4cfd4 100644 --- a/src/ui/simulator/toolbox/resources.cpp +++ b/src/ui/simulator/toolbox/resources.cpp @@ -27,6 +27,7 @@ #include #include "resources.h" +#include "wx-wrapper.h" #include #include #include diff --git a/src/ui/simulator/toolbox/resources.h b/src/ui/simulator/toolbox/resources.h index 7bce3ac805..692b1b2d72 100644 --- a/src/ui/simulator/toolbox/resources.h +++ b/src/ui/simulator/toolbox/resources.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_TOOLBOX_RESOURCES_H__ #define __ANTARES_TOOLBOX_RESOURCES_H__ -#include #include #include #include diff --git a/src/ui/simulator/windows/analyzer/analyzer.h b/src/ui/simulator/windows/analyzer/analyzer.h index 03f80f0a0f..a4baa0e81f 100644 --- a/src/ui/simulator/windows/analyzer/analyzer.h +++ b/src/ui/simulator/windows/analyzer/analyzer.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_APPLICATION_WINDOW_ANALYZER_H__ #define __ANTARES_APPLICATION_WINDOW_ANALYZER_H__ -#include #include #include #include diff --git a/src/ui/simulator/windows/bindingconstraint/bindingconstraint.h b/src/ui/simulator/windows/bindingconstraint/bindingconstraint.h index 535cdad70e..33d3263328 100644 --- a/src/ui/simulator/windows/bindingconstraint/bindingconstraint.h +++ b/src/ui/simulator/windows/bindingconstraint/bindingconstraint.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_APPLICATION_WINDOW_BINDING_CONSTRAINT_H__ #define __ANTARES_APPLICATION_WINDOW_BINDING_CONSTRAINT_H__ -#include #include "../../toolbox/components/notebook/notebook.h" #include "../../toolbox/components/datagrid/component.h" #include "../../toolbox/input/bindingconstraint.h" diff --git a/src/ui/simulator/windows/bindingconstraint/edit.h b/src/ui/simulator/windows/bindingconstraint/edit.h index 47f264e566..c0b41ede5d 100644 --- a/src/ui/simulator/windows/bindingconstraint/edit.h +++ b/src/ui/simulator/windows/bindingconstraint/edit.h @@ -27,10 +27,10 @@ #ifndef __ANTARES_APPLICATION_WINDOW_BINDING_CONSTRAINT_EDIT_H__ #define __ANTARES_APPLICATION_WINDOW_BINDING_CONSTRAINT_EDIT_H__ -#include #include #include #include +#include namespace Antares { diff --git a/src/ui/simulator/windows/calendar/calendar.h b/src/ui/simulator/windows/calendar/calendar.h index 9f0906849d..4eb9e1c3f0 100644 --- a/src/ui/simulator/windows/calendar/calendar.h +++ b/src/ui/simulator/windows/calendar/calendar.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_APPLICATION_WINDOWS_CALENDAR_CALENDAR_H__ #define __ANTARES_APPLICATION_WINDOWS_CALENDAR_CALENDAR_H__ -#include #include #include "../../toolbox/components/button.h" diff --git a/src/ui/simulator/windows/cleaner.h b/src/ui/simulator/windows/cleaner.h index 6fd449928d..7f7b1a419e 100644 --- a/src/ui/simulator/windows/cleaner.h +++ b/src/ui/simulator/windows/cleaner.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_APPLICATION_WINDOW_CLEANER_H__ #define __ANTARES_APPLICATION_WINDOW_CLEANER_H__ -#include #include #include #include diff --git a/src/ui/simulator/windows/constraints-builder/constraintsbuilder.h b/src/ui/simulator/windows/constraints-builder/constraintsbuilder.h index 7886ad7304..bba1a9b408 100644 --- a/src/ui/simulator/windows/constraints-builder/constraintsbuilder.h +++ b/src/ui/simulator/windows/constraints-builder/constraintsbuilder.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_APPLICATION_WINDOW_CONSTRAINTSBUILDER_H__ #define __ANTARES_APPLICATION_WINDOW_CONSTRAINTSBUILDER_H__ -#include #include #include #include diff --git a/src/ui/simulator/windows/correlation/correlation.h b/src/ui/simulator/windows/correlation/correlation.h index 7843ddaab1..aeef6636d8 100644 --- a/src/ui/simulator/windows/correlation/correlation.h +++ b/src/ui/simulator/windows/correlation/correlation.h @@ -29,7 +29,6 @@ #include #include -#include #include #include diff --git a/src/ui/simulator/windows/exportmap.h b/src/ui/simulator/windows/exportmap.h index a10c5cfcd6..36a5418687 100644 --- a/src/ui/simulator/windows/exportmap.h +++ b/src/ui/simulator/windows/exportmap.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_APPLICATION_WINDOWS_EXPORTMAP_H__ #define __ANTARES_APPLICATION_WINDOWS_EXPORTMAP_H__ -#include #include #include #include "../application/study.h" diff --git a/src/ui/simulator/windows/hydro/allocation.h b/src/ui/simulator/windows/hydro/allocation.h index 4553f42386..8715cc55c0 100644 --- a/src/ui/simulator/windows/hydro/allocation.h +++ b/src/ui/simulator/windows/hydro/allocation.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_APPLICATION_WINDOWS_HYDRO_ALLOCATION_H__ #define __ANTARES_APPLICATION_WINDOWS_HYDRO_ALLOCATION_H__ -#include #include namespace Antares diff --git a/src/ui/simulator/windows/hydro/dailypower.h b/src/ui/simulator/windows/hydro/dailypower.h index 10c74e491e..4be3f0296b 100644 --- a/src/ui/simulator/windows/hydro/dailypower.h +++ b/src/ui/simulator/windows/hydro/dailypower.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_APPLICATION_HYDROOW_HYDRO_DAILYPOWER_H__ #define __ANTARES_APPLICATION_HYDROOW_HYDRO_DAILYPOWER_H__ -#include #include "../../toolbox/components/datagrid/component.h" #include "../../toolbox/input/area.h" #include diff --git a/src/ui/simulator/windows/hydro/levelsandvalues.h b/src/ui/simulator/windows/hydro/levelsandvalues.h index d49052b1d9..178350b8e4 100644 --- a/src/ui/simulator/windows/hydro/levelsandvalues.h +++ b/src/ui/simulator/windows/hydro/levelsandvalues.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_APPLICATION_HYDROOW_HYDRO_LEVELSANDVALUES_H__ #define __ANTARES_APPLICATION_HYDROOW_HYDRO_LEVELSANDVALUES_H__ -#include #include "../../toolbox/components/datagrid/component.h" #include "../../toolbox/input/area.h" #include diff --git a/src/ui/simulator/windows/hydro/localdatahydro.h b/src/ui/simulator/windows/hydro/localdatahydro.h index a9f9ed29c5..2f76d79409 100644 --- a/src/ui/simulator/windows/hydro/localdatahydro.h +++ b/src/ui/simulator/windows/hydro/localdatahydro.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_APPLICATION_WINDOWS_HYDRO_LOCALDATAHYDRO_H__ #define __ANTARES_APPLICATION_WINDOWS_HYDRO_LOCALDATAHYDRO_H__ -#include #include "../../toolbox/input/area.h" #include "../../toolbox/components/notebook/notebook.h" #include diff --git a/src/ui/simulator/windows/hydro/management.h b/src/ui/simulator/windows/hydro/management.h index 9b456c3f17..711790338e 100644 --- a/src/ui/simulator/windows/hydro/management.h +++ b/src/ui/simulator/windows/hydro/management.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_APPLICATION_HYDROOW_HYDRO_MANAGEMENT_H__ #define __ANTARES_APPLICATION_HYDROOW_HYDRO_MANAGEMENT_H__ -#include #include "../../toolbox/components/datagrid/component.h" #include "../../toolbox/input/area.h" #include diff --git a/src/ui/simulator/windows/hydro/prepro.h b/src/ui/simulator/windows/hydro/prepro.h index 26dcaee13d..be1965cc0c 100644 --- a/src/ui/simulator/windows/hydro/prepro.h +++ b/src/ui/simulator/windows/hydro/prepro.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_APPLICATION_HYDROOW_HYDRO_PREPRO_H__ #define __ANTARES_APPLICATION_HYDROOW_HYDRO_PREPRO_H__ -#include #include "../../toolbox/components/datagrid/component.h" #include "../../toolbox/input/area.h" #include diff --git a/src/ui/simulator/windows/hydro/series.h b/src/ui/simulator/windows/hydro/series.h index 90656c3e06..f6de6209a6 100644 --- a/src/ui/simulator/windows/hydro/series.h +++ b/src/ui/simulator/windows/hydro/series.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_APPLICATION_WINDOWS_HYDRO_PREPRO_H__ #define __ANTARES_APPLICATION_WINDOWS_HYDRO_PREPRO_H__ -#include #include "../../toolbox/input/area.h" #include "../../toolbox/components/notebook/notebook.h" #include diff --git a/src/ui/simulator/windows/inspector/constants.h b/src/ui/simulator/windows/inspector/constants.h index 6bf2c8489e..34b7c238bf 100644 --- a/src/ui/simulator/windows/inspector/constants.h +++ b/src/ui/simulator/windows/inspector/constants.h @@ -1,6 +1,6 @@ #pragma once -#include +#include namespace Antares { diff --git a/src/ui/simulator/windows/inspector/editor-calendar.h b/src/ui/simulator/windows/inspector/editor-calendar.h index f87784ffb9..4ceda21560 100644 --- a/src/ui/simulator/windows/inspector/editor-calendar.h +++ b/src/ui/simulator/windows/inspector/editor-calendar.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_WINDOWS_INSPECTOR_EDITOR_STUDY_CALENDAR_H__ #define __ANTARES_WINDOWS_INSPECTOR_EDITOR_STUDY_CALENDAR_H__ -#include #include #include #include diff --git a/src/ui/simulator/windows/inspector/frame.cpp b/src/ui/simulator/windows/inspector/frame.cpp index 110adf099e..22b9ad28c9 100644 --- a/src/ui/simulator/windows/inspector/frame.cpp +++ b/src/ui/simulator/windows/inspector/frame.cpp @@ -25,7 +25,6 @@ ** SPDX-License-Identifier: licenceRef-GPL3_WITH_RTE-Exceptions */ -#include #include "frame.h" #include "../../application/main.h" #include diff --git a/src/ui/simulator/windows/inspector/frame.h b/src/ui/simulator/windows/inspector/frame.h index 7582cee43a..2d49c0bd8e 100644 --- a/src/ui/simulator/windows/inspector/frame.h +++ b/src/ui/simulator/windows/inspector/frame.h @@ -29,7 +29,6 @@ #include -#include #include #include "../notes.h" #include "data.h" diff --git a/src/ui/simulator/windows/inspector/grid.h b/src/ui/simulator/windows/inspector/grid.h index bfd7bed40e..653d9f9869 100644 --- a/src/ui/simulator/windows/inspector/grid.h +++ b/src/ui/simulator/windows/inspector/grid.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_WINDOWS_INSPECTOR_GRID_H__ #define __ANTARES_WINDOWS_INSPECTOR_GRID_H__ -#include #include #include #include diff --git a/src/ui/simulator/windows/inspector/inspector.cpp b/src/ui/simulator/windows/inspector/inspector.cpp index 021c9f08e9..d895d26f1c 100644 --- a/src/ui/simulator/windows/inspector/inspector.cpp +++ b/src/ui/simulator/windows/inspector/inspector.cpp @@ -25,7 +25,6 @@ ** SPDX-License-Identifier: licenceRef-GPL3_WITH_RTE-Exceptions */ -#include #include #include #include diff --git a/src/ui/simulator/windows/memorystatistics/memorystatistics.h b/src/ui/simulator/windows/memorystatistics/memorystatistics.h index fe3e6f17c3..b4915d8ff8 100644 --- a/src/ui/simulator/windows/memorystatistics/memorystatistics.h +++ b/src/ui/simulator/windows/memorystatistics/memorystatistics.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_APPLICATION_MEMORYSTATISTICS_MEMORYSTATISTICS_H__ #define __ANTARES_APPLICATION_MEMORYSTATISTICS_MEMORYSTATISTICS_H__ -#include #include #include "private.h" diff --git a/src/ui/simulator/windows/message.h b/src/ui/simulator/windows/message.h index 8e0fa663b3..3ca130bc55 100644 --- a/src/ui/simulator/windows/message.h +++ b/src/ui/simulator/windows/message.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_APPLICATION_MESSAGE_H__ #define __ANTARES_APPLICATION_MESSAGE_H__ -#include #include #include #include diff --git a/src/ui/simulator/windows/notes.h b/src/ui/simulator/windows/notes.h index 14802701d7..2b2a44966f 100644 --- a/src/ui/simulator/windows/notes.h +++ b/src/ui/simulator/windows/notes.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_APPLICATION_WINDOWS_NOTES_H__ #define __ANTARES_APPLICATION_WINDOWS_NOTES_H__ -#include #include #include #include diff --git a/src/ui/simulator/windows/options/adequacy-patch/adequacy-patch-areas.h b/src/ui/simulator/windows/options/adequacy-patch/adequacy-patch-areas.h index 1712fc7aab..5ca9e2c160 100644 --- a/src/ui/simulator/windows/options/adequacy-patch/adequacy-patch-areas.h +++ b/src/ui/simulator/windows/options/adequacy-patch/adequacy-patch-areas.h @@ -28,7 +28,6 @@ #ifndef __ANTARES_APPLICATION_WINDOWS_ADEQUACY_PATCH_AREAS_H__ #define __ANTARES_APPLICATION_WINDOWS_ADEQUACY_PATCH_AREAS_H__ -#include #include "../../../toolbox/components/datagrid/component.h" #include #include diff --git a/src/ui/simulator/windows/options/adequacy-patch/adequacy-patch-options.h b/src/ui/simulator/windows/options/adequacy-patch/adequacy-patch-options.h index fa3c9ed828..5a0d1c3c45 100644 --- a/src/ui/simulator/windows/options/adequacy-patch/adequacy-patch-options.h +++ b/src/ui/simulator/windows/options/adequacy-patch/adequacy-patch-options.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_APPLICATION_WINDOWS_OPTIONS_ADEQUACY_PATCH_H__ #define __ANTARES_APPLICATION_WINDOWS_OPTIONS_ADEQUACY_PATCH_H__ -#include #include "../../../toolbox/components/button.h" #include diff --git a/src/ui/simulator/windows/options/advanced/advanced.h b/src/ui/simulator/windows/options/advanced/advanced.h index 1183ea1a7e..7d25a55b89 100644 --- a/src/ui/simulator/windows/options/advanced/advanced.h +++ b/src/ui/simulator/windows/options/advanced/advanced.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_APPLICATION_WINDOWS_OPTIONS_ADVANCED_PARAMETERS_H__ #define __ANTARES_APPLICATION_WINDOWS_OPTIONS_ADVANCED_PARAMETERS_H__ -#include #include "../../../toolbox/components/button.h" #include #include diff --git a/src/ui/simulator/windows/options/optimization/optimization.h b/src/ui/simulator/windows/options/optimization/optimization.h index 1d61c74feb..b133861b7a 100644 --- a/src/ui/simulator/windows/options/optimization/optimization.h +++ b/src/ui/simulator/windows/options/optimization/optimization.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_APPLICATION_WINDOWS_OPTIONS_OPTIMIZATION_PREFS_H__ #define __ANTARES_APPLICATION_WINDOWS_OPTIONS_OPTIMIZATION_PREFS_H__ -#include #include "toolbox/components/button.h" #include diff --git a/src/ui/simulator/windows/options/playlist/playlist.h b/src/ui/simulator/windows/options/playlist/playlist.h index 2b83e05f35..8b266cfa95 100644 --- a/src/ui/simulator/windows/options/playlist/playlist.h +++ b/src/ui/simulator/windows/options/playlist/playlist.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_APPLICATION_WINDOWS_PLAYLIST_H__ #define __ANTARES_APPLICATION_WINDOWS_PLAYLIST_H__ -#include #include "../../../toolbox/components/datagrid/component.h" #include #include diff --git a/src/ui/simulator/windows/options/select-output/select-output.h b/src/ui/simulator/windows/options/select-output/select-output.h index e8790959dc..9e31a5b21f 100644 --- a/src/ui/simulator/windows/options/select-output/select-output.h +++ b/src/ui/simulator/windows/options/select-output/select-output.h @@ -1,7 +1,6 @@ #ifndef __ANTARES_APPLICATION_WINDOWS_SELECTOUTPUT_H__ #define __ANTARES_APPLICATION_WINDOWS_SELECTOUTPUT_H__ -#include #include "../../../toolbox/components/datagrid/component.h" #include #include diff --git a/src/ui/simulator/windows/options/temp-folder/temp-folder.h b/src/ui/simulator/windows/options/temp-folder/temp-folder.h index aa2bd5dca9..0e0f8b1b67 100644 --- a/src/ui/simulator/windows/options/temp-folder/temp-folder.h +++ b/src/ui/simulator/windows/options/temp-folder/temp-folder.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_APPLICATION_WINDOWS_OPTIONS_TEMP_FOLDER_H__ #define __ANTARES_APPLICATION_WINDOWS_OPTIONS_TEMP_FOLDER_H__ -#include #include #include #include diff --git a/src/ui/simulator/windows/output/layer.h b/src/ui/simulator/windows/output/layer.h index 130728014b..26eebad7bb 100644 --- a/src/ui/simulator/windows/output/layer.h +++ b/src/ui/simulator/windows/output/layer.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_WINDOWS_OUTPUT_LAYER_H__ #define __ANTARES_WINDOWS_OUTPUT_LAYER_H__ -#include #include "../../application/study.h" #include "fwd.h" diff --git a/src/ui/simulator/windows/output/output.h b/src/ui/simulator/windows/output/output.h index efa1593c6a..4aa2403eb4 100644 --- a/src/ui/simulator/windows/output/output.h +++ b/src/ui/simulator/windows/output/output.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_WINDOWS_OUTPUT_OUTPUT_H__ #define __ANTARES_WINDOWS_OUTPUT_OUTPUT_H__ -#include #include #include "../../application/study.h" #include "../../toolbox/components/button.h" diff --git a/src/ui/simulator/windows/output/panel/area-link-renderer.h b/src/ui/simulator/windows/output/panel/area-link-renderer.h index ceec2411cd..9efe88fc89 100644 --- a/src/ui/simulator/windows/output/panel/area-link-renderer.h +++ b/src/ui/simulator/windows/output/panel/area-link-renderer.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_WINDOWS_OUTPUT_PANEL_AREA_LINK_RENDERER_H__ #define __ANTARES_WINDOWS_OUTPUT_PANEL_AREA_LINK_RENDERER_H__ -#include #include "../../../toolbox/components/datagrid/renderer.h" #include #include diff --git a/src/ui/simulator/windows/output/panel/panel.h b/src/ui/simulator/windows/output/panel/panel.h index c6a8ed3cb8..f83ffca4c3 100644 --- a/src/ui/simulator/windows/output/panel/panel.h +++ b/src/ui/simulator/windows/output/panel/panel.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_WINDOWS_OUTPUT_PANEL_PANEL_H__ #define __ANTARES_WINDOWS_OUTPUT_PANEL_PANEL_H__ -#include #include #include "../fwd.h" #include diff --git a/src/ui/simulator/windows/output/provider/output-comparison.h b/src/ui/simulator/windows/output/provider/output-comparison.h index 0dd66d5cde..84431b298c 100644 --- a/src/ui/simulator/windows/output/provider/output-comparison.h +++ b/src/ui/simulator/windows/output/provider/output-comparison.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_WINDOWS_OUTPUT_PROVIDER_COMPARISON_H__ #define __ANTARES_WINDOWS_OUTPUT_PROVIDER_COMPARISON_H__ -#include #include #include "../fwd.h" #include diff --git a/src/ui/simulator/windows/output/provider/outputs.h b/src/ui/simulator/windows/output/provider/outputs.h index c6ba45f2e1..b60dd2f150 100644 --- a/src/ui/simulator/windows/output/provider/outputs.h +++ b/src/ui/simulator/windows/output/provider/outputs.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_WINDOWS_OUTPUT_PROVIDER_OUTPUTS_H__ #define __ANTARES_WINDOWS_OUTPUT_PROVIDER_OUTPUTS_H__ -#include #include #include "../fwd.h" #include diff --git a/src/ui/simulator/windows/output/provider/variables.h b/src/ui/simulator/windows/output/provider/variables.h index 1a2d93cca2..ac891cde11 100644 --- a/src/ui/simulator/windows/output/provider/variables.h +++ b/src/ui/simulator/windows/output/provider/variables.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_WINDOWS_OUTPUT_PROVIDER_VARIABLES_H__ #define __ANTARES_WINDOWS_OUTPUT_PROVIDER_VARIABLES_H__ -#include #include #include "../fwd.h" #include diff --git a/src/ui/simulator/windows/output/spotlight-provider.h b/src/ui/simulator/windows/output/spotlight-provider.h index 1a2b2815bc..36bdd96a21 100644 --- a/src/ui/simulator/windows/output/spotlight-provider.h +++ b/src/ui/simulator/windows/output/spotlight-provider.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_WINDOWS_OUTPUT_SPOTLIGHT_PROVIDER_H__ #define __ANTARES_WINDOWS_OUTPUT_SPOTLIGHT_PROVIDER_H__ -#include #include #include "fwd.h" #include "layer.h" diff --git a/src/ui/simulator/windows/output/window.h b/src/ui/simulator/windows/output/window.h index 94ac0166a0..518c74fcfc 100644 --- a/src/ui/simulator/windows/output/window.h +++ b/src/ui/simulator/windows/output/window.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_WINDOWS_OUTPUT_WINDOW_H__ #define __ANTARES_WINDOWS_OUTPUT_WINDOW_H__ -#include #include "output.h" #include diff --git a/src/ui/simulator/windows/renewables/cluster.h b/src/ui/simulator/windows/renewables/cluster.h index acd416d1ac..52d5a52a59 100644 --- a/src/ui/simulator/windows/renewables/cluster.h +++ b/src/ui/simulator/windows/renewables/cluster.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_APPLICATION_WINDOW_RENEWABLE_COMMON_H__ #define __ANTARES_APPLICATION_WINDOW_RENEWABLE_COMMON_H__ -#include // #include // #include "../../toolbox/components/datagrid/component.h" #include "../../toolbox/input/renewable-cluster.h" diff --git a/src/ui/simulator/windows/saveas.h b/src/ui/simulator/windows/saveas.h index b2ff86e670..af057cdd8b 100644 --- a/src/ui/simulator/windows/saveas.h +++ b/src/ui/simulator/windows/saveas.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_APPLICATION_WINDOWS_SAVEAS_H__ #define __ANTARES_APPLICATION_WINDOWS_SAVEAS_H__ -#include #include #include "../application/study.h" diff --git a/src/ui/simulator/windows/scenario-builder/panel.h b/src/ui/simulator/windows/scenario-builder/panel.h index aa0e512b9b..44e59afa00 100644 --- a/src/ui/simulator/windows/scenario-builder/panel.h +++ b/src/ui/simulator/windows/scenario-builder/panel.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_APPLICATION_WINDOWS_SCENARIO_BUILDER_PANEL_H__ #define __ANTARES_APPLICATION_WINDOWS_SCENARIO_BUILDER_PANEL_H__ -#include #include #include #include diff --git a/src/ui/simulator/windows/sets.h b/src/ui/simulator/windows/sets.h index 3c97f7d319..06c0d70266 100644 --- a/src/ui/simulator/windows/sets.h +++ b/src/ui/simulator/windows/sets.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_APPLICATION_WINDOWS_SETS_H__ #define __ANTARES_APPLICATION_WINDOWS_SETS_H__ -#include #include #include #include diff --git a/src/ui/simulator/windows/simulation/panel.h b/src/ui/simulator/windows/simulation/panel.h index 0e13ea3023..3113dba3a3 100644 --- a/src/ui/simulator/windows/simulation/panel.h +++ b/src/ui/simulator/windows/simulation/panel.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_APPLICATION_WINDOWS_SIMULATION_PANEL_H__ #define __ANTARES_APPLICATION_WINDOWS_SIMULATION_PANEL_H__ -#include #include "../inspector/data.h" #include #include "../../toolbox/components/datagrid/component.h" diff --git a/src/ui/simulator/windows/simulation/run.h b/src/ui/simulator/windows/simulation/run.h index 710d0ab2d5..0586fedae0 100644 --- a/src/ui/simulator/windows/simulation/run.h +++ b/src/ui/simulator/windows/simulation/run.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_APPLICATION_WINDOWS_SIMULATION_RUN_H__ #define __ANTARES_APPLICATION_WINDOWS_SIMULATION_RUN_H__ -#include #include #include diff --git a/src/ui/simulator/windows/startupwizard.h b/src/ui/simulator/windows/startupwizard.h index abc67c036f..cc7a1e2a1c 100644 --- a/src/ui/simulator/windows/startupwizard.h +++ b/src/ui/simulator/windows/startupwizard.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_APPLICATION_WINDOWS_STARTUP_WIZARD_H__ #define __ANTARES_APPLICATION_WINDOWS_STARTUP_WIZARD_H__ -#include #include #include #include "../toolbox/components/button.h" diff --git a/src/ui/simulator/windows/studylogs.h b/src/ui/simulator/windows/studylogs.h index c0ce61013b..3779cee36a 100644 --- a/src/ui/simulator/windows/studylogs.h +++ b/src/ui/simulator/windows/studylogs.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_APPLICATION_WINDOWS_STUDY_LOGS_H__ #define __ANTARES_APPLICATION_WINDOWS_STUDY_LOGS_H__ -#include #include #include diff --git a/src/ui/simulator/windows/textinput/input.cpp b/src/ui/simulator/windows/textinput/input.cpp index bd8357b58b..a54d8c1b50 100644 --- a/src/ui/simulator/windows/textinput/input.cpp +++ b/src/ui/simulator/windows/textinput/input.cpp @@ -25,7 +25,6 @@ ** SPDX-License-Identifier: licenceRef-GPL3_WITH_RTE-Exceptions */ -#include #include #include "../../application/study.h" #include "../../application/main/main.h" diff --git a/src/ui/simulator/windows/textinput/input.h b/src/ui/simulator/windows/textinput/input.h index cfa45a324c..92e14eda2a 100644 --- a/src/ui/simulator/windows/textinput/input.h +++ b/src/ui/simulator/windows/textinput/input.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_WINDOWS_TEXTINPUT_INPUT_H__ #define __ANTARES_WINDOWS_TEXTINPUT_INPUT_H__ -#include namespace Antares { diff --git a/src/ui/simulator/windows/thermal/cluster.h b/src/ui/simulator/windows/thermal/cluster.h index 57482cf0d2..83c90ad857 100644 --- a/src/ui/simulator/windows/thermal/cluster.h +++ b/src/ui/simulator/windows/thermal/cluster.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_APPLICATION_WINDOW_THERMAL_COMMON_H__ #define __ANTARES_APPLICATION_WINDOW_THERMAL_COMMON_H__ -#include #include #include "../../toolbox/components/datagrid/component.h" #include "../../toolbox/input/thermal-cluster.h" diff --git a/src/ui/simulator/windows/version.h b/src/ui/simulator/windows/version.h index 7929e10464..44f51833d0 100644 --- a/src/ui/simulator/windows/version.h +++ b/src/ui/simulator/windows/version.h @@ -27,7 +27,8 @@ #ifndef __ANTARES_WINDOW_VERSION_H__ #define __ANTARES_WINDOW_VERSION_H__ -#include + +#include namespace Antares { diff --git a/src/ui/simulator/windows/xcast/xcast.h b/src/ui/simulator/windows/xcast/xcast.h index aa3b7c0be2..9afa178004 100644 --- a/src/ui/simulator/windows/xcast/xcast.h +++ b/src/ui/simulator/windows/xcast/xcast.h @@ -27,7 +27,6 @@ #ifndef __ANTARES_WINDOWS_XCAST_XCAST_H__ #define __ANTARES_WINDOWS_XCAST_XCAST_H__ -#include #include "../../toolbox/components/notebook/notebook.h" #include "../../toolbox/components/datagrid/component.h" #include "../../toolbox/input/area.h" From d25dc66bb9318ac9b507ef2162b37ebc243b0877 Mon Sep 17 00:00:00 2001 From: Jason Marechal Date: Thu, 24 Aug 2023 10:57:43 +0200 Subject: [PATCH 40/52] Remove dependency to libantares-core --- src/analyzer/CMakeLists.txt | 5 ++--- src/solver/CMakeLists.txt | 17 ++++++++--------- src/solver/aleatoire/CMakeLists.txt | 2 +- .../infeasible-problem-analysis/CMakeLists.txt | 3 +-- src/solver/main/CMakeLists.txt | 2 -- src/solver/optimisation/CMakeLists.txt | 1 - src/solver/simulation/CMakeLists.txt | 1 - src/solver/ts-generator/CMakeLists.txt | 1 - src/solver/utils/CMakeLists.txt | 4 ++-- src/solver/utils/ortools_utils.cpp | 1 - .../binding_constraints/CMakeLists.txt | 1 - .../end-to-end/simple_study/CMakeLists.txt | 1 - src/tests/end-to-end/utils/CMakeLists.txt | 1 - src/tests/src/libs/antares/CMakeLists.txt | 3 +-- .../src/libs/antares/study/area/CMakeLists.txt | 2 -- .../antares/study/constraint/CMakeLists.txt | 2 -- .../antares/study/output-folder/CMakeLists.txt | 1 - .../study/scenario-builder/CMakeLists.txt | 2 -- .../short-term-storage-input/CMakeLists.txt | 1 - .../thermal-price-definition/CMakeLists.txt | 2 +- .../src/solver/optimisation/CMakeLists.txt | 1 - src/tests/src/solver/simulation/CMakeLists.txt | 4 ---- src/tools/batchrun/CMakeLists.txt | 4 +--- src/tools/cleaner/CMakeLists.txt | 4 ++-- src/tools/config/CMakeLists.txt | 4 ++-- src/tools/config/main.cpp | 1 - src/tools/finder/CMakeLists.txt | 2 +- src/tools/kirchhoff-cbuilder/CMakeLists.txt | 1 - src/tools/updater/CMakeLists.txt | 4 ++-- src/tools/vacuum/CMakeLists.txt | 3 +-- src/tools/yby-aggregator/CMakeLists.txt | 2 +- 31 files changed, 26 insertions(+), 57 deletions(-) diff --git a/src/analyzer/CMakeLists.txt b/src/analyzer/CMakeLists.txt index 4fd5736c94..f65109c2be 100644 --- a/src/analyzer/CMakeLists.txt +++ b/src/analyzer/CMakeLists.txt @@ -50,13 +50,12 @@ INSTALL(EXPORT antares-analyzer target_link_libraries(antares-${ANTARES_PRG_VERSION}-analyzer PRIVATE - libantares-core - Antares::date - Antares::sys yuni-static-core ${CMAKE_THREADS_LIBS_INIT} + libantares-core #local.h PUBLIC Antares::study #atsp -> xcast + Antares::sys ) import_std_libs(antares-${ANTARES_PRG_VERSION}-analyzer) diff --git a/src/solver/CMakeLists.txt b/src/solver/CMakeLists.txt index 3ec69be700..378f5d372a 100644 --- a/src/solver/CMakeLists.txt +++ b/src/solver/CMakeLists.txt @@ -73,8 +73,13 @@ add_executable(antares-solver set_target_properties(antares-solver PROPERTIES OUTPUT_NAME ${exec_name}) -set(ANTARES_SOLVER_LIBS - date +set(ANTARES_SOLVER_LIBS + Antares::date + Antares::benchmarking + Antares::result_writer + Antares::sys + Antares::infoCollection + Antares::checks yuni-static-uuid yuni-static-core ${CMAKE_THREADS_LIBS_INIT} @@ -88,17 +93,11 @@ set(ANTARES_SOLVER_LIBS ${ANTARES_SOLVER_LIBS} libantares-solver-variable libantares-solver-simulation libantares-solver-ts-generator - libmodel_antares - libantares-core) + libmodel_antares) target_link_libraries(antares-solver PRIVATE ${ANTARES_SOLVER_LIBS} - Antares::benchmarking - result_writer - Antares::sys - Antares::infoCollection - Antares::checks ) target_include_directories(antares-solver diff --git a/src/solver/aleatoire/CMakeLists.txt b/src/solver/aleatoire/CMakeLists.txt index f705fb6dda..bb84736cdc 100644 --- a/src/solver/aleatoire/CMakeLists.txt +++ b/src/solver/aleatoire/CMakeLists.txt @@ -11,7 +11,7 @@ target_include_directories(libantares-solver-aleatoire PRIVATE ${CMAKE_SOURCE_DIR}/solver) -target_link_libraries(libantares-solver-aleatoire PRIVATE libantares-core +target_link_libraries(libantares-solver-aleatoire PUBLIC Antares::study ) diff --git a/src/solver/infeasible-problem-analysis/CMakeLists.txt b/src/solver/infeasible-problem-analysis/CMakeLists.txt index 321f24d5b4..97864d3ef8 100644 --- a/src/solver/infeasible-problem-analysis/CMakeLists.txt +++ b/src/solver/infeasible-problem-analysis/CMakeLists.txt @@ -14,6 +14,5 @@ set(SRC_INFEASIBLE_PROBLEM_ANALYSIS add_library(infeasible_problem_analysis ${SRC_INFEASIBLE_PROBLEM_ANALYSIS}) target_link_libraries(infeasible_problem_analysis PUBLIC ortools::ortools sirius_solver - PRIVATE libantares-core - utils + utils #ortools-utils, not Antares::utils ) diff --git a/src/solver/main/CMakeLists.txt b/src/solver/main/CMakeLists.txt index 56d046720b..8280c65edf 100644 --- a/src/solver/main/CMakeLists.txt +++ b/src/solver/main/CMakeLists.txt @@ -11,13 +11,11 @@ set(SRC_SOLVER_MAIN_ADEQUACY adequacy.cpp) add_library(libantares-solver-main-adequacy ${SRC_SOLVER_MAIN_ADEQUACY}) target_link_libraries(libantares-solver-main-adequacy PRIVATE - libantares-core Antares::infoCollection ) add_library(libantares-solver-main-economy ${SRC_SOLVER_MAIN_ECONOMY}) target_link_libraries(libantares-solver-main-economy PRIVATE - libantares-core Antares::infoCollection ) diff --git a/src/solver/optimisation/CMakeLists.txt b/src/solver/optimisation/CMakeLists.txt index 05f5e5a352..7bc5136fea 100644 --- a/src/solver/optimisation/CMakeLists.txt +++ b/src/solver/optimisation/CMakeLists.txt @@ -89,7 +89,6 @@ else() endif() target_link_libraries(libmodel_antares PUBLIC - libantares-core utils sirius_solver infeasible_problem_analysis diff --git a/src/solver/simulation/CMakeLists.txt b/src/solver/simulation/CMakeLists.txt index 304e69059b..6ab6edc380 100644 --- a/src/solver/simulation/CMakeLists.txt +++ b/src/solver/simulation/CMakeLists.txt @@ -57,6 +57,5 @@ target_include_directories(libantares-solver-simulation PUBLIC ${CMAKE_SOURCE_DIR}/solver/simulation) target_link_libraries(libantares-solver-simulation PRIVATE - libantares-core Antares::infoCollection ) diff --git a/src/solver/ts-generator/CMakeLists.txt b/src/solver/ts-generator/CMakeLists.txt index d01cf0adf9..f0e951354a 100644 --- a/src/solver/ts-generator/CMakeLists.txt +++ b/src/solver/ts-generator/CMakeLists.txt @@ -43,7 +43,6 @@ add_library(libantares-solver-ts-generator target_link_libraries(libantares-solver-ts-generator PRIVATE - libantares-core result_writer array benchmarking diff --git a/src/solver/utils/CMakeLists.txt b/src/solver/utils/CMakeLists.txt index 1bd26bfb42..4b709ffa2a 100644 --- a/src/solver/utils/CMakeLists.txt +++ b/src/solver/utils/CMakeLists.txt @@ -24,7 +24,7 @@ target_link_libraries(utils PUBLIC ortools::ortools sirius_solver - libantares-core - Antares::result_writer Antares::study + Antares::result_writer #ortools_utils.h + libantares-core #enum.h ) diff --git a/src/solver/utils/ortools_utils.cpp b/src/solver/utils/ortools_utils.cpp index d58025d968..eab7dbdda2 100644 --- a/src/solver/utils/ortools_utils.cpp +++ b/src/solver/utils/ortools_utils.cpp @@ -3,7 +3,6 @@ #include #include #include -#include #include using namespace operations_research; diff --git a/src/tests/end-to-end/binding_constraints/CMakeLists.txt b/src/tests/end-to-end/binding_constraints/CMakeLists.txt index b37417914b..3a841ee33d 100644 --- a/src/tests/end-to-end/binding_constraints/CMakeLists.txt +++ b/src/tests/end-to-end/binding_constraints/CMakeLists.txt @@ -14,7 +14,6 @@ target_link_libraries(tests-binding_constraints PRIVATE test_utils Boost::unit_test_framework - libantares-core libantares-solver-simulation libantares-solver-hydro libantares-solver-ts-generator diff --git a/src/tests/end-to-end/simple_study/CMakeLists.txt b/src/tests/end-to-end/simple_study/CMakeLists.txt index 3e83ef2cb5..03ce6d5b1d 100644 --- a/src/tests/end-to-end/simple_study/CMakeLists.txt +++ b/src/tests/end-to-end/simple_study/CMakeLists.txt @@ -13,7 +13,6 @@ add_executable(tests-simple-study target_link_libraries(tests-simple-study PRIVATE test_utils - libantares-core libantares-solver-main-economy libantares-solver-main-adequacy libantares-solver-hydro diff --git a/src/tests/end-to-end/utils/CMakeLists.txt b/src/tests/end-to-end/utils/CMakeLists.txt index e15182d04d..b95a0af268 100644 --- a/src/tests/end-to-end/utils/CMakeLists.txt +++ b/src/tests/end-to-end/utils/CMakeLists.txt @@ -5,7 +5,6 @@ add_library(test_utils target_link_libraries(test_utils PRIVATE - libantares-core libantares-solver-simulation PUBLIC ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY} diff --git a/src/tests/src/libs/antares/CMakeLists.txt b/src/tests/src/libs/antares/CMakeLists.txt index b26ea2d0d3..61ad648f26 100644 --- a/src/tests/src/libs/antares/CMakeLists.txt +++ b/src/tests/src/libs/antares/CMakeLists.txt @@ -19,7 +19,6 @@ add_library(lib-matrix ${SRC_MATRIX_LIB}) target_link_libraries(lib-matrix PRIVATE - libantares-core yuni-static-core ) @@ -111,9 +110,9 @@ set_property(TEST load-matrix PROPERTY LABELS unit) add_executable(test-utils test_utils.cpp) target_link_libraries(test-utils PRIVATE - libantares-core Boost::unit_test_framework Antares::utils + yuni-static-core ) add_test(NAME test-utils COMMAND test-utils) diff --git a/src/tests/src/libs/antares/study/area/CMakeLists.txt b/src/tests/src/libs/antares/study/area/CMakeLists.txt index 5beb25014b..2adea54077 100644 --- a/src/tests/src/libs/antares/study/area/CMakeLists.txt +++ b/src/tests/src/libs/antares/study/area/CMakeLists.txt @@ -18,7 +18,6 @@ target_include_directories(test-save-link-properties target_link_libraries(test-save-link-properties PRIVATE Boost::unit_test_framework - libantares-core libmodel_antares ) # Linux @@ -51,7 +50,6 @@ target_include_directories(test-save-area-optimization-ini target_link_libraries(test-save-area-optimization-ini PRIVATE Boost::unit_test_framework - libantares-core libmodel_antares ) diff --git a/src/tests/src/libs/antares/study/constraint/CMakeLists.txt b/src/tests/src/libs/antares/study/constraint/CMakeLists.txt index c530f6e2da..f9940d2247 100644 --- a/src/tests/src/libs/antares/study/constraint/CMakeLists.txt +++ b/src/tests/src/libs/antares/study/constraint/CMakeLists.txt @@ -4,7 +4,6 @@ add_executable(test_constraint target_link_libraries(test_constraint PRIVATE - libantares-core test_utils_unit Boost::unit_test_framework Antares::study @@ -29,7 +28,6 @@ add_executable(test_groups target_link_libraries(test_groups PRIVATE - libantares-core test_utils_unit Boost::unit_test_framework Antares::study diff --git a/src/tests/src/libs/antares/study/output-folder/CMakeLists.txt b/src/tests/src/libs/antares/study/output-folder/CMakeLists.txt index 8544889dd2..7889348772 100644 --- a/src/tests/src/libs/antares/study/output-folder/CMakeLists.txt +++ b/src/tests/src/libs/antares/study/output-folder/CMakeLists.txt @@ -11,7 +11,6 @@ target_include_directories(test-folder-output target_link_libraries(test-folder-output PRIVATE Boost::unit_test_framework - libantares-core Antares::study ) diff --git a/src/tests/src/libs/antares/study/scenario-builder/CMakeLists.txt b/src/tests/src/libs/antares/study/scenario-builder/CMakeLists.txt index a57478aa3d..6673214596 100644 --- a/src/tests/src/libs/antares/study/scenario-builder/CMakeLists.txt +++ b/src/tests/src/libs/antares/study/scenario-builder/CMakeLists.txt @@ -18,7 +18,6 @@ target_include_directories(test-sc-builder-file-read-line target_link_libraries(test-sc-builder-file-read-line PRIVATE Boost::unit_test_framework - libantares-core libmodel_antares ) # Linux @@ -53,7 +52,6 @@ target_include_directories(test-sc-builder-file-save target_link_libraries(test-sc-builder-file-save PRIVATE Boost::unit_test_framework - libantares-core libmodel_antares ) diff --git a/src/tests/src/libs/antares/study/short-term-storage-input/CMakeLists.txt b/src/tests/src/libs/antares/study/short-term-storage-input/CMakeLists.txt index 4f620df144..3f15798cd4 100644 --- a/src/tests/src/libs/antares/study/short-term-storage-input/CMakeLists.txt +++ b/src/tests/src/libs/antares/study/short-term-storage-input/CMakeLists.txt @@ -17,7 +17,6 @@ target_include_directories(short-term-storage-input target_link_libraries(short-term-storage-input PRIVATE Boost::unit_test_framework - libantares-core libmodel_antares ) # Linux diff --git a/src/tests/src/libs/antares/study/thermal-price-definition/CMakeLists.txt b/src/tests/src/libs/antares/study/thermal-price-definition/CMakeLists.txt index 5443c8ba48..3a6305ff5e 100644 --- a/src/tests/src/libs/antares/study/thermal-price-definition/CMakeLists.txt +++ b/src/tests/src/libs/antares/study/thermal-price-definition/CMakeLists.txt @@ -21,9 +21,9 @@ target_include_directories(thermal-price-definition target_link_libraries(thermal-price-definition PRIVATE Boost::unit_test_framework - libantares-core checks Antares::study + Antares::exception ) # Linux if(UNIX AND NOT APPLE) diff --git a/src/tests/src/solver/optimisation/CMakeLists.txt b/src/tests/src/solver/optimisation/CMakeLists.txt index 5a8c549d7b..54ad312175 100644 --- a/src/tests/src/solver/optimisation/CMakeLists.txt +++ b/src/tests/src/solver/optimisation/CMakeLists.txt @@ -13,7 +13,6 @@ target_link_libraries(${EXECUTABLE_NAME} PRIVATE Boost::unit_test_framework libmodel_antares - libantares-core array ) diff --git a/src/tests/src/solver/simulation/CMakeLists.txt b/src/tests/src/solver/simulation/CMakeLists.txt index ef9d45950e..acf826f1c8 100644 --- a/src/tests/src/solver/simulation/CMakeLists.txt +++ b/src/tests/src/solver/simulation/CMakeLists.txt @@ -20,7 +20,6 @@ target_include_directories(tests-ts-numbers target_link_libraries(tests-ts-numbers PRIVATE Boost::unit_test_framework - libantares-core libmodel_antares libantares-solver-simulation ) @@ -44,9 +43,7 @@ target_link_libraries(test-store-timeseries-number PRIVATE Boost::unit_test_framework test_utils_unit - libantares-core libantares-solver-simulation - result_writer Antares::study ) @@ -73,7 +70,6 @@ target_link_libraries(test-time_series PRIVATE Boost::unit_test_framework test_utils_unit - libantares-core libantares-solver-simulation Antares::study ) diff --git a/src/tools/batchrun/CMakeLists.txt b/src/tools/batchrun/CMakeLists.txt index e4538d13a8..d4abe8bd86 100644 --- a/src/tools/batchrun/CMakeLists.txt +++ b/src/tools/batchrun/CMakeLists.txt @@ -36,10 +36,8 @@ INSTALL(EXPORT antares-batchrun ) set(BATCHRUN_LIBS - libantares-core - date + libantares-core #local.h yuni-static-core - inifile ${CMAKE_THREADS_LIBS_INIT} Antares::study ) diff --git a/src/tools/cleaner/CMakeLists.txt b/src/tools/cleaner/CMakeLists.txt index 027770bb81..b1a7df4a7f 100644 --- a/src/tools/cleaner/CMakeLists.txt +++ b/src/tools/cleaner/CMakeLists.txt @@ -25,10 +25,10 @@ INSTALL(EXPORT antares-study-cleaner ) set(CLEANER_LIBS - libantares-core yuni-static-core - Antares::sys Antares::study + Antares::sys + libantares-core #version.h ${CMAKE_THREADS_LIBS_INIT} ) diff --git a/src/tools/config/CMakeLists.txt b/src/tools/config/CMakeLists.txt index 6e358265f1..631ae695cb 100644 --- a/src/tools/config/CMakeLists.txt +++ b/src/tools/config/CMakeLists.txt @@ -29,7 +29,6 @@ INSTALL(EXPORT antares-config ) set(CONFIG_LIBS - libantares-core yuni-static-core ${CMAKE_THREADS_LIBS_INIT} ) @@ -43,8 +42,9 @@ target_include_directories(${execname} target_link_libraries(${execname} PRIVATE ${CONFIG_LIBS} - array + Antares::array Antares::sys + libantares-core #ressource.h ) import_std_libs(${execname}) diff --git a/src/tools/config/main.cpp b/src/tools/config/main.cpp index c50c9a9aaf..17a85efb8b 100644 --- a/src/tools/config/main.cpp +++ b/src/tools/config/main.cpp @@ -25,7 +25,6 @@ ** SPDX-License-Identifier: licenceRef-GPL3_WITH_RTE-Exceptions */ -#include #include #include #include diff --git a/src/tools/finder/CMakeLists.txt b/src/tools/finder/CMakeLists.txt index 3908bc8cd8..fb572128d6 100644 --- a/src/tools/finder/CMakeLists.txt +++ b/src/tools/finder/CMakeLists.txt @@ -26,7 +26,7 @@ INSTALL(EXPORT antares-study-finder ) set(FINDER_LIBS - libantares-core + libantares-core #version yuni-static-core ${CMAKE_THREADS_LIBS_INIT} ) diff --git a/src/tools/kirchhoff-cbuilder/CMakeLists.txt b/src/tools/kirchhoff-cbuilder/CMakeLists.txt index 13787fdd7b..560bc8d6bc 100644 --- a/src/tools/kirchhoff-cbuilder/CMakeLists.txt +++ b/src/tools/kirchhoff-cbuilder/CMakeLists.txt @@ -22,7 +22,6 @@ INSTALL(EXPORT antares-kirchhoff-constraints-builder ) set(KIRCHHOFF_CBUILDER_LIBS - libantares-core yuni-static-core ${CMAKE_THREADS_LIBS_INIT} ) diff --git a/src/tools/updater/CMakeLists.txt b/src/tools/updater/CMakeLists.txt index 641518a45b..e09807f3c4 100644 --- a/src/tools/updater/CMakeLists.txt +++ b/src/tools/updater/CMakeLists.txt @@ -25,10 +25,10 @@ INSTALL(EXPORT antares-study-updater ) set(UPDATER_LIBS - libantares-core yuni-static-core - Antares::sys Antares::study + Antares::sys + libantares-core #version.h ${CMAKE_THREADS_LIBS_INIT} ) diff --git a/src/tools/vacuum/CMakeLists.txt b/src/tools/vacuum/CMakeLists.txt index f02287eb43..e4129514bc 100644 --- a/src/tools/vacuum/CMakeLists.txt +++ b/src/tools/vacuum/CMakeLists.txt @@ -33,7 +33,6 @@ INSTALL(EXPORT antares-vacuum ) set(VACUUM_LIBS - libantares-core libantares-fswalker yuni-static-core ${CMAKE_THREADS_LIBS_INIT} @@ -43,7 +42,7 @@ set(VACUUM_LIBS target_link_libraries(${execname} PRIVATE ${VACUUM_LIBS} - array + libantares-core #version.h ) import_std_libs(${execname}) diff --git a/src/tools/yby-aggregator/CMakeLists.txt b/src/tools/yby-aggregator/CMakeLists.txt index 6f1a449532..0f92e5b1ef 100644 --- a/src/tools/yby-aggregator/CMakeLists.txt +++ b/src/tools/yby-aggregator/CMakeLists.txt @@ -47,7 +47,7 @@ INSTALL(EXPORT antares-ybyaggregator ) set(YBY_AGGREGATOR_LIBS - libantares-core + libantares-core #version.h Antares::date Antares::logs yuni-static-core From 6aacab77f06eeffb6e4fb920b30000268210c455 Mon Sep 17 00:00:00 2001 From: Jason Marechal Date: Mon, 28 Aug 2023 17:01:43 +0200 Subject: [PATCH 41/52] Fix boost compil --- src/libs/antares/study/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libs/antares/study/CMakeLists.txt b/src/libs/antares/study/CMakeLists.txt index 99442a8e7d..15ad16fc3b 100644 --- a/src/libs/antares/study/CMakeLists.txt +++ b/src/libs/antares/study/CMakeLists.txt @@ -427,6 +427,7 @@ add_library(Antares::study ALIAS study) target_link_libraries(study PUBLIC yuni-static-core + Boost::Boost Antares::array #xcast Antares::date #parameters Antares::inifile #parameters From cb8b3c3b6461eb47ba124aed26728339d685bde3 Mon Sep 17 00:00:00 2001 From: Jason Marechal Date: Mon, 28 Aug 2023 17:06:33 +0200 Subject: [PATCH 42/52] Fix boost compil --- src/libs/antares/study/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/antares/study/CMakeLists.txt b/src/libs/antares/study/CMakeLists.txt index 15ad16fc3b..7da8e43b82 100644 --- a/src/libs/antares/study/CMakeLists.txt +++ b/src/libs/antares/study/CMakeLists.txt @@ -427,7 +427,7 @@ add_library(Antares::study ALIAS study) target_link_libraries(study PUBLIC yuni-static-core - Boost::Boost + Boost::boost Antares::array #xcast Antares::date #parameters Antares::inifile #parameters From 5df53802ee5437ea3f439013d849548032fd9e3c Mon Sep 17 00:00:00 2001 From: Jason Marechal Date: Tue, 29 Aug 2023 10:05:43 +0200 Subject: [PATCH 43/52] Fix hostname/policy link error --- src/libs/antares/logs/CMakeLists.txt | 1 + .../{sys/include/antares/sys => logs/antares/logs}/hostname.hxx | 0 src/libs/antares/logs/hostinfo.cpp | 2 +- src/libs/antares/sys/CMakeLists.txt | 1 - src/libs/antares/sys/policy.cpp | 2 +- 5 files changed, 3 insertions(+), 3 deletions(-) rename src/libs/antares/{sys/include/antares/sys => logs/antares/logs}/hostname.hxx (100%) diff --git a/src/libs/antares/logs/CMakeLists.txt b/src/libs/antares/logs/CMakeLists.txt index 4eebd0483c..c60d889df1 100644 --- a/src/libs/antares/logs/CMakeLists.txt +++ b/src/libs/antares/logs/CMakeLists.txt @@ -4,6 +4,7 @@ set(HEADERS antares/${PROJ}/logs.h antares/${PROJ}/logs.hxx antares/${PROJ}/hostinfo.h + antares/${PROJ}/hostname.hxx ) set(SRC_LOGS ${HEADERS} diff --git a/src/libs/antares/sys/include/antares/sys/hostname.hxx b/src/libs/antares/logs/antares/logs/hostname.hxx similarity index 100% rename from src/libs/antares/sys/include/antares/sys/hostname.hxx rename to src/libs/antares/logs/antares/logs/hostname.hxx diff --git a/src/libs/antares/logs/hostinfo.cpp b/src/libs/antares/logs/hostinfo.cpp index 9d352541f7..009a0a96b4 100644 --- a/src/libs/antares/logs/hostinfo.cpp +++ b/src/libs/antares/logs/hostinfo.cpp @@ -30,7 +30,7 @@ #include "antares/logs/hostinfo.h" #include -#include "antares/sys/hostname.hxx" +#include "antares/logs/hostname.hxx" using namespace Yuni; using namespace Antares; diff --git a/src/libs/antares/sys/CMakeLists.txt b/src/libs/antares/sys/CMakeLists.txt index 0f3ff8a1fb..b0cd415915 100644 --- a/src/libs/antares/sys/CMakeLists.txt +++ b/src/libs/antares/sys/CMakeLists.txt @@ -2,7 +2,6 @@ set(PROJ sys) set(HEADERS include/antares/${PROJ}/appdata.h include/antares/${PROJ}/policy.h - include/antares/${PROJ}/hostname.hxx ) set(SRC_PROJ ${HEADERS} diff --git a/src/libs/antares/sys/policy.cpp b/src/libs/antares/sys/policy.cpp index 05dc41f76f..c45de88af5 100644 --- a/src/libs/antares/sys/policy.cpp +++ b/src/libs/antares/sys/policy.cpp @@ -31,7 +31,7 @@ #include "antares/sys/appdata.h" #include #include -#include "antares/sys/hostname.hxx" +#include #include "../config.h" #include #include From a6d258af70b6d271b44c2867fb4d3c9ad2a8af19 Mon Sep 17 00:00:00 2001 From: Jason Marechal Date: Tue, 29 Aug 2023 13:22:39 +0200 Subject: [PATCH 44/52] Add missing link to thermal definition --- src/libs/antares/checks/CMakeLists.txt | 19 +++++------ .../antares/checks/checkLoadedInputData.cpp | 4 +-- .../antares/correlation/correlation.h | 2 +- src/libs/antares/study/CMakeLists.txt | 1 - src/libs/antares/study/area.h | 32 ------------------- .../antares/study/parts/hydro/container.h | 2 +- .../study/parts/renewable/cluster_list.cpp | 2 +- src/libs/antares/study/ui-runtimeinfos.h | 2 +- src/solver/ts-generator/xcast/predicate.hxx | 2 +- .../variable/commons/links/links.cpp.inc.hxx | 2 +- .../thermal-price-definition/CMakeLists.txt | 1 + .../thermal-price-definition.cpp | 2 -- src/ui/simulator/application/study.cpp | 6 +--- .../toolbox/components/map/nodes/connection.h | 2 +- 14 files changed, 21 insertions(+), 58 deletions(-) delete mode 100644 src/libs/antares/study/area.h diff --git a/src/libs/antares/checks/CMakeLists.txt b/src/libs/antares/checks/CMakeLists.txt index 6e5b9f4251..6906efca3b 100644 --- a/src/libs/antares/checks/CMakeLists.txt +++ b/src/libs/antares/checks/CMakeLists.txt @@ -11,15 +11,15 @@ add_library(Antares::checks ALIAS checks) target_include_directories(checks PRIVATE - ${CMAKE_SOURCE_DIR}/libs/ - ${CMAKE_SOURCE_DIR}/libs/antares/study - ${CMAKE_SOURCE_DIR}/libs/antares/inifile #adq-patch-params - ${CMAKE_SOURCE_DIR}/libs/antares/array #area - ${CMAKE_SOURCE_DIR}/libs/antares/io #area -> matrix -> io - ${CMAKE_SOURCE_DIR}/libs/antares/date #area -> parameter -> date - ${CMAKE_SOURCE_DIR}/libs/antares/writer #area -> antares/parts/thermal/cluster -> writer - ${CMAKE_SOURCE_DIR}/libs/antares/jit #area -> matrix -> jit - ${CMAKE_SOURCE_DIR}/libs/antares/memory/include #area -> matrix -> memory +# ${CMAKE_SOURCE_DIR}/libs/ +# ${CMAKE_SOURCE_DIR}/libs/antares/study +# ${CMAKE_SOURCE_DIR}/libs/antares/inifile #adq-patch-params +# ${CMAKE_SOURCE_DIR}/libs/antares/array #area +# ${CMAKE_SOURCE_DIR}/libs/antares/io #area -> matrix -> io +# ${CMAKE_SOURCE_DIR}/libs/antares/date #area -> parameter -> date +# ${CMAKE_SOURCE_DIR}/libs/antares/writer #area -> antares/parts/thermal/cluster -> writer +# ${CMAKE_SOURCE_DIR}/libs/antares/jit #area -> matrix -> jit +# ${CMAKE_SOURCE_DIR}/libs/antares/memory/include #area -> matrix -> memory PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ) @@ -30,4 +30,5 @@ target_link_libraries(checks yuni-static-core exception Antares::study # cpp -> area + libantares-core ) \ No newline at end of file diff --git a/src/libs/antares/checks/checkLoadedInputData.cpp b/src/libs/antares/checks/checkLoadedInputData.cpp index 672b68d580..3fcad20e02 100644 --- a/src/libs/antares/checks/checkLoadedInputData.cpp +++ b/src/libs/antares/checks/checkLoadedInputData.cpp @@ -27,10 +27,10 @@ #include #include -#include +#include #include -#include "area.h" +#include namespace Antares::Check { diff --git a/src/libs/antares/correlation/antares/correlation/correlation.h b/src/libs/antares/correlation/antares/correlation/correlation.h index e9043597e4..f69f23bcd7 100644 --- a/src/libs/antares/correlation/antares/correlation/correlation.h +++ b/src/libs/antares/correlation/antares/correlation/correlation.h @@ -243,7 +243,7 @@ IniFile* InterAreaCorrelationSaveToIniFile(const Matrix<>* m, const AreaList* l) } // namespace Data } // namespace Antares -#include "../study/area.h" +#include #include "correlation.hxx" #endif /* __ANTARES_LIBS_ARRAY_CORRELATION_H__ */ diff --git a/src/libs/antares/study/CMakeLists.txt b/src/libs/antares/study/CMakeLists.txt index 7da8e43b82..e43f5ecdb6 100644 --- a/src/libs/antares/study/CMakeLists.txt +++ b/src/libs/antares/study/CMakeLists.txt @@ -153,7 +153,6 @@ source_group("study\\action\\handler\\antares study\\constraint" FILES ${SRC_STU set(SRC_AREAS - area.h area/constants.h area/area.h area/area.hxx diff --git a/src/libs/antares/study/area.h b/src/libs/antares/study/area.h deleted file mode 100644 index d9efa3204a..0000000000 --- a/src/libs/antares/study/area.h +++ /dev/null @@ -1,32 +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_AREA_H__ -#define __ANTARES_LIBS_STUDY_AREA_H__ - -#include "area/area.h" - -#endif // __ANTARES_LIBS_STUDY_AREA_H__ diff --git a/src/libs/antares/study/parts/hydro/container.h b/src/libs/antares/study/parts/hydro/container.h index 7916c02803..84f9f4cc8f 100644 --- a/src/libs/antares/study/parts/hydro/container.h +++ b/src/libs/antares/study/parts/hydro/container.h @@ -191,6 +191,6 @@ double getWeeklyModulation(const double& level /* format : in % of reservoir cap } // namespace Antares::Data -#include "../../area.h" +#include #endif /* __ANTARES_LIBS_STUDY_PARTS_HYDRO_CONTAINER_H__ */ diff --git a/src/libs/antares/study/parts/renewable/cluster_list.cpp b/src/libs/antares/study/parts/renewable/cluster_list.cpp index 6f02bfaf38..c7c01a00bd 100644 --- a/src/libs/antares/study/parts/renewable/cluster_list.cpp +++ b/src/libs/antares/study/parts/renewable/cluster_list.cpp @@ -1,7 +1,7 @@ #include "cluster_list.h" #include #include "../../study.h" -#include "../../area.h" +#include using namespace Yuni; diff --git a/src/libs/antares/study/ui-runtimeinfos.h b/src/libs/antares/study/ui-runtimeinfos.h index 5a229b40d0..3353b81b62 100644 --- a/src/libs/antares/study/ui-runtimeinfos.h +++ b/src/libs/antares/study/ui-runtimeinfos.h @@ -30,7 +30,7 @@ #include #include #include "fwd.h" -#include "area.h" +#include "area/area.h" #include "binding_constraint/BindingConstraint.h" namespace Antares diff --git a/src/solver/ts-generator/xcast/predicate.hxx b/src/solver/ts-generator/xcast/predicate.hxx index bc02a44d9d..5797a00b72 100644 --- a/src/solver/ts-generator/xcast/predicate.hxx +++ b/src/solver/ts-generator/xcast/predicate.hxx @@ -28,7 +28,7 @@ #define __SOLVER_TS_GENERATOR_XCAST_PREDICATE_HXX__ #include -#include +#include #include #include "antares/study/parts/load/prepro.h" diff --git a/src/solver/variable/commons/links/links.cpp.inc.hxx b/src/solver/variable/commons/links/links.cpp.inc.hxx index 2f79991628..fbb860b19e 100644 --- a/src/solver/variable/commons/links/links.cpp.inc.hxx +++ b/src/solver/variable/commons/links/links.cpp.inc.hxx @@ -26,7 +26,7 @@ */ #include "../../variable.h" -#include "../../area.h" +#include #include "../../setofareas.h" using namespace Yuni; diff --git a/src/tests/src/libs/antares/study/thermal-price-definition/CMakeLists.txt b/src/tests/src/libs/antares/study/thermal-price-definition/CMakeLists.txt index 3a6305ff5e..43c7aca74e 100644 --- a/src/tests/src/libs/antares/study/thermal-price-definition/CMakeLists.txt +++ b/src/tests/src/libs/antares/study/thermal-price-definition/CMakeLists.txt @@ -24,6 +24,7 @@ target_link_libraries(thermal-price-definition checks Antares::study Antares::exception + Antares::checks ) # Linux if(UNIX AND NOT APPLE) diff --git a/src/tests/src/libs/antares/study/thermal-price-definition/thermal-price-definition.cpp b/src/tests/src/libs/antares/study/thermal-price-definition/thermal-price-definition.cpp index 8bff9b724f..7748e7466d 100644 --- a/src/tests/src/libs/antares/study/thermal-price-definition/thermal-price-definition.cpp +++ b/src/tests/src/libs/antares/study/thermal-price-definition/thermal-price-definition.cpp @@ -9,12 +9,10 @@ #include #include -#include #include #include #include "cluster_list.h" -#include "container.h" const auto SEP = Yuni::IO::Separator; using namespace Antares::Data; diff --git a/src/ui/simulator/application/study.cpp b/src/ui/simulator/application/study.cpp index 3a3e7911e3..9fbf768e4e 100644 --- a/src/ui/simulator/application/study.cpp +++ b/src/ui/simulator/application/study.cpp @@ -25,10 +25,8 @@ ** SPDX-License-Identifier: licenceRef-GPL3_WITH_RTE-Exceptions */ #include "study.h" -#include -#include #include -#include +#include #include #include @@ -44,7 +42,6 @@ #include "../windows/saveas.h" #include "main.h" #include "menus.h" -#include #include "../windows/inspector/inspector.h" #include @@ -52,7 +49,6 @@ #include "wait.h" #include #include -#include "../toolbox/dispatcher/study.h" #include "../windows/startupwizard.h" #include diff --git a/src/ui/simulator/toolbox/components/map/nodes/connection.h b/src/ui/simulator/toolbox/components/map/nodes/connection.h index 9cd8e249bf..31fe996072 100644 --- a/src/ui/simulator/toolbox/components/map/nodes/connection.h +++ b/src/ui/simulator/toolbox/components/map/nodes/connection.h @@ -30,7 +30,7 @@ #include "item.h" #include "node.h" #include "../tools/tool.h" -#include +#include namespace Antares { From e3972551712f4bd064de0f931e6c321350e1dee3 Mon Sep 17 00:00:00 2001 From: Jason Marechal Date: Tue, 29 Aug 2023 15:16:10 +0200 Subject: [PATCH 45/52] Make yuni public in lib-matrix for test --- src/tests/src/libs/antares/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tests/src/libs/antares/CMakeLists.txt b/src/tests/src/libs/antares/CMakeLists.txt index 61ad648f26..6f450180aa 100644 --- a/src/tests/src/libs/antares/CMakeLists.txt +++ b/src/tests/src/libs/antares/CMakeLists.txt @@ -18,7 +18,7 @@ set(SRC_MATRIX_LIB add_library(lib-matrix ${SRC_MATRIX_LIB}) target_link_libraries(lib-matrix - PRIVATE + PUBLIC yuni-static-core ) From 1bb58283fc1076f136509d3e487caf9064331340 Mon Sep 17 00:00:00 2001 From: Jason Marechal Date: Tue, 29 Aug 2023 16:24:11 +0200 Subject: [PATCH 46/52] Loosen build parallelization --- .github/workflows/windows-release.yml | 2 +- .github/workflows/windows-vcpkg.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/windows-release.yml b/.github/workflows/windows-release.yml index cdd36467db..f090233732 100644 --- a/.github/workflows/windows-release.yml +++ b/.github/workflows/windows-release.yml @@ -103,7 +103,7 @@ jobs: - name: Build run: | - cmake --build _build --config release -j2 + cmake --build _build --config release - name: Remove OR-Tools install directory to free some disk space shell: bash diff --git a/.github/workflows/windows-vcpkg.yml b/.github/workflows/windows-vcpkg.yml index 3a9bc71d65..0b065aaea2 100644 --- a/.github/workflows/windows-vcpkg.yml +++ b/.github/workflows/windows-vcpkg.yml @@ -118,7 +118,7 @@ jobs: - name: Build shell: bash run: | - cmake --build _build --config release -j2 + cmake --build _build --config release - name: Run unfeasibility-related tests run: | From f3dd7b5b559ddce2e81bd82939680611f4d638e4 Mon Sep 17 00:00:00 2001 From: Jason Marechal Date: Tue, 29 Aug 2023 16:24:32 +0200 Subject: [PATCH 47/52] Try fix --- src/tests/src/libs/antares/CMakeLists.txt | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/tests/src/libs/antares/CMakeLists.txt b/src/tests/src/libs/antares/CMakeLists.txt index 6f450180aa..e8d7ea3338 100644 --- a/src/tests/src/libs/antares/CMakeLists.txt +++ b/src/tests/src/libs/antares/CMakeLists.txt @@ -24,10 +24,7 @@ target_link_libraries(lib-matrix target_include_directories(lib-matrix PRIVATE - "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/logs" - "${CMAKE_SOURCE_DIR}/tests/src/libs" - ) # Storing lib-matrix under the folder Unit-tests in the IDE From 26b47b0e13ea592c9c67a4aa836acd72e274e505 Mon Sep 17 00:00:00 2001 From: Jason Marechal Date: Wed, 30 Aug 2023 09:26:14 +0200 Subject: [PATCH 48/52] Remove extra include to log causing link error --- src/tests/src/libs/antares/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/src/tests/src/libs/antares/CMakeLists.txt b/src/tests/src/libs/antares/CMakeLists.txt index e8d7ea3338..b4c1d790c9 100644 --- a/src/tests/src/libs/antares/CMakeLists.txt +++ b/src/tests/src/libs/antares/CMakeLists.txt @@ -46,7 +46,6 @@ target_include_directories(tests-matrix-save "${src_libs_antares}/array" "${src_libs_antares}/io" "${src_libs_antares}/jit" - "${src_libs_antares}/logs" "${src_libs_antares}/memory/include" "${CMAKE_CURRENT_SOURCE_DIR}/logs" "${CMAKE_CURRENT_SOURCE_DIR}/jit" From 5905fe45c818dd95b2d8cfcbc4d0113c8fed9226 Mon Sep 17 00:00:00 2001 From: Jason Marechal Date: Wed, 30 Aug 2023 10:50:12 +0200 Subject: [PATCH 49/52] Fix windows compilation: missing link to winsock --- src/libs/antares/logs/CMakeLists.txt | 8 ++++++-- src/solver/simulation/CMakeLists.txt | 4 ++++ src/tests/src/solver/simulation/CMakeLists.txt | 1 + .../solver/simulation/test-store-timeseries-number.cpp | 4 ++-- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/libs/antares/logs/CMakeLists.txt b/src/libs/antares/logs/CMakeLists.txt index c60d889df1..0915bc55de 100644 --- a/src/libs/antares/logs/CMakeLists.txt +++ b/src/libs/antares/logs/CMakeLists.txt @@ -17,10 +17,14 @@ source_group("misc\\logs" FILES ${SRC_LOGS}) add_library(${PROJ} ${SRC_LOGS}) add_library(Antares::${PROJ} ALIAS ${PROJ}) +if(WIN32) + find_library(WSOCK32_LIBRARY wsock32) + find_library(WS2_32_LIBRARY ws2_32) + target_link_libraries(${PROJ} PUBLIC wsock32 ws2_32) +endif() target_link_libraries(${PROJ} - PRIVATE + PUBLIC yuni-static-core - Antares::sys ) target_include_directories(${PROJ} diff --git a/src/solver/simulation/CMakeLists.txt b/src/solver/simulation/CMakeLists.txt index 6ab6edc380..2fb31c1159 100644 --- a/src/solver/simulation/CMakeLists.txt +++ b/src/solver/simulation/CMakeLists.txt @@ -58,4 +58,8 @@ target_include_directories(libantares-solver-simulation PUBLIC target_link_libraries(libantares-solver-simulation PRIVATE Antares::infoCollection + PUBLIC + yuni-static-core + Antares::study + Antares::result_writer ) diff --git a/src/tests/src/solver/simulation/CMakeLists.txt b/src/tests/src/solver/simulation/CMakeLists.txt index acf826f1c8..7dcdba69e7 100644 --- a/src/tests/src/solver/simulation/CMakeLists.txt +++ b/src/tests/src/solver/simulation/CMakeLists.txt @@ -45,6 +45,7 @@ target_link_libraries(test-store-timeseries-number test_utils_unit libantares-solver-simulation Antares::study + Antares::result_writer ) # Linux diff --git a/src/tests/src/solver/simulation/test-store-timeseries-number.cpp b/src/tests/src/solver/simulation/test-store-timeseries-number.cpp index 8cbac1ce83..8066be02f2 100644 --- a/src/tests/src/solver/simulation/test-store-timeseries-number.cpp +++ b/src/tests/src/solver/simulation/test-store-timeseries-number.cpp @@ -12,8 +12,8 @@ #include "timeseries-numbers.h" #include "BindingConstraintsTimeSeriesNumbersWriter.h" #include "utils.h" -#include "antares/writer/writer_factory.h" -#include "antares/writer/result_format.h" +#include +#include using namespace Antares::Solver; using namespace Antares::Data; From 71fede58095e88a079bc15dbf9f628d2accfd8d1 Mon Sep 17 00:00:00 2001 From: Jason Marechal Date: Wed, 30 Aug 2023 11:46:51 +0200 Subject: [PATCH 50/52] Fix UI compilation --- src/ui/simulator/toolbox/components/datagrid/dbgrid.h | 1 + .../simulator/toolbox/components/datagrid/filter/operator.list.h | 1 + src/ui/simulator/toolbox/create.h | 1 + 3 files changed, 3 insertions(+) diff --git a/src/ui/simulator/toolbox/components/datagrid/dbgrid.h b/src/ui/simulator/toolbox/components/datagrid/dbgrid.h index 72169d7a04..a7f32b98b8 100644 --- a/src/ui/simulator/toolbox/components/datagrid/dbgrid.h +++ b/src/ui/simulator/toolbox/components/datagrid/dbgrid.h @@ -28,6 +28,7 @@ #define __ANTARES_TOOLBOX_COMPONENT_DATAGRID_DBGRID_H__ #include +#include namespace Antares { diff --git a/src/ui/simulator/toolbox/components/datagrid/filter/operator.list.h b/src/ui/simulator/toolbox/components/datagrid/filter/operator.list.h index 9f1649845b..e3b7b0a58c 100644 --- a/src/ui/simulator/toolbox/components/datagrid/filter/operator.list.h +++ b/src/ui/simulator/toolbox/components/datagrid/filter/operator.list.h @@ -28,6 +28,7 @@ #define __ANTARES_TOOLBOX_FILTER_OPERATOR_LIST_H__ #include +#include #include namespace Antares diff --git a/src/ui/simulator/toolbox/create.h b/src/ui/simulator/toolbox/create.h index 21aa3ec460..adb2402d91 100644 --- a/src/ui/simulator/toolbox/create.h +++ b/src/ui/simulator/toolbox/create.h @@ -30,6 +30,7 @@ #include #include #include +#include namespace Antares { From 28e1e5d2f4161e46b515e2244f95030d55b7579e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jason=20Mar=C3=A9chal?= <45510813+JasonMarechal25@users.noreply.github.com> Date: Tue, 12 Sep 2023 09:48:23 +0200 Subject: [PATCH 51/52] Revert removing -j options during CI --- .github/workflows/windows-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/windows-release.yml b/.github/workflows/windows-release.yml index f090233732..cdd36467db 100644 --- a/.github/workflows/windows-release.yml +++ b/.github/workflows/windows-release.yml @@ -103,7 +103,7 @@ jobs: - name: Build run: | - cmake --build _build --config release + cmake --build _build --config release -j2 - name: Remove OR-Tools install directory to free some disk space shell: bash From 40e438343b9ef088a318e1a06c7e1ad03527f6de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jason=20Mar=C3=A9chal?= <45510813+JasonMarechal25@users.noreply.github.com> Date: Tue, 12 Sep 2023 11:23:23 +0200 Subject: [PATCH 52/52] Remove deps to core (#1586) * Fix merge * Fix compil * Fix compil * Reestablish -j2 build option as it doesn't change anything removing it * Remove commented code * Use proper casing for s(S)ettings struct * Remove duplicated link dependency * add missing dependency in writer --- .github/workflows/windows-vcpkg.yml | 2 +- src/libs/antares/checks/CMakeLists.txt | 10 ---------- src/libs/antares/date/antares/date/date.h | 6 +++--- src/libs/antares/date/date.cpp | 2 +- src/libs/antares/study/CMakeLists.txt | 7 +++++-- src/libs/antares/writer/CMakeLists.txt | 1 - .../antares/writer/antares/writer/writer_factory.h | 5 ++++- src/solver/optimisation/CMakeLists.txt | 4 +++- 8 files changed, 17 insertions(+), 20 deletions(-) diff --git a/.github/workflows/windows-vcpkg.yml b/.github/workflows/windows-vcpkg.yml index 0b065aaea2..3a9bc71d65 100644 --- a/.github/workflows/windows-vcpkg.yml +++ b/.github/workflows/windows-vcpkg.yml @@ -118,7 +118,7 @@ jobs: - name: Build shell: bash run: | - cmake --build _build --config release + cmake --build _build --config release -j2 - name: Run unfeasibility-related tests run: | diff --git a/src/libs/antares/checks/CMakeLists.txt b/src/libs/antares/checks/CMakeLists.txt index 6906efca3b..8846d0eb41 100644 --- a/src/libs/antares/checks/CMakeLists.txt +++ b/src/libs/antares/checks/CMakeLists.txt @@ -10,16 +10,6 @@ add_library(checks add_library(Antares::checks ALIAS checks) target_include_directories(checks - PRIVATE -# ${CMAKE_SOURCE_DIR}/libs/ -# ${CMAKE_SOURCE_DIR}/libs/antares/study -# ${CMAKE_SOURCE_DIR}/libs/antares/inifile #adq-patch-params -# ${CMAKE_SOURCE_DIR}/libs/antares/array #area -# ${CMAKE_SOURCE_DIR}/libs/antares/io #area -> matrix -> io -# ${CMAKE_SOURCE_DIR}/libs/antares/date #area -> parameter -> date -# ${CMAKE_SOURCE_DIR}/libs/antares/writer #area -> antares/parts/thermal/cluster -> writer -# ${CMAKE_SOURCE_DIR}/libs/antares/jit #area -> matrix -> jit -# ${CMAKE_SOURCE_DIR}/libs/antares/memory/include #area -> matrix -> memory PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ) diff --git a/src/libs/antares/date/antares/date/date.h b/src/libs/antares/date/antares/date/date.h index 4800e4178b..08bc29330e 100644 --- a/src/libs/antares/date/antares/date/date.h +++ b/src/libs/antares/date/antares/date/date.h @@ -292,7 +292,7 @@ class Calendar } mapping; //! The calendar settings - struct settings + struct Settings { //! Day of the week for the 1rst January DayOfTheWeek weekday1rstJanuary; @@ -355,7 +355,7 @@ class Calendar ** Reset the calendar from an instance of the class \p Parameters, ** \param parameters Simulation settings */ - void reset(settings settings); + void reset(Settings settings); /*! ** \brief Export the whole calendar into a CSV file @@ -365,7 +365,7 @@ class Calendar bool saveToCSVFile(const AnyString& filename) const; private: - settings settings_; + Settings settings_; }; // class Calendar } // namespace Date diff --git a/src/libs/antares/date/date.cpp b/src/libs/antares/date/date.cpp index f7bd1719dd..1572c27cd3 100644 --- a/src/libs/antares/date/date.cpp +++ b/src/libs/antares/date/date.cpp @@ -402,7 +402,7 @@ Calendar::Calendar() settings_.weekday1rstJanuary = monday; } -void Calendar::reset(settings settings) +void Calendar::reset(Settings settings) { settings_ = settings; reset(); diff --git a/src/libs/antares/study/CMakeLists.txt b/src/libs/antares/study/CMakeLists.txt index e43f5ecdb6..0f0dbaa197 100644 --- a/src/libs/antares/study/CMakeLists.txt +++ b/src/libs/antares/study/CMakeLists.txt @@ -425,6 +425,7 @@ add_library(Antares::study ALIAS study) target_link_libraries(study PUBLIC + Boost::boost yuni-static-core Boost::boost Antares::array #xcast @@ -439,9 +440,11 @@ target_link_libraries(study Antares::object PRIVATE Antares::exception + Antares::benchmarking ) target_include_directories(study - PUBLIC - ${CMAKE_CURRENT_SOURCE_DIR}/../.. + PUBLIC + ${CMAKE_CURRENT_SOURCE_DIR}/../.. #Dirty trick to allow inclusion via + # Make more than just study visible but it's the lesser evil for now ) \ No newline at end of file diff --git a/src/libs/antares/writer/CMakeLists.txt b/src/libs/antares/writer/CMakeLists.txt index 1c99d75e35..ef7129cc51 100644 --- a/src/libs/antares/writer/CMakeLists.txt +++ b/src/libs/antares/writer/CMakeLists.txt @@ -33,7 +33,6 @@ target_link_libraries(result_writer PUBLIC Antares::benchmarking PRIVATE - Antares::benchmarking yuni-static-core MINIZIP::minizip logs diff --git a/src/libs/antares/writer/antares/writer/writer_factory.h b/src/libs/antares/writer/antares/writer/writer_factory.h index 2d728d7766..8ce59d9ae7 100644 --- a/src/libs/antares/writer/antares/writer/writer_factory.h +++ b/src/libs/antares/writer/antares/writer/writer_factory.h @@ -5,7 +5,10 @@ #include "i_writer.h" #include "result_format.h" -#include + +namespace Benchmarking { + class IDurationCollector; +} namespace Antares::Solver { diff --git a/src/solver/optimisation/CMakeLists.txt b/src/solver/optimisation/CMakeLists.txt index 7bc5136fea..2508e1ddb2 100644 --- a/src/solver/optimisation/CMakeLists.txt +++ b/src/solver/optimisation/CMakeLists.txt @@ -92,4 +92,6 @@ target_link_libraries(libmodel_antares utils sirius_solver infeasible_problem_analysis - libantares-solver-simulation) + libantares-solver-simulation + Antares::benchmarking +)