From c0420442730b7b0ecd53e6eb9c93665f492ad634 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jason=20Mar=C3=A9chal?= <45510813+JasonMarechal25@users.noreply.github.com> Date: Wed, 16 Oct 2024 16:06:14 +0200 Subject: [PATCH] Clean up cmake organisation (#946) - Clean up CMake organisation. Place headers in include directories - Include directories follow the convention - Remove use of "get properties" and use target_include/target_link CMake convention --------- Co-authored-by: Abdoulbari Zaher <32519851+a-zakir@users.noreply.github.com> --- CMakeGraphVizOptions.cmake | 0 .../benders_by_batch/BatchCollection.cpp | 2 +- .../benders_by_batch/BendersByBatch.cpp | 8 +- .../benders/benders_by_batch/CMakeLists.txt | 57 +++++----- .../benders_by_batch/RandomBatchShuffler.cpp | 2 +- .../benders_by_batch}/BatchCollection.h | 2 +- .../benders_by_batch}/BendersByBatch.h | 4 +- .../benders_by_batch}/RandomBatchShuffler.h | 0 src/cpp/benders/benders_core/BendersBase.cpp | 12 +- .../benders_core/BendersMathLogger.cpp | 6 +- .../benders_core/BendersStructsDatas.cpp | 2 +- src/cpp/benders/benders_core/CMakeLists.txt | 73 +++++++----- .../benders/benders_core/CutsManagement.cpp | 2 +- .../benders_core/LastIterationPrinter.cpp | 2 +- .../benders_core/LastIterationReader.cpp | 4 +- .../benders_core/LastIterationWriter.cpp | 2 +- .../benders/benders_core/MasterUpdateBase.cpp | 2 +- .../benders_core/SimulationOptions.cpp | 10 +- src/cpp/benders/benders_core/StartUp.cpp | 2 +- .../benders/benders_core/SubproblemWorker.cpp | 4 +- src/cpp/benders/benders_core/Worker.cpp | 6 +- src/cpp/benders/benders_core/WorkerMaster.cpp | 4 +- src/cpp/benders/benders_core/common.cpp | 2 +- .../benders/benders_core}/BendersBase.h | 6 +- .../benders/benders_core}/BendersMathLogger.h | 2 +- .../benders_core}/BendersStructsDatas.h | 2 +- .../benders/benders_core}/CustomVector.h | 0 .../benders/benders_core}/CutsManagement.h | 0 .../benders_core}/LastIterationPrinter.h | 2 +- .../benders_core}/LastIterationReader.h | 2 +- .../benders_core}/LastIterationWriter.h | 2 +- .../benders/benders_core}/MasterUpdate.h | 2 +- .../benders/benders_core}/SimulationOptions.h | 0 .../benders_core}/SimulationOptions.hxx | 0 .../benders/benders_core}/StartUp.h | 4 +- .../benders/benders_core}/SubproblemCut.h | 0 .../benders/benders_core}/SubproblemWorker.h | 0 .../benders/benders_core}/Worker.h | 6 +- .../benders/benders_core}/WorkerMaster.h | 0 .../benders/benders_core}/common.h | 0 src/cpp/benders/benders_mpi/BendersMPI.cpp | 6 +- .../benders_mpi/BendersMpiOuterLoop.cpp | 4 +- src/cpp/benders/benders_mpi/CMakeLists.txt | 32 +++--- .../benders/benders_mpi/OuterLoopBenders.cpp | 2 +- .../benders/benders_mpi}/BendersMPI.h | 20 ++-- .../benders_mpi}/BendersMpiOuterLoop.h | 2 +- .../benders/benders_mpi}/OuterLoopBenders.h | 8 +- .../benders/benders_mpi}/common_mpi.h | 2 +- .../benders_sequential/BendersSequential.cpp | 6 +- .../benders/benders_sequential/CMakeLists.txt | 38 ++++--- .../benders_sequential}/BendersSequential.h | 8 +- src/cpp/benders/factories/BendersFactory.cpp | 28 ++--- src/cpp/benders/factories/CMakeLists.txt | 39 ++++--- src/cpp/benders/factories/LoggerFactories.cpp | 6 +- src/cpp/benders/factories/WriterFactories.cpp | 10 +- .../benders/factories}/BendersFactory.h | 6 +- .../benders/factories}/LoggerFactories.h | 10 +- .../benders/factories}/WriterFactories.h | 2 +- src/cpp/benders/logger/CMakeLists.txt | 28 +++-- src/cpp/benders/logger/CandidateLog.cpp | 5 +- src/cpp/benders/logger/IterationResultLog.cpp | 7 +- src/cpp/benders/logger/Master.cpp | 2 +- src/cpp/benders/logger/MathLogger.cpp | 2 +- src/cpp/benders/logger/User.cpp | 12 +- src/cpp/benders/logger/UserFile.cpp | 12 +- .../benders/logger}/CandidateLog.h | 2 +- .../benders/logger}/Commons.h | 0 .../benders/logger}/IterationResultLog.h | 2 +- .../benders}/logger/Master.h | 2 +- .../benders}/logger/MathLogger.h | 4 +- .../benders}/logger/User.h | 2 +- .../benders}/logger/UserFile.h | 4 +- src/cpp/benders/merge_mps/CMakeLists.txt | 37 +++--- src/cpp/benders/merge_mps/MergeMPS.cpp | 8 +- .../benders/merge_mps}/MergeMPS.h | 8 +- src/cpp/benders/outer_loop/CMakeLists.txt | 62 +++++----- .../outer_loop/CriterionComputation.cpp | 2 +- src/cpp/benders/outer_loop/OuterLoop.cpp | 2 +- .../benders/outer_loop/OuterLoopBiLevel.cpp | 2 +- .../outer_loop/OuterLoopInputDataReader.cpp | 4 +- src/cpp/benders/outer_loop/VariablesGroup.cpp | 2 +- .../outer_loop}/CriterionComputation.h | 0 .../benders/outer_loop}/IMasterUpdate.h | 0 .../benders/outer_loop}/OuterLoop.h | 0 .../benders/outer_loop}/OuterLoopBiLevel.h | 0 .../outer_loop}/OuterLoopInputDataReader.h | 2 +- .../benders/outer_loop}/VariablesGroup.h | 0 src/cpp/benders/output/CMakeLists.txt | 36 +++--- src/cpp/benders/output/JsonWriter.cpp | 2 +- src/cpp/benders/output/VoidWriter.cpp | 2 +- .../benders/output}/JsonWriter.h | 4 +- .../benders/output}/VoidWriter.h | 2 +- .../antares_archive_updater/CMakeLists.txt | 2 +- src/cpp/exe/antares_archive_updater/main.cpp | 6 +- src/cpp/exe/benders/CMakeLists.txt | 2 +- src/cpp/exe/benders/main.cpp | 4 +- src/cpp/exe/full_run/CMakeLists.txt | 39 +++---- src/cpp/exe/full_run/main.cpp | 10 +- src/cpp/exe/lpnamer/CMakeLists.txt | 1 + src/cpp/exe/lpnamer/main.cpp | 4 +- src/cpp/exe/merge/CMakeLists.txt | 4 +- src/cpp/exe/merge/main.cpp | 16 +-- src/cpp/exe/outer_loop/CMakeLists.txt | 14 +-- src/cpp/exe/outer_loop/main.cpp | 4 +- src/cpp/exe/sensitivity/CMakeLists.txt | 2 +- src/cpp/exe/sensitivity/main.cpp | 10 +- src/cpp/exe/study-updater/main.cpp | 14 +-- src/cpp/full_run/CMakeLists.txt | 31 ++--- src/cpp/full_run/FullRunOptionsParser.cpp | 4 +- .../full_run}/FullRunOptionsParser.h | 4 +- src/cpp/helpers/AntaresArchiveUpdater.cpp | 6 +- .../AntaresArchiveUpdaterExeOptions.cpp | 2 +- src/cpp/helpers/AntaresVersionProvider.cpp | 2 +- src/cpp/helpers/ArchiveReader.cpp | 4 +- src/cpp/helpers/ArchiveWriter.cpp | 4 +- src/cpp/helpers/CMakeLists.txt | 73 ++++++------ src/cpp/helpers/Clock.cpp | 2 +- src/cpp/helpers/FileInBuffer.cpp | 2 +- src/cpp/helpers/JsonXpansionReader.cpp | 2 +- src/cpp/helpers/OptionsParser.cpp | 2 +- .../helpers}/AntaresArchiveUpdater.h | 0 .../AntaresArchiveUpdaterExeOptions.h | 0 .../helpers}/AntaresVersionProvider.h | 0 .../antares-xpansion/helpers}/ArchiveIO.h | 0 .../antares-xpansion/helpers}/ArchiveReader.h | 0 .../antares-xpansion/helpers}/ArchiveWriter.h | 0 .../antares-xpansion/helpers}/Clock.h | 0 .../antares-xpansion/helpers}/FileInBuffer.h | 0 .../helpers}/JsonXpansionReader.h | 0 .../antares-xpansion/helpers}/LoggerUtils.h | 2 +- .../antares-xpansion/helpers}/OptionsParser.h | 2 +- .../antares-xpansion/helpers}/Timer.h | 0 .../antares-xpansion/helpers}/solver_utils.h | 4 +- src/cpp/helpers/solver_utils.cc | 2 +- src/cpp/lpnamer/helper/CMakeLists.txt | 30 ++--- src/cpp/lpnamer/helper/ColumnToChange.cpp | 2 +- .../helper/ProblemGenerationLogger.cpp | 4 +- .../lpnamer/helper}/ColumnToChange.h | 0 .../lpnamer/helper}/ProblemGenerationLogger.h | 6 +- .../AdditionalConstraintsReader.cpp | 4 +- src/cpp/lpnamer/input_reader/CMakeLists.txt | 65 ++++++----- .../input_reader/CandidatesINIReader.cpp | 8 +- .../input_reader/GeneralDataReader.cpp | 10 +- .../input_reader/LinkProfileReader.cpp | 4 +- .../lpnamer/input_reader/LpFilesExtractor.cpp | 4 +- src/cpp/lpnamer/input_reader/MpsTxtWriter.cpp | 4 +- .../input_reader/VariableFileReader.cpp | 2 +- .../input_reader/WeightsFileReader.cpp | 6 +- .../input_reader/WeightsFileWriter.cpp | 5 +- .../AdditionalConstraintsReader.h | 2 +- .../input_reader}/CandidatesINIReader.h | 6 +- .../lpnamer/input_reader}/GeneralDataReader.h | 6 +- .../lpnamer/input_reader}/INIReader.h | 0 .../lpnamer/input_reader}/LinkProfileReader.h | 6 +- .../lpnamer/input_reader}/LpFilesExtractor.h | 6 +- .../lpnamer/input_reader}/MpsTxtWriter.h | 2 +- .../input_reader}/VariableFileReader.h | 6 +- .../lpnamer/input_reader}/WeightsFileReader.h | 4 +- .../lpnamer/input_reader}/WeightsFileWriter.h | 0 src/cpp/lpnamer/main/CMakeLists.txt | 47 ++++---- src/cpp/lpnamer/main/ProblemGeneration.cpp | 45 ++++---- .../main/ProblemGenerationExeOptions.cpp | 2 +- src/cpp/lpnamer/main/Version.cpp | 2 +- .../lpnamer/main}/ProblemGeneration.h | 14 +-- .../main}/ProblemGenerationExeOptions.h | 2 +- .../lpnamer/main}/ProblemGenerationOptions.h | 0 src/cpp/lpnamer/main/{ => private}/Version.h | 0 src/cpp/lpnamer/model/ActiveLinks.cpp | 2 +- src/cpp/lpnamer/model/CMakeLists.txt | 55 +++++---- src/cpp/lpnamer/model/Candidate.cpp | 2 +- .../lpnamer/model/ChronicleMapProvider.cpp | 4 +- src/cpp/lpnamer/model/ChronicleMapReader.cpp | 2 +- src/cpp/lpnamer/model/LinkProfile.cpp | 2 +- src/cpp/lpnamer/model/Problem.cpp | 4 +- src/cpp/lpnamer/model/ProblemNameParser.cpp | 2 +- .../lpnamer/model}/ActiveLinks.h | 8 +- .../lpnamer/model}/Candidate.h | 6 +- .../lpnamer/model}/ChronicleMapProvider.h | 4 +- .../lpnamer/model}/ChronicleMapReader.h | 0 .../lpnamer/model}/LinkProfile.h | 6 +- .../antares-xpansion/lpnamer/model}/Mode.h | 0 .../antares-xpansion/lpnamer/model}/Problem.h | 2 +- .../lpnamer/model}/ProblemNameParser.h | 0 .../lpnamer/model}/SimulationInputMode.h | 0 .../AdditionalConstraints.cpp | 6 +- ...aresProblemToXpansionProblemTranslator.cpp | 8 +- .../lpnamer/problem_modifier/CMakeLists.txt | 107 +++++++++--------- .../FileProblemProviderAdapter.cpp | 4 +- .../FileProblemsProviderAdapter.cpp | 4 +- .../problem_modifier/LauncherHelpers.cpp | 14 +-- .../LinkProblemsGenerator.cpp | 24 ++-- .../problem_modifier/LinkdataRecord.cpp | 2 +- .../MPSFileProblemProviderAdapter.cpp | 4 +- .../problem_modifier/MPSFileWriter.cpp | 6 +- .../problem_modifier/MasterGeneration.cpp | 8 +- .../problem_modifier/MasterProblemBuilder.cpp | 6 +- .../problem_modifier/ProblemModifier.cpp | 4 +- .../ProblemVariablesFileAdapter.cpp | 4 +- .../ProblemVariablesFromProblemAdapter.cpp | 3 +- .../ProblemVariablesZipAdapter.cpp | 8 +- .../XpansionProblemsFromAntaresProvider.cpp | 6 +- .../ZipProblemProviderAdapter.cpp | 8 +- .../ZipProblemsProviderAdapter.cpp | 6 +- .../problem_modifier}/AdditionalConstraints.h | 2 +- ...ntaresProblemToXpansionProblemTranslator.h | 2 +- .../FileProblemProviderAdapter.h | 2 +- .../FileProblemsProviderAdapter.h | 0 .../problem_modifier}/IProblemProviderPort.h | 2 +- .../IProblemVariablesProviderPort.h | 2 +- .../problem_modifier}/IProblemWriter.h | 2 +- .../IXpansionProblemsProvider.h | 2 +- .../problem_modifier}/LauncherHelpers.h | 8 +- .../problem_modifier}/LinkProblemsGenerator.h | 24 ++-- .../problem_modifier}/LinkdataRecord.h | 6 +- .../MPSFileProblemProviderAdapter.h | 2 +- .../lpnamer/problem_modifier}/MPSFileWriter.h | 4 +- .../problem_modifier}/MasterGeneration.h | 6 +- .../problem_modifier}/MasterProblemBuilder.h | 4 +- .../problem_modifier}/ProblemModifier.h | 12 +- .../ProblemVariablesFileAdapter.h | 4 +- .../ProblemVariablesFromProblemAdapter.h | 4 +- .../ProblemVariablesZipAdapter.h | 4 +- .../XpansionProblemsFromAntaresProvider.h | 2 +- .../ZipProblemProviderAdapter.h | 4 +- .../ZipProblemsProviderAdapter.h | 2 +- src/cpp/multisolver_interface/CMakeLists.txt | 86 ++++++++------ .../COIN_common_functions.cpp | 4 +- .../multisolver_interface/SolverFactory.cpp | 6 +- .../multisolver_interface/SolverXpress.cpp | 2 +- src/cpp/multisolver_interface/environment.cc | 2 +- .../multisolver_interface/Solver.h | 5 + .../multisolver_interface/SolverAbstract.h | 2 +- .../multisolver_interface/SolverFactory.h | 4 +- .../multisolver_interface/dynamic_library.h | 0 .../multisolver_interface/environment.h | 2 +- .../include/multisolver_interface/Solver.h | 5 - .../{ => private}/COIN_common_functions.h | 0 .../{ => private}/SolverCbc.h | 2 +- .../{ => private}/SolverClp.h | 2 +- .../{ => private}/SolverXpress.h | 4 +- src/cpp/sensitivity/Analysis.cpp | 6 +- src/cpp/sensitivity/CMakeLists.txt | 47 +++++--- src/cpp/sensitivity/ProblemModifierCapex.cpp | 4 +- .../sensitivity/ProblemModifierProjection.cpp | 4 +- src/cpp/sensitivity/SensitivityFileLogger.cpp | 2 +- .../sensitivity/SensitivityInputReader.cpp | 10 +- src/cpp/sensitivity/SensitivityLogger.cpp | 4 +- .../sensitivity/SensitivityMasterLogger.cpp | 2 +- .../SensitivityProblemModifier.cpp | 4 +- src/cpp/sensitivity/SensitivityStudy.cpp | 2 +- src/cpp/sensitivity/SensitivityWriter.cpp | 2 +- .../sensitivity}/ProblemModifierCapex.h | 2 +- .../sensitivity}/ProblemModifierProjection.h | 2 +- .../sensitivity}/SensitivityFileLogger.h | 4 +- .../sensitivity}/SensitivityILogger.h | 4 +- .../sensitivity}/SensitivityInputReader.h | 2 +- .../sensitivity}/SensitivityLogger.h | 2 +- .../sensitivity}/SensitivityMasterLogger.h | 2 +- .../sensitivity}/SensitivityOutputData.h | 2 +- .../sensitivity}/SensitivityProblemModifier.h | 4 +- .../sensitivity}/SensitivityStudy.h | 12 +- .../sensitivity}/SensitivityWriter.h | 4 +- src/cpp/sensitivity/{ => private}/Analysis.h | 6 +- src/cpp/study-updater/CMakeLists.txt | 61 +++++----- .../study-updater/LinkCapacitiesCSVWriter.cpp | 4 +- .../LinkParametersCSVOverwriter.cpp | 8 +- .../StudyUpdateLinkCapacitiesStrategy.cpp | 4 +- .../StudyUpdateLinkParameterStrategy.cpp | 4 +- src/cpp/study-updater/StudyUpdateRunner.cpp | 2 +- src/cpp/study-updater/StudyUpdateStrategy.cpp | 2 +- src/cpp/study-updater/StudyUpdater.cpp | 10 +- .../study-updater}/LinkCapacitiesCSVWriter.h | 6 +- .../LinkParametersCSVOverwriter.h | 2 +- .../StudyUpdateLinkCapacitiesStrategy.h | 4 +- .../StudyUpdateLinkParameterStrategy.h | 4 +- .../study-updater}/StudyUpdateRunner.h | 12 +- .../study-updater}/StudyUpdateStrategy.h | 6 +- .../study-updater}/StudyUpdater.h | 8 +- src/cpp/xpansion_interfaces/CMakeLists.txt | 20 +++- .../xpansion_interfaces}/ILogger.h | 2 +- .../xpansion_interfaces}/IWriterLogger.h | 0 .../xpansion_interfaces}/LogUtils.h | 0 .../xpansion_interfaces}/OutputWriter.h | 0 .../xpansion_interfaces}/StringManip.h | 0 tests/cpp/TestDoubles/LoggerStub.h | 2 +- tests/cpp/TestDoubles/WriterStub.h | 2 +- tests/cpp/benders/BendersByBatchTest.cpp | 10 +- tests/cpp/benders/CMakeLists.txt | 10 +- tests/cpp/benders/benders_sequential_test.cpp | 6 +- tests/cpp/full_run/FullRunTest.cpp | 2 +- .../helpers/AntaresVersionProviderTest.cpp | 2 +- tests/cpp/helpers/CMakeLists.txt | 10 +- tests/cpp/helpers/JsonXpansionReaderTest.cc | 2 +- tests/cpp/helpers/OptionsParserTest.cpp | 2 +- tests/cpp/json_output_writer/CMakeLists.txt | 4 +- .../json_output_writer/output_writer_test.cpp | 4 +- tests/cpp/logger/CMakeLists.txt | 2 +- tests/cpp/logger/logger_test.cpp | 10 +- tests/cpp/lp_namer/ActiveLinkTest.cpp | 2 +- .../AdditionalConstraintsReaderTest.cc | 4 +- .../cpp/lp_namer/AdditionalConstraintsTest.cc | 4 +- ...ProblemToXpansionProblemTranslatorTest.cpp | 2 +- tests/cpp/lp_namer/CMakeLists.txt | 14 +-- .../cpp/lp_namer/CandidatesINIReaderTest.cpp | 4 +- .../cpp/lp_namer/ChronicleMapProviderTest.cpp | 4 +- tests/cpp/lp_namer/ChronicleMapReaderTest.cpp | 2 +- tests/cpp/lp_namer/GeneralDataReadetTests.cpp | 2 +- tests/cpp/lp_namer/LinkProfileReaderTest.cpp | 4 +- tests/cpp/lp_namer/LinkdataRecordTest.cc | 4 +- tests/cpp/lp_namer/LoggerBuilder.h | 2 +- tests/cpp/lp_namer/LpFilesExtractorTest.cpp | 2 +- .../cpp/lp_namer/MasterProblemBuilderTest.cpp | 4 +- tests/cpp/lp_namer/MpsTxtWriterTest.cpp | 4 +- tests/cpp/lp_namer/NOOPSolver.h | 2 +- .../cpp/lp_namer/ProblemConstructionTest.cpp | 6 +- .../ProblemGenerationExeOptionsTest.cpp | 4 +- .../lp_namer/ProblemGenerationLoggerTest.cpp | 2 +- tests/cpp/lp_namer/ProblemModifierTest.cpp | 10 +- tests/cpp/lp_namer/StudyUpdateTest.cc | 14 +-- tests/cpp/lp_namer/VariableFileReaderTest.cpp | 2 +- tests/cpp/lp_namer/WeightsFileReaderTest.cpp | 2 +- tests/cpp/lp_namer/WeightsFileWriterTest.cpp | 2 +- tests/cpp/outer_loop/CMakeLists.txt | 12 +- tests/cpp/outer_loop/outer_loop_test.cpp | 16 +-- tests/cpp/restart_benders/CMakeLists.txt | 4 +- .../cpp/restart_benders/restart_lib_tests.cpp | 10 +- tests/cpp/sensitivity/CMakeLists.txt | 2 +- .../SensitivityInputReaderTest.cpp | 2 +- .../cpp/sensitivity/SensitivityLoggerTest.cpp | 10 +- .../sensitivity/SensitivityPbModifierTest.cpp | 8 +- .../cpp/sensitivity/SensitivityStudyTest.cpp | 8 +- .../cpp/sensitivity/SensitivityWriterTest.cpp | 2 +- tests/cpp/solvers_interface/CMakeLists.txt | 29 +++-- tests/cpp/solvers_interface/define_datas.hpp | 2 +- tests/cpp/solvers_interface/test_basis.cpp | 2 +- .../cpp/solvers_interface/test_exceptions.cpp | 4 +- .../test_modifying_problem.cpp | 2 +- .../test_reading_problem.cpp | 2 +- .../test_solving_problem.cpp | 2 +- tests/cpp/zip_mps/CMakeLists.txt | 2 +- tests/cpp/zip_mps/zip_mps_lib_tests.cpp | 8 +- vcpkg | 2 +- 342 files changed, 1294 insertions(+), 1162 deletions(-) create mode 100644 CMakeGraphVizOptions.cmake rename src/cpp/benders/benders_by_batch/include/{ => antares-xpansion/benders/benders_by_batch}/BatchCollection.h (96%) rename src/cpp/benders/benders_by_batch/include/{ => antares-xpansion/benders/benders_by_batch}/BendersByBatch.h (93%) rename src/cpp/benders/benders_by_batch/include/{ => antares-xpansion/benders/benders_by_batch}/RandomBatchShuffler.h (100%) rename src/cpp/benders/benders_core/include/{ => antares-xpansion/benders/benders_core}/BendersBase.h (98%) rename src/cpp/benders/benders_core/include/{ => antares-xpansion/benders/benders_core}/BendersMathLogger.h (99%) rename src/cpp/benders/benders_core/include/{ => antares-xpansion/benders/benders_core}/BendersStructsDatas.h (97%) rename src/cpp/benders/benders_core/include/{ => antares-xpansion/benders/benders_core}/CustomVector.h (100%) rename src/cpp/benders/benders_core/include/{ => antares-xpansion/benders/benders_core}/CutsManagement.h (100%) rename src/cpp/benders/benders_core/include/{ => antares-xpansion/benders/benders_core}/LastIterationPrinter.h (87%) rename src/cpp/benders/benders_core/include/{ => antares-xpansion/benders/benders_core}/LastIterationReader.h (90%) rename src/cpp/benders/benders_core/include/{ => antares-xpansion/benders/benders_core}/LastIterationWriter.h (92%) rename src/cpp/benders/benders_core/include/{ => antares-xpansion/benders/benders_core}/MasterUpdate.h (94%) rename src/cpp/benders/benders_core/include/{ => antares-xpansion/benders/benders_core}/SimulationOptions.h (100%) rename src/cpp/benders/benders_core/include/{ => antares-xpansion/benders/benders_core}/SimulationOptions.hxx (100%) rename src/cpp/benders/benders_core/include/{ => antares-xpansion/benders/benders_core}/StartUp.h (74%) rename src/cpp/benders/benders_core/include/{ => antares-xpansion/benders/benders_core}/SubproblemCut.h (100%) rename src/cpp/benders/benders_core/include/{ => antares-xpansion/benders/benders_core}/SubproblemWorker.h (100%) rename src/cpp/benders/benders_core/include/{ => antares-xpansion/benders/benders_core}/Worker.h (91%) rename src/cpp/benders/benders_core/include/{ => antares-xpansion/benders/benders_core}/WorkerMaster.h (100%) rename src/cpp/benders/benders_core/include/{ => antares-xpansion/benders/benders_core}/common.h (100%) rename src/cpp/benders/benders_mpi/include/{ => antares-xpansion/benders/benders_mpi}/BendersMPI.h (81%) rename src/cpp/benders/benders_mpi/include/{ => antares-xpansion/benders/benders_mpi}/BendersMpiOuterLoop.h (94%) rename src/cpp/benders/benders_mpi/include/{ => antares-xpansion/benders/benders_mpi}/OuterLoopBenders.h (83%) rename src/cpp/benders/benders_mpi/include/{ => antares-xpansion/benders/benders_mpi}/common_mpi.h (88%) rename src/cpp/benders/benders_sequential/include/{ => antares-xpansion/benders/benders_sequential}/BendersSequential.h (74%) rename src/cpp/benders/factories/include/{ => antares-xpansion/benders/factories}/BendersFactory.h (87%) rename src/cpp/benders/factories/include/{ => antares-xpansion/benders/factories}/LoggerFactories.h (86%) rename src/cpp/benders/factories/include/{ => antares-xpansion/benders/factories}/WriterFactories.h (83%) rename src/cpp/benders/logger/include/{ => antares-xpansion/benders/logger}/CandidateLog.h (95%) rename src/cpp/benders/logger/include/{ => antares-xpansion/benders/logger}/Commons.h (100%) rename src/cpp/benders/logger/include/{ => antares-xpansion/benders/logger}/IterationResultLog.h (95%) rename src/cpp/benders/logger/include/{ => antares-xpansion/benders}/logger/Master.h (97%) rename src/cpp/benders/logger/include/{ => antares-xpansion/benders}/logger/MathLogger.h (87%) rename src/cpp/benders/logger/include/{ => antares-xpansion/benders}/logger/User.h (96%) rename src/cpp/benders/logger/include/{ => antares-xpansion/benders}/logger/UserFile.h (94%) rename src/cpp/benders/merge_mps/include/{ => antares-xpansion/benders/merge_mps}/MergeMPS.h (97%) rename src/cpp/benders/outer_loop/include/{ => antares-xpansion/benders/outer_loop}/CriterionComputation.h (100%) rename src/cpp/benders/outer_loop/include/{ => antares-xpansion/benders/outer_loop}/IMasterUpdate.h (100%) rename src/cpp/benders/outer_loop/include/{ => antares-xpansion/benders/outer_loop}/OuterLoop.h (100%) rename src/cpp/benders/outer_loop/include/{ => antares-xpansion/benders/outer_loop}/OuterLoopBiLevel.h (100%) rename src/cpp/benders/outer_loop/include/{ => antares-xpansion/benders/outer_loop}/OuterLoopInputDataReader.h (98%) rename src/cpp/benders/outer_loop/include/{ => antares-xpansion/benders/outer_loop}/VariablesGroup.h (100%) rename src/cpp/benders/output/include/{ => antares-xpansion/benders/output}/JsonWriter.h (95%) rename src/cpp/benders/output/include/{ => antares-xpansion/benders/output}/VoidWriter.h (97%) rename src/cpp/full_run/include/{ => antares-xpansion/full_run}/FullRunOptionsParser.h (85%) rename src/cpp/helpers/{ => include/antares-xpansion/helpers}/AntaresArchiveUpdater.h (100%) rename src/cpp/helpers/{ => include/antares-xpansion/helpers}/AntaresArchiveUpdaterExeOptions.h (100%) rename src/cpp/helpers/{ => include/antares-xpansion/helpers}/AntaresVersionProvider.h (100%) rename src/cpp/helpers/{ => include/antares-xpansion/helpers}/ArchiveIO.h (100%) rename src/cpp/helpers/{ => include/antares-xpansion/helpers}/ArchiveReader.h (100%) rename src/cpp/helpers/{ => include/antares-xpansion/helpers}/ArchiveWriter.h (100%) rename src/cpp/helpers/{ => include/antares-xpansion/helpers}/Clock.h (100%) rename src/cpp/helpers/{ => include/antares-xpansion/helpers}/FileInBuffer.h (100%) rename src/cpp/helpers/{ => include/antares-xpansion/helpers}/JsonXpansionReader.h (100%) rename src/cpp/helpers/{ => include/antares-xpansion/helpers}/LoggerUtils.h (83%) rename src/cpp/helpers/{ => include/antares-xpansion/helpers}/OptionsParser.h (96%) rename src/cpp/helpers/{ => include/antares-xpansion/helpers}/Timer.h (100%) rename src/cpp/helpers/{ => include/antares-xpansion/helpers}/solver_utils.h (98%) rename src/cpp/lpnamer/helper/{ => include/antares-xpansion/lpnamer/helper}/ColumnToChange.h (100%) rename src/cpp/lpnamer/helper/{ => include/antares-xpansion/lpnamer/helper}/ProblemGenerationLogger.h (96%) rename src/cpp/lpnamer/input_reader/{ => include/antares-xpansion/lpnamer/input_reader}/AdditionalConstraintsReader.h (97%) rename src/cpp/lpnamer/input_reader/{ => include/antares-xpansion/lpnamer/input_reader}/CandidatesINIReader.h (92%) rename src/cpp/lpnamer/input_reader/{ => include/antares-xpansion/lpnamer/input_reader}/GeneralDataReader.h (88%) rename src/cpp/lpnamer/input_reader/{ => include/antares-xpansion/lpnamer/input_reader}/INIReader.h (100%) rename src/cpp/lpnamer/input_reader/{ => include/antares-xpansion/lpnamer/input_reader}/LinkProfileReader.h (89%) rename src/cpp/lpnamer/input_reader/{ => include/antares-xpansion/lpnamer/input_reader}/LpFilesExtractor.h (91%) rename src/cpp/lpnamer/input_reader/{ => include/antares-xpansion/lpnamer/input_reader}/MpsTxtWriter.h (96%) rename src/cpp/lpnamer/input_reader/{ => include/antares-xpansion/lpnamer/input_reader}/VariableFileReader.h (92%) rename src/cpp/lpnamer/input_reader/{ => include/antares-xpansion/lpnamer/input_reader}/WeightsFileReader.h (94%) rename src/cpp/lpnamer/input_reader/{ => include/antares-xpansion/lpnamer/input_reader}/WeightsFileWriter.h (100%) rename src/cpp/lpnamer/main/include/{ => antares-xpansion/lpnamer/main}/ProblemGeneration.h (80%) rename src/cpp/lpnamer/main/include/{ => antares-xpansion/lpnamer/main}/ProblemGenerationExeOptions.h (97%) rename src/cpp/lpnamer/main/include/{ => antares-xpansion/lpnamer/main}/ProblemGenerationOptions.h (100%) rename src/cpp/lpnamer/main/{ => private}/Version.h (100%) rename src/cpp/lpnamer/model/{ => include/antares-xpansion/lpnamer/model}/ActiveLinks.h (95%) rename src/cpp/lpnamer/model/{ => include/antares-xpansion/lpnamer/model}/Candidate.h (89%) rename src/cpp/lpnamer/model/{ => include/antares-xpansion/lpnamer/model}/ChronicleMapProvider.h (89%) rename src/cpp/lpnamer/model/{ => include/antares-xpansion/lpnamer/model}/ChronicleMapReader.h (100%) rename src/cpp/lpnamer/model/{ => include/antares-xpansion/lpnamer/model}/LinkProfile.h (89%) rename src/cpp/lpnamer/model/{ => include/antares-xpansion/lpnamer/model}/Mode.h (100%) rename src/cpp/lpnamer/model/{ => include/antares-xpansion/lpnamer/model}/Problem.h (99%) rename src/cpp/lpnamer/model/{ => include/antares-xpansion/lpnamer/model}/ProblemNameParser.h (100%) rename src/cpp/lpnamer/model/{ => include/antares-xpansion/lpnamer/model}/SimulationInputMode.h (100%) rename src/cpp/lpnamer/problem_modifier/{ => include/antares-xpansion/lpnamer/problem_modifier}/AdditionalConstraints.h (99%) rename src/cpp/lpnamer/problem_modifier/{ => include/antares-xpansion/lpnamer/problem_modifier}/AntaresProblemToXpansionProblemTranslator.h (90%) rename src/cpp/lpnamer/problem_modifier/{ => include/antares-xpansion/lpnamer/problem_modifier}/FileProblemProviderAdapter.h (87%) rename src/cpp/lpnamer/problem_modifier/{ => include/antares-xpansion/lpnamer/problem_modifier}/FileProblemsProviderAdapter.h (100%) rename src/cpp/lpnamer/problem_modifier/{ => include/antares-xpansion/lpnamer/problem_modifier}/IProblemProviderPort.h (85%) rename src/cpp/lpnamer/problem_modifier/{ => include/antares-xpansion/lpnamer/problem_modifier}/IProblemVariablesProviderPort.h (89%) rename src/cpp/lpnamer/problem_modifier/{ => include/antares-xpansion/lpnamer/problem_modifier}/IProblemWriter.h (78%) rename src/cpp/lpnamer/problem_modifier/{ => include/antares-xpansion/lpnamer/problem_modifier}/IXpansionProblemsProvider.h (86%) rename src/cpp/lpnamer/problem_modifier/{ => include/antares-xpansion/lpnamer/problem_modifier}/LauncherHelpers.h (89%) rename src/cpp/lpnamer/problem_modifier/{ => include/antares-xpansion/lpnamer/problem_modifier}/LinkProblemsGenerator.h (69%) rename src/cpp/lpnamer/problem_modifier/{ => include/antares-xpansion/lpnamer/problem_modifier}/LinkdataRecord.h (90%) rename src/cpp/lpnamer/problem_modifier/{ => include/antares-xpansion/lpnamer/problem_modifier}/MPSFileProblemProviderAdapter.h (86%) rename src/cpp/lpnamer/problem_modifier/{ => include/antares-xpansion/lpnamer/problem_modifier}/MPSFileWriter.h (58%) rename src/cpp/lpnamer/problem_modifier/{ => include/antares-xpansion/lpnamer/problem_modifier}/MasterGeneration.h (88%) rename src/cpp/lpnamer/problem_modifier/{ => include/antares-xpansion/lpnamer/problem_modifier}/MasterProblemBuilder.h (90%) rename src/cpp/lpnamer/problem_modifier/{ => include/antares-xpansion/lpnamer/problem_modifier}/ProblemModifier.h (92%) rename src/cpp/lpnamer/problem_modifier/{ => include/antares-xpansion/lpnamer/problem_modifier}/ProblemVariablesFileAdapter.h (84%) rename src/cpp/lpnamer/problem_modifier/{ => include/antares-xpansion/lpnamer/problem_modifier}/ProblemVariablesFromProblemAdapter.h (82%) rename src/cpp/lpnamer/problem_modifier/{ => include/antares-xpansion/lpnamer/problem_modifier}/ProblemVariablesZipAdapter.h (84%) rename src/cpp/lpnamer/problem_modifier/{ => include/antares-xpansion/lpnamer/problem_modifier}/XpansionProblemsFromAntaresProvider.h (91%) rename src/cpp/lpnamer/problem_modifier/{ => include/antares-xpansion/lpnamer/problem_modifier}/ZipProblemProviderAdapter.h (83%) rename src/cpp/lpnamer/problem_modifier/{ => include/antares-xpansion/lpnamer/problem_modifier}/ZipProblemsProviderAdapter.h (92%) create mode 100644 src/cpp/multisolver_interface/include/antares-xpansion/multisolver_interface/Solver.h rename src/cpp/multisolver_interface/include/{ => antares-xpansion}/multisolver_interface/SolverAbstract.h (99%) rename src/cpp/multisolver_interface/include/{ => antares-xpansion}/multisolver_interface/SolverFactory.h (95%) rename src/cpp/multisolver_interface/include/{ => antares-xpansion}/multisolver_interface/dynamic_library.h (100%) rename src/cpp/multisolver_interface/include/{ => antares-xpansion}/multisolver_interface/environment.h (99%) delete mode 100644 src/cpp/multisolver_interface/include/multisolver_interface/Solver.h rename src/cpp/multisolver_interface/{ => private}/COIN_common_functions.h (100%) rename src/cpp/multisolver_interface/{ => private}/SolverCbc.h (99%) rename src/cpp/multisolver_interface/{ => private}/SolverClp.h (99%) rename src/cpp/multisolver_interface/{ => private}/SolverXpress.h (98%) rename src/cpp/sensitivity/include/{ => antares-xpansion/sensitivity}/ProblemModifierCapex.h (86%) rename src/cpp/sensitivity/include/{ => antares-xpansion/sensitivity}/ProblemModifierProjection.h (89%) rename src/cpp/sensitivity/include/{ => antares-xpansion/sensitivity}/SensitivityFileLogger.h (87%) rename src/cpp/sensitivity/include/{ => antares-xpansion/sensitivity}/SensitivityILogger.h (84%) rename src/cpp/sensitivity/include/{ => antares-xpansion/sensitivity}/SensitivityInputReader.h (95%) rename src/cpp/sensitivity/include/{ => antares-xpansion/sensitivity}/SensitivityLogger.h (95%) rename src/cpp/sensitivity/include/{ => antares-xpansion/sensitivity}/SensitivityMasterLogger.h (93%) rename src/cpp/sensitivity/include/{ => antares-xpansion/sensitivity}/SensitivityOutputData.h (97%) rename src/cpp/sensitivity/include/{ => antares-xpansion/sensitivity}/SensitivityProblemModifier.h (84%) rename src/cpp/sensitivity/include/{ => antares-xpansion/sensitivity}/SensitivityStudy.h (65%) rename src/cpp/sensitivity/include/{ => antares-xpansion/sensitivity}/SensitivityWriter.h (90%) rename src/cpp/sensitivity/{ => private}/Analysis.h (82%) rename src/cpp/study-updater/include/{ => antares-xpansion/study-updater}/LinkCapacitiesCSVWriter.h (67%) rename src/cpp/study-updater/include/{ => antares-xpansion/study-updater}/LinkParametersCSVOverwriter.h (91%) rename src/cpp/study-updater/include/{ => antares-xpansion/study-updater}/StudyUpdateLinkCapacitiesStrategy.h (85%) rename src/cpp/study-updater/include/{ => antares-xpansion/study-updater}/StudyUpdateLinkParameterStrategy.h (92%) rename src/cpp/study-updater/include/{ => antares-xpansion/study-updater}/StudyUpdateRunner.h (71%) rename src/cpp/study-updater/include/{ => antares-xpansion/study-updater}/StudyUpdateStrategy.h (84%) rename src/cpp/study-updater/include/{ => antares-xpansion/study-updater}/StudyUpdater.h (89%) rename src/cpp/xpansion_interfaces/{ => include/antares-xpansion/xpansion_interfaces}/ILogger.h (98%) rename src/cpp/xpansion_interfaces/{ => include/antares-xpansion/xpansion_interfaces}/IWriterLogger.h (100%) rename src/cpp/xpansion_interfaces/{ => include/antares-xpansion/xpansion_interfaces}/LogUtils.h (100%) rename src/cpp/xpansion_interfaces/{ => include/antares-xpansion/xpansion_interfaces}/OutputWriter.h (100%) rename src/cpp/xpansion_interfaces/{ => include/antares-xpansion/xpansion_interfaces}/StringManip.h (100%) diff --git a/CMakeGraphVizOptions.cmake b/CMakeGraphVizOptions.cmake new file mode 100644 index 000000000..e69de29bb diff --git a/src/cpp/benders/benders_by_batch/BatchCollection.cpp b/src/cpp/benders/benders_by_batch/BatchCollection.cpp index 6c50a7dcc..497755339 100644 --- a/src/cpp/benders/benders_by_batch/BatchCollection.cpp +++ b/src/cpp/benders/benders_by_batch/BatchCollection.cpp @@ -1,4 +1,4 @@ -#include "BatchCollection.h" +#include "antares-xpansion/benders/benders_by_batch/BatchCollection.h" #include #include diff --git a/src/cpp/benders/benders_by_batch/BendersByBatch.cpp b/src/cpp/benders/benders_by_batch/BendersByBatch.cpp index e34c0540b..5ebac7a81 100644 --- a/src/cpp/benders/benders_by_batch/BendersByBatch.cpp +++ b/src/cpp/benders/benders_by_batch/BendersByBatch.cpp @@ -1,13 +1,13 @@ -#include "BendersByBatch.h" +#include "antares-xpansion/benders/benders_by_batch/BendersByBatch.h" #include #include #include #include -#include "BatchCollection.h" -#include "CustomVector.h" -#include "RandomBatchShuffler.h" +#include "antares-xpansion/benders/benders_by_batch/BatchCollection.h" +#include "antares-xpansion/benders/benders_core/CustomVector.h" +#include "antares-xpansion/benders/benders_by_batch/RandomBatchShuffler.h" BendersByBatch::BendersByBatch( BendersBaseOptions const &options, Logger logger, Writer writer, diff --git a/src/cpp/benders/benders_by_batch/CMakeLists.txt b/src/cpp/benders/benders_by_batch/CMakeLists.txt index c62eb2a3f..ae5b63f73 100644 --- a/src/cpp/benders/benders_by_batch/CMakeLists.txt +++ b/src/cpp/benders/benders_by_batch/CMakeLists.txt @@ -6,36 +6,41 @@ # Targets # =========================================================================== find_package(MPI REQUIRED) -find_package (MPI REQUIRED COMPONENTS C) -message ("MPI_C_INCLUDE_PATH ${MPI_C_INCLUDE_PATH}") -message ("MPI_C_INCLUDE_DIRS ${MPI_C_INCLUDE_DIRS}") -message ("MPI_C_LIBRARIES ${MPI_C_LIBRARIES}") +find_package(MPI REQUIRED COMPONENTS C) +message("MPI_C_INCLUDE_PATH ${MPI_C_INCLUDE_PATH}") +message("MPI_C_INCLUDE_DIRS ${MPI_C_INCLUDE_DIRS}") +message("MPI_C_LIBRARIES ${MPI_C_LIBRARIES}") -if(UNIX) -set(CMAKE_CXX_COMPILER ${MPI_CXX_COMPILER}) -endif() -add_library (benders_by_batch_core STATIC - ${CMAKE_CURRENT_SOURCE_DIR}/BendersByBatch.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/BatchCollection.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/RandomBatchShuffler.cpp - ) +if (UNIX) + set(CMAKE_CXX_COMPILER ${MPI_CXX_COMPILER}) +endif () +add_library(benders_by_batch_core) +target_sources(benders_by_batch_core PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/BatchCollection.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/BendersByBatch.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/RandomBatchShuffler.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/benders/benders_by_batch/BatchCollection.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/benders/benders_by_batch/BendersByBatch.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/benders/benders_by_batch/RandomBatchShuffler.h +) -target_include_directories (benders_by_batch_core - PUBLIC - ${CMAKE_CURRENT_SOURCE_DIR}/include - PUBLIC - ${CMAKE_CURRENT_SOURCE_DIR} +target_include_directories(benders_by_batch_core + PUBLIC + $ ) -target_link_libraries (benders_by_batch_core - PUBLIC - benders_core - benders_sequential_core - benders_mpi_core - helpers - output_core - solvers +target_link_libraries(benders_by_batch_core + PUBLIC + antaresXpansion::benders_core + antaresXpansion::benders_sequential_core + antaresXpansion::benders_mpi_core + antaresXpansion::helpers + antaresXpansion::output_core + antaresXpansion::solvers ) -add_library (${PROJECT_NAME}::benders_by_batch_core ALIAS benders_by_batch_core) \ No newline at end of file +add_library(${PROJECT_NAME}::benders_by_batch_core ALIAS benders_by_batch_core) +install(DIRECTORY include/antares-xpansion + DESTINATION "include" +) \ No newline at end of file diff --git a/src/cpp/benders/benders_by_batch/RandomBatchShuffler.cpp b/src/cpp/benders/benders_by_batch/RandomBatchShuffler.cpp index e92e19c83..bbb58578d 100644 --- a/src/cpp/benders/benders_by_batch/RandomBatchShuffler.cpp +++ b/src/cpp/benders/benders_by_batch/RandomBatchShuffler.cpp @@ -1,4 +1,4 @@ -#include "RandomBatchShuffler.h" +#include "antares-xpansion/benders/benders_by_batch/RandomBatchShuffler.h" std::vector RandomBatchShuffler::GetCyclicBatchOrder( unsigned batch_counter) const { diff --git a/src/cpp/benders/benders_by_batch/include/BatchCollection.h b/src/cpp/benders/benders_by_batch/include/antares-xpansion/benders/benders_by_batch/BatchCollection.h similarity index 96% rename from src/cpp/benders/benders_by_batch/include/BatchCollection.h rename to src/cpp/benders/benders_by_batch/include/antares-xpansion/benders/benders_by_batch/BatchCollection.h index ee73b8e23..71e5943f2 100644 --- a/src/cpp/benders/benders_by_batch/include/BatchCollection.h +++ b/src/cpp/benders/benders_by_batch/include/antares-xpansion/benders/benders_by_batch/BatchCollection.h @@ -4,7 +4,7 @@ #include #include -#include "ILogger.h" +#include "antares-xpansion/xpansion_interfaces/ILogger.h" struct Batch { std::vector sub_problem_names; diff --git a/src/cpp/benders/benders_by_batch/include/BendersByBatch.h b/src/cpp/benders/benders_by_batch/include/antares-xpansion/benders/benders_by_batch/BendersByBatch.h similarity index 93% rename from src/cpp/benders/benders_by_batch/include/BendersByBatch.h rename to src/cpp/benders/benders_by_batch/include/antares-xpansion/benders/benders_by_batch/BendersByBatch.h index 03dde786e..235e03b94 100644 --- a/src/cpp/benders/benders_by_batch/include/BendersByBatch.h +++ b/src/cpp/benders/benders_by_batch/include/antares-xpansion/benders/benders_by_batch/BendersByBatch.h @@ -1,8 +1,8 @@ #ifndef SRC_CPP_BENDERS_BENDERS_BY_BATCH_INCLUDE_BENDERSBYBATCH_H_ #define SRC_CPP_BENDERS_BENDERS_BY_BATCH_INCLUDE_BENDERSBYBATCH_H_ #include "BatchCollection.h" -#include "BendersMPI.h" -#include "common_mpi.h" +#include "antares-xpansion/benders/benders_mpi/BendersMPI.h" +#include "antares-xpansion/benders/benders_mpi/common_mpi.h" class BendersByBatch : public BendersMpi { std::vector random_batch_permutation_; diff --git a/src/cpp/benders/benders_by_batch/include/RandomBatchShuffler.h b/src/cpp/benders/benders_by_batch/include/antares-xpansion/benders/benders_by_batch/RandomBatchShuffler.h similarity index 100% rename from src/cpp/benders/benders_by_batch/include/RandomBatchShuffler.h rename to src/cpp/benders/benders_by_batch/include/antares-xpansion/benders/benders_by_batch/RandomBatchShuffler.h diff --git a/src/cpp/benders/benders_core/BendersBase.cpp b/src/cpp/benders/benders_core/BendersBase.cpp index 408c260d0..2ef266243 100644 --- a/src/cpp/benders/benders_core/BendersBase.cpp +++ b/src/cpp/benders/benders_core/BendersBase.cpp @@ -1,15 +1,15 @@ -#include "BendersBase.h" +#include "antares-xpansion/benders/benders_core/BendersBase.h" #include #include #include #include -#include "LastIterationPrinter.h" -#include "LastIterationReader.h" -#include "LastIterationWriter.h" -#include "LogUtils.h" -#include "solver_utils.h" +#include "antares-xpansion/benders/benders_core/LastIterationPrinter.h" +#include "antares-xpansion/benders/benders_core/LastIterationReader.h" +#include "antares-xpansion/benders/benders_core/LastIterationWriter.h" +#include "antares-xpansion/xpansion_interfaces/LogUtils.h" +#include "antares-xpansion/helpers/solver_utils.h" BendersBase::BendersBase(const BendersBaseOptions &options, Logger logger, Writer writer, diff --git a/src/cpp/benders/benders_core/BendersMathLogger.cpp b/src/cpp/benders/benders_core/BendersMathLogger.cpp index a690501de..3d3186e85 100644 --- a/src/cpp/benders/benders_core/BendersMathLogger.cpp +++ b/src/cpp/benders/benders_core/BendersMathLogger.cpp @@ -1,10 +1,10 @@ -#include "BendersMathLogger.h" +#include "antares-xpansion/benders/benders_core/BendersMathLogger.h" #include #include -#include "LogUtils.h" -#include "LoggerUtils.h" +#include "antares-xpansion/xpansion_interfaces/LogUtils.h" +#include "antares-xpansion/helpers/LoggerUtils.h" HeadersManager::HeadersManager(HEADERSTYPE type, const BENDERSMETHOD& method) : type_(type), method_(method) {} diff --git a/src/cpp/benders/benders_core/BendersStructsDatas.cpp b/src/cpp/benders/benders_core/BendersStructsDatas.cpp index 9b5e8dc8a..50e2a8b17 100644 --- a/src/cpp/benders/benders_core/BendersStructsDatas.cpp +++ b/src/cpp/benders/benders_core/BendersStructsDatas.cpp @@ -1,4 +1,4 @@ -#include "BendersStructsDatas.h" +#include "antares-xpansion/benders/benders_core/BendersStructsDatas.h" /*! * \brief Get point diff --git a/src/cpp/benders/benders_core/CMakeLists.txt b/src/cpp/benders/benders_core/CMakeLists.txt index 0d42d842a..c2cec7274 100644 --- a/src/cpp/benders/benders_core/CMakeLists.txt +++ b/src/cpp/benders/benders_core/CMakeLists.txt @@ -6,35 +6,56 @@ # Targets # =========================================================================== -add_library (benders_core STATIC - ${CMAKE_CURRENT_SOURCE_DIR}/SubproblemWorker.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/SimulationOptions.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/BendersBase.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/WorkerMaster.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/common.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/BendersStructsDatas.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/Worker.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/LastIterationWriter.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/LastIterationReader.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/LastIterationPrinter.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/StartUp.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/BendersMathLogger.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/MasterUpdateBase.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/CutsManagement.cpp +add_library(benders_core) +target_sources(benders_core PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/BendersBase.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/BendersMathLogger.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/BendersStructsDatas.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/CutsManagement.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/LastIterationPrinter.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/LastIterationReader.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/LastIterationWriter.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/MasterUpdateBase.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/SimulationOptions.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/StartUp.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/SubproblemWorker.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/Worker.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/WorkerMaster.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/common.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/benders/benders_core/BendersBase.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/benders/benders_core/BendersMathLogger.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/benders/benders_core/BendersStructsDatas.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/benders/benders_core/CustomVector.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/benders/benders_core/CutsManagement.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/benders/benders_core/LastIterationPrinter.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/benders/benders_core/LastIterationReader.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/benders/benders_core/LastIterationWriter.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/benders/benders_core/MasterUpdate.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/benders/benders_core/SimulationOptions.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/benders/benders_core/StartUp.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/benders/benders_core/SubproblemWorker.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/benders/benders_core/Worker.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/benders/benders_core/WorkerMaster.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/benders/benders_core/common.h +) - ) +add_library(antaresXpansion::benders_core ALIAS benders_core) -target_include_directories (benders_core - PUBLIC - ${CMAKE_CURRENT_SOURCE_DIR}/include +target_include_directories(benders_core + PUBLIC + $ ) -target_link_libraries (benders_core - PUBLIC - helpers - output_core - solvers - ${JSONCPP_LIB} - outer_loop_lib +target_link_libraries(benders_core + PUBLIC + antaresXpansion::helpers + antaresXpansion::output_core + antaresXpansion::solvers + ${JSONCPP_LIB} + antaresXpansion::outer_loop_lib ) + +install(DIRECTORY include/antares-xpansion + DESTINATION "include" +) \ No newline at end of file diff --git a/src/cpp/benders/benders_core/CutsManagement.cpp b/src/cpp/benders/benders_core/CutsManagement.cpp index 17ca06db8..41df8cdea 100644 --- a/src/cpp/benders/benders_core/CutsManagement.cpp +++ b/src/cpp/benders/benders_core/CutsManagement.cpp @@ -1,4 +1,4 @@ -#include "CutsManagement.h" +#include "antares-xpansion/benders/benders_core/CutsManagement.h" using namespace Outerloop; diff --git a/src/cpp/benders/benders_core/LastIterationPrinter.cpp b/src/cpp/benders/benders_core/LastIterationPrinter.cpp index 928f3b189..fdabb45e9 100644 --- a/src/cpp/benders/benders_core/LastIterationPrinter.cpp +++ b/src/cpp/benders/benders_core/LastIterationPrinter.cpp @@ -1,4 +1,4 @@ -#include "LastIterationPrinter.h" +#include "antares-xpansion/benders/benders_core/LastIterationPrinter.h" #include diff --git a/src/cpp/benders/benders_core/LastIterationReader.cpp b/src/cpp/benders/benders_core/LastIterationReader.cpp index 466fbfc8e..6256bff4b 100644 --- a/src/cpp/benders/benders_core/LastIterationReader.cpp +++ b/src/cpp/benders/benders_core/LastIterationReader.cpp @@ -1,10 +1,10 @@ -#include "LastIterationReader.h" +#include "antares-xpansion/benders/benders_core/LastIterationReader.h" #include #include -#include "common.h" +#include "antares-xpansion/benders/benders_core/common.h" LastIterationReader::LastIterationReader( const std::filesystem::path& last_iteration_file) diff --git a/src/cpp/benders/benders_core/LastIterationWriter.cpp b/src/cpp/benders/benders_core/LastIterationWriter.cpp index 144b5ca2c..74e8d9e38 100644 --- a/src/cpp/benders/benders_core/LastIterationWriter.cpp +++ b/src/cpp/benders/benders_core/LastIterationWriter.cpp @@ -1,4 +1,4 @@ -#include "LastIterationWriter.h" +#include "antares-xpansion/benders/benders_core/LastIterationWriter.h" #include #include diff --git a/src/cpp/benders/benders_core/MasterUpdateBase.cpp b/src/cpp/benders/benders_core/MasterUpdateBase.cpp index 0873b2a09..82cb7bf5b 100644 --- a/src/cpp/benders/benders_core/MasterUpdateBase.cpp +++ b/src/cpp/benders/benders_core/MasterUpdateBase.cpp @@ -1,6 +1,6 @@ #include -#include "MasterUpdate.h" +#include "antares-xpansion/benders/benders_core/MasterUpdate.h" using namespace Outerloop; diff --git a/src/cpp/benders/benders_core/SimulationOptions.cpp b/src/cpp/benders/benders_core/SimulationOptions.cpp index 9a3ea03a2..39b8386a0 100644 --- a/src/cpp/benders/benders_core/SimulationOptions.cpp +++ b/src/cpp/benders/benders_core/SimulationOptions.cpp @@ -1,10 +1,10 @@ -#include "SimulationOptions.h" +#include "antares-xpansion/benders/benders_core/SimulationOptions.h" #include #include -#include "LogUtils.h" +#include "antares-xpansion/xpansion_interfaces/LogUtils.h" Json::Value SimulationOptions::get_value_from_json( const std::filesystem::path &file_name) { Json::Value _input; @@ -28,7 +28,7 @@ SimulationOptions::SimulationOptions() #define BENDERS_OPTIONS_MACRO(name__, type__, default__, \ deserialization_method__) \ name__(default__), -#include "SimulationOptions.hxx" +#include "antares-xpansion/benders/benders_core/SimulationOptions.hxx" #undef BENDERS_OPTIONS_MACRO _weights() { } @@ -64,7 +64,7 @@ void SimulationOptions::read(const std::filesystem::path &file_name) { deserialization_method__) \ if (#var__ == var_name) \ var__ = options_values[var_name].deserialization_method__; -#include "SimulationOptions.hxx" +#include "antares-xpansion/benders/benders_core/SimulationOptions.hxx" #undef BENDERS_OPTIONS_MACRO } set_weights(); @@ -116,7 +116,7 @@ void SimulationOptions::print(std::ostream &stream) const { #define BENDERS_OPTIONS_MACRO(name__, type__, default__, \ deserialization_method__) \ stream << std::setw(30) << #name__ << std::setw(50)< #include "BendersStructsDatas.h" -#include "ILogger.h" +#include "antares-xpansion/xpansion_interfaces/ILogger.h" #include "common.h" const std::string MATHLOGGERCONTEXT = "Benders"; diff --git a/src/cpp/benders/benders_core/include/BendersStructsDatas.h b/src/cpp/benders/benders_core/include/antares-xpansion/benders/benders_core/BendersStructsDatas.h similarity index 97% rename from src/cpp/benders/benders_core/include/BendersStructsDatas.h rename to src/cpp/benders/benders_core/include/antares-xpansion/benders/benders_core/BendersStructsDatas.h index cd8157365..5aba0ec6e 100644 --- a/src/cpp/benders/benders_core/include/BendersStructsDatas.h +++ b/src/cpp/benders/benders_core/include/antares-xpansion/benders/benders_core/BendersStructsDatas.h @@ -1,6 +1,6 @@ #pragma once -#include "ILogger.h" +#include "antares-xpansion/xpansion_interfaces/ILogger.h" #include "SubproblemCut.h" #include "Worker.h" #include "common.h" diff --git a/src/cpp/benders/benders_core/include/CustomVector.h b/src/cpp/benders/benders_core/include/antares-xpansion/benders/benders_core/CustomVector.h similarity index 100% rename from src/cpp/benders/benders_core/include/CustomVector.h rename to src/cpp/benders/benders_core/include/antares-xpansion/benders/benders_core/CustomVector.h diff --git a/src/cpp/benders/benders_core/include/CutsManagement.h b/src/cpp/benders/benders_core/include/antares-xpansion/benders/benders_core/CutsManagement.h similarity index 100% rename from src/cpp/benders/benders_core/include/CutsManagement.h rename to src/cpp/benders/benders_core/include/antares-xpansion/benders/benders_core/CutsManagement.h diff --git a/src/cpp/benders/benders_core/include/LastIterationPrinter.h b/src/cpp/benders/benders_core/include/antares-xpansion/benders/benders_core/LastIterationPrinter.h similarity index 87% rename from src/cpp/benders/benders_core/include/LastIterationPrinter.h rename to src/cpp/benders/benders_core/include/antares-xpansion/benders/benders_core/LastIterationPrinter.h index e12e13f5c..79c443918 100644 --- a/src/cpp/benders/benders_core/include/LastIterationPrinter.h +++ b/src/cpp/benders/benders_core/include/antares-xpansion/benders/benders_core/LastIterationPrinter.h @@ -1,5 +1,5 @@ #ifndef __LASTITERATIONPRINTER_H__ -#include "ILogger.h" +#include "antares-xpansion/xpansion_interfaces/ILogger.h" class LastIterationPrinter { public: diff --git a/src/cpp/benders/benders_core/include/LastIterationReader.h b/src/cpp/benders/benders_core/include/antares-xpansion/benders/benders_core/LastIterationReader.h similarity index 90% rename from src/cpp/benders/benders_core/include/LastIterationReader.h rename to src/cpp/benders/benders_core/include/antares-xpansion/benders/benders_core/LastIterationReader.h index 43673fb44..aa492db17 100644 --- a/src/cpp/benders/benders_core/include/LastIterationReader.h +++ b/src/cpp/benders/benders_core/include/antares-xpansion/benders/benders_core/LastIterationReader.h @@ -3,7 +3,7 @@ #include -#include "ILogger.h" +#include "antares-xpansion/xpansion_interfaces/ILogger.h" class LastIterationReader { public: diff --git a/src/cpp/benders/benders_core/include/LastIterationWriter.h b/src/cpp/benders/benders_core/include/antares-xpansion/benders/benders_core/LastIterationWriter.h similarity index 92% rename from src/cpp/benders/benders_core/include/LastIterationWriter.h rename to src/cpp/benders/benders_core/include/antares-xpansion/benders/benders_core/LastIterationWriter.h index f685cadeb..ec4ef39f5 100644 --- a/src/cpp/benders/benders_core/include/LastIterationWriter.h +++ b/src/cpp/benders/benders_core/include/antares-xpansion/benders/benders_core/LastIterationWriter.h @@ -4,7 +4,7 @@ #include -#include "ILogger.h" +#include "antares-xpansion/xpansion_interfaces/ILogger.h" class LastIterationWriter { public: explicit LastIterationWriter(const std::filesystem::path &last_iteration_file) diff --git a/src/cpp/benders/benders_core/include/MasterUpdate.h b/src/cpp/benders/benders_core/include/antares-xpansion/benders/benders_core/MasterUpdate.h similarity index 94% rename from src/cpp/benders/benders_core/include/MasterUpdate.h rename to src/cpp/benders/benders_core/include/antares-xpansion/benders/benders_core/MasterUpdate.h index 8ac156ab4..f221c4f09 100644 --- a/src/cpp/benders/benders_core/include/MasterUpdate.h +++ b/src/cpp/benders/benders_core/include/antares-xpansion/benders/benders_core/MasterUpdate.h @@ -1,6 +1,6 @@ #pragma once #include "BendersBase.h" -#include "IMasterUpdate.h" +#include "antares-xpansion/benders/outer_loop/IMasterUpdate.h" #include "common.h" namespace Outerloop { diff --git a/src/cpp/benders/benders_core/include/SimulationOptions.h b/src/cpp/benders/benders_core/include/antares-xpansion/benders/benders_core/SimulationOptions.h similarity index 100% rename from src/cpp/benders/benders_core/include/SimulationOptions.h rename to src/cpp/benders/benders_core/include/antares-xpansion/benders/benders_core/SimulationOptions.h diff --git a/src/cpp/benders/benders_core/include/SimulationOptions.hxx b/src/cpp/benders/benders_core/include/antares-xpansion/benders/benders_core/SimulationOptions.hxx similarity index 100% rename from src/cpp/benders/benders_core/include/SimulationOptions.hxx rename to src/cpp/benders/benders_core/include/antares-xpansion/benders/benders_core/SimulationOptions.hxx diff --git a/src/cpp/benders/benders_core/include/StartUp.h b/src/cpp/benders/benders_core/include/antares-xpansion/benders/benders_core/StartUp.h similarity index 74% rename from src/cpp/benders/benders_core/include/StartUp.h rename to src/cpp/benders/benders_core/include/antares-xpansion/benders/benders_core/StartUp.h index 8013b4441..9eaa69eb5 100644 --- a/src/cpp/benders/benders_core/include/StartUp.h +++ b/src/cpp/benders/benders_core/include/antares-xpansion/benders/benders_core/StartUp.h @@ -4,8 +4,8 @@ #pragma once -#include "ILogger.h" -#include "OutputWriter.h" +#include "antares-xpansion/xpansion_interfaces/ILogger.h" +#include "antares-xpansion/xpansion_interfaces/OutputWriter.h" #include "SimulationOptions.h" namespace Benders { diff --git a/src/cpp/benders/benders_core/include/SubproblemCut.h b/src/cpp/benders/benders_core/include/antares-xpansion/benders/benders_core/SubproblemCut.h similarity index 100% rename from src/cpp/benders/benders_core/include/SubproblemCut.h rename to src/cpp/benders/benders_core/include/antares-xpansion/benders/benders_core/SubproblemCut.h diff --git a/src/cpp/benders/benders_core/include/SubproblemWorker.h b/src/cpp/benders/benders_core/include/antares-xpansion/benders/benders_core/SubproblemWorker.h similarity index 100% rename from src/cpp/benders/benders_core/include/SubproblemWorker.h rename to src/cpp/benders/benders_core/include/antares-xpansion/benders/benders_core/SubproblemWorker.h diff --git a/src/cpp/benders/benders_core/include/Worker.h b/src/cpp/benders/benders_core/include/antares-xpansion/benders/benders_core/Worker.h similarity index 91% rename from src/cpp/benders/benders_core/include/Worker.h rename to src/cpp/benders/benders_core/include/antares-xpansion/benders/benders_core/Worker.h index 4fdff708e..ee0471cbf 100644 --- a/src/cpp/benders/benders_core/include/Worker.h +++ b/src/cpp/benders/benders_core/include/antares-xpansion/benders/benders_core/Worker.h @@ -2,10 +2,10 @@ #include -#include "ILogger.h" -#include "OutputWriter.h" +#include "antares-xpansion/xpansion_interfaces/ILogger.h" +#include "antares-xpansion/xpansion_interfaces/OutputWriter.h" #include "common.h" -#include "multisolver_interface/Solver.h" +#include "antares-xpansion/multisolver_interface/Solver.h" class Worker; typedef std::shared_ptr WorkerPtr; diff --git a/src/cpp/benders/benders_core/include/WorkerMaster.h b/src/cpp/benders/benders_core/include/antares-xpansion/benders/benders_core/WorkerMaster.h similarity index 100% rename from src/cpp/benders/benders_core/include/WorkerMaster.h rename to src/cpp/benders/benders_core/include/antares-xpansion/benders/benders_core/WorkerMaster.h diff --git a/src/cpp/benders/benders_core/include/common.h b/src/cpp/benders/benders_core/include/antares-xpansion/benders/benders_core/common.h similarity index 100% rename from src/cpp/benders/benders_core/include/common.h rename to src/cpp/benders/benders_core/include/antares-xpansion/benders/benders_core/common.h diff --git a/src/cpp/benders/benders_mpi/BendersMPI.cpp b/src/cpp/benders/benders_mpi/BendersMPI.cpp index 5db531031..8b2134c97 100644 --- a/src/cpp/benders/benders_mpi/BendersMPI.cpp +++ b/src/cpp/benders/benders_mpi/BendersMPI.cpp @@ -1,11 +1,11 @@ -#include "BendersMPI.h" +#include "antares-xpansion/benders/benders_mpi/BendersMPI.h" #include #include -#include "CriterionComputation.h" -#include "Timer.h" +#include "antares-xpansion/benders/outer_loop/CriterionComputation.h" +#include "antares-xpansion/helpers/Timer.h" BendersMpi::BendersMpi(BendersBaseOptions const &options, Logger logger, Writer writer, mpi::environment &env, diff --git a/src/cpp/benders/benders_mpi/BendersMpiOuterLoop.cpp b/src/cpp/benders/benders_mpi/BendersMpiOuterLoop.cpp index 9284c2de6..6dc541554 100644 --- a/src/cpp/benders/benders_mpi/BendersMpiOuterLoop.cpp +++ b/src/cpp/benders/benders_mpi/BendersMpiOuterLoop.cpp @@ -1,6 +1,6 @@ -#include "BendersMpiOuterLoop.h" +#include "antares-xpansion/benders/benders_mpi/BendersMpiOuterLoop.h" -#include "CustomVector.h" +#include "antares-xpansion/benders/benders_core/CustomVector.h" namespace Outerloop { void BendersMpiOuterLoop::SolveSubproblem( diff --git a/src/cpp/benders/benders_mpi/CMakeLists.txt b/src/cpp/benders/benders_mpi/CMakeLists.txt index 1308c0703..828ac9d12 100644 --- a/src/cpp/benders/benders_mpi/CMakeLists.txt +++ b/src/cpp/benders/benders_mpi/CMakeLists.txt @@ -17,34 +17,38 @@ if (UNIX) set(CMAKE_CXX_COMPILER ${MPI_CXX_COMPILER}) endif () -add_library(benders_mpi_core STATIC - ${CMAKE_CURRENT_SOURCE_DIR}/common_mpi.cpp +add_library(benders_mpi_core) + +target_sources(benders_mpi_core PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/BendersMPI.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/OuterLoopBenders.cpp ${CMAKE_CURRENT_SOURCE_DIR}/BendersMpiOuterLoop.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/OuterLoopBenders.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/common_mpi.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/benders/benders_mpi/BendersMPI.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/benders/benders_mpi/BendersMpiOuterLoop.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/benders/benders_mpi/OuterLoopBenders.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/benders/benders_mpi/common_mpi.h + ) target_link_libraries(benders_mpi_core PUBLIC - benders_core - benders_sequential_core - output_core + antaresXpansion::benders_core + antaresXpansion::benders_sequential_core + antaresXpansion::output_core Boost::mpi MPI::MPI_C ${PROJECT_NAME}::factories - logger_lib + antaresXpansion::logger_lib Boost::serialization ) -#if (WIN32) -# target_link_libraries (benders_mpi_core PUBLIC ${MPI_C_LIBRARIES}) -#endif () - target_include_directories(benders_mpi_core - # PUBLIC ${MPI_C_INCLUDE_DIRS} PUBLIC - ${CMAKE_CURRENT_SOURCE_DIR}/include - INTERFACE ${CMAKE_CURRENT_SOURCE_DIR} + $ ) add_library(${PROJECT_NAME}::benders_mpi_core ALIAS benders_mpi_core) +install(DIRECTORY include/antares-xpansion + DESTINATION "include" +) diff --git a/src/cpp/benders/benders_mpi/OuterLoopBenders.cpp b/src/cpp/benders/benders_mpi/OuterLoopBenders.cpp index a97bf66d8..a21366e5a 100644 --- a/src/cpp/benders/benders_mpi/OuterLoopBenders.cpp +++ b/src/cpp/benders/benders_mpi/OuterLoopBenders.cpp @@ -1,4 +1,4 @@ -#include "OuterLoopBenders.h" +#include "antares-xpansion/benders/benders_mpi/OuterLoopBenders.h" namespace Outerloop { OuterLoopBenders::OuterLoopBenders( diff --git a/src/cpp/benders/benders_mpi/include/BendersMPI.h b/src/cpp/benders/benders_mpi/include/antares-xpansion/benders/benders_mpi/BendersMPI.h similarity index 81% rename from src/cpp/benders/benders_mpi/include/BendersMPI.h rename to src/cpp/benders/benders_mpi/include/antares-xpansion/benders/benders_mpi/BendersMPI.h index 383b840ce..022b2cc08 100644 --- a/src/cpp/benders/benders_mpi/include/BendersMPI.h +++ b/src/cpp/benders/benders_mpi/include/antares-xpansion/benders/benders_mpi/BendersMPI.h @@ -1,15 +1,15 @@ #pragma once -#include "ArchiveReader.h" -#include "BendersBase.h" -#include "BendersStructsDatas.h" -#include "ILogger.h" -#include "LoggerUtils.h" -#include "SubproblemCut.h" -#include "SubproblemWorker.h" -#include "Timer.h" -#include "Worker.h" -#include "WorkerMaster.h" +#include "antares-xpansion/helpers/ArchiveReader.h" +#include "antares-xpansion/benders/benders_core/BendersBase.h" +#include "antares-xpansion/benders/benders_core/BendersStructsDatas.h" +#include "antares-xpansion/xpansion_interfaces/ILogger.h" +#include "antares-xpansion/helpers/LoggerUtils.h" +#include "antares-xpansion/benders/benders_core/SubproblemCut.h" +#include "antares-xpansion/benders/benders_core/SubproblemWorker.h" +#include "antares-xpansion/helpers/Timer.h" +#include "antares-xpansion/benders/benders_core/Worker.h" +#include "antares-xpansion/benders/benders_core/WorkerMaster.h" #include "common_mpi.h" /*! diff --git a/src/cpp/benders/benders_mpi/include/BendersMpiOuterLoop.h b/src/cpp/benders/benders_mpi/include/antares-xpansion/benders/benders_mpi/BendersMpiOuterLoop.h similarity index 94% rename from src/cpp/benders/benders_mpi/include/BendersMpiOuterLoop.h rename to src/cpp/benders/benders_mpi/include/antares-xpansion/benders/benders_mpi/BendersMpiOuterLoop.h index 1c1e2f96f..f84ba0489 100644 --- a/src/cpp/benders/benders_mpi/include/BendersMpiOuterLoop.h +++ b/src/cpp/benders/benders_mpi/include/antares-xpansion/benders/benders_mpi/BendersMpiOuterLoop.h @@ -1,6 +1,6 @@ #pragma once #include "BendersMPI.h" -#include "CriterionComputation.h" +#include "antares-xpansion/benders/outer_loop/CriterionComputation.h" namespace Outerloop { class BendersMpiOuterLoop : public BendersMpi { diff --git a/src/cpp/benders/benders_mpi/include/OuterLoopBenders.h b/src/cpp/benders/benders_mpi/include/antares-xpansion/benders/benders_mpi/OuterLoopBenders.h similarity index 83% rename from src/cpp/benders/benders_mpi/include/OuterLoopBenders.h rename to src/cpp/benders/benders_mpi/include/antares-xpansion/benders/benders_mpi/OuterLoopBenders.h index 668765669..8bd090d74 100644 --- a/src/cpp/benders/benders_mpi/include/OuterLoopBenders.h +++ b/src/cpp/benders/benders_mpi/include/antares-xpansion/benders/benders_mpi/OuterLoopBenders.h @@ -1,8 +1,8 @@ #pragma once -#include "BendersBase.h" -#include "CutsManagement.h" -#include "IMasterUpdate.h" -#include "OuterLoop.h" +#include "antares-xpansion/benders/benders_core/BendersBase.h" +#include "antares-xpansion/benders/benders_core/CutsManagement.h" +#include "antares-xpansion/benders/outer_loop/IMasterUpdate.h" +#include "antares-xpansion/benders/outer_loop/OuterLoop.h" #include "common_mpi.h" namespace Outerloop { diff --git a/src/cpp/benders/benders_mpi/include/common_mpi.h b/src/cpp/benders/benders_mpi/include/antares-xpansion/benders/benders_mpi/common_mpi.h similarity index 88% rename from src/cpp/benders/benders_mpi/include/common_mpi.h rename to src/cpp/benders/benders_mpi/include/antares-xpansion/benders/benders_mpi/common_mpi.h index 88476c5cd..dde20739a 100644 --- a/src/cpp/benders/benders_mpi/include/common_mpi.h +++ b/src/cpp/benders/benders_mpi/include/antares-xpansion/benders/benders_mpi/common_mpi.h @@ -12,6 +12,6 @@ #include #include -#include "common.h" +#include "antares-xpansion/benders/benders_core/common.h" namespace mpi = boost::mpi; diff --git a/src/cpp/benders/benders_sequential/BendersSequential.cpp b/src/cpp/benders/benders_sequential/BendersSequential.cpp index 45ec76e11..060e6b238 100644 --- a/src/cpp/benders/benders_sequential/BendersSequential.cpp +++ b/src/cpp/benders/benders_sequential/BendersSequential.cpp @@ -1,12 +1,12 @@ -#include "BendersSequential.h" +#include "antares-xpansion/benders/benders_sequential/BendersSequential.h" #include #include #include -#include "Timer.h" +#include "antares-xpansion/helpers/Timer.h" -#include "solver_utils.h" +#include "antares-xpansion/helpers/solver_utils.h" /*! * \brief Constructor of class BendersSequential diff --git a/src/cpp/benders/benders_sequential/CMakeLists.txt b/src/cpp/benders/benders_sequential/CMakeLists.txt index 2631efc44..1a17dc239 100644 --- a/src/cpp/benders/benders_sequential/CMakeLists.txt +++ b/src/cpp/benders/benders_sequential/CMakeLists.txt @@ -6,26 +6,30 @@ # Targets # =========================================================================== -add_library (benders_sequential_core STATIC - ${CMAKE_CURRENT_SOURCE_DIR}/BendersSequential.cpp - ) - -target_include_directories (benders_sequential_core - PUBLIC - ${CMAKE_CURRENT_SOURCE_DIR}/include - PUBLIC - ${CMAKE_CURRENT_SOURCE_DIR} +add_library(benders_sequential_core) + +target_sources(benders_sequential_core PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/BendersSequential.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/benders/benders_sequential/BendersSequential.h +) + +target_include_directories(benders_sequential_core + PUBLIC + $ ) -target_link_libraries (benders_sequential_core - PUBLIC - benders_core - helpers - output_core - solvers - ${PROJECT_NAME}::factories +target_link_libraries(benders_sequential_core + PUBLIC + antaresXpansion::benders_core + antaresXpansion::helpers + antaresXpansion::output_core + antaresXpansion::solvers + ${PROJECT_NAME}::factories ) -add_library (${PROJECT_NAME}::benders_sequential_core ALIAS benders_sequential_core) \ No newline at end of file +add_library(${PROJECT_NAME}::benders_sequential_core ALIAS benders_sequential_core) +install(DIRECTORY include/antares-xpansion + DESTINATION "include" +) \ No newline at end of file diff --git a/src/cpp/benders/benders_sequential/include/BendersSequential.h b/src/cpp/benders/benders_sequential/include/antares-xpansion/benders/benders_sequential/BendersSequential.h similarity index 74% rename from src/cpp/benders/benders_sequential/include/BendersSequential.h rename to src/cpp/benders/benders_sequential/include/antares-xpansion/benders/benders_sequential/BendersSequential.h index f15435970..e2d7d6a67 100644 --- a/src/cpp/benders/benders_sequential/include/BendersSequential.h +++ b/src/cpp/benders/benders_sequential/include/antares-xpansion/benders/benders_sequential/BendersSequential.h @@ -1,9 +1,9 @@ #pragma once -#include "ArchiveReader.h" -#include "BendersBase.h" -#include "ILogger.h" -#include "common.h" +#include "antares-xpansion/helpers/ArchiveReader.h" +#include "antares-xpansion/benders/benders_core/BendersBase.h" +#include "antares-xpansion/xpansion_interfaces/ILogger.h" +#include "antares-xpansion/benders/benders_core/common.h" /*! * \class BendersSequential diff --git a/src/cpp/benders/factories/BendersFactory.cpp b/src/cpp/benders/factories/BendersFactory.cpp index f099eb839..7eaf510df 100644 --- a/src/cpp/benders/factories/BendersFactory.cpp +++ b/src/cpp/benders/factories/BendersFactory.cpp @@ -1,21 +1,21 @@ -#include "BendersFactory.h" +#include "antares-xpansion/benders/factories/BendersFactory.h" #include -#include "BendersByBatch.h" -#include "BendersMpiOuterLoop.h" -#include "BendersSequential.h" -#include "ILogger.h" -#include "LogUtils.h" -#include "LoggerFactories.h" -#include "MasterUpdate.h" -#include "OuterLoopBenders.h" -#include "OutputWriter.h" -#include "StartUp.h" -#include "Timer.h" -#include "Worker.h" -#include "WriterFactories.h" +#include "antares-xpansion/benders/benders_by_batch/BendersByBatch.h" +#include "antares-xpansion/benders/benders_mpi/BendersMpiOuterLoop.h" +#include "antares-xpansion/benders/benders_sequential/BendersSequential.h" +#include "antares-xpansion/xpansion_interfaces/ILogger.h" +#include "antares-xpansion/xpansion_interfaces/LogUtils.h" +#include "antares-xpansion/benders/factories/LoggerFactories.h" +#include "antares-xpansion/benders/benders_core/MasterUpdate.h" +#include "antares-xpansion/benders/benders_mpi/OuterLoopBenders.h" +#include "antares-xpansion/xpansion_interfaces/OutputWriter.h" +#include "antares-xpansion/benders/benders_core/StartUp.h" +#include "antares-xpansion/helpers/Timer.h" +#include "antares-xpansion/benders/benders_core/Worker.h" +#include "antares-xpansion/benders/factories/WriterFactories.h" BENDERSMETHOD DeduceBendersMethod(size_t coupling_map_size, size_t batch_size, bool external_loop) { diff --git a/src/cpp/benders/factories/CMakeLists.txt b/src/cpp/benders/factories/CMakeLists.txt index 14486d5d2..f9c9d367f 100644 --- a/src/cpp/benders/factories/CMakeLists.txt +++ b/src/cpp/benders/factories/CMakeLists.txt @@ -1,23 +1,30 @@ -add_library (factories - WriterFactories.cpp - LoggerFactories.cpp +add_library(factories) +target_sources(factories PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/benders/factories/BendersFactory.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/benders/factories/LoggerFactories.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/benders/factories/WriterFactories.h BendersFactory.cpp - ) + LoggerFactories.cpp + WriterFactories.cpp +) -target_link_libraries (factories +target_link_libraries(factories PUBLIC - benders_core - benders_sequential_core - benders_by_batch_core - output_core - logger_lib + antaresXpansion::benders_core + antaresXpansion::benders_sequential_core + antaresXpansion::benders_by_batch_core + antaresXpansion::output_core + antaresXpansion::logger_lib ${PROJECT_NAME}::benders_mpi_core - outer_loop_lib - ) + antaresXpansion::outer_loop_lib +) -target_include_directories (factories +target_include_directories(factories PUBLIC - ${CMAKE_CURRENT_SOURCE_DIR}/include - ) + $ +) -add_library (${PROJECT_NAME}::factories ALIAS factories) \ No newline at end of file +add_library(${PROJECT_NAME}::factories ALIAS factories) +install(DIRECTORY include/antares-xpansion + DESTINATION "include" +) \ No newline at end of file diff --git a/src/cpp/benders/factories/LoggerFactories.cpp b/src/cpp/benders/factories/LoggerFactories.cpp index 8b6d69283..89d40fb3e 100644 --- a/src/cpp/benders/factories/LoggerFactories.cpp +++ b/src/cpp/benders/factories/LoggerFactories.cpp @@ -1,8 +1,8 @@ -#include "LoggerFactories.h" +#include "antares-xpansion/benders/factories/LoggerFactories.h" -#include "logger/Master.h" -#include "logger/UserFile.h" +#include "antares-xpansion/benders/logger/Master.h" +#include "antares-xpansion/benders/logger/UserFile.h" Logger build_void_logger() { Logger logger = std::make_shared(); diff --git a/src/cpp/benders/factories/WriterFactories.cpp b/src/cpp/benders/factories/WriterFactories.cpp index 8e8eeb4db..054adcf69 100644 --- a/src/cpp/benders/factories/WriterFactories.cpp +++ b/src/cpp/benders/factories/WriterFactories.cpp @@ -1,11 +1,11 @@ -#include "WriterFactories.h" +#include "antares-xpansion/benders/factories/WriterFactories.h" -#include "JsonWriter.h" -#include "OutputWriter.h" -#include "VoidWriter.h" -#include "common.h" +#include "antares-xpansion/benders/output/JsonWriter.h" +#include "antares-xpansion/xpansion_interfaces/OutputWriter.h" +#include "antares-xpansion/benders/output/VoidWriter.h" +#include "antares-xpansion/benders/benders_core/common.h" Writer build_void_writer() { return std::make_shared(); } diff --git a/src/cpp/benders/factories/include/BendersFactory.h b/src/cpp/benders/factories/include/antares-xpansion/benders/factories/BendersFactory.h similarity index 87% rename from src/cpp/benders/factories/include/BendersFactory.h rename to src/cpp/benders/factories/include/antares-xpansion/benders/factories/BendersFactory.h index f1eeeb94c..ff3e2f762 100644 --- a/src/cpp/benders/factories/include/BendersFactory.h +++ b/src/cpp/benders/factories/include/antares-xpansion/benders/factories/BendersFactory.h @@ -1,8 +1,8 @@ #ifndef ANTARES_XPANSION_SRC_CPP_BENDERS_FACTORIES_INCLUDE_BENDERSFACTORY_H #define ANTARES_XPANSION_SRC_CPP_BENDERS_FACTORIES_INCLUDE_BENDERSFACTORY_H -#include "BendersMPI.h" -#include "CriterionComputation.h" -#include "common.h" +#include "antares-xpansion/benders/benders_mpi/BendersMPI.h" +#include "antares-xpansion/benders/outer_loop/CriterionComputation.h" +#include "antares-xpansion/benders/benders_core/common.h" class BendersMainFactory { private: diff --git a/src/cpp/benders/factories/include/LoggerFactories.h b/src/cpp/benders/factories/include/antares-xpansion/benders/factories/LoggerFactories.h similarity index 86% rename from src/cpp/benders/factories/include/LoggerFactories.h rename to src/cpp/benders/factories/include/antares-xpansion/benders/factories/LoggerFactories.h index 82008a28d..2b9612e33 100644 --- a/src/cpp/benders/factories/include/LoggerFactories.h +++ b/src/cpp/benders/factories/include/antares-xpansion/benders/factories/LoggerFactories.h @@ -5,11 +5,11 @@ #include #include "BendersFactory.h" -#include "ILogger.h" -#include "SimulationOptions.h" -#include "logger/Master.h" -#include "logger/MathLogger.h" -#include "logger/UserFile.h" +#include "antares-xpansion/xpansion_interfaces/ILogger.h" +#include "antares-xpansion/benders/benders_core/SimulationOptions.h" +#include "antares-xpansion/benders/logger/Master.h" +#include "antares-xpansion/benders/logger/MathLogger.h" +#include "antares-xpansion/benders/logger/UserFile.h" Logger build_void_logger(); std::ostringstream start_message(const SimulationOptions &options, diff --git a/src/cpp/benders/factories/include/WriterFactories.h b/src/cpp/benders/factories/include/antares-xpansion/benders/factories/WriterFactories.h similarity index 83% rename from src/cpp/benders/factories/include/WriterFactories.h rename to src/cpp/benders/factories/include/antares-xpansion/benders/factories/WriterFactories.h index 80987f6ca..16778630e 100644 --- a/src/cpp/benders/factories/include/WriterFactories.h +++ b/src/cpp/benders/factories/include/antares-xpansion/benders/factories/WriterFactories.h @@ -5,7 +5,7 @@ #include #include -#include "OutputWriter.h" +#include "antares-xpansion/xpansion_interfaces/OutputWriter.h" Writer build_void_writer(); diff --git a/src/cpp/benders/logger/CMakeLists.txt b/src/cpp/benders/logger/CMakeLists.txt index d322c811a..7e18b004c 100644 --- a/src/cpp/benders/logger/CMakeLists.txt +++ b/src/cpp/benders/logger/CMakeLists.txt @@ -1,19 +1,33 @@ +add_library (logger_lib) - -add_library (logger_lib +target_sources(logger_lib PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/benders/logger/CandidateLog.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/benders/logger/Commons.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/benders/logger/IterationResultLog.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/benders/logger/Master.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/benders/logger/User.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/benders/logger/User.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/benders/logger/UserFile.h + CandidateLog.cpp + IterationResultLog.cpp Master.cpp + MathLogger.cpp User.cpp UserFile.cpp - CandidateLog.cpp - IterationResultLog.cpp - MathLogger.cpp ) +) + +add_library(antaresXpansion::logger_lib ALIAS logger_lib) target_link_libraries (logger_lib PUBLIC - benders_core + antaresXpansion::benders_core ) target_include_directories (logger_lib PUBLIC - ${CMAKE_CURRENT_SOURCE_DIR}/include + $ ) + +install(DIRECTORY include/antares-xpansion + DESTINATION "include" +) \ No newline at end of file diff --git a/src/cpp/benders/logger/CandidateLog.cpp b/src/cpp/benders/logger/CandidateLog.cpp index 176fecd44..ad7762161 100644 --- a/src/cpp/benders/logger/CandidateLog.cpp +++ b/src/cpp/benders/logger/CandidateLog.cpp @@ -1,4 +1,4 @@ -#include "CandidateLog.h" +#include "antares-xpansion/benders/logger/CandidateLog.h" #include #include @@ -6,8 +6,7 @@ #include #include -#include "CandidateLog.h" -#include "ILogger.h" +#include "antares-xpansion/xpansion_interfaces/ILogger.h" namespace xpansion { namespace logger { diff --git a/src/cpp/benders/logger/IterationResultLog.cpp b/src/cpp/benders/logger/IterationResultLog.cpp index 518439eff..85f7bfdfa 100644 --- a/src/cpp/benders/logger/IterationResultLog.cpp +++ b/src/cpp/benders/logger/IterationResultLog.cpp @@ -1,4 +1,4 @@ -#include "IterationResultLog.h" +#include "antares-xpansion/benders/logger/IterationResultLog.h" #include #include @@ -6,9 +6,8 @@ #include #include -#include "Commons.h" -#include "ILogger.h" -#include "IterationResultLog.h" +#include "antares-xpansion/benders/logger/Commons.h" +#include "antares-xpansion/xpansion_interfaces/ILogger.h" namespace xpansion { namespace logger { diff --git a/src/cpp/benders/logger/Master.cpp b/src/cpp/benders/logger/Master.cpp index fc0dde8c6..6641f6624 100644 --- a/src/cpp/benders/logger/Master.cpp +++ b/src/cpp/benders/logger/Master.cpp @@ -1,4 +1,4 @@ -#include "logger/Master.h" +#include "antares-xpansion/benders/logger/Master.h" namespace xpansion { namespace logger { diff --git a/src/cpp/benders/logger/MathLogger.cpp b/src/cpp/benders/logger/MathLogger.cpp index b48c5e955..17dcdec82 100644 --- a/src/cpp/benders/logger/MathLogger.cpp +++ b/src/cpp/benders/logger/MathLogger.cpp @@ -1,4 +1,4 @@ -#include "logger/MathLogger.h" +#include "antares-xpansion/benders/logger/MathLogger.h" MathLoggerFile::MathLoggerFile(const BENDERSMETHOD& method, const std::filesystem::path& filename, diff --git a/src/cpp/benders/logger/User.cpp b/src/cpp/benders/logger/User.cpp index 9e1e080dc..438c091e1 100644 --- a/src/cpp/benders/logger/User.cpp +++ b/src/cpp/benders/logger/User.cpp @@ -1,4 +1,4 @@ -#include "logger/User.h" +#include "antares-xpansion/benders/logger/User.h" #include #include @@ -6,11 +6,11 @@ #include #include -#include "CandidateLog.h" -#include "Commons.h" -#include "IterationResultLog.h" -#include "LoggerUtils.h" -#include "Timer.h" +#include "antares-xpansion/benders/logger/CandidateLog.h" +#include "antares-xpansion/benders/logger/Commons.h" +#include "antares-xpansion/benders/logger/IterationResultLog.h" +#include "antares-xpansion/helpers/LoggerUtils.h" +#include "antares-xpansion/helpers/Timer.h" using xpansion::logger::commons::indent_1; namespace xpansion { diff --git a/src/cpp/benders/logger/UserFile.cpp b/src/cpp/benders/logger/UserFile.cpp index 39baf0d6a..963eb5ebc 100644 --- a/src/cpp/benders/logger/UserFile.cpp +++ b/src/cpp/benders/logger/UserFile.cpp @@ -1,4 +1,4 @@ -#include "logger/UserFile.h" +#include "antares-xpansion/benders/logger/UserFile.h" #include #include @@ -6,11 +6,11 @@ #include #include -#include "CandidateLog.h" -#include "Commons.h" -#include "IterationResultLog.h" -#include "LoggerUtils.h" -#include "Timer.h" +#include "antares-xpansion/benders/logger/CandidateLog.h" +#include "antares-xpansion/benders/logger/Commons.h" +#include "antares-xpansion/benders/logger/IterationResultLog.h" +#include "antares-xpansion/helpers/LoggerUtils.h" +#include "antares-xpansion/helpers/Timer.h" using xpansion::logger::commons::indent_1; namespace xpansion { diff --git a/src/cpp/benders/logger/include/CandidateLog.h b/src/cpp/benders/logger/include/antares-xpansion/benders/logger/CandidateLog.h similarity index 95% rename from src/cpp/benders/logger/include/CandidateLog.h rename to src/cpp/benders/logger/include/antares-xpansion/benders/logger/CandidateLog.h index 6e5f39b41..ec5c73e93 100644 --- a/src/cpp/benders/logger/include/CandidateLog.h +++ b/src/cpp/benders/logger/include/antares-xpansion/benders/logger/CandidateLog.h @@ -5,7 +5,7 @@ #include #include "Commons.h" -#include "ILogger.h" +#include "antares-xpansion/xpansion_interfaces/ILogger.h" using xpansion::logger::commons::indent_0; using xpansion::logger::commons::indent_1; diff --git a/src/cpp/benders/logger/include/Commons.h b/src/cpp/benders/logger/include/antares-xpansion/benders/logger/Commons.h similarity index 100% rename from src/cpp/benders/logger/include/Commons.h rename to src/cpp/benders/logger/include/antares-xpansion/benders/logger/Commons.h diff --git a/src/cpp/benders/logger/include/IterationResultLog.h b/src/cpp/benders/logger/include/antares-xpansion/benders/logger/IterationResultLog.h similarity index 95% rename from src/cpp/benders/logger/include/IterationResultLog.h rename to src/cpp/benders/logger/include/antares-xpansion/benders/logger/IterationResultLog.h index 3c23a0a0c..ba0d39b1f 100644 --- a/src/cpp/benders/logger/include/IterationResultLog.h +++ b/src/cpp/benders/logger/include/antares-xpansion/benders/logger/IterationResultLog.h @@ -5,7 +5,7 @@ #include #include "Commons.h" -#include "ILogger.h" +#include "antares-xpansion/xpansion_interfaces/ILogger.h" using xpansion::logger::commons::indent_0; using xpansion::logger::commons::indent_1; diff --git a/src/cpp/benders/logger/include/logger/Master.h b/src/cpp/benders/logger/include/antares-xpansion/benders/logger/Master.h similarity index 97% rename from src/cpp/benders/logger/include/logger/Master.h rename to src/cpp/benders/logger/include/antares-xpansion/benders/logger/Master.h index 2bac75237..e63ee8d7e 100644 --- a/src/cpp/benders/logger/include/logger/Master.h +++ b/src/cpp/benders/logger/include/antares-xpansion/benders/logger/Master.h @@ -10,7 +10,7 @@ #include #include -#include "ILogger.h" +#include "antares-xpansion/xpansion_interfaces/ILogger.h" namespace xpansion { namespace logger { diff --git a/src/cpp/benders/logger/include/logger/MathLogger.h b/src/cpp/benders/logger/include/antares-xpansion/benders/logger/MathLogger.h similarity index 87% rename from src/cpp/benders/logger/include/logger/MathLogger.h rename to src/cpp/benders/logger/include/antares-xpansion/benders/logger/MathLogger.h index 6770edeee..05b9865a9 100644 --- a/src/cpp/benders/logger/include/logger/MathLogger.h +++ b/src/cpp/benders/logger/include/antares-xpansion/benders/logger/MathLogger.h @@ -2,8 +2,8 @@ #pragma once #include -#include "BendersMathLogger.h" -#include "LoggerUtils.h" +#include "antares-xpansion/benders/benders_core/BendersMathLogger.h" +#include "antares-xpansion/helpers/LoggerUtils.h" class MathLoggerFile : public MathLoggerImplementation { public: diff --git a/src/cpp/benders/logger/include/logger/User.h b/src/cpp/benders/logger/include/antares-xpansion/benders/logger/User.h similarity index 96% rename from src/cpp/benders/logger/include/logger/User.h rename to src/cpp/benders/logger/include/antares-xpansion/benders/logger/User.h index a1ca2eca1..f1598d1bd 100644 --- a/src/cpp/benders/logger/include/logger/User.h +++ b/src/cpp/benders/logger/include/antares-xpansion/benders/logger/User.h @@ -7,7 +7,7 @@ #include -#include "ILogger.h" +#include "antares-xpansion/xpansion_interfaces/ILogger.h" namespace xpansion { namespace logger { diff --git a/src/cpp/benders/logger/include/logger/UserFile.h b/src/cpp/benders/logger/include/antares-xpansion/benders/logger/UserFile.h similarity index 94% rename from src/cpp/benders/logger/include/logger/UserFile.h rename to src/cpp/benders/logger/include/antares-xpansion/benders/logger/UserFile.h index ca7c33ec8..ed4877a96 100644 --- a/src/cpp/benders/logger/include/logger/UserFile.h +++ b/src/cpp/benders/logger/include/antares-xpansion/benders/logger/UserFile.h @@ -6,8 +6,8 @@ #include #include -#include "ILogger.h" -#include "logger/User.h" +#include "antares-xpansion/xpansion_interfaces/ILogger.h" +#include "antares-xpansion/benders/logger/User.h" namespace xpansion { namespace logger { diff --git a/src/cpp/benders/merge_mps/CMakeLists.txt b/src/cpp/benders/merge_mps/CMakeLists.txt index 25c0c9e7a..9992c832a 100644 --- a/src/cpp/benders/merge_mps/CMakeLists.txt +++ b/src/cpp/benders/merge_mps/CMakeLists.txt @@ -6,26 +6,29 @@ # Targets # =========================================================================== -add_library (merge_mps_core STATIC - ${CMAKE_CURRENT_SOURCE_DIR}/MergeMPS.cpp - ) - - +add_library(merge_mps_core) +target_sources(merge_mps_core PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/MergeMPS.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/benders/merge_mps/MergeMPS.h +) -target_include_directories (merge_mps_core - PUBLIC - ${CMAKE_CURRENT_SOURCE_DIR}/include +target_include_directories(merge_mps_core + PUBLIC + $ ) -target_link_libraries (merge_mps_core - PUBLIC - benders_core - helpers - logger_lib - factories - output_core - solvers +target_link_libraries(merge_mps_core + PUBLIC + antaresXpansion::benders_core + antaresXpansion::helpers + antaresXpansion::logger_lib + antaresXpansion::factories + antaresXpansion::output_core + antaresXpansion::solvers ) -add_library (${PROJECT_NAME}::merge_mps_core ALIAS merge_mps_core) \ No newline at end of file +add_library(${PROJECT_NAME}::merge_mps_core ALIAS merge_mps_core) +install(DIRECTORY include/antares-xpansion + DESTINATION "include" +) \ No newline at end of file diff --git a/src/cpp/benders/merge_mps/MergeMPS.cpp b/src/cpp/benders/merge_mps/MergeMPS.cpp index cd30b0571..2b5f910e2 100644 --- a/src/cpp/benders/merge_mps/MergeMPS.cpp +++ b/src/cpp/benders/merge_mps/MergeMPS.cpp @@ -1,10 +1,10 @@ -#include "MergeMPS.h" +#include "antares-xpansion/benders/merge_mps/MergeMPS.h" #include -#include "ArchiveReader.h" -#include "LogUtils.h" -#include "Timer.h" +#include "antares-xpansion/helpers/ArchiveReader.h" +#include "antares-xpansion/xpansion_interfaces/LogUtils.h" +#include "antares-xpansion/helpers/Timer.h" MergeMPS::MergeMPS(const MergeMPSOptions &options, Logger &logger, Writer writer) diff --git a/src/cpp/benders/merge_mps/include/MergeMPS.h b/src/cpp/benders/merge_mps/include/antares-xpansion/benders/merge_mps/MergeMPS.h similarity index 97% rename from src/cpp/benders/merge_mps/include/MergeMPS.h rename to src/cpp/benders/merge_mps/include/antares-xpansion/benders/merge_mps/MergeMPS.h index 630b88fbd..b14778855 100644 --- a/src/cpp/benders/merge_mps/include/MergeMPS.h +++ b/src/cpp/benders/merge_mps/include/antares-xpansion/benders/merge_mps/MergeMPS.h @@ -1,9 +1,9 @@ #pragma once -#include "WriterFactories.h" -#include "common.h" -#include "logger/User.h" -#include "solver_utils.h" +#include "antares-xpansion/benders/factories/WriterFactories.h" +#include "antares-xpansion/benders/benders_core/common.h" +#include "antares-xpansion/benders/logger/User.h" +#include "antares-xpansion/helpers/solver_utils.h" enum Attribute { INT_VALUE, diff --git a/src/cpp/benders/outer_loop/CMakeLists.txt b/src/cpp/benders/outer_loop/CMakeLists.txt index 2b7f33a7b..c0987d271 100644 --- a/src/cpp/benders/outer_loop/CMakeLists.txt +++ b/src/cpp/benders/outer_loop/CMakeLists.txt @@ -7,38 +7,46 @@ # =========================================================================== find_package(yaml-cpp CONFIG REQUIRED) -find_package (MPI REQUIRED COMPONENTS C) -message ("MPI_C_INCLUDE_PATH ${MPI_C_INCLUDE_PATH}") -message ("MPI_C_INCLUDE_DIRS ${MPI_C_INCLUDE_DIRS}") -message ("MPI_C_LIBRARIES ${MPI_C_LIBRARIES}") +find_package(MPI REQUIRED COMPONENTS C) +message("MPI_C_INCLUDE_PATH ${MPI_C_INCLUDE_PATH}") +message("MPI_C_INCLUDE_DIRS ${MPI_C_INCLUDE_DIRS}") +message("MPI_C_LIBRARIES ${MPI_C_LIBRARIES}") find_package(MPI REQUIRED) -if(UNIX) -set(CMAKE_CXX_COMPILER ${MPI_CXX_COMPILER}) -endif() - -add_library (outer_loop_lib STATIC - ${CMAKE_CURRENT_SOURCE_DIR}/OuterLoopBiLevel.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/VariablesGroup.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/OuterLoopInputDataReader.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/OuterLoop.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/CriterionComputation.cpp - ) - - +if (UNIX) + set(CMAKE_CXX_COMPILER ${MPI_CXX_COMPILER}) +endif () + +add_library(outer_loop_lib) +target_sources(outer_loop_lib PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/CriterionComputation.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/OuterLoop.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/OuterLoopBiLevel.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/OuterLoopInputDataReader.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/VariablesGroup.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/benders/outer_loop/CriterionComputation.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/benders/outer_loop/IMasterUpdate.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/benders/outer_loop/OuterLoop.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/benders/outer_loop/OuterLoopBiLevel.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/benders/outer_loop/OuterLoopInputDataReader.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/benders/outer_loop/VariablesGroup.h +) -target_include_directories (outer_loop_lib - PUBLIC - ${CMAKE_CURRENT_SOURCE_DIR}/include - INTERFACE ${CMAKE_CURRENT_SOURCE_DIR} - ) +target_include_directories(outer_loop_lib + PUBLIC + $ +) -target_link_libraries (outer_loop_lib - PUBLIC - helpers - yaml-cpp::yaml-cpp +target_link_libraries(outer_loop_lib + PUBLIC + antaresXpansion::helpers + yaml-cpp::yaml-cpp ) -add_library (${PROJECT_NAME}::outer_loop_lib ALIAS outer_loop_lib) +add_library(${PROJECT_NAME}::outer_loop_lib ALIAS outer_loop_lib) + +install(DIRECTORY include/antares-xpansion + DESTINATION "include" +) \ No newline at end of file diff --git a/src/cpp/benders/outer_loop/CriterionComputation.cpp b/src/cpp/benders/outer_loop/CriterionComputation.cpp index 006cbe3b4..85ba550e7 100644 --- a/src/cpp/benders/outer_loop/CriterionComputation.cpp +++ b/src/cpp/benders/outer_loop/CriterionComputation.cpp @@ -1,4 +1,4 @@ -#include "CriterionComputation.h" +#include "antares-xpansion/benders/outer_loop/CriterionComputation.h" namespace Outerloop { diff --git a/src/cpp/benders/outer_loop/OuterLoop.cpp b/src/cpp/benders/outer_loop/OuterLoop.cpp index 8cc9ce017..3d908b2b8 100644 --- a/src/cpp/benders/outer_loop/OuterLoop.cpp +++ b/src/cpp/benders/outer_loop/OuterLoop.cpp @@ -1,4 +1,4 @@ -#include "OuterLoop.h" +#include "antares-xpansion/benders/outer_loop/OuterLoop.h" namespace Outerloop { void OuterLoop::Run() { diff --git a/src/cpp/benders/outer_loop/OuterLoopBiLevel.cpp b/src/cpp/benders/outer_loop/OuterLoopBiLevel.cpp index f596183e0..dfb0eee38 100644 --- a/src/cpp/benders/outer_loop/OuterLoopBiLevel.cpp +++ b/src/cpp/benders/outer_loop/OuterLoopBiLevel.cpp @@ -1,4 +1,4 @@ -#include "OuterLoopBiLevel.h" +#include "antares-xpansion/benders/outer_loop/OuterLoopBiLevel.h" namespace Outerloop { OuterLoopBiLevel::OuterLoopBiLevel( const std::vector &outer_loop_input_data) diff --git a/src/cpp/benders/outer_loop/OuterLoopInputDataReader.cpp b/src/cpp/benders/outer_loop/OuterLoopInputDataReader.cpp index 94a01074a..fd854fcee 100644 --- a/src/cpp/benders/outer_loop/OuterLoopInputDataReader.cpp +++ b/src/cpp/benders/outer_loop/OuterLoopInputDataReader.cpp @@ -1,8 +1,8 @@ -#include "OuterLoopInputDataReader.h" +#include "antares-xpansion/benders/outer_loop/OuterLoopInputDataReader.h" #include -#include "StringManip.h" +#include "antares-xpansion/xpansion_interfaces/StringManip.h" using namespace Outerloop; diff --git a/src/cpp/benders/outer_loop/VariablesGroup.cpp b/src/cpp/benders/outer_loop/VariablesGroup.cpp index 4b42bef77..38298ea5e 100644 --- a/src/cpp/benders/outer_loop/VariablesGroup.cpp +++ b/src/cpp/benders/outer_loop/VariablesGroup.cpp @@ -1,4 +1,4 @@ -#include "VariablesGroup.h" +#include "antares-xpansion/benders/outer_loop/VariablesGroup.h" using namespace Outerloop; VariablesGroup::VariablesGroup( diff --git a/src/cpp/benders/outer_loop/include/CriterionComputation.h b/src/cpp/benders/outer_loop/include/antares-xpansion/benders/outer_loop/CriterionComputation.h similarity index 100% rename from src/cpp/benders/outer_loop/include/CriterionComputation.h rename to src/cpp/benders/outer_loop/include/antares-xpansion/benders/outer_loop/CriterionComputation.h diff --git a/src/cpp/benders/outer_loop/include/IMasterUpdate.h b/src/cpp/benders/outer_loop/include/antares-xpansion/benders/outer_loop/IMasterUpdate.h similarity index 100% rename from src/cpp/benders/outer_loop/include/IMasterUpdate.h rename to src/cpp/benders/outer_loop/include/antares-xpansion/benders/outer_loop/IMasterUpdate.h diff --git a/src/cpp/benders/outer_loop/include/OuterLoop.h b/src/cpp/benders/outer_loop/include/antares-xpansion/benders/outer_loop/OuterLoop.h similarity index 100% rename from src/cpp/benders/outer_loop/include/OuterLoop.h rename to src/cpp/benders/outer_loop/include/antares-xpansion/benders/outer_loop/OuterLoop.h diff --git a/src/cpp/benders/outer_loop/include/OuterLoopBiLevel.h b/src/cpp/benders/outer_loop/include/antares-xpansion/benders/outer_loop/OuterLoopBiLevel.h similarity index 100% rename from src/cpp/benders/outer_loop/include/OuterLoopBiLevel.h rename to src/cpp/benders/outer_loop/include/antares-xpansion/benders/outer_loop/OuterLoopBiLevel.h diff --git a/src/cpp/benders/outer_loop/include/OuterLoopInputDataReader.h b/src/cpp/benders/outer_loop/include/antares-xpansion/benders/outer_loop/OuterLoopInputDataReader.h similarity index 98% rename from src/cpp/benders/outer_loop/include/OuterLoopInputDataReader.h rename to src/cpp/benders/outer_loop/include/antares-xpansion/benders/outer_loop/OuterLoopInputDataReader.h index ef31a46b6..edaa7d1c3 100644 --- a/src/cpp/benders/outer_loop/include/OuterLoopInputDataReader.h +++ b/src/cpp/benders/outer_loop/include/antares-xpansion/benders/outer_loop/OuterLoopInputDataReader.h @@ -4,7 +4,7 @@ #include #include -#include "LoggerUtils.h" +#include "antares-xpansion/helpers/LoggerUtils.h" #include "yaml-cpp/yaml.h" namespace Outerloop { diff --git a/src/cpp/benders/outer_loop/include/VariablesGroup.h b/src/cpp/benders/outer_loop/include/antares-xpansion/benders/outer_loop/VariablesGroup.h similarity index 100% rename from src/cpp/benders/outer_loop/include/VariablesGroup.h rename to src/cpp/benders/outer_loop/include/antares-xpansion/benders/outer_loop/VariablesGroup.h diff --git a/src/cpp/benders/output/CMakeLists.txt b/src/cpp/benders/output/CMakeLists.txt index 49ec3235f..3c5daff0f 100644 --- a/src/cpp/benders/output/CMakeLists.txt +++ b/src/cpp/benders/output/CMakeLists.txt @@ -6,25 +6,29 @@ # Targets # =========================================================================== -add_library (output_core STATIC - ${CMAKE_CURRENT_SOURCE_DIR}/VoidWriter.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/JsonWriter.cpp - ) +add_library(output_core) -get_target_property(xpansion_interfaces_path xpansion_interfaces INTERFACE_INCLUDE_DIRECTORIES) +target_sources(output_core PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/VoidWriter.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/JsonWriter.cpp + include/antares-xpansion/benders/output/VoidWriter.h + include/antares-xpansion/benders/output/JsonWriter.h +) -target_include_directories (output_core - PUBLIC - ${CMAKE_CURRENT_SOURCE_DIR}/include - PUBLIC - ${CMAKE_CURRENT_SOURCE_DIR} - ${xpansion_interfaces_path} +target_include_directories(output_core + PUBLIC + $ ) -target_link_libraries (output_core - PUBLIC - ${JSONCPP_LIB} - helpers +target_link_libraries(output_core + PUBLIC + ${JSONCPP_LIB} + antaresXpansion::helpers + ${PROJECT_NAME}::xpansion_interfaces ) -add_library (${PROJECT_NAME}::output_core ALIAS output_core) +add_library(${PROJECT_NAME}::output_core ALIAS output_core) + +install(DIRECTORY include/antares-xpansion + DESTINATION "include" +) \ No newline at end of file diff --git a/src/cpp/benders/output/JsonWriter.cpp b/src/cpp/benders/output/JsonWriter.cpp index 00d7be1e2..5ef774afc 100644 --- a/src/cpp/benders/output/JsonWriter.cpp +++ b/src/cpp/benders/output/JsonWriter.cpp @@ -1,4 +1,4 @@ -#include "JsonWriter.h" +#include "antares-xpansion/benders/output/JsonWriter.h" #include diff --git a/src/cpp/benders/output/VoidWriter.cpp b/src/cpp/benders/output/VoidWriter.cpp index 34cf4b1f6..ec694fe0a 100644 --- a/src/cpp/benders/output/VoidWriter.cpp +++ b/src/cpp/benders/output/VoidWriter.cpp @@ -1,4 +1,4 @@ -#include "VoidWriter.h" +#include "antares-xpansion/benders/output/VoidWriter.h" namespace Output { void VoidWriter::updateBeginTime() { diff --git a/src/cpp/benders/output/include/JsonWriter.h b/src/cpp/benders/output/include/antares-xpansion/benders/output/JsonWriter.h similarity index 95% rename from src/cpp/benders/output/include/JsonWriter.h rename to src/cpp/benders/output/include/antares-xpansion/benders/output/JsonWriter.h index 327a62d31..2f80f0c19 100644 --- a/src/cpp/benders/output/include/JsonWriter.h +++ b/src/cpp/benders/output/include/antares-xpansion/benders/output/JsonWriter.h @@ -6,8 +6,8 @@ #include #include -#include "Clock.h" -#include "OutputWriter.h" +#include "antares-xpansion/helpers/Clock.h" +#include "antares-xpansion/xpansion_interfaces/OutputWriter.h" namespace Output { diff --git a/src/cpp/benders/output/include/VoidWriter.h b/src/cpp/benders/output/include/antares-xpansion/benders/output/VoidWriter.h similarity index 97% rename from src/cpp/benders/output/include/VoidWriter.h rename to src/cpp/benders/output/include/antares-xpansion/benders/output/VoidWriter.h index 29a8deeec..08c170cb8 100644 --- a/src/cpp/benders/output/include/VoidWriter.h +++ b/src/cpp/benders/output/include/antares-xpansion/benders/output/VoidWriter.h @@ -1,7 +1,7 @@ #pragma once -#include "OutputWriter.h" +#include "antares-xpansion/xpansion_interfaces/OutputWriter.h" namespace Output { /*! diff --git a/src/cpp/exe/antares_archive_updater/CMakeLists.txt b/src/cpp/exe/antares_archive_updater/CMakeLists.txt index c797f82b4..5200b8e06 100644 --- a/src/cpp/exe/antares_archive_updater/CMakeLists.txt +++ b/src/cpp/exe/antares_archive_updater/CMakeLists.txt @@ -15,7 +15,7 @@ add_executable (antares_archive_updater ) target_link_libraries (antares_archive_updater - helpers + antaresXpansion::helpers ) install(TARGETS antares_archive_updater DESTINATION bin) \ No newline at end of file diff --git a/src/cpp/exe/antares_archive_updater/main.cpp b/src/cpp/exe/antares_archive_updater/main.cpp index fb924feab..08c067253 100644 --- a/src/cpp/exe/antares_archive_updater/main.cpp +++ b/src/cpp/exe/antares_archive_updater/main.cpp @@ -1,8 +1,8 @@ #include -#include "AntaresArchiveUpdater.h" -#include "AntaresArchiveUpdaterExeOptions.h" -#include "ArchiveWriter.h" +#include "antares-xpansion/helpers/AntaresArchiveUpdater.h" +#include "antares-xpansion/helpers/AntaresArchiveUpdaterExeOptions.h" +#include "antares-xpansion/helpers/ArchiveWriter.h" int main(int argc, char** argv) { AntaresArchiveUpdaterExeOptions options_parser; diff --git a/src/cpp/exe/benders/CMakeLists.txt b/src/cpp/exe/benders/CMakeLists.txt index d2f323dbf..dd8989d17 100644 --- a/src/cpp/exe/benders/CMakeLists.txt +++ b/src/cpp/exe/benders/CMakeLists.txt @@ -26,7 +26,7 @@ endif() #ELSE (WIN32) target_link_libraries (benders ${PROJECT_NAME}::benders_mpi_core - factories + antaresXpansion::factories ) #ENDIF (WIN32) diff --git a/src/cpp/exe/benders/main.cpp b/src/cpp/exe/benders/main.cpp index 3db774816..65a9fe951 100644 --- a/src/cpp/exe/benders/main.cpp +++ b/src/cpp/exe/benders/main.cpp @@ -1,5 +1,5 @@ -#include "BendersFactory.h" -#include "common_mpi.h" +#include "antares-xpansion/benders/factories/BendersFactory.h" +#include "antares-xpansion/benders/benders_mpi/common_mpi.h" int main(int argc, char **argv) { mpi::environment env(argc, argv); diff --git a/src/cpp/exe/full_run/CMakeLists.txt b/src/cpp/exe/full_run/CMakeLists.txt index 3ca47d8dc..abf8fd414 100644 --- a/src/cpp/exe/full_run/CMakeLists.txt +++ b/src/cpp/exe/full_run/CMakeLists.txt @@ -10,31 +10,28 @@ # Full Run Exe # --------------------------------------------------------------------------- -add_executable (full_run - ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp +add_executable(full_run + ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp ) find_package(MPI REQUIRED) -if(UNIX) -set(CMAKE_CXX_COMPILER ${MPI_CXX_COMPILER}) -endif() - -target_link_libraries (full_run - PRIVATE - ${PROJECT_NAME}::benders_mpi_core - ) -get_target_property(full_run_lib_include full_run_lib INTERFACE_INCLUDE_DIRECTORIES) - -target_include_directories(full_run PRIVATE -${full_run_lib_include}) - -target_link_libraries (full_run - PRIVATE - ${PROJECT_NAME}::full_run_lib - ${PROJECT_NAME}::problem_generation_main - ${PROJECT_NAME}::benders_sequential_core - ${PROJECT_NAME}::xpansion_study_updater_lib +if (UNIX) + set(CMAKE_CXX_COMPILER ${MPI_CXX_COMPILER}) +endif () + +target_link_libraries(full_run + PRIVATE + ${PROJECT_NAME}::benders_mpi_core +) + +target_link_libraries(full_run + PRIVATE + ${PROJECT_NAME}::full_run_lib + ${PROJECT_NAME}::problem_generation_main + ${PROJECT_NAME}::benders_sequential_core + ${PROJECT_NAME}::xpansion_study_updater_lib + antaresXpansion::helpers ) install(TARGETS full_run DESTINATION bin) \ No newline at end of file diff --git a/src/cpp/exe/full_run/main.cpp b/src/cpp/exe/full_run/main.cpp index 61044367a..c5d415fdd 100644 --- a/src/cpp/exe/full_run/main.cpp +++ b/src/cpp/exe/full_run/main.cpp @@ -2,11 +2,11 @@ #include #include -#include "FullRunOptionsParser.h" -#include "ProblemGeneration.h" -#include "ProblemGenerationLogger.h" -#include "StudyUpdateRunner.h" -#include "common_mpi.h" +#include "antares-xpansion/full_run/FullRunOptionsParser.h" +#include "antares-xpansion/lpnamer/main/ProblemGeneration.h" +#include "antares-xpansion/lpnamer/helper/ProblemGenerationLogger.h" +#include "antares-xpansion/study-updater/StudyUpdateRunner.h" +#include "antares-xpansion/benders/benders_mpi/common_mpi.h" namespace po = boost::program_options; int main(int argc, char** argv) { diff --git a/src/cpp/exe/lpnamer/CMakeLists.txt b/src/cpp/exe/lpnamer/CMakeLists.txt index 023f1482b..5ea1233fd 100644 --- a/src/cpp/exe/lpnamer/CMakeLists.txt +++ b/src/cpp/exe/lpnamer/CMakeLists.txt @@ -16,6 +16,7 @@ add_executable (lp_namer target_link_libraries (lp_namer PRIVATE + ${PROJECT_NAME}::lp_namer_input_reader ${PROJECT_NAME}::problem_generation_main ${PROJECT_NAME}::lp_namer_helper ) diff --git a/src/cpp/exe/lpnamer/main.cpp b/src/cpp/exe/lpnamer/main.cpp index 4dd8fe136..b6d5e200b 100644 --- a/src/cpp/exe/lpnamer/main.cpp +++ b/src/cpp/exe/lpnamer/main.cpp @@ -1,8 +1,8 @@ #include -#include "ProblemGeneration.h" -#include "ProblemGenerationExeOptions.h" +#include "antares-xpansion/lpnamer/main/ProblemGeneration.h" +#include "antares-xpansion/lpnamer/main/ProblemGenerationExeOptions.h" int main(int argc, char** argv) { try { diff --git a/src/cpp/exe/merge/CMakeLists.txt b/src/cpp/exe/merge/CMakeLists.txt index d3d9ca6d7..f7cabb964 100644 --- a/src/cpp/exe/merge/CMakeLists.txt +++ b/src/cpp/exe/merge/CMakeLists.txt @@ -18,8 +18,8 @@ target_link_libraries (merge_mps ${PROJECT_NAME}::merge_mps_core ${PROJECT_NAME}::factories ${PROJECT_NAME}::output_core - helpers - logger_lib + antaresXpansion::helpers + antaresXpansion::logger_lib ) diff --git a/src/cpp/exe/merge/main.cpp b/src/cpp/exe/merge/main.cpp index 4a0572702..bad7bcfe6 100644 --- a/src/cpp/exe/merge/main.cpp +++ b/src/cpp/exe/merge/main.cpp @@ -3,14 +3,14 @@ #include -#include "JsonWriter.h" -#include "MergeMPS.h" -#include "SimulationOptions.h" -#include "Worker.h" -#include "WriterFactories.h" - -#include "logger/User.h" -#include "solver_utils.h" +#include "antares-xpansion/benders/output/JsonWriter.h" +#include "antares-xpansion/benders/merge_mps/MergeMPS.h" +#include "antares-xpansion/benders/benders_core/SimulationOptions.h" +#include "antares-xpansion/benders/benders_core/Worker.h" +#include "antares-xpansion/benders/factories/WriterFactories.h" + +#include "antares-xpansion/benders/logger/User.h" +#include "antares-xpansion/helpers/solver_utils.h" //@suggest: create and move to standardlp.cpp // Initialize static member diff --git a/src/cpp/exe/outer_loop/CMakeLists.txt b/src/cpp/exe/outer_loop/CMakeLists.txt index a811f58c8..0d73f07db 100644 --- a/src/cpp/exe/outer_loop/CMakeLists.txt +++ b/src/cpp/exe/outer_loop/CMakeLists.txt @@ -11,17 +11,17 @@ # --------------------------------------------------------------------------- add_executable(outer_loop - ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp ) find_package(MPI REQUIRED) -if(UNIX) -set(CMAKE_CXX_COMPILER ${MPI_CXX_COMPILER}) -endif() +if (UNIX) + set(CMAKE_CXX_COMPILER ${MPI_CXX_COMPILER}) +endif () target_link_libraries(outer_loop - ${PROJECT_NAME}::outer_loop_lib - factories - ) + ${PROJECT_NAME}::outer_loop_lib + antaresXpansion::factories +) install(TARGETS outer_loop DESTINATION bin) diff --git a/src/cpp/exe/outer_loop/main.cpp b/src/cpp/exe/outer_loop/main.cpp index 7556135eb..dbbc19eb0 100644 --- a/src/cpp/exe/outer_loop/main.cpp +++ b/src/cpp/exe/outer_loop/main.cpp @@ -1,5 +1,5 @@ -#include "BendersFactory.h" -#include "common_mpi.h" +#include "antares-xpansion/benders/factories/BendersFactory.h" +#include "antares-xpansion/benders/benders_mpi/common_mpi.h" int main(int argc, char **argv) { mpi::environment env(argc, argv); diff --git a/src/cpp/exe/sensitivity/CMakeLists.txt b/src/cpp/exe/sensitivity/CMakeLists.txt index 077c52222..11415d12f 100644 --- a/src/cpp/exe/sensitivity/CMakeLists.txt +++ b/src/cpp/exe/sensitivity/CMakeLists.txt @@ -15,7 +15,7 @@ add_executable (sensitivity ) target_link_libraries (sensitivity - sensitivity_core + antaresXpansion::sensitivity_core Boost::boost Boost::program_options) install(TARGETS sensitivity DESTINATION bin) \ No newline at end of file diff --git a/src/cpp/exe/sensitivity/main.cpp b/src/cpp/exe/sensitivity/main.cpp index d9acc07a4..8c3f29346 100644 --- a/src/cpp/exe/sensitivity/main.cpp +++ b/src/cpp/exe/sensitivity/main.cpp @@ -3,11 +3,11 @@ #include #include -#include "SensitivityFileLogger.h" -#include "SensitivityInputReader.h" -#include "SensitivityLogger.h" -#include "SensitivityMasterLogger.h" -#include "SensitivityStudy.h" +#include "antares-xpansion/sensitivity/SensitivityFileLogger.h" +#include "antares-xpansion/sensitivity/SensitivityInputReader.h" +#include "antares-xpansion/sensitivity/SensitivityLogger.h" +#include "antares-xpansion/sensitivity/SensitivityMasterLogger.h" +#include "antares-xpansion/sensitivity/SensitivityStudy.h" namespace po = boost::program_options; const std::string DEFAULT_SENSITIVITY_OUTPUT_JSON("sensitivity.json"); diff --git a/src/cpp/exe/study-updater/main.cpp b/src/cpp/exe/study-updater/main.cpp index 84ffba4f9..5cd450ded 100644 --- a/src/cpp/exe/study-updater/main.cpp +++ b/src/cpp/exe/study-updater/main.cpp @@ -5,13 +5,13 @@ #include #include -#include "ActiveLinks.h" -#include "CandidatesINIReader.h" -#include "LauncherHelpers.h" -#include "LinkProfileReader.h" -#include "ProblemGenerationLogger.h" -#include "StudyUpdateRunner.h" -#include "StudyUpdater.h" +#include "antares-xpansion/lpnamer/model/ActiveLinks.h" +#include "antares-xpansion/lpnamer/input_reader/CandidatesINIReader.h" +#include "antares-xpansion/lpnamer/problem_modifier/LauncherHelpers.h" +#include "antares-xpansion/lpnamer/input_reader/LinkProfileReader.h" +#include "antares-xpansion/lpnamer/helper/ProblemGenerationLogger.h" +#include "antares-xpansion/study-updater/StudyUpdateRunner.h" +#include "antares-xpansion/study-updater/StudyUpdater.h" /** * \fn int main (void) diff --git a/src/cpp/full_run/CMakeLists.txt b/src/cpp/full_run/CMakeLists.txt index fefcd33e5..68d371ca6 100644 --- a/src/cpp/full_run/CMakeLists.txt +++ b/src/cpp/full_run/CMakeLists.txt @@ -10,23 +10,24 @@ # Full Run Exe # --------------------------------------------------------------------------- -add_library (full_run_lib STATIC - ${CMAKE_CURRENT_SOURCE_DIR}/FullRunOptionsParser.cpp +add_library(full_run_lib) +target_sources(full_run_lib PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/FullRunOptionsParser.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/full_run/FullRunOptionsParser.h ) -target_link_libraries (full_run_lib - PUBLIC - ${PROJECT_NAME}::problem_generation_main - ${PROJECT_NAME}::factories +target_link_libraries(full_run_lib + PUBLIC + ${PROJECT_NAME}::problem_generation_main + ${PROJECT_NAME}::factories ) -get_target_property(problem_generation_main_include problem_generation_main INTERFACE_INCLUDE_DIRECTORIES) -get_target_property(factories_include factories INTERFACE_INCLUDE_DIRECTORIES) -target_include_directories (full_run_lib - PUBLIC - ${CMAKE_CURRENT_SOURCE_DIR}/include - ${problem_generation_main_include} - ${factories_include} - ) -add_library (${PROJECT_NAME}::full_run_lib ALIAS full_run_lib) +target_include_directories(full_run_lib + PUBLIC + $ +) +add_library(${PROJECT_NAME}::full_run_lib ALIAS full_run_lib) +install(DIRECTORY include/antares-xpansion + DESTINATION "include" +) diff --git a/src/cpp/full_run/FullRunOptionsParser.cpp b/src/cpp/full_run/FullRunOptionsParser.cpp index a75bd648f..b827c7325 100644 --- a/src/cpp/full_run/FullRunOptionsParser.cpp +++ b/src/cpp/full_run/FullRunOptionsParser.cpp @@ -1,6 +1,6 @@ -#include "FullRunOptionsParser.h" +#include "antares-xpansion/full_run/FullRunOptionsParser.h" -#include "LogUtils.h" +#include "antares-xpansion/xpansion_interfaces/LogUtils.h" namespace po = boost::program_options; FullRunOptionsParser::FullRunOptionsParser() : ProblemGenerationExeOptions() { diff --git a/src/cpp/full_run/include/FullRunOptionsParser.h b/src/cpp/full_run/include/antares-xpansion/full_run/FullRunOptionsParser.h similarity index 85% rename from src/cpp/full_run/include/FullRunOptionsParser.h rename to src/cpp/full_run/include/antares-xpansion/full_run/FullRunOptionsParser.h index 31a441bdc..9ef28399a 100644 --- a/src/cpp/full_run/include/FullRunOptionsParser.h +++ b/src/cpp/full_run/include/antares-xpansion/full_run/FullRunOptionsParser.h @@ -2,8 +2,8 @@ #define ANTARES_XPANSION_SRC_CPP_FULL_RUN_FULLRUNOPTIONSPARSER_H #include -#include "BendersFactory.h" -#include "ProblemGenerationExeOptions.h" +#include "antares-xpansion/benders/factories/BendersFactory.h" +#include "antares-xpansion/lpnamer/main/ProblemGenerationExeOptions.h" class FullRunOptionsParser : public ProblemGenerationExeOptions { public: diff --git a/src/cpp/helpers/AntaresArchiveUpdater.cpp b/src/cpp/helpers/AntaresArchiveUpdater.cpp index e9be8fe84..c9e2d65ce 100644 --- a/src/cpp/helpers/AntaresArchiveUpdater.cpp +++ b/src/cpp/helpers/AntaresArchiveUpdater.cpp @@ -1,10 +1,10 @@ -#include "AntaresArchiveUpdater.h" +#include "antares-xpansion/helpers/AntaresArchiveUpdater.h" #include #include -#include "ArchiveReader.h" -#include "StringManip.h" +#include "antares-xpansion/helpers/ArchiveReader.h" +#include "antares-xpansion/xpansion_interfaces/StringManip.h" const std::string CRITERION_FILES_PREFIX = "criterion"; const std::string CONSTRAINTS_FILES_PREFIX = "constraints"; diff --git a/src/cpp/helpers/AntaresArchiveUpdaterExeOptions.cpp b/src/cpp/helpers/AntaresArchiveUpdaterExeOptions.cpp index b43a1216a..cc754a7e7 100644 --- a/src/cpp/helpers/AntaresArchiveUpdaterExeOptions.cpp +++ b/src/cpp/helpers/AntaresArchiveUpdaterExeOptions.cpp @@ -1,4 +1,4 @@ -#include "AntaresArchiveUpdaterExeOptions.h" +#include "antares-xpansion/helpers/AntaresArchiveUpdaterExeOptions.h" namespace po = boost::program_options; diff --git a/src/cpp/helpers/AntaresVersionProvider.cpp b/src/cpp/helpers/AntaresVersionProvider.cpp index 5edaa7e68..b0cf75e64 100644 --- a/src/cpp/helpers/AntaresVersionProvider.cpp +++ b/src/cpp/helpers/AntaresVersionProvider.cpp @@ -2,7 +2,7 @@ // Created by marechaljas on 03/06/22. // -#include "AntaresVersionProvider.h" +#include "antares-xpansion/helpers/AntaresVersionProvider.h" #include #include diff --git a/src/cpp/helpers/ArchiveReader.cpp b/src/cpp/helpers/ArchiveReader.cpp index 4561e700b..9d3a3fcf5 100644 --- a/src/cpp/helpers/ArchiveReader.cpp +++ b/src/cpp/helpers/ArchiveReader.cpp @@ -1,11 +1,11 @@ -#include "ArchiveReader.h" +#include "antares-xpansion/helpers/ArchiveReader.h" #include #include #include #include -#include "LogUtils.h" +#include "antares-xpansion/xpansion_interfaces/LogUtils.h" ArchiveReader::ArchiveReader(const std::filesystem::path& archivePath) : ArchiveIO(archivePath) { diff --git a/src/cpp/helpers/ArchiveWriter.cpp b/src/cpp/helpers/ArchiveWriter.cpp index 8f8ba622d..ba849747a 100644 --- a/src/cpp/helpers/ArchiveWriter.cpp +++ b/src/cpp/helpers/ArchiveWriter.cpp @@ -1,4 +1,4 @@ -#include "ArchiveWriter.h" +#include "antares-xpansion/helpers/ArchiveWriter.h" #include #include @@ -6,7 +6,7 @@ #include #include -#include "LogUtils.h" +#include "antares-xpansion/xpansion_interfaces/LogUtils.h" ArchiveWriter::ArchiveWriter(const std::filesystem::path& archivePath) : ArchiveIO(archivePath) { diff --git a/src/cpp/helpers/CMakeLists.txt b/src/cpp/helpers/CMakeLists.txt index 325a463f8..322be120e 100644 --- a/src/cpp/helpers/CMakeLists.txt +++ b/src/cpp/helpers/CMakeLists.txt @@ -14,43 +14,48 @@ # unit tests # -------------------------------------------------------------------------- -add_library (helpers STATIC - ${CMAKE_CURRENT_SOURCE_DIR}/solver_utils.h +add_library(helpers) +target_sources(helpers PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/AntaresArchiveUpdater.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/AntaresArchiveUpdaterExeOptions.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/AntaresVersionProvider.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/ArchiveReader.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/ArchiveWriter.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/Clock.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/FileInBuffer.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/JsonXpansionReader.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/OptionsParser.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/helpers/AntaresArchiveUpdater.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/helpers/AntaresArchiveUpdaterExeOptions.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/helpers/AntaresVersionProvider.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/helpers/ArchiveIO.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/helpers/ArchiveReader.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/helpers/ArchiveWriter.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/helpers/Clock.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/helpers/FileInBuffer.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/helpers/LoggerUtils.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/helpers/OptionsParser.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/helpers/Timer.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/helpers/solver_utils.h ${CMAKE_CURRENT_SOURCE_DIR}/solver_utils.cc - ${CMAKE_CURRENT_SOURCE_DIR}/JsonXpansionReader.cpp - AntaresVersionProvider.cpp AntaresVersionProvider.h - ${CMAKE_CURRENT_SOURCE_DIR}/OptionsParser.h - ${CMAKE_CURRENT_SOURCE_DIR}/OptionsParser.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/ArchiveIO.h - ${CMAKE_CURRENT_SOURCE_DIR}/ArchiveReader.h - ${CMAKE_CURRENT_SOURCE_DIR}/ArchiveReader.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/ArchiveWriter.h - ${CMAKE_CURRENT_SOURCE_DIR}/ArchiveWriter.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/FileInBuffer.h - ${CMAKE_CURRENT_SOURCE_DIR}/FileInBuffer.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/Clock.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/Clock.h - ${CMAKE_CURRENT_SOURCE_DIR}/Timer.h - ${CMAKE_CURRENT_SOURCE_DIR}/AntaresArchiveUpdater.h - ${CMAKE_CURRENT_SOURCE_DIR}/AntaresArchiveUpdater.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/AntaresArchiveUpdaterExeOptions.h - ${CMAKE_CURRENT_SOURCE_DIR}/AntaresArchiveUpdaterExeOptions.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/LoggerUtils.h ) +add_library(antaresXpansion::helpers ALIAS helpers) -get_target_property(xpansion_interfaces_path xpansion_interfaces INTERFACE_INCLUDE_DIRECTORIES) - -target_include_directories (helpers - PUBLIC - ${CMAKE_CURRENT_SOURCE_DIR} - ${xpansion_interfaces_path} +target_include_directories(helpers + PUBLIC + $ ) -target_link_libraries (helpers - PUBLIC - ${JSONCPP_LIB} - solvers - gflags::gflags - Boost::boost Boost::program_options - MINIZIP::minizip-ng +target_link_libraries(helpers + PUBLIC + ${JSONCPP_LIB} + antaresXpansion::solvers + gflags::gflags + Boost::boost Boost::program_options + MINIZIP::minizip-ng + ${PROJECT_NAME}::xpansion_interfaces ) + +install(DIRECTORY include/antares-xpansion + DESTINATION "include" +) \ No newline at end of file diff --git a/src/cpp/helpers/Clock.cpp b/src/cpp/helpers/Clock.cpp index 73d728a0f..af53bc7ce 100644 --- a/src/cpp/helpers/Clock.cpp +++ b/src/cpp/helpers/Clock.cpp @@ -1,4 +1,4 @@ -#include "Clock.h" +#include "antares-xpansion/helpers/Clock.h" #include #include diff --git a/src/cpp/helpers/FileInBuffer.cpp b/src/cpp/helpers/FileInBuffer.cpp index fd3574e0b..44a719a90 100644 --- a/src/cpp/helpers/FileInBuffer.cpp +++ b/src/cpp/helpers/FileInBuffer.cpp @@ -1,4 +1,4 @@ -#include "FileInBuffer.h" +#include "antares-xpansion/helpers/FileInBuffer.h" #include #include diff --git a/src/cpp/helpers/JsonXpansionReader.cpp b/src/cpp/helpers/JsonXpansionReader.cpp index 9acd49f0d..6e252ab99 100644 --- a/src/cpp/helpers/JsonXpansionReader.cpp +++ b/src/cpp/helpers/JsonXpansionReader.cpp @@ -1,4 +1,4 @@ -#include "JsonXpansionReader.h" +#include "antares-xpansion/helpers/JsonXpansionReader.h" #include diff --git a/src/cpp/helpers/OptionsParser.cpp b/src/cpp/helpers/OptionsParser.cpp index bd92b0003..27c0f963e 100644 --- a/src/cpp/helpers/OptionsParser.cpp +++ b/src/cpp/helpers/OptionsParser.cpp @@ -1,4 +1,4 @@ -#include "OptionsParser.h" +#include "antares-xpansion/helpers/OptionsParser.h" #include diff --git a/src/cpp/helpers/AntaresArchiveUpdater.h b/src/cpp/helpers/include/antares-xpansion/helpers/AntaresArchiveUpdater.h similarity index 100% rename from src/cpp/helpers/AntaresArchiveUpdater.h rename to src/cpp/helpers/include/antares-xpansion/helpers/AntaresArchiveUpdater.h diff --git a/src/cpp/helpers/AntaresArchiveUpdaterExeOptions.h b/src/cpp/helpers/include/antares-xpansion/helpers/AntaresArchiveUpdaterExeOptions.h similarity index 100% rename from src/cpp/helpers/AntaresArchiveUpdaterExeOptions.h rename to src/cpp/helpers/include/antares-xpansion/helpers/AntaresArchiveUpdaterExeOptions.h diff --git a/src/cpp/helpers/AntaresVersionProvider.h b/src/cpp/helpers/include/antares-xpansion/helpers/AntaresVersionProvider.h similarity index 100% rename from src/cpp/helpers/AntaresVersionProvider.h rename to src/cpp/helpers/include/antares-xpansion/helpers/AntaresVersionProvider.h diff --git a/src/cpp/helpers/ArchiveIO.h b/src/cpp/helpers/include/antares-xpansion/helpers/ArchiveIO.h similarity index 100% rename from src/cpp/helpers/ArchiveIO.h rename to src/cpp/helpers/include/antares-xpansion/helpers/ArchiveIO.h diff --git a/src/cpp/helpers/ArchiveReader.h b/src/cpp/helpers/include/antares-xpansion/helpers/ArchiveReader.h similarity index 100% rename from src/cpp/helpers/ArchiveReader.h rename to src/cpp/helpers/include/antares-xpansion/helpers/ArchiveReader.h diff --git a/src/cpp/helpers/ArchiveWriter.h b/src/cpp/helpers/include/antares-xpansion/helpers/ArchiveWriter.h similarity index 100% rename from src/cpp/helpers/ArchiveWriter.h rename to src/cpp/helpers/include/antares-xpansion/helpers/ArchiveWriter.h diff --git a/src/cpp/helpers/Clock.h b/src/cpp/helpers/include/antares-xpansion/helpers/Clock.h similarity index 100% rename from src/cpp/helpers/Clock.h rename to src/cpp/helpers/include/antares-xpansion/helpers/Clock.h diff --git a/src/cpp/helpers/FileInBuffer.h b/src/cpp/helpers/include/antares-xpansion/helpers/FileInBuffer.h similarity index 100% rename from src/cpp/helpers/FileInBuffer.h rename to src/cpp/helpers/include/antares-xpansion/helpers/FileInBuffer.h diff --git a/src/cpp/helpers/JsonXpansionReader.h b/src/cpp/helpers/include/antares-xpansion/helpers/JsonXpansionReader.h similarity index 100% rename from src/cpp/helpers/JsonXpansionReader.h rename to src/cpp/helpers/include/antares-xpansion/helpers/JsonXpansionReader.h diff --git a/src/cpp/helpers/LoggerUtils.h b/src/cpp/helpers/include/antares-xpansion/helpers/LoggerUtils.h similarity index 83% rename from src/cpp/helpers/LoggerUtils.h rename to src/cpp/helpers/include/antares-xpansion/helpers/LoggerUtils.h index bc50a7121..e66ed0d70 100644 --- a/src/cpp/helpers/LoggerUtils.h +++ b/src/cpp/helpers/include/antares-xpansion/helpers/LoggerUtils.h @@ -1,6 +1,6 @@ #pragma once #include "Clock.h" -#include "LogUtils.h" +#include "antares-xpansion/xpansion_interfaces/LogUtils.h" inline std::string PrefixMessage(const LogUtils::LOGLEVEL &log_level, const std::string &context) { diff --git a/src/cpp/helpers/OptionsParser.h b/src/cpp/helpers/include/antares-xpansion/helpers/OptionsParser.h similarity index 96% rename from src/cpp/helpers/OptionsParser.h rename to src/cpp/helpers/include/antares-xpansion/helpers/OptionsParser.h index 6cb97f2f1..47d84c526 100644 --- a/src/cpp/helpers/OptionsParser.h +++ b/src/cpp/helpers/include/antares-xpansion/helpers/OptionsParser.h @@ -5,7 +5,7 @@ #include #include -#include "LogUtils.h" +#include "antares-xpansion/xpansion_interfaces/LogUtils.h" class OptionsParser { private: diff --git a/src/cpp/helpers/Timer.h b/src/cpp/helpers/include/antares-xpansion/helpers/Timer.h similarity index 100% rename from src/cpp/helpers/Timer.h rename to src/cpp/helpers/include/antares-xpansion/helpers/Timer.h diff --git a/src/cpp/helpers/solver_utils.h b/src/cpp/helpers/include/antares-xpansion/helpers/solver_utils.h similarity index 98% rename from src/cpp/helpers/solver_utils.h rename to src/cpp/helpers/include/antares-xpansion/helpers/solver_utils.h index 72e455a48..ec349b4cc 100644 --- a/src/cpp/helpers/solver_utils.h +++ b/src/cpp/helpers/include/antares-xpansion/helpers/solver_utils.h @@ -3,8 +3,8 @@ #include #include -#include "LogUtils.h" -#include "multisolver_interface/Solver.h" +#include "antares-xpansion/xpansion_interfaces/LogUtils.h" +#include "antares-xpansion/multisolver_interface/Solver.h" class InvalidSolverStatusException : public LogUtils::XpansionError { diff --git a/src/cpp/helpers/solver_utils.cc b/src/cpp/helpers/solver_utils.cc index 2a7f31f53..71cb2af28 100644 --- a/src/cpp/helpers/solver_utils.cc +++ b/src/cpp/helpers/solver_utils.cc @@ -1,4 +1,4 @@ -#include "solver_utils.h" +#include "antares-xpansion/helpers/solver_utils.h" void solver_getrows(const SolverAbstract &solver_p, std::vector &mstart_p, std::vector &mclind_p, diff --git a/src/cpp/lpnamer/helper/CMakeLists.txt b/src/cpp/lpnamer/helper/CMakeLists.txt index e3139e2bd..e77eca78c 100644 --- a/src/cpp/lpnamer/helper/CMakeLists.txt +++ b/src/cpp/lpnamer/helper/CMakeLists.txt @@ -6,20 +6,24 @@ # Targets # =========================================================================== -add_library (lp_namer_helper STATIC - ${CMAKE_CURRENT_SOURCE_DIR}/ColumnToChange.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/ColumnToChange.h - ${CMAKE_CURRENT_SOURCE_DIR}/ProblemGenerationLogger.h - ${CMAKE_CURRENT_SOURCE_DIR}/ProblemGenerationLogger.cpp - ) +add_library(lp_namer_helper) +target_sources(lp_namer_helper PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/ColumnToChange.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/ProblemGenerationLogger.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/lpnamer/helper/ColumnToChange.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/lpnamer/helper/ProblemGenerationLogger.h +) -target_include_directories (lp_namer_helper - PUBLIC - ${CMAKE_CURRENT_SOURCE_DIR} +target_include_directories(lp_namer_helper + PUBLIC + $ ) -target_link_libraries (lp_namer_helper - PUBLIC - helpers +target_link_libraries(lp_namer_helper + PUBLIC + antaresXpansion::helpers ) -add_library (${PROJECT_NAME}::lp_namer_helper ALIAS lp_namer_helper) +add_library(${PROJECT_NAME}::lp_namer_helper ALIAS lp_namer_helper) +install(DIRECTORY include/antares-xpansion + DESTINATION "include" +) \ No newline at end of file diff --git a/src/cpp/lpnamer/helper/ColumnToChange.cpp b/src/cpp/lpnamer/helper/ColumnToChange.cpp index d332830f6..275dbf057 100644 --- a/src/cpp/lpnamer/helper/ColumnToChange.cpp +++ b/src/cpp/lpnamer/helper/ColumnToChange.cpp @@ -1,4 +1,4 @@ -#include "ColumnToChange.h" +#include "antares-xpansion/lpnamer/helper/ColumnToChange.h" bool ColumnToChange::operator==(const ColumnToChange& other) const { bool result = id == other.id; diff --git a/src/cpp/lpnamer/helper/ProblemGenerationLogger.cpp b/src/cpp/lpnamer/helper/ProblemGenerationLogger.cpp index 361361e10..7b3fdfd1a 100644 --- a/src/cpp/lpnamer/helper/ProblemGenerationLogger.cpp +++ b/src/cpp/lpnamer/helper/ProblemGenerationLogger.cpp @@ -1,6 +1,6 @@ -#include "ProblemGenerationLogger.h" +#include "antares-xpansion/lpnamer/helper/ProblemGenerationLogger.h" -#include "Clock.h" +#include "antares-xpansion/helpers/Clock.h" namespace ProblemGenerationLog { ProblemGenerationFileLogger::ProblemGenerationFileLogger( diff --git a/src/cpp/lpnamer/helper/ColumnToChange.h b/src/cpp/lpnamer/helper/include/antares-xpansion/lpnamer/helper/ColumnToChange.h similarity index 100% rename from src/cpp/lpnamer/helper/ColumnToChange.h rename to src/cpp/lpnamer/helper/include/antares-xpansion/lpnamer/helper/ColumnToChange.h diff --git a/src/cpp/lpnamer/helper/ProblemGenerationLogger.h b/src/cpp/lpnamer/helper/include/antares-xpansion/lpnamer/helper/ProblemGenerationLogger.h similarity index 96% rename from src/cpp/lpnamer/helper/ProblemGenerationLogger.h rename to src/cpp/lpnamer/helper/include/antares-xpansion/lpnamer/helper/ProblemGenerationLogger.h index bead3add9..a15af1dc4 100644 --- a/src/cpp/lpnamer/helper/ProblemGenerationLogger.h +++ b/src/cpp/lpnamer/helper/include/antares-xpansion/lpnamer/helper/ProblemGenerationLogger.h @@ -11,9 +11,9 @@ #include #include -#include "ILogger.h" -#include "LogUtils.h" -#include "LoggerUtils.h" +#include "antares-xpansion/xpansion_interfaces/ILogger.h" +#include "antares-xpansion/xpansion_interfaces/LogUtils.h" +#include "antares-xpansion/helpers/LoggerUtils.h" namespace ProblemGenerationLog { diff --git a/src/cpp/lpnamer/input_reader/AdditionalConstraintsReader.cpp b/src/cpp/lpnamer/input_reader/AdditionalConstraintsReader.cpp index e8a75f94b..983696ec5 100644 --- a/src/cpp/lpnamer/input_reader/AdditionalConstraintsReader.cpp +++ b/src/cpp/lpnamer/input_reader/AdditionalConstraintsReader.cpp @@ -1,11 +1,11 @@ -#include "AdditionalConstraintsReader.h" +#include "antares-xpansion/lpnamer/input_reader/AdditionalConstraintsReader.h" #include #include #include #include -#include "LogUtils.h" +#include "antares-xpansion/xpansion_interfaces/LogUtils.h" namespace { diff --git a/src/cpp/lpnamer/input_reader/CMakeLists.txt b/src/cpp/lpnamer/input_reader/CMakeLists.txt index d6314de3a..43418ed91 100644 --- a/src/cpp/lpnamer/input_reader/CMakeLists.txt +++ b/src/cpp/lpnamer/input_reader/CMakeLists.txt @@ -6,38 +6,43 @@ # Targets # =========================================================================== -add_library (lp_namer_input_reader STATIC - ${CMAKE_CURRENT_SOURCE_DIR}/AdditionalConstraintsReader.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/AdditionalConstraintsReader.h - ${CMAKE_CURRENT_SOURCE_DIR}/INIReader.h - ${CMAKE_CURRENT_SOURCE_DIR}/CandidatesINIReader.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/CandidatesINIReader.h - ${CMAKE_CURRENT_SOURCE_DIR}/LinkProfileReader.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/LinkProfileReader.h - ${CMAKE_CURRENT_SOURCE_DIR}/VariableFileReader.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/VariableFileReader.h - ${CMAKE_CURRENT_SOURCE_DIR}/WeightsFileReader.h - ${CMAKE_CURRENT_SOURCE_DIR}/WeightsFileReader.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/WeightsFileWriter.h - ${CMAKE_CURRENT_SOURCE_DIR}/WeightsFileWriter.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/MpsTxtWriter.h - ${CMAKE_CURRENT_SOURCE_DIR}/MpsTxtWriter.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/LpFilesExtractor.h - ${CMAKE_CURRENT_SOURCE_DIR}/LpFilesExtractor.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/GeneralDataReader.h - ${CMAKE_CURRENT_SOURCE_DIR}/GeneralDataReader.cpp - ) +add_library(lp_namer_input_reader) +target_sources(lp_namer_input_reader PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/AdditionalConstraintsReader.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/CandidatesINIReader.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/GeneralDataReader.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/LpFilesExtractor.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/MpsTxtWriter.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/VariableFileReader.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/WeightsFileReader.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/WeightsFileWriter.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/lpnamer/input_reader/AdditionalConstraintsReader.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/lpnamer/input_reader/CandidatesINIReader.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/lpnamer/input_reader/GeneralDataReader.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/lpnamer/input_reader/INIReader.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/lpnamer/input_reader/LinkProfileReader.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/lpnamer/input_reader/LpFilesExtractor.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/lpnamer/input_reader/MpsTxtWriter.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/lpnamer/input_reader/VariableFileReader.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/lpnamer/input_reader/WeightsFileReader.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/lpnamer/input_reader/WeightsFileWriter.h + ${CMAKE_CURRENT_SOURCE_DIR}/LinkProfileReader.cpp +) -target_include_directories (lp_namer_input_reader - PUBLIC - ${CMAKE_CURRENT_SOURCE_DIR} +target_include_directories(lp_namer_input_reader + PUBLIC + $ ) -target_link_libraries (lp_namer_input_reader - PUBLIC - lp_namer_model - helpers - solvers +target_link_libraries(lp_namer_input_reader + PUBLIC + antaresXpansion::lp_namer_model + antaresXpansion::helpers + antaresXpansion::solvers ) -add_library (${PROJECT_NAME}::lp_namer_input_reader ALIAS lp_namer_input_reader) +add_library(${PROJECT_NAME}::lp_namer_input_reader ALIAS lp_namer_input_reader) + +install(DIRECTORY include/antares-xpansion + DESTINATION "include" +) \ No newline at end of file diff --git a/src/cpp/lpnamer/input_reader/CandidatesINIReader.cpp b/src/cpp/lpnamer/input_reader/CandidatesINIReader.cpp index 2c0ebfa2f..d8a5b561a 100644 --- a/src/cpp/lpnamer/input_reader/CandidatesINIReader.cpp +++ b/src/cpp/lpnamer/input_reader/CandidatesINIReader.cpp @@ -1,12 +1,12 @@ // -#include "CandidatesINIReader.h" +#include "antares-xpansion/lpnamer/input_reader/CandidatesINIReader.h" #include -#include "INIReader.h" -#include "LogUtils.h" -#include "StringManip.h" +#include "antares-xpansion/lpnamer/input_reader/INIReader.h" +#include "antares-xpansion/xpansion_interfaces/LogUtils.h" +#include "antares-xpansion/xpansion_interfaces/StringManip.h" CandidatesINIReader::CandidatesINIReader( const std::filesystem::path &antaresIntercoFile, diff --git a/src/cpp/lpnamer/input_reader/GeneralDataReader.cpp b/src/cpp/lpnamer/input_reader/GeneralDataReader.cpp index 361fe2351..9be93946d 100644 --- a/src/cpp/lpnamer/input_reader/GeneralDataReader.cpp +++ b/src/cpp/lpnamer/input_reader/GeneralDataReader.cpp @@ -1,4 +1,4 @@ -#include "GeneralDataReader.h" +#include "antares-xpansion/lpnamer/input_reader/GeneralDataReader.h" #include #include @@ -9,10 +9,10 @@ #include #include -#include "INIReader.h" -#include "LogUtils.h" -#include "ProblemGenerationLogger.h" -#include "StringManip.h" +#include "antares-xpansion/lpnamer/input_reader/INIReader.h" +#include "antares-xpansion/xpansion_interfaces/LogUtils.h" +#include "antares-xpansion/lpnamer/helper/ProblemGenerationLogger.h" +#include "antares-xpansion/xpansion_interfaces/StringManip.h" class IniReaderUtils { public: static bool LineIsNotASectionHeader(const std::string& line) { diff --git a/src/cpp/lpnamer/input_reader/LinkProfileReader.cpp b/src/cpp/lpnamer/input_reader/LinkProfileReader.cpp index f47f9a752..9a7872a8e 100644 --- a/src/cpp/lpnamer/input_reader/LinkProfileReader.cpp +++ b/src/cpp/lpnamer/input_reader/LinkProfileReader.cpp @@ -1,8 +1,8 @@ -#include "LinkProfileReader.h" +#include "antares-xpansion/lpnamer/input_reader/LinkProfileReader.h" #include -#include "LogUtils.h" +#include "antares-xpansion/xpansion_interfaces/LogUtils.h" std::vector LinkProfileReader::ReadLinkProfile( const std::filesystem::path &direct_filename, diff --git a/src/cpp/lpnamer/input_reader/LpFilesExtractor.cpp b/src/cpp/lpnamer/input_reader/LpFilesExtractor.cpp index d33721a54..5d27b06c0 100644 --- a/src/cpp/lpnamer/input_reader/LpFilesExtractor.cpp +++ b/src/cpp/lpnamer/input_reader/LpFilesExtractor.cpp @@ -1,9 +1,9 @@ -#include "LpFilesExtractor.h" +#include "antares-xpansion/lpnamer/input_reader/LpFilesExtractor.h" #include #include -#include "ArchiveReader.h" +#include "antares-xpansion/helpers/ArchiveReader.h" void LpFilesExtractor::ExtractFiles() const { auto [vect_area_files, vect_interco_files] = getFiles(); diff --git a/src/cpp/lpnamer/input_reader/MpsTxtWriter.cpp b/src/cpp/lpnamer/input_reader/MpsTxtWriter.cpp index b7538047c..5f0d087b2 100644 --- a/src/cpp/lpnamer/input_reader/MpsTxtWriter.cpp +++ b/src/cpp/lpnamer/input_reader/MpsTxtWriter.cpp @@ -1,9 +1,9 @@ -#include "MpsTxtWriter.h" +#include "antares-xpansion/lpnamer/input_reader/MpsTxtWriter.h" #include -#include "ArchiveReader.h" +#include "antares-xpansion/helpers/ArchiveReader.h" using namespace std::string_literals; diff --git a/src/cpp/lpnamer/input_reader/VariableFileReader.cpp b/src/cpp/lpnamer/input_reader/VariableFileReader.cpp index 24dbeb44c..d71b0e99f 100644 --- a/src/cpp/lpnamer/input_reader/VariableFileReader.cpp +++ b/src/cpp/lpnamer/input_reader/VariableFileReader.cpp @@ -1,5 +1,5 @@ // -#include "VariableFileReader.h" +#include "antares-xpansion/lpnamer/input_reader/VariableFileReader.h" #include #include diff --git a/src/cpp/lpnamer/input_reader/WeightsFileReader.cpp b/src/cpp/lpnamer/input_reader/WeightsFileReader.cpp index 7e8f215d9..86c885444 100644 --- a/src/cpp/lpnamer/input_reader/WeightsFileReader.cpp +++ b/src/cpp/lpnamer/input_reader/WeightsFileReader.cpp @@ -1,10 +1,10 @@ -#include "WeightsFileReader.h" +#include "antares-xpansion/lpnamer/input_reader/WeightsFileReader.h" #include #include -#include "LogUtils.h" -#include "StringManip.h" +#include "antares-xpansion/xpansion_interfaces/LogUtils.h" +#include "antares-xpansion/xpansion_interfaces/StringManip.h" bool WeightsFileReader::CheckWeightsFile() { std::ifstream file_reader; diff --git a/src/cpp/lpnamer/input_reader/WeightsFileWriter.cpp b/src/cpp/lpnamer/input_reader/WeightsFileWriter.cpp index a18178d88..466095ed4 100644 --- a/src/cpp/lpnamer/input_reader/WeightsFileWriter.cpp +++ b/src/cpp/lpnamer/input_reader/WeightsFileWriter.cpp @@ -1,10 +1,11 @@ -#include "WeightsFileWriter.h" +#include "antares-xpansion/lpnamer/input_reader/WeightsFileWriter.h" #include #include #include -#include "StringManip.h" +#include "antares-xpansion/helpers/ArchiveReader.h" +#include "antares-xpansion/xpansion_interfaces/StringManip.h" YearlyWeightsWriter::YearlyWeightsWriter( const std::filesystem::path& xpansion_output_dir, diff --git a/src/cpp/lpnamer/input_reader/AdditionalConstraintsReader.h b/src/cpp/lpnamer/input_reader/include/antares-xpansion/lpnamer/input_reader/AdditionalConstraintsReader.h similarity index 97% rename from src/cpp/lpnamer/input_reader/AdditionalConstraintsReader.h rename to src/cpp/lpnamer/input_reader/include/antares-xpansion/lpnamer/input_reader/AdditionalConstraintsReader.h index 198497fbd..fd1a24bea 100644 --- a/src/cpp/lpnamer/input_reader/AdditionalConstraintsReader.h +++ b/src/cpp/lpnamer/input_reader/include/antares-xpansion/lpnamer/input_reader/AdditionalConstraintsReader.h @@ -4,7 +4,7 @@ #include #include -#include "ProblemGenerationLogger.h" +#include "antares-xpansion/lpnamer/helper/ProblemGenerationLogger.h" /*! * \struct AdditionalConstraintsReader diff --git a/src/cpp/lpnamer/input_reader/CandidatesINIReader.h b/src/cpp/lpnamer/input_reader/include/antares-xpansion/lpnamer/input_reader/CandidatesINIReader.h similarity index 92% rename from src/cpp/lpnamer/input_reader/CandidatesINIReader.h rename to src/cpp/lpnamer/input_reader/include/antares-xpansion/lpnamer/input_reader/CandidatesINIReader.h index 2204c80ce..fb10534e8 100644 --- a/src/cpp/lpnamer/input_reader/CandidatesINIReader.h +++ b/src/cpp/lpnamer/input_reader/include/antares-xpansion/lpnamer/input_reader/CandidatesINIReader.h @@ -8,9 +8,9 @@ #include #include -#include "Candidate.h" -#include "INIReader.h" -#include "ProblemGenerationLogger.h" +#include "antares-xpansion/lpnamer/model/Candidate.h" +#include "antares-xpansion/lpnamer/input_reader/INIReader.h" +#include "antares-xpansion/lpnamer/helper/ProblemGenerationLogger.h" struct IntercoFileData { int index_interco; diff --git a/src/cpp/lpnamer/input_reader/GeneralDataReader.h b/src/cpp/lpnamer/input_reader/include/antares-xpansion/lpnamer/input_reader/GeneralDataReader.h similarity index 88% rename from src/cpp/lpnamer/input_reader/GeneralDataReader.h rename to src/cpp/lpnamer/input_reader/include/antares-xpansion/lpnamer/input_reader/GeneralDataReader.h index eb9d9c552..0a33b2727 100644 --- a/src/cpp/lpnamer/input_reader/GeneralDataReader.h +++ b/src/cpp/lpnamer/input_reader/include/antares-xpansion/lpnamer/input_reader/GeneralDataReader.h @@ -9,9 +9,9 @@ #include #include -#include "INIReader.h" -#include "ProblemGenerationLogger.h" -#include "StringManip.h" +#include "antares-xpansion/lpnamer/input_reader/INIReader.h" +#include "antares-xpansion/lpnamer/helper/ProblemGenerationLogger.h" +#include "antares-xpansion/xpansion_interfaces/StringManip.h" class IniFileNotFound : public std::runtime_error { public: diff --git a/src/cpp/lpnamer/input_reader/INIReader.h b/src/cpp/lpnamer/input_reader/include/antares-xpansion/lpnamer/input_reader/INIReader.h similarity index 100% rename from src/cpp/lpnamer/input_reader/INIReader.h rename to src/cpp/lpnamer/input_reader/include/antares-xpansion/lpnamer/input_reader/INIReader.h diff --git a/src/cpp/lpnamer/input_reader/LinkProfileReader.h b/src/cpp/lpnamer/input_reader/include/antares-xpansion/lpnamer/input_reader/LinkProfileReader.h similarity index 89% rename from src/cpp/lpnamer/input_reader/LinkProfileReader.h rename to src/cpp/lpnamer/input_reader/include/antares-xpansion/lpnamer/input_reader/LinkProfileReader.h index 8a7f2e807..7655782f3 100644 --- a/src/cpp/lpnamer/input_reader/LinkProfileReader.h +++ b/src/cpp/lpnamer/input_reader/include/antares-xpansion/lpnamer/input_reader/LinkProfileReader.h @@ -5,9 +5,9 @@ #include #include -#include "Candidate.h" -#include "LinkProfile.h" -#include "ProblemGenerationLogger.h" +#include "antares-xpansion/lpnamer/model/Candidate.h" +#include "antares-xpansion/lpnamer/model/LinkProfile.h" +#include "antares-xpansion/lpnamer/helper/ProblemGenerationLogger.h" class LinkProfileReader { public: diff --git a/src/cpp/lpnamer/input_reader/LpFilesExtractor.h b/src/cpp/lpnamer/input_reader/include/antares-xpansion/lpnamer/input_reader/LpFilesExtractor.h similarity index 91% rename from src/cpp/lpnamer/input_reader/LpFilesExtractor.h rename to src/cpp/lpnamer/input_reader/include/antares-xpansion/lpnamer/input_reader/LpFilesExtractor.h index 93ca302fd..04625504a 100644 --- a/src/cpp/lpnamer/input_reader/LpFilesExtractor.h +++ b/src/cpp/lpnamer/input_reader/include/antares-xpansion/lpnamer/input_reader/LpFilesExtractor.h @@ -3,9 +3,9 @@ #include #include -#include "LogUtils.h" -#include "ProblemGenerationLogger.h" -#include "SimulationInputMode.h" +#include "antares-xpansion/xpansion_interfaces/LogUtils.h" +#include "antares-xpansion/lpnamer/helper/ProblemGenerationLogger.h" +#include "antares-xpansion/lpnamer/model/SimulationInputMode.h" class LpFilesExtractor { private: diff --git a/src/cpp/lpnamer/input_reader/MpsTxtWriter.h b/src/cpp/lpnamer/input_reader/include/antares-xpansion/lpnamer/input_reader/MpsTxtWriter.h similarity index 96% rename from src/cpp/lpnamer/input_reader/MpsTxtWriter.h rename to src/cpp/lpnamer/input_reader/include/antares-xpansion/lpnamer/input_reader/MpsTxtWriter.h index 9f3a81c3d..cd19823b7 100644 --- a/src/cpp/lpnamer/input_reader/MpsTxtWriter.h +++ b/src/cpp/lpnamer/input_reader/include/antares-xpansion/lpnamer/input_reader/MpsTxtWriter.h @@ -7,7 +7,7 @@ #include #include -#include "StringManip.h" +#include "antares-xpansion/xpansion_interfaces/StringManip.h" // a pair to hold double key (year and week) using YearAndWeek = std::pair; diff --git a/src/cpp/lpnamer/input_reader/VariableFileReader.h b/src/cpp/lpnamer/input_reader/include/antares-xpansion/lpnamer/input_reader/VariableFileReader.h similarity index 92% rename from src/cpp/lpnamer/input_reader/VariableFileReader.h rename to src/cpp/lpnamer/input_reader/include/antares-xpansion/lpnamer/input_reader/VariableFileReader.h index 0284018d3..b99834115 100644 --- a/src/cpp/lpnamer/input_reader/VariableFileReader.h +++ b/src/cpp/lpnamer/input_reader/include/antares-xpansion/lpnamer/input_reader/VariableFileReader.h @@ -3,15 +3,15 @@ #ifndef ANTARESXPANSION_VARIABLEFILEREADER_H #define ANTARESXPANSION_VARIABLEFILEREADER_H -#include -#include +#include "antares-xpansion/lpnamer/model/ActiveLinks.h" +#include #include #include #include #include -#include "LogUtils.h" +#include "antares-xpansion/xpansion_interfaces/LogUtils.h" void updateMapColumn(const std::vector& links, int link_id, colId id, unsigned int time_step, diff --git a/src/cpp/lpnamer/input_reader/WeightsFileReader.h b/src/cpp/lpnamer/input_reader/include/antares-xpansion/lpnamer/input_reader/WeightsFileReader.h similarity index 94% rename from src/cpp/lpnamer/input_reader/WeightsFileReader.h rename to src/cpp/lpnamer/input_reader/include/antares-xpansion/lpnamer/input_reader/WeightsFileReader.h index b32753232..0e5f86324 100644 --- a/src/cpp/lpnamer/input_reader/WeightsFileReader.h +++ b/src/cpp/lpnamer/input_reader/include/antares-xpansion/lpnamer/input_reader/WeightsFileReader.h @@ -4,8 +4,8 @@ #include #include -#include "LogUtils.h" -#include "ProblemGenerationLogger.h" +#include "antares-xpansion/xpansion_interfaces/LogUtils.h" +#include "antares-xpansion/lpnamer/helper/ProblemGenerationLogger.h" class WeightsFileReader { private: diff --git a/src/cpp/lpnamer/input_reader/WeightsFileWriter.h b/src/cpp/lpnamer/input_reader/include/antares-xpansion/lpnamer/input_reader/WeightsFileWriter.h similarity index 100% rename from src/cpp/lpnamer/input_reader/WeightsFileWriter.h rename to src/cpp/lpnamer/input_reader/include/antares-xpansion/lpnamer/input_reader/WeightsFileWriter.h diff --git a/src/cpp/lpnamer/main/CMakeLists.txt b/src/cpp/lpnamer/main/CMakeLists.txt index 02f193924..f10775765 100644 --- a/src/cpp/lpnamer/main/CMakeLists.txt +++ b/src/cpp/lpnamer/main/CMakeLists.txt @@ -11,36 +11,39 @@ # --------------------------------------------------------------------------- find_package(Antares REQUIRED) -add_library (problem_generation_main STATIC - ${CMAKE_CURRENT_SOURCE_DIR}/ProblemGenerationExeOptions.cpp +add_library(problem_generation_main) +target_sources(problem_generation_main PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/ProblemGeneration.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/include/ProblemGeneration.h - ${CMAKE_CURRENT_SOURCE_DIR}/include/ProblemGenerationOptions.h - ${CMAKE_CURRENT_SOURCE_DIR}/Version.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/Version.h + ${CMAKE_CURRENT_SOURCE_DIR}/ProblemGenerationExeOptions.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/Version.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/lpnamer/main/ProblemGeneration.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/lpnamer/main/ProblemGenerationOptions.h + ${CMAKE_CURRENT_SOURCE_DIR}/private/Version.h ) -target_link_libraries (problem_generation_main - PRIVATE - ${PROJECT_NAME}::lp_namer_helper - ${PROJECT_NAME}::lp_namer_model - ${PROJECT_NAME}::lp_namer_input_reader - ${PROJECT_NAME}::lp_namer_problem_modifier - Boost::boost Boost::program_options - helpers - Antares::solver_api - PUBLIC - Antares::antares-solver-simulation +target_link_libraries(problem_generation_main + PRIVATE + ${PROJECT_NAME}::lp_namer_model + ${PROJECT_NAME}::lp_namer_problem_modifier + Boost::boost Boost::program_options + antaresXpansion::helpers + Antares::solver_api + PUBLIC + ${PROJECT_NAME}::lp_namer_helper + ${PROJECT_NAME}::lp_namer_input_reader + Antares::antares-solver-simulation ) -get_target_property(helpers_include helpers INTERFACE_INCLUDE_DIRECTORIES) - target_include_directories(problem_generation_main PUBLIC - ${CMAKE_CURRENT_SOURCE_DIR}/include - ${helpers_include} + $ + PRIVATE + $ ) -add_library (${PROJECT_NAME}::problem_generation_main ALIAS problem_generation_main) +add_library(${PROJECT_NAME}::problem_generation_main ALIAS problem_generation_main) +install(DIRECTORY include/antares-xpansion + DESTINATION "include" +) \ No newline at end of file diff --git a/src/cpp/lpnamer/main/ProblemGeneration.cpp b/src/cpp/lpnamer/main/ProblemGeneration.cpp index 71ea20597..23865ce7b 100644 --- a/src/cpp/lpnamer/main/ProblemGeneration.cpp +++ b/src/cpp/lpnamer/main/ProblemGeneration.cpp @@ -1,5 +1,5 @@ -#include "include/ProblemGeneration.h" +#include "antares-xpansion/lpnamer/main/ProblemGeneration.h" #include @@ -7,28 +7,29 @@ #include #include -#include "ActiveLinks.h" -#include "AdditionalConstraints.h" -#include "FileProblemsProviderAdapter.h" -#include "GeneralDataReader.h" -#include "LauncherHelpers.h" -#include "LinkProblemsGenerator.h" -#include "LogUtils.h" -#include "LpFilesExtractor.h" -#include "MPSFileWriter.h" -#include "MasterGeneration.h" -#include "MasterProblemBuilder.h" -#include "MpsTxtWriter.h" -#include "ProblemGenerationLogger.h" -#include "ProblemVariablesFileAdapter.h" -#include "ProblemVariablesFromProblemAdapter.h" -#include "ProblemVariablesZipAdapter.h" -#include "Timer.h" +#include "antares-xpansion/lpnamer/model/ActiveLinks.h" +#include "antares-xpansion/lpnamer/problem_modifier/AdditionalConstraints.h" +#include "antares-xpansion/lpnamer/problem_modifier/FileProblemsProviderAdapter.h" +#include "antares-xpansion/lpnamer/input_reader/GeneralDataReader.h" +#include "antares-xpansion/lpnamer/problem_modifier/LauncherHelpers.h" +#include "antares-xpansion/lpnamer/problem_modifier/LinkProblemsGenerator.h" +#include "antares-xpansion/xpansion_interfaces/LogUtils.h" +#include "antares-xpansion/lpnamer/input_reader/LpFilesExtractor.h" +#include "antares-xpansion/lpnamer/problem_modifier/MPSFileWriter.h" +#include "antares-xpansion/lpnamer/problem_modifier/MasterGeneration.h" +#include "antares-xpansion/lpnamer/problem_modifier/MasterProblemBuilder.h" +#include "antares-xpansion/lpnamer/input_reader/MpsTxtWriter.h" +#include "antares-xpansion/lpnamer/helper/ProblemGenerationLogger.h" +#include "antares-xpansion/lpnamer/problem_modifier/ProblemVariablesFileAdapter.h" +#include "antares-xpansion/lpnamer/problem_modifier/ProblemVariablesFromProblemAdapter.h" +#include "antares-xpansion/lpnamer/problem_modifier/ProblemVariablesZipAdapter.h" +#include "antares-xpansion/xpansion_interfaces/StringManip.h" +#include "antares-xpansion/helpers/Timer.h" #include "Version.h" -#include "WeightsFileReader.h" -#include "WeightsFileWriter.h" -#include "XpansionProblemsFromAntaresProvider.h" -#include "ZipProblemsProviderAdapter.h" +#include "antares-xpansion/lpnamer/input_reader/WeightsFileReader.h" +#include "antares-xpansion/lpnamer/input_reader/WeightsFileWriter.h" +#include "antares-xpansion/lpnamer/problem_modifier/XpansionProblemsFromAntaresProvider.h" +#include "antares-xpansion/lpnamer/problem_modifier/ZipProblemsProviderAdapter.h" #include "config.h" static const std::string LP_DIRNAME = "lp"; diff --git a/src/cpp/lpnamer/main/ProblemGenerationExeOptions.cpp b/src/cpp/lpnamer/main/ProblemGenerationExeOptions.cpp index b746b8278..64d078501 100644 --- a/src/cpp/lpnamer/main/ProblemGenerationExeOptions.cpp +++ b/src/cpp/lpnamer/main/ProblemGenerationExeOptions.cpp @@ -1,4 +1,4 @@ -#include "ProblemGenerationExeOptions.h" +#include "antares-xpansion/lpnamer/main/ProblemGenerationExeOptions.h" namespace po = boost::program_options; using namespace std::string_literals; diff --git a/src/cpp/lpnamer/main/Version.cpp b/src/cpp/lpnamer/main/Version.cpp index 8560ee6b0..4b2eaa77a 100644 --- a/src/cpp/lpnamer/main/Version.cpp +++ b/src/cpp/lpnamer/main/Version.cpp @@ -4,7 +4,7 @@ #include "Version.h" -#include "StringManip.h" +#include "antares-xpansion/xpansion_interfaces/StringManip.h" Version::Version(std::string_view version) { auto split_version = StringManip::split(StringManip::trim(version), '.'); diff --git a/src/cpp/lpnamer/main/include/ProblemGeneration.h b/src/cpp/lpnamer/main/include/antares-xpansion/lpnamer/main/ProblemGeneration.h similarity index 80% rename from src/cpp/lpnamer/main/include/ProblemGeneration.h rename to src/cpp/lpnamer/main/include/antares-xpansion/lpnamer/main/ProblemGeneration.h index f0a924db3..fb41ae020 100644 --- a/src/cpp/lpnamer/main/include/ProblemGeneration.h +++ b/src/cpp/lpnamer/main/include/antares-xpansion/lpnamer/main/ProblemGeneration.h @@ -10,14 +10,14 @@ #include #include -#include "../../input_reader/MpsTxtWriter.h" -#include "../../model/Problem.h" -#include "../../model/SimulationInputMode.h" -#include "ArchiveReader.h" -#include "ProblemGenerationExeOptions.h" -#include "ProblemGenerationLogger.h" +#include "antares-xpansion/lpnamer/input_reader/MpsTxtWriter.h" +#include "antares-xpansion/lpnamer/model/Problem.h" +#include "antares-xpansion/lpnamer/model/SimulationInputMode.h" +#include "antares-xpansion/helpers/ArchiveReader.h" +#include "antares-xpansion/lpnamer/main/ProblemGenerationExeOptions.h" +#include "antares-xpansion/lpnamer/helper/ProblemGenerationLogger.h" #include "ProblemGenerationOptions.h" -#include "multisolver_interface/SolverAbstract.h" +#include "antares-xpansion/multisolver_interface/SolverAbstract.h" class ProblemGeneration { public: diff --git a/src/cpp/lpnamer/main/include/ProblemGenerationExeOptions.h b/src/cpp/lpnamer/main/include/antares-xpansion/lpnamer/main/ProblemGenerationExeOptions.h similarity index 97% rename from src/cpp/lpnamer/main/include/ProblemGenerationExeOptions.h rename to src/cpp/lpnamer/main/include/antares-xpansion/lpnamer/main/ProblemGenerationExeOptions.h index d623817f5..fd1a89eef 100644 --- a/src/cpp/lpnamer/main/include/ProblemGenerationExeOptions.h +++ b/src/cpp/lpnamer/main/include/antares-xpansion/lpnamer/main/ProblemGenerationExeOptions.h @@ -3,7 +3,7 @@ #include #include -#include "OptionsParser.h" +#include "antares-xpansion/helpers/OptionsParser.h" #include "ProblemGenerationOptions.h" class ProblemGenerationExeOptions : public OptionsParser, diff --git a/src/cpp/lpnamer/main/include/ProblemGenerationOptions.h b/src/cpp/lpnamer/main/include/antares-xpansion/lpnamer/main/ProblemGenerationOptions.h similarity index 100% rename from src/cpp/lpnamer/main/include/ProblemGenerationOptions.h rename to src/cpp/lpnamer/main/include/antares-xpansion/lpnamer/main/ProblemGenerationOptions.h diff --git a/src/cpp/lpnamer/main/Version.h b/src/cpp/lpnamer/main/private/Version.h similarity index 100% rename from src/cpp/lpnamer/main/Version.h rename to src/cpp/lpnamer/main/private/Version.h diff --git a/src/cpp/lpnamer/model/ActiveLinks.cpp b/src/cpp/lpnamer/model/ActiveLinks.cpp index ff9a12e42..5da9c3ce5 100644 --- a/src/cpp/lpnamer/model/ActiveLinks.cpp +++ b/src/cpp/lpnamer/model/ActiveLinks.cpp @@ -1,4 +1,4 @@ -#include "ActiveLinks.h" +#include "antares-xpansion/lpnamer/model/ActiveLinks.h" #include #include diff --git a/src/cpp/lpnamer/model/CMakeLists.txt b/src/cpp/lpnamer/model/CMakeLists.txt index fdb2c8225..9e877b9e6 100644 --- a/src/cpp/lpnamer/model/CMakeLists.txt +++ b/src/cpp/lpnamer/model/CMakeLists.txt @@ -6,34 +6,39 @@ # Targets # =========================================================================== -add_library (lp_namer_model STATIC - ${CMAKE_CURRENT_SOURCE_DIR}/Candidate.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/Candidate.h - ${CMAKE_CURRENT_SOURCE_DIR}/ActiveLinks.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/ActiveLinks.h - ${CMAKE_CURRENT_SOURCE_DIR}/LinkProfile.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/LinkProfile.h - ${CMAKE_CURRENT_SOURCE_DIR}/Problem.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/Problem.h - ${CMAKE_CURRENT_SOURCE_DIR}/ProblemNameParser.h - ${CMAKE_CURRENT_SOURCE_DIR}/ProblemNameParser.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/ChronicleMapReader.h - ${CMAKE_CURRENT_SOURCE_DIR}/ChronicleMapReader.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/ChronicleMapProvider.h - ${CMAKE_CURRENT_SOURCE_DIR}/ChronicleMapProvider.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/SimulationInputMode.h +add_library(lp_namer_model) +target_sources(lp_namer_model PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/ActiveLinks.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/Candidate.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/ChronicleMapProvider.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/ChronicleMapReader.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/LinkProfile.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/Problem.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/ProblemNameParser.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/lpnamer/model/ActiveLinks.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/lpnamer/model/Candidate.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/lpnamer/model/ChronicleMapProvider.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/lpnamer/model/ChronicleMapReader.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/lpnamer/model/LinkProfile.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/lpnamer/model/Problem.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/lpnamer/model/ProblemNameParser.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/lpnamer/model/SimulationInputMode.h ) -target_include_directories (lp_namer_model - PUBLIC - ${CMAKE_CURRENT_SOURCE_DIR} +target_include_directories(lp_namer_model + PUBLIC + $ ) -target_link_libraries (lp_namer_model - PUBLIC - lp_namer_helper - helpers - solvers +target_link_libraries(lp_namer_model + PUBLIC + antaresXpansion::lp_namer_helper + antaresXpansion::helpers + antaresXpansion::solvers ) -add_library (${PROJECT_NAME}::lp_namer_model ALIAS lp_namer_model) +add_library(${PROJECT_NAME}::lp_namer_model ALIAS lp_namer_model) + +install(DIRECTORY include/antares-xpansion + DESTINATION "include" +) \ No newline at end of file diff --git a/src/cpp/lpnamer/model/Candidate.cpp b/src/cpp/lpnamer/model/Candidate.cpp index dc5e3125f..329280a96 100644 --- a/src/cpp/lpnamer/model/Candidate.cpp +++ b/src/cpp/lpnamer/model/Candidate.cpp @@ -1,4 +1,4 @@ -#include "Candidate.h" +#include "antares-xpansion/lpnamer/model/Candidate.h" #include #include diff --git a/src/cpp/lpnamer/model/ChronicleMapProvider.cpp b/src/cpp/lpnamer/model/ChronicleMapProvider.cpp index b41657a08..12bfdc64a 100644 --- a/src/cpp/lpnamer/model/ChronicleMapProvider.cpp +++ b/src/cpp/lpnamer/model/ChronicleMapProvider.cpp @@ -2,13 +2,13 @@ // Created by marechaljas on 29/04/2022. // -#include "ChronicleMapProvider.h" +#include "antares-xpansion/lpnamer/model/ChronicleMapProvider.h" #include #include #include -#include "ChronicleMapReader.h" +#include "antares-xpansion/lpnamer/model/ChronicleMapReader.h" std::map DirectAccessScenarioToChronicleProvider::GetMap( const std::string& link_from, const std::string& link_to) const { diff --git a/src/cpp/lpnamer/model/ChronicleMapReader.cpp b/src/cpp/lpnamer/model/ChronicleMapReader.cpp index 5be0195e6..d3fdaff22 100644 --- a/src/cpp/lpnamer/model/ChronicleMapReader.cpp +++ b/src/cpp/lpnamer/model/ChronicleMapReader.cpp @@ -3,7 +3,7 @@ // #include "gtest/gtest.h" -#include "ChronicleMapReader.h" +#include "antares-xpansion/lpnamer/model/ChronicleMapReader.h" #include std::map ScenarioToChronicleReader::read( diff --git a/src/cpp/lpnamer/model/LinkProfile.cpp b/src/cpp/lpnamer/model/LinkProfile.cpp index d9d3da99c..4ac6b3c36 100644 --- a/src/cpp/lpnamer/model/LinkProfile.cpp +++ b/src/cpp/lpnamer/model/LinkProfile.cpp @@ -1,6 +1,6 @@ // -#include "LinkProfile.h" +#include "antares-xpansion/lpnamer/model/LinkProfile.h" constexpr int MAX_LINK_PROFILE_HOUR = NUMBER_OF_HOUR_PER_YEAR - 1; diff --git a/src/cpp/lpnamer/model/Problem.cpp b/src/cpp/lpnamer/model/Problem.cpp index 30c3f051a..19ff0a810 100644 --- a/src/cpp/lpnamer/model/Problem.cpp +++ b/src/cpp/lpnamer/model/Problem.cpp @@ -2,9 +2,9 @@ // Created by marechaljas on 27/04/2022. // -#include "Problem.h" +#include "antares-xpansion/lpnamer/model/Problem.h" -#include "ProblemNameParser.h" +#include "antares-xpansion/lpnamer/model/ProblemNameParser.h" void Problem::read_prob_mps(const std::filesystem::path& filename) { mc_year = MCYear(filename); diff --git a/src/cpp/lpnamer/model/ProblemNameParser.cpp b/src/cpp/lpnamer/model/ProblemNameParser.cpp index 8c33a5025..bd38fe2b5 100644 --- a/src/cpp/lpnamer/model/ProblemNameParser.cpp +++ b/src/cpp/lpnamer/model/ProblemNameParser.cpp @@ -4,7 +4,7 @@ #include #include -#include "ProblemNameParser.h" +#include "antares-xpansion/lpnamer/model/ProblemNameParser.h" unsigned int MCYear(const std::filesystem::path &file_path) { return MCYear(file_path.filename().string()); diff --git a/src/cpp/lpnamer/model/ActiveLinks.h b/src/cpp/lpnamer/model/include/antares-xpansion/lpnamer/model/ActiveLinks.h similarity index 95% rename from src/cpp/lpnamer/model/ActiveLinks.h rename to src/cpp/lpnamer/model/include/antares-xpansion/lpnamer/model/ActiveLinks.h index f45045f33..a62f7eed5 100644 --- a/src/cpp/lpnamer/model/ActiveLinks.h +++ b/src/cpp/lpnamer/model/include/antares-xpansion/lpnamer/model/ActiveLinks.h @@ -2,13 +2,13 @@ #ifndef ANTARESXPANSION_ACTIVELINKS_H #define ANTARESXPANSION_ACTIVELINKS_H -#include +#include "antares-xpansion/lpnamer/model/Candidate.h" #include -#include "ChronicleMapProvider.h" -#include "LogUtils.h" -#include "ProblemGenerationLogger.h" +#include "antares-xpansion/lpnamer/model/ChronicleMapProvider.h" +#include "antares-xpansion/xpansion_interfaces/LogUtils.h" +#include "antares-xpansion/lpnamer/helper/ProblemGenerationLogger.h" using LinkName = std::string; diff --git a/src/cpp/lpnamer/model/Candidate.h b/src/cpp/lpnamer/model/include/antares-xpansion/lpnamer/model/Candidate.h similarity index 89% rename from src/cpp/lpnamer/model/Candidate.h rename to src/cpp/lpnamer/model/include/antares-xpansion/lpnamer/model/Candidate.h index 68e418dee..161115b9e 100644 --- a/src/cpp/lpnamer/model/Candidate.h +++ b/src/cpp/lpnamer/model/include/antares-xpansion/lpnamer/model/Candidate.h @@ -1,9 +1,9 @@ #ifndef ANTARESXPANSION_CANDIDATE_H #define ANTARESXPANSION_CANDIDATE_H -#include "LinkProfile.h" -#include "ProblemGenerationLogger.h" -#include "StringManip.h" +#include "antares-xpansion/lpnamer/model/LinkProfile.h" +#include "antares-xpansion/lpnamer/helper/ProblemGenerationLogger.h" +#include "antares-xpansion/xpansion_interfaces/StringManip.h" struct CandidateData { bool enable = true; diff --git a/src/cpp/lpnamer/model/ChronicleMapProvider.h b/src/cpp/lpnamer/model/include/antares-xpansion/lpnamer/model/ChronicleMapProvider.h similarity index 89% rename from src/cpp/lpnamer/model/ChronicleMapProvider.h rename to src/cpp/lpnamer/model/include/antares-xpansion/lpnamer/model/ChronicleMapProvider.h index e07641d1d..2f519ee4d 100644 --- a/src/cpp/lpnamer/model/ChronicleMapProvider.h +++ b/src/cpp/lpnamer/model/include/antares-xpansion/lpnamer/model/ChronicleMapProvider.h @@ -10,8 +10,8 @@ #include #include -#include "ChronicleMapReader.h" -#include "ProblemGenerationLogger.h" +#include "antares-xpansion/lpnamer/model/ChronicleMapReader.h" +#include "antares-xpansion/lpnamer/helper/ProblemGenerationLogger.h" class DirectAccessScenarioToChronicleProvider { public: diff --git a/src/cpp/lpnamer/model/ChronicleMapReader.h b/src/cpp/lpnamer/model/include/antares-xpansion/lpnamer/model/ChronicleMapReader.h similarity index 100% rename from src/cpp/lpnamer/model/ChronicleMapReader.h rename to src/cpp/lpnamer/model/include/antares-xpansion/lpnamer/model/ChronicleMapReader.h diff --git a/src/cpp/lpnamer/model/LinkProfile.h b/src/cpp/lpnamer/model/include/antares-xpansion/lpnamer/model/LinkProfile.h similarity index 89% rename from src/cpp/lpnamer/model/LinkProfile.h rename to src/cpp/lpnamer/model/include/antares-xpansion/lpnamer/model/LinkProfile.h index 6f64457c0..b77f60711 100644 --- a/src/cpp/lpnamer/model/LinkProfile.h +++ b/src/cpp/lpnamer/model/include/antares-xpansion/lpnamer/model/LinkProfile.h @@ -5,9 +5,9 @@ constexpr int NUMBER_OF_HOUR_PER_YEAR = 8760; #include #include -#include "LogUtils.h" -#include "ProblemGenerationLogger.h" -#include "StringManip.h" +#include "antares-xpansion/xpansion_interfaces/LogUtils.h" +#include "antares-xpansion/lpnamer/helper/ProblemGenerationLogger.h" +#include "antares-xpansion/xpansion_interfaces/StringManip.h" /*! * \struct LinkProfile diff --git a/src/cpp/lpnamer/model/Mode.h b/src/cpp/lpnamer/model/include/antares-xpansion/lpnamer/model/Mode.h similarity index 100% rename from src/cpp/lpnamer/model/Mode.h rename to src/cpp/lpnamer/model/include/antares-xpansion/lpnamer/model/Mode.h diff --git a/src/cpp/lpnamer/model/Problem.h b/src/cpp/lpnamer/model/include/antares-xpansion/lpnamer/model/Problem.h similarity index 99% rename from src/cpp/lpnamer/model/Problem.h rename to src/cpp/lpnamer/model/include/antares-xpansion/lpnamer/model/Problem.h index c48e7bc3c..7a62ae3c4 100644 --- a/src/cpp/lpnamer/model/Problem.h +++ b/src/cpp/lpnamer/model/include/antares-xpansion/lpnamer/model/Problem.h @@ -7,7 +7,7 @@ #include -#include "multisolver_interface/SolverAbstract.h" +#include "antares-xpansion/multisolver_interface/SolverAbstract.h" /** * @brief Decorator to the SolverAbstract class diff --git a/src/cpp/lpnamer/model/ProblemNameParser.h b/src/cpp/lpnamer/model/include/antares-xpansion/lpnamer/model/ProblemNameParser.h similarity index 100% rename from src/cpp/lpnamer/model/ProblemNameParser.h rename to src/cpp/lpnamer/model/include/antares-xpansion/lpnamer/model/ProblemNameParser.h diff --git a/src/cpp/lpnamer/model/SimulationInputMode.h b/src/cpp/lpnamer/model/include/antares-xpansion/lpnamer/model/SimulationInputMode.h similarity index 100% rename from src/cpp/lpnamer/model/SimulationInputMode.h rename to src/cpp/lpnamer/model/include/antares-xpansion/lpnamer/model/SimulationInputMode.h diff --git a/src/cpp/lpnamer/problem_modifier/AdditionalConstraints.cpp b/src/cpp/lpnamer/problem_modifier/AdditionalConstraints.cpp index 4ab3f804c..71117b4ef 100644 --- a/src/cpp/lpnamer/problem_modifier/AdditionalConstraints.cpp +++ b/src/cpp/lpnamer/problem_modifier/AdditionalConstraints.cpp @@ -1,11 +1,11 @@ -#include "AdditionalConstraints.h" +#include "antares-xpansion/lpnamer/problem_modifier/AdditionalConstraints.h" #include #include -#include "AdditionalConstraintsReader.h" -#include "LogUtils.h" +#include "antares-xpansion/lpnamer/input_reader/AdditionalConstraintsReader.h" +#include "antares-xpansion/xpansion_interfaces/LogUtils.h" AdditionalConstraints::AdditionalConstraints( std::string constraints_file_path, diff --git a/src/cpp/lpnamer/problem_modifier/AntaresProblemToXpansionProblemTranslator.cpp b/src/cpp/lpnamer/problem_modifier/AntaresProblemToXpansionProblemTranslator.cpp index 93f42d75c..4b73a2e6c 100644 --- a/src/cpp/lpnamer/problem_modifier/AntaresProblemToXpansionProblemTranslator.cpp +++ b/src/cpp/lpnamer/problem_modifier/AntaresProblemToXpansionProblemTranslator.cpp @@ -2,14 +2,14 @@ // Created by marechaljas on 22/11/22. // -#include "AntaresProblemToXpansionProblemTranslator.h" +#include "antares-xpansion/lpnamer/problem_modifier/AntaresProblemToXpansionProblemTranslator.h" #include #include -#include "LogUtils.h" -#include "multisolver_interface/SolverFactory.h" -#include "solver_utils.h" +#include "antares-xpansion/xpansion_interfaces/LogUtils.h" +#include "antares-xpansion/multisolver_interface/SolverFactory.h" +#include "antares-xpansion/helpers/solver_utils.h" /** * diff --git a/src/cpp/lpnamer/problem_modifier/CMakeLists.txt b/src/cpp/lpnamer/problem_modifier/CMakeLists.txt index 559ac001e..ed71da2d2 100644 --- a/src/cpp/lpnamer/problem_modifier/CMakeLists.txt +++ b/src/cpp/lpnamer/problem_modifier/CMakeLists.txt @@ -6,62 +6,67 @@ # Targets # =========================================================================== -add_library(lp_namer_problem_modifier STATIC - ${CMAKE_CURRENT_SOURCE_DIR}/LinkdataRecord.cpp +add_library(lp_namer_problem_modifier) +target_sources(lp_namer_problem_modifier PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/AdditionalConstraints.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/AntaresProblemToXpansionProblemTranslator.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/FileProblemProviderAdapter.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/FileProblemsProviderAdapter.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/LauncherHelpers.cpp ${CMAKE_CURRENT_SOURCE_DIR}/LinkProblemsGenerator.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/LinkProblemsGenerator.h - ${CMAKE_CURRENT_SOURCE_DIR}/AdditionalConstraints.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/AdditionalConstraints.h - ${CMAKE_CURRENT_SOURCE_DIR}/ProblemModifier.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/ProblemModifier.h - ${CMAKE_CURRENT_SOURCE_DIR}/MasterProblemBuilder.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/MasterProblemBuilder.h - ${CMAKE_CURRENT_SOURCE_DIR}/LauncherHelpers.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/LauncherHelpers.h - ${CMAKE_CURRENT_SOURCE_DIR}/MasterGeneration.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/MasterGeneration.h - ${CMAKE_CURRENT_SOURCE_DIR}/LinkdataRecord.h - ${CMAKE_CURRENT_SOURCE_DIR}/ZipProblemProviderAdapter.h - ${CMAKE_CURRENT_SOURCE_DIR}/ZipProblemProviderAdapter.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/IProblemProviderPort.h - ${CMAKE_CURRENT_SOURCE_DIR}/IProblemWriter.h - ${CMAKE_CURRENT_SOURCE_DIR}/MPSFileWriter.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/MPSFileWriter.h - ${CMAKE_CURRENT_SOURCE_DIR}/ProblemVariablesZipAdapter.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/ProblemVariablesZipAdapter.h - ${CMAKE_CURRENT_SOURCE_DIR}/IProblemVariablesProviderPort.h - ${CMAKE_CURRENT_SOURCE_DIR}/ProblemVariablesFileAdapter.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/ProblemVariablesFileAdapter.h - ${CMAKE_CURRENT_SOURCE_DIR}/MPSFileProblemProviderAdapter.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/MPSFileProblemProviderAdapter.h - ${CMAKE_CURRENT_SOURCE_DIR}/XpansionProblemsFromAntaresProvider.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/XpansionProblemsFromAntaresProvider.h - ${CMAKE_CURRENT_SOURCE_DIR}/AntaresProblemToXpansionProblemTranslator.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/AntaresProblemToXpansionProblemTranslator.h - ${CMAKE_CURRENT_SOURCE_DIR}/IXpansionProblemsProvider.h - ${CMAKE_CURRENT_SOURCE_DIR}/ZipProblemsProviderAdapter.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/ZipProblemsProviderAdapter.h - ${CMAKE_CURRENT_SOURCE_DIR}/ProblemVariablesFromProblemAdapter.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/ProblemVariablesFromProblemAdapter.h - ${CMAKE_CURRENT_SOURCE_DIR}/FileProblemsProviderAdapter.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/FileProblemsProviderAdapter.h - ${CMAKE_CURRENT_SOURCE_DIR}/FileProblemProviderAdapter.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/FileProblemProviderAdapter.h + ${CMAKE_CURRENT_SOURCE_DIR}/LinkdataRecord.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/MPSFileProblemProviderAdapter.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/MPSFileWriter.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/MasterGeneration.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/MasterProblemBuilder.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/ProblemModifier.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/ProblemVariablesFileAdapter.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/ProblemVariablesFromProblemAdapter.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/ProblemVariablesZipAdapter.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/XpansionProblemsFromAntaresProvider.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/ZipProblemProviderAdapter.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/ZipProblemsProviderAdapter.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/lpnamer/problem_modifier/AdditionalConstraints.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/lpnamer/problem_modifier/AntaresProblemToXpansionProblemTranslator.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/lpnamer/problem_modifier/FileProblemProviderAdapter.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/lpnamer/problem_modifier/FileProblemsProviderAdapter.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/lpnamer/problem_modifier/IProblemProviderPort.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/lpnamer/problem_modifier/IProblemVariablesProviderPort.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/lpnamer/problem_modifier/IProblemWriter.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/lpnamer/problem_modifier/IXpansionProblemsProvider.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/lpnamer/problem_modifier/LauncherHelpers.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/lpnamer/problem_modifier/LinkProblemsGenerator.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/lpnamer/problem_modifier/LinkdataRecord.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/lpnamer/problem_modifier/MPSFileProblemProviderAdapter.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/lpnamer/problem_modifier/MPSFileWriter.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/lpnamer/problem_modifier/MasterGeneration.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/lpnamer/problem_modifier/MasterProblemBuilder.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/lpnamer/problem_modifier/ProblemModifier.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/lpnamer/problem_modifier/ProblemVariablesFileAdapter.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/lpnamer/problem_modifier/ProblemVariablesFromProblemAdapter.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/lpnamer/problem_modifier/ProblemVariablesZipAdapter.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/lpnamer/problem_modifier/XpansionProblemsFromAntaresProvider.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/lpnamer/problem_modifier/ZipProblemProviderAdapter.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/lpnamer/problem_modifier/ZipProblemsProviderAdapter.h ) -target_include_directories (lp_namer_problem_modifier - PUBLIC - ${CMAKE_CURRENT_SOURCE_DIR} +target_include_directories(lp_namer_problem_modifier + PUBLIC + $ ) -target_link_libraries (lp_namer_problem_modifier - PUBLIC - lp_namer_model - lp_namer_input_reader - lp_namer_helper - helpers - solvers +target_link_libraries(lp_namer_problem_modifier + PUBLIC + antaresXpansion::lp_namer_model + antaresXpansion::lp_namer_input_reader + antaresXpansion::lp_namer_helper + antaresXpansion::helpers + antaresXpansion::solvers Antares::antares-solver-simulation ) -add_library (${PROJECT_NAME}::lp_namer_problem_modifier ALIAS lp_namer_problem_modifier) +add_library(${PROJECT_NAME}::lp_namer_problem_modifier ALIAS lp_namer_problem_modifier) + +install(DIRECTORY include/antares-xpansion + DESTINATION "include" +) \ No newline at end of file diff --git a/src/cpp/lpnamer/problem_modifier/FileProblemProviderAdapter.cpp b/src/cpp/lpnamer/problem_modifier/FileProblemProviderAdapter.cpp index 3be4ba3e8..89ea4911b 100644 --- a/src/cpp/lpnamer/problem_modifier/FileProblemProviderAdapter.cpp +++ b/src/cpp/lpnamer/problem_modifier/FileProblemProviderAdapter.cpp @@ -2,11 +2,11 @@ // Created by marechaljas on 09/01/24. // -#include "FileProblemProviderAdapter.h" +#include "antares-xpansion/lpnamer/problem_modifier/FileProblemProviderAdapter.h" #include -#include "multisolver_interface/SolverFactory.h" +#include "antares-xpansion/multisolver_interface/SolverFactory.h" std::shared_ptr FileProblemProviderAdapter::provide_problem( const std::string& solver_name, SolverLogManager& solver_log_manager) const { diff --git a/src/cpp/lpnamer/problem_modifier/FileProblemsProviderAdapter.cpp b/src/cpp/lpnamer/problem_modifier/FileProblemsProviderAdapter.cpp index 8bb83d967..c8c6291c8 100644 --- a/src/cpp/lpnamer/problem_modifier/FileProblemsProviderAdapter.cpp +++ b/src/cpp/lpnamer/problem_modifier/FileProblemsProviderAdapter.cpp @@ -2,11 +2,11 @@ // Created by marechaljas on 09/01/24. // -#include "FileProblemsProviderAdapter.h" +#include "antares-xpansion/lpnamer/problem_modifier/FileProblemsProviderAdapter.h" #include -#include "FileProblemProviderAdapter.h" +#include "antares-xpansion/lpnamer/problem_modifier/FileProblemProviderAdapter.h" std::vector> FileProblemsProviderAdapter::provideProblems( diff --git a/src/cpp/lpnamer/problem_modifier/LauncherHelpers.cpp b/src/cpp/lpnamer/problem_modifier/LauncherHelpers.cpp index db9dd0f88..fd3d6240a 100644 --- a/src/cpp/lpnamer/problem_modifier/LauncherHelpers.cpp +++ b/src/cpp/lpnamer/problem_modifier/LauncherHelpers.cpp @@ -1,14 +1,14 @@ -#include "LauncherHelpers.h" +#include "antares-xpansion/lpnamer/problem_modifier/LauncherHelpers.h" -#include +#include #include -#include "Candidate.h" -#include "CandidatesINIReader.h" -#include "LinkProblemsGenerator.h" -#include "LinkProfileReader.h" -#include "LogUtils.h" +#include "antares-xpansion/lpnamer/model/Candidate.h" +#include "antares-xpansion/lpnamer/input_reader/CandidatesINIReader.h" +#include "antares-xpansion/lpnamer/problem_modifier/LinkProblemsGenerator.h" +#include "antares-xpansion/lpnamer/input_reader/LinkProfileReader.h" +#include "antares-xpansion/xpansion_interfaces/LogUtils.h" void treatAdditionalConstraints( SolverAbstract::Ptr master_p, diff --git a/src/cpp/lpnamer/problem_modifier/LinkProblemsGenerator.cpp b/src/cpp/lpnamer/problem_modifier/LinkProblemsGenerator.cpp index 8750a71f5..697deec67 100644 --- a/src/cpp/lpnamer/problem_modifier/LinkProblemsGenerator.cpp +++ b/src/cpp/lpnamer/problem_modifier/LinkProblemsGenerator.cpp @@ -1,20 +1,20 @@ -#include "LinkProblemsGenerator.h" +#include "antares-xpansion/lpnamer/problem_modifier/LinkProblemsGenerator.h" #include #include #include -#include "IProblemProviderPort.h" -#include "IProblemVariablesProviderPort.h" -#include "IProblemWriter.h" -#include "MPSFileProblemProviderAdapter.h" -#include "MpsTxtWriter.h" -#include "ProblemVariablesFileAdapter.h" -#include "ProblemVariablesFromProblemAdapter.h" -#include "ProblemVariablesZipAdapter.h" -#include "VariableFileReader.h" -#include "ZipProblemProviderAdapter.h" -#include "solver_utils.h" +#include "antares-xpansion/lpnamer/problem_modifier/IProblemProviderPort.h" +#include "antares-xpansion/lpnamer/problem_modifier/IProblemVariablesProviderPort.h" +#include "antares-xpansion/lpnamer/problem_modifier/IProblemWriter.h" +#include "antares-xpansion/lpnamer/problem_modifier/MPSFileProblemProviderAdapter.h" +#include "antares-xpansion/lpnamer/input_reader/MpsTxtWriter.h" +#include "antares-xpansion/lpnamer/problem_modifier/ProblemVariablesFileAdapter.h" +#include "antares-xpansion/lpnamer/problem_modifier/ProblemVariablesFromProblemAdapter.h" +#include "antares-xpansion/lpnamer/problem_modifier/ProblemVariablesZipAdapter.h" +#include "antares-xpansion/lpnamer/input_reader/VariableFileReader.h" +#include "antares-xpansion/lpnamer/problem_modifier/ZipProblemProviderAdapter.h" +#include "antares-xpansion/helpers/solver_utils.h" /** * \brief That function create new optimization problems with new candidates diff --git a/src/cpp/lpnamer/problem_modifier/LinkdataRecord.cpp b/src/cpp/lpnamer/problem_modifier/LinkdataRecord.cpp index 1c765278d..e4be8bd9e 100644 --- a/src/cpp/lpnamer/problem_modifier/LinkdataRecord.cpp +++ b/src/cpp/lpnamer/problem_modifier/LinkdataRecord.cpp @@ -1,4 +1,4 @@ -#include "LinkdataRecord.h" +#include "antares-xpansion/lpnamer/problem_modifier/LinkdataRecord.h" LinkdataRecord::LinkdataRecord() : fileColumns{0, 0, 0, 0, diff --git a/src/cpp/lpnamer/problem_modifier/MPSFileProblemProviderAdapter.cpp b/src/cpp/lpnamer/problem_modifier/MPSFileProblemProviderAdapter.cpp index 533e4cb90..78776ce83 100644 --- a/src/cpp/lpnamer/problem_modifier/MPSFileProblemProviderAdapter.cpp +++ b/src/cpp/lpnamer/problem_modifier/MPSFileProblemProviderAdapter.cpp @@ -2,11 +2,11 @@ // Created by marechaljas on 09/11/22. // -#include "MPSFileProblemProviderAdapter.h" +#include "antares-xpansion/lpnamer/problem_modifier/MPSFileProblemProviderAdapter.h" #include -#include "multisolver_interface/SolverFactory.h" +#include "antares-xpansion/multisolver_interface/SolverFactory.h" std::shared_ptr MPSFileProblemProviderAdapter::provide_problem( const std::string& solver_name, SolverLogManager& solver_log_manager) const { diff --git a/src/cpp/lpnamer/problem_modifier/MPSFileWriter.cpp b/src/cpp/lpnamer/problem_modifier/MPSFileWriter.cpp index 33c4d34d9..1d03f30fa 100644 --- a/src/cpp/lpnamer/problem_modifier/MPSFileWriter.cpp +++ b/src/cpp/lpnamer/problem_modifier/MPSFileWriter.cpp @@ -1,10 +1,10 @@ -#include "MPSFileWriter.h" +#include "antares-xpansion/lpnamer/problem_modifier/MPSFileWriter.h" #include -#include "IProblemWriter.h" -#include "LinkProblemsGenerator.h" +#include "antares-xpansion/lpnamer/problem_modifier/IProblemWriter.h" +#include "antares-xpansion/lpnamer/problem_modifier/LinkProblemsGenerator.h" void MPSFileWriter::Write_problem(Problem *in_prblm) { auto const lp_mps_name = lp_dir_ / in_prblm->_name; diff --git a/src/cpp/lpnamer/problem_modifier/MasterGeneration.cpp b/src/cpp/lpnamer/problem_modifier/MasterGeneration.cpp index ef3a67666..064025476 100644 --- a/src/cpp/lpnamer/problem_modifier/MasterGeneration.cpp +++ b/src/cpp/lpnamer/problem_modifier/MasterGeneration.cpp @@ -1,11 +1,11 @@ -#include "MasterGeneration.h" +#include "antares-xpansion/lpnamer/problem_modifier/MasterGeneration.h" #include #include -#include "LauncherHelpers.h" -#include "MasterProblemBuilder.h" -#include "multisolver_interface/SolverAbstract.h" +#include "antares-xpansion/lpnamer/problem_modifier/LauncherHelpers.h" +#include "antares-xpansion/lpnamer/problem_modifier/MasterProblemBuilder.h" +#include "antares-xpansion/multisolver_interface/SolverAbstract.h" MasterGeneration::MasterGeneration( const std::filesystem::path &rootPath, const std::vector &links, diff --git a/src/cpp/lpnamer/problem_modifier/MasterProblemBuilder.cpp b/src/cpp/lpnamer/problem_modifier/MasterProblemBuilder.cpp index 1bcc8df4a..4f4de0442 100644 --- a/src/cpp/lpnamer/problem_modifier/MasterProblemBuilder.cpp +++ b/src/cpp/lpnamer/problem_modifier/MasterProblemBuilder.cpp @@ -1,15 +1,15 @@ // // Created by s90365 on 23/08/2021. // -#include "MasterProblemBuilder.h" +#include "antares-xpansion/lpnamer/problem_modifier/MasterProblemBuilder.h" -#include +#include #include #include #include -#include "LogUtils.h" +#include "antares-xpansion/xpansion_interfaces/LogUtils.h" MasterProblemBuilder::MasterProblemBuilder(std::string master_formulation) : _master_formulation(std::move(master_formulation)) {} diff --git a/src/cpp/lpnamer/problem_modifier/ProblemModifier.cpp b/src/cpp/lpnamer/problem_modifier/ProblemModifier.cpp index e5b921d99..f1c14636b 100644 --- a/src/cpp/lpnamer/problem_modifier/ProblemModifier.cpp +++ b/src/cpp/lpnamer/problem_modifier/ProblemModifier.cpp @@ -1,8 +1,8 @@ -#include "ProblemModifier.h" +#include "antares-xpansion/lpnamer/problem_modifier/ProblemModifier.h" #include -#include "solver_utils.h" +#include "antares-xpansion/helpers/solver_utils.h" std::set extract_time_steps( const std::map &p_columns) { diff --git a/src/cpp/lpnamer/problem_modifier/ProblemVariablesFileAdapter.cpp b/src/cpp/lpnamer/problem_modifier/ProblemVariablesFileAdapter.cpp index ee26cd729..bcd6ca1ee 100644 --- a/src/cpp/lpnamer/problem_modifier/ProblemVariablesFileAdapter.cpp +++ b/src/cpp/lpnamer/problem_modifier/ProblemVariablesFileAdapter.cpp @@ -2,11 +2,11 @@ // Created by marechaljas on 09/11/22. // -#include "ProblemVariablesFileAdapter.h" +#include "antares-xpansion/lpnamer/problem_modifier/ProblemVariablesFileAdapter.h" #include -#include "VariableFileReader.h" +#include "antares-xpansion/lpnamer/input_reader/VariableFileReader.h" void ProblemVariablesFileAdapter::extract_variables( const std::filesystem::path& file, std::vector& var_names, diff --git a/src/cpp/lpnamer/problem_modifier/ProblemVariablesFromProblemAdapter.cpp b/src/cpp/lpnamer/problem_modifier/ProblemVariablesFromProblemAdapter.cpp index cbf7fe4c9..79684825e 100644 --- a/src/cpp/lpnamer/problem_modifier/ProblemVariablesFromProblemAdapter.cpp +++ b/src/cpp/lpnamer/problem_modifier/ProblemVariablesFromProblemAdapter.cpp @@ -4,8 +4,7 @@ #include -#include "ProblemVariablesFromProblemAdapter.h" -// #include "VariableFileReader.h" +#include "antares-xpansion/lpnamer/problem_modifier/ProblemVariablesFromProblemAdapter.h" const std::string SEPARATOR = "::"; const std::string AREA_SEPARATOR = "$$"; diff --git a/src/cpp/lpnamer/problem_modifier/ProblemVariablesZipAdapter.cpp b/src/cpp/lpnamer/problem_modifier/ProblemVariablesZipAdapter.cpp index 491707c32..6a4c67df9 100644 --- a/src/cpp/lpnamer/problem_modifier/ProblemVariablesZipAdapter.cpp +++ b/src/cpp/lpnamer/problem_modifier/ProblemVariablesZipAdapter.cpp @@ -2,13 +2,13 @@ // Created by marechaljas on 08/11/22. // -#include "ProblemVariablesZipAdapter.h" +#include "antares-xpansion/lpnamer/problem_modifier/ProblemVariablesZipAdapter.h" #include -#include "ArchiveReader.h" -#include "LinkProblemsGenerator.h" -#include "VariableFileReader.h" +#include "antares-xpansion/helpers/ArchiveReader.h" +#include "antares-xpansion/lpnamer/problem_modifier/LinkProblemsGenerator.h" +#include "antares-xpansion/lpnamer/input_reader/VariableFileReader.h" void ProblemVariablesZipAdapter::extract_variables( std::istringstream& variableFileContent, diff --git a/src/cpp/lpnamer/problem_modifier/XpansionProblemsFromAntaresProvider.cpp b/src/cpp/lpnamer/problem_modifier/XpansionProblemsFromAntaresProvider.cpp index 36808eeb3..da5c7ac49 100644 --- a/src/cpp/lpnamer/problem_modifier/XpansionProblemsFromAntaresProvider.cpp +++ b/src/cpp/lpnamer/problem_modifier/XpansionProblemsFromAntaresProvider.cpp @@ -2,12 +2,12 @@ // Created by marechaljas on 18/11/22. // -#include "XpansionProblemsFromAntaresProvider.h" +#include "antares-xpansion/lpnamer/problem_modifier/XpansionProblemsFromAntaresProvider.h" #include -#include "../model/Problem.h" -#include "AntaresProblemToXpansionProblemTranslator.h" +#include "antares-xpansion/lpnamer/model/Problem.h" +#include "antares-xpansion/lpnamer/problem_modifier/AntaresProblemToXpansionProblemTranslator.h" XpansionProblemsFromAntaresProvider::XpansionProblemsFromAntaresProvider( Antares::Solver::LpsFromAntares lps) diff --git a/src/cpp/lpnamer/problem_modifier/ZipProblemProviderAdapter.cpp b/src/cpp/lpnamer/problem_modifier/ZipProblemProviderAdapter.cpp index a8bf4a9a8..f4a16923e 100644 --- a/src/cpp/lpnamer/problem_modifier/ZipProblemProviderAdapter.cpp +++ b/src/cpp/lpnamer/problem_modifier/ZipProblemProviderAdapter.cpp @@ -2,13 +2,13 @@ // Created by marechaljas on 02/11/22. // -#include "ZipProblemProviderAdapter.h" +#include "antares-xpansion/lpnamer/problem_modifier/ZipProblemProviderAdapter.h" #include -#include "LinkProblemsGenerator.h" -#include "StringManip.h" -#include "solver_utils.h" +#include "antares-xpansion/lpnamer/problem_modifier/LinkProblemsGenerator.h" +#include "antares-xpansion/xpansion_interfaces/StringManip.h" +#include "antares-xpansion/helpers/solver_utils.h" void ZipProblemProviderAdapter::reader_extract_file( const std::string& problem_name, ArchiveReader& reader, const std::filesystem::path& lpDir) const { diff --git a/src/cpp/lpnamer/problem_modifier/ZipProblemsProviderAdapter.cpp b/src/cpp/lpnamer/problem_modifier/ZipProblemsProviderAdapter.cpp index bf8aeae6f..0ff57078b 100644 --- a/src/cpp/lpnamer/problem_modifier/ZipProblemsProviderAdapter.cpp +++ b/src/cpp/lpnamer/problem_modifier/ZipProblemsProviderAdapter.cpp @@ -2,13 +2,13 @@ // Created by marechaljas on 25/11/22. // -#include "ZipProblemsProviderAdapter.h" +#include "antares-xpansion/lpnamer/problem_modifier/ZipProblemsProviderAdapter.h" #include #include -#include "ArchiveReader.h" -#include "ZipProblemProviderAdapter.h" +#include "antares-xpansion/helpers/ArchiveReader.h" +#include "antares-xpansion/lpnamer/problem_modifier/ZipProblemProviderAdapter.h" std::vector> ZipProblemsProviderAdapter::provideProblems( diff --git a/src/cpp/lpnamer/problem_modifier/AdditionalConstraints.h b/src/cpp/lpnamer/problem_modifier/include/antares-xpansion/lpnamer/problem_modifier/AdditionalConstraints.h similarity index 99% rename from src/cpp/lpnamer/problem_modifier/AdditionalConstraints.h rename to src/cpp/lpnamer/problem_modifier/include/antares-xpansion/lpnamer/problem_modifier/AdditionalConstraints.h index a34f24f25..fd0bd0f34 100644 --- a/src/cpp/lpnamer/problem_modifier/AdditionalConstraints.h +++ b/src/cpp/lpnamer/problem_modifier/include/antares-xpansion/lpnamer/problem_modifier/AdditionalConstraints.h @@ -5,7 +5,7 @@ #include #include -#include "ProblemGenerationLogger.h" +#include "antares-xpansion/lpnamer/helper/ProblemGenerationLogger.h" /*! * \class AdditionalConstraint diff --git a/src/cpp/lpnamer/problem_modifier/AntaresProblemToXpansionProblemTranslator.h b/src/cpp/lpnamer/problem_modifier/include/antares-xpansion/lpnamer/problem_modifier/AntaresProblemToXpansionProblemTranslator.h similarity index 90% rename from src/cpp/lpnamer/problem_modifier/AntaresProblemToXpansionProblemTranslator.h rename to src/cpp/lpnamer/problem_modifier/include/antares-xpansion/lpnamer/problem_modifier/AntaresProblemToXpansionProblemTranslator.h index 7011739f9..f63e89cc1 100644 --- a/src/cpp/lpnamer/problem_modifier/AntaresProblemToXpansionProblemTranslator.h +++ b/src/cpp/lpnamer/problem_modifier/include/antares-xpansion/lpnamer/problem_modifier/AntaresProblemToXpansionProblemTranslator.h @@ -8,7 +8,7 @@ #include -#include "../model/Problem.h" +#include "antares-xpansion/lpnamer/model/Problem.h" class AntaresProblemToXpansionProblemTranslator { public: diff --git a/src/cpp/lpnamer/problem_modifier/FileProblemProviderAdapter.h b/src/cpp/lpnamer/problem_modifier/include/antares-xpansion/lpnamer/problem_modifier/FileProblemProviderAdapter.h similarity index 87% rename from src/cpp/lpnamer/problem_modifier/FileProblemProviderAdapter.h rename to src/cpp/lpnamer/problem_modifier/include/antares-xpansion/lpnamer/problem_modifier/FileProblemProviderAdapter.h index c3b221764..70b7df116 100644 --- a/src/cpp/lpnamer/problem_modifier/FileProblemProviderAdapter.h +++ b/src/cpp/lpnamer/problem_modifier/include/antares-xpansion/lpnamer/problem_modifier/FileProblemProviderAdapter.h @@ -4,7 +4,7 @@ #pragma once -#include "IProblemProviderPort.h" +#include "antares-xpansion/lpnamer/problem_modifier/IProblemProviderPort.h" class FileProblemProviderAdapter : public IProblemProviderPort { public: explicit FileProblemProviderAdapter(std::filesystem::path lp_dir, diff --git a/src/cpp/lpnamer/problem_modifier/FileProblemsProviderAdapter.h b/src/cpp/lpnamer/problem_modifier/include/antares-xpansion/lpnamer/problem_modifier/FileProblemsProviderAdapter.h similarity index 100% rename from src/cpp/lpnamer/problem_modifier/FileProblemsProviderAdapter.h rename to src/cpp/lpnamer/problem_modifier/include/antares-xpansion/lpnamer/problem_modifier/FileProblemsProviderAdapter.h diff --git a/src/cpp/lpnamer/problem_modifier/IProblemProviderPort.h b/src/cpp/lpnamer/problem_modifier/include/antares-xpansion/lpnamer/problem_modifier/IProblemProviderPort.h similarity index 85% rename from src/cpp/lpnamer/problem_modifier/IProblemProviderPort.h rename to src/cpp/lpnamer/problem_modifier/include/antares-xpansion/lpnamer/problem_modifier/IProblemProviderPort.h index 0c85a9568..9d9a6969c 100644 --- a/src/cpp/lpnamer/problem_modifier/IProblemProviderPort.h +++ b/src/cpp/lpnamer/problem_modifier/include/antares-xpansion/lpnamer/problem_modifier/IProblemProviderPort.h @@ -4,7 +4,7 @@ #pragma once -#include "../../lpnamer/model/Problem.h" +#include "antares-xpansion/lpnamer/model/Problem.h" class IProblemProviderPort { public: diff --git a/src/cpp/lpnamer/problem_modifier/IProblemVariablesProviderPort.h b/src/cpp/lpnamer/problem_modifier/include/antares-xpansion/lpnamer/problem_modifier/IProblemVariablesProviderPort.h similarity index 89% rename from src/cpp/lpnamer/problem_modifier/IProblemVariablesProviderPort.h rename to src/cpp/lpnamer/problem_modifier/include/antares-xpansion/lpnamer/problem_modifier/IProblemVariablesProviderPort.h index dac7f5b0a..e5ec59cb1 100644 --- a/src/cpp/lpnamer/problem_modifier/IProblemVariablesProviderPort.h +++ b/src/cpp/lpnamer/problem_modifier/include/antares-xpansion/lpnamer/problem_modifier/IProblemVariablesProviderPort.h @@ -7,7 +7,7 @@ #include #include -#include "ColumnToChange.h" +#include "antares-xpansion/lpnamer/helper/ColumnToChange.h" struct ProblemVariables { std::vector variable_names; diff --git a/src/cpp/lpnamer/problem_modifier/IProblemWriter.h b/src/cpp/lpnamer/problem_modifier/include/antares-xpansion/lpnamer/problem_modifier/IProblemWriter.h similarity index 78% rename from src/cpp/lpnamer/problem_modifier/IProblemWriter.h rename to src/cpp/lpnamer/problem_modifier/include/antares-xpansion/lpnamer/problem_modifier/IProblemWriter.h index 5a2571f2f..510f192cf 100644 --- a/src/cpp/lpnamer/problem_modifier/IProblemWriter.h +++ b/src/cpp/lpnamer/problem_modifier/include/antares-xpansion/lpnamer/problem_modifier/IProblemWriter.h @@ -4,7 +4,7 @@ #pragma once -#include "../../lpnamer/model/Problem.h" +#include "antares-xpansion/lpnamer/model/Problem.h" class IProblemWriter { public: virtual ~IProblemWriter() = default; diff --git a/src/cpp/lpnamer/problem_modifier/IXpansionProblemsProvider.h b/src/cpp/lpnamer/problem_modifier/include/antares-xpansion/lpnamer/problem_modifier/IXpansionProblemsProvider.h similarity index 86% rename from src/cpp/lpnamer/problem_modifier/IXpansionProblemsProvider.h rename to src/cpp/lpnamer/problem_modifier/include/antares-xpansion/lpnamer/problem_modifier/IXpansionProblemsProvider.h index 5f6da3f56..15afa14bc 100644 --- a/src/cpp/lpnamer/problem_modifier/IXpansionProblemsProvider.h +++ b/src/cpp/lpnamer/problem_modifier/include/antares-xpansion/lpnamer/problem_modifier/IXpansionProblemsProvider.h @@ -4,7 +4,7 @@ #pragma once -#include "../model/Problem.h" +#include "antares-xpansion/lpnamer/model/Problem.h" class IXpansionProblemsProvider { public: diff --git a/src/cpp/lpnamer/problem_modifier/LauncherHelpers.h b/src/cpp/lpnamer/problem_modifier/include/antares-xpansion/lpnamer/problem_modifier/LauncherHelpers.h similarity index 89% rename from src/cpp/lpnamer/problem_modifier/LauncherHelpers.h rename to src/cpp/lpnamer/problem_modifier/include/antares-xpansion/lpnamer/problem_modifier/LauncherHelpers.h index 70e92d69c..3eb86c9c1 100644 --- a/src/cpp/lpnamer/problem_modifier/LauncherHelpers.h +++ b/src/cpp/lpnamer/problem_modifier/include/antares-xpansion/lpnamer/problem_modifier/LauncherHelpers.h @@ -3,10 +3,10 @@ #include #include -#include "ActiveLinks.h" -#include "AdditionalConstraints.h" -#include "ProblemGenerationLogger.h" -#include "solver_utils.h" +#include "antares-xpansion/lpnamer/model/ActiveLinks.h" +#include "antares-xpansion/lpnamer/problem_modifier/AdditionalConstraints.h" +#include "antares-xpansion/lpnamer/helper/ProblemGenerationLogger.h" +#include "antares-xpansion/helpers/solver_utils.h" /** * \brief adds binary variables and additional constraints to an existent solver * diff --git a/src/cpp/lpnamer/problem_modifier/LinkProblemsGenerator.h b/src/cpp/lpnamer/problem_modifier/include/antares-xpansion/lpnamer/problem_modifier/LinkProblemsGenerator.h similarity index 69% rename from src/cpp/lpnamer/problem_modifier/LinkProblemsGenerator.h rename to src/cpp/lpnamer/problem_modifier/include/antares-xpansion/lpnamer/problem_modifier/LinkProblemsGenerator.h index 431d6bf22..dcacc8866 100644 --- a/src/cpp/lpnamer/problem_modifier/LinkProblemsGenerator.h +++ b/src/cpp/lpnamer/problem_modifier/include/antares-xpansion/lpnamer/problem_modifier/LinkProblemsGenerator.h @@ -1,23 +1,23 @@ #pragma once -#include +#include "antares-xpansion/multisolver_interface/SolverAbstract.h" #include #include #include #include -#include "ArchiveReader.h" -#include "ArchiveWriter.h" -#include "FileInBuffer.h" -#include "IProblemProviderPort.h" -#include "IProblemVariablesProviderPort.h" -#include "IProblemWriter.h" -#include "MpsTxtWriter.h" -#include "ProblemGenerationLogger.h" -#include "ProblemModifier.h" -#include "StringManip.h" -#include "VariableFileReader.h" +#include "antares-xpansion/helpers/ArchiveReader.h" +#include "antares-xpansion/helpers/ArchiveWriter.h" +#include "antares-xpansion/helpers/FileInBuffer.h" +#include "antares-xpansion/lpnamer/problem_modifier/IProblemProviderPort.h" +#include "antares-xpansion/lpnamer/problem_modifier/IProblemVariablesProviderPort.h" +#include "antares-xpansion/lpnamer/problem_modifier/IProblemWriter.h" +#include "antares-xpansion/lpnamer/input_reader/MpsTxtWriter.h" +#include "antares-xpansion/lpnamer/helper/ProblemGenerationLogger.h" +#include "antares-xpansion/lpnamer/problem_modifier/ProblemModifier.h" +#include "antares-xpansion/xpansion_interfaces/StringManip.h" +#include "antares-xpansion/lpnamer/input_reader/VariableFileReader.h" const std::string CANDIDATES_INI{"candidates.ini"}; const std::string STRUCTURE_FILE{"structure.txt"}; diff --git a/src/cpp/lpnamer/problem_modifier/LinkdataRecord.h b/src/cpp/lpnamer/problem_modifier/include/antares-xpansion/lpnamer/problem_modifier/LinkdataRecord.h similarity index 90% rename from src/cpp/lpnamer/problem_modifier/LinkdataRecord.h rename to src/cpp/lpnamer/problem_modifier/include/antares-xpansion/lpnamer/problem_modifier/LinkdataRecord.h index 53f972bd1..8d3ddb79f 100644 --- a/src/cpp/lpnamer/problem_modifier/LinkdataRecord.h +++ b/src/cpp/lpnamer/problem_modifier/include/antares-xpansion/lpnamer/problem_modifier/LinkdataRecord.h @@ -6,9 +6,9 @@ #include -#include "ActiveLinks.h" -#include "AntaresVersionProvider.h" -#include "LinkProblemsGenerator.h" +#include "antares-xpansion/lpnamer/model/ActiveLinks.h" +#include "antares-xpansion/helpers/AntaresVersionProvider.h" +#include "antares-xpansion/lpnamer/problem_modifier/LinkProblemsGenerator.h" /*! * \struct LinkdataRecord * \brief struct describing a line in a linkdata file of antares diff --git a/src/cpp/lpnamer/problem_modifier/MPSFileProblemProviderAdapter.h b/src/cpp/lpnamer/problem_modifier/include/antares-xpansion/lpnamer/problem_modifier/MPSFileProblemProviderAdapter.h similarity index 86% rename from src/cpp/lpnamer/problem_modifier/MPSFileProblemProviderAdapter.h rename to src/cpp/lpnamer/problem_modifier/include/antares-xpansion/lpnamer/problem_modifier/MPSFileProblemProviderAdapter.h index 712152315..069c2f62a 100644 --- a/src/cpp/lpnamer/problem_modifier/MPSFileProblemProviderAdapter.h +++ b/src/cpp/lpnamer/problem_modifier/include/antares-xpansion/lpnamer/problem_modifier/MPSFileProblemProviderAdapter.h @@ -4,7 +4,7 @@ #pragma once -#include "IProblemProviderPort.h" +#include "antares-xpansion/lpnamer/problem_modifier/IProblemProviderPort.h" class MPSFileProblemProviderAdapter : public IProblemProviderPort { public: MPSFileProblemProviderAdapter(std::filesystem::path root, diff --git a/src/cpp/lpnamer/problem_modifier/MPSFileWriter.h b/src/cpp/lpnamer/problem_modifier/include/antares-xpansion/lpnamer/problem_modifier/MPSFileWriter.h similarity index 58% rename from src/cpp/lpnamer/problem_modifier/MPSFileWriter.h rename to src/cpp/lpnamer/problem_modifier/include/antares-xpansion/lpnamer/problem_modifier/MPSFileWriter.h index 920f13862..60b88126b 100644 --- a/src/cpp/lpnamer/problem_modifier/MPSFileWriter.h +++ b/src/cpp/lpnamer/problem_modifier/include/antares-xpansion/lpnamer/problem_modifier/MPSFileWriter.h @@ -1,7 +1,7 @@ #pragma once -#include "IProblemWriter.h" -#include "LinkProblemsGenerator.h" +#include "antares-xpansion/lpnamer/problem_modifier/IProblemWriter.h" +#include "antares-xpansion/lpnamer/problem_modifier/LinkProblemsGenerator.h" class MPSFileWriter : public IProblemWriter { void Write_problem(Problem *in_prblm) override; diff --git a/src/cpp/lpnamer/problem_modifier/MasterGeneration.h b/src/cpp/lpnamer/problem_modifier/include/antares-xpansion/lpnamer/problem_modifier/MasterGeneration.h similarity index 88% rename from src/cpp/lpnamer/problem_modifier/MasterGeneration.h rename to src/cpp/lpnamer/problem_modifier/include/antares-xpansion/lpnamer/problem_modifier/MasterGeneration.h index e284e2c12..5304b4d87 100644 --- a/src/cpp/lpnamer/problem_modifier/MasterGeneration.h +++ b/src/cpp/lpnamer/problem_modifier/include/antares-xpansion/lpnamer/problem_modifier/MasterGeneration.h @@ -3,9 +3,9 @@ #include -#include "ActiveLinks.h" -#include "AdditionalConstraints.h" -#include "LinkProblemsGenerator.h" +#include "antares-xpansion/lpnamer/model/ActiveLinks.h" +#include "antares-xpansion/lpnamer/problem_modifier/AdditionalConstraints.h" +#include "antares-xpansion/lpnamer/problem_modifier/LinkProblemsGenerator.h" class MasterGeneration { public: /** diff --git a/src/cpp/lpnamer/problem_modifier/MasterProblemBuilder.h b/src/cpp/lpnamer/problem_modifier/include/antares-xpansion/lpnamer/problem_modifier/MasterProblemBuilder.h similarity index 90% rename from src/cpp/lpnamer/problem_modifier/MasterProblemBuilder.h rename to src/cpp/lpnamer/problem_modifier/include/antares-xpansion/lpnamer/problem_modifier/MasterProblemBuilder.h index f64a9665f..4e684aa24 100644 --- a/src/cpp/lpnamer/problem_modifier/MasterProblemBuilder.h +++ b/src/cpp/lpnamer/problem_modifier/include/antares-xpansion/lpnamer/problem_modifier/MasterProblemBuilder.h @@ -2,12 +2,12 @@ // Created by s90365 on 23/08/2021. // -#include +#include "antares-xpansion/multisolver_interface/SolverAbstract.h" #include #include -#include "ActiveLinks.h" +#include "antares-xpansion/lpnamer/model/ActiveLinks.h" #ifndef ANTARESXPANSION_MASTERPROBLEMBUILDER_H #define ANTARESXPANSION_MASTERPROBLEMBUILDER_H diff --git a/src/cpp/lpnamer/problem_modifier/ProblemModifier.h b/src/cpp/lpnamer/problem_modifier/include/antares-xpansion/lpnamer/problem_modifier/ProblemModifier.h similarity index 92% rename from src/cpp/lpnamer/problem_modifier/ProblemModifier.h rename to src/cpp/lpnamer/problem_modifier/include/antares-xpansion/lpnamer/problem_modifier/ProblemModifier.h index ad097191a..ac72b52d1 100644 --- a/src/cpp/lpnamer/problem_modifier/ProblemModifier.h +++ b/src/cpp/lpnamer/problem_modifier/include/antares-xpansion/lpnamer/problem_modifier/ProblemModifier.h @@ -2,17 +2,17 @@ #ifndef ANTARESXPANSION_PROBLEMMODIFIER_H #define ANTARESXPANSION_PROBLEMMODIFIER_H -#include +#include "antares-xpansion/multisolver_interface/SolverAbstract.h" #include #include #include -#include "ActiveLinks.h" -#include "ColumnToChange.h" -#include "LogUtils.h" -#include "Problem.h" -#include "ProblemGenerationLogger.h" +#include "antares-xpansion/lpnamer/model/ActiveLinks.h" +#include "antares-xpansion/lpnamer/helper/ColumnToChange.h" +#include "antares-xpansion/xpansion_interfaces/LogUtils.h" +#include "antares-xpansion/lpnamer/model/Problem.h" +#include "antares-xpansion/lpnamer/helper/ProblemGenerationLogger.h" class ProblemModifier { public: diff --git a/src/cpp/lpnamer/problem_modifier/ProblemVariablesFileAdapter.h b/src/cpp/lpnamer/problem_modifier/include/antares-xpansion/lpnamer/problem_modifier/ProblemVariablesFileAdapter.h similarity index 84% rename from src/cpp/lpnamer/problem_modifier/ProblemVariablesFileAdapter.h rename to src/cpp/lpnamer/problem_modifier/include/antares-xpansion/lpnamer/problem_modifier/ProblemVariablesFileAdapter.h index 2825de683..1a672e922 100644 --- a/src/cpp/lpnamer/problem_modifier/ProblemVariablesFileAdapter.h +++ b/src/cpp/lpnamer/problem_modifier/include/antares-xpansion/lpnamer/problem_modifier/ProblemVariablesFileAdapter.h @@ -4,8 +4,8 @@ #pragma once -#include "IProblemVariablesProviderPort.h" -#include "LinkProblemsGenerator.h" +#include "antares-xpansion/lpnamer/problem_modifier/IProblemVariablesProviderPort.h" +#include "antares-xpansion/lpnamer/problem_modifier/LinkProblemsGenerator.h" class ProblemVariablesFileAdapter : public IProblemVariablesProviderPort { public: ProblemVariablesFileAdapter( diff --git a/src/cpp/lpnamer/problem_modifier/ProblemVariablesFromProblemAdapter.h b/src/cpp/lpnamer/problem_modifier/include/antares-xpansion/lpnamer/problem_modifier/ProblemVariablesFromProblemAdapter.h similarity index 82% rename from src/cpp/lpnamer/problem_modifier/ProblemVariablesFromProblemAdapter.h rename to src/cpp/lpnamer/problem_modifier/include/antares-xpansion/lpnamer/problem_modifier/ProblemVariablesFromProblemAdapter.h index 4bcd0fb83..89c1f76d3 100644 --- a/src/cpp/lpnamer/problem_modifier/ProblemVariablesFromProblemAdapter.h +++ b/src/cpp/lpnamer/problem_modifier/include/antares-xpansion/lpnamer/problem_modifier/ProblemVariablesFromProblemAdapter.h @@ -1,7 +1,7 @@ #pragma once -#include "IProblemVariablesProviderPort.h" -#include "LinkProblemsGenerator.h" +#include "antares-xpansion/lpnamer/problem_modifier/IProblemVariablesProviderPort.h" +#include "antares-xpansion/lpnamer/problem_modifier/LinkProblemsGenerator.h" class ProblemVariablesFromProblemAdapter : public IProblemVariablesProviderPort { diff --git a/src/cpp/lpnamer/problem_modifier/ProblemVariablesZipAdapter.h b/src/cpp/lpnamer/problem_modifier/include/antares-xpansion/lpnamer/problem_modifier/ProblemVariablesZipAdapter.h similarity index 84% rename from src/cpp/lpnamer/problem_modifier/ProblemVariablesZipAdapter.h rename to src/cpp/lpnamer/problem_modifier/include/antares-xpansion/lpnamer/problem_modifier/ProblemVariablesZipAdapter.h index 55b57a160..7b0908163 100644 --- a/src/cpp/lpnamer/problem_modifier/ProblemVariablesZipAdapter.h +++ b/src/cpp/lpnamer/problem_modifier/include/antares-xpansion/lpnamer/problem_modifier/ProblemVariablesZipAdapter.h @@ -4,8 +4,8 @@ #pragma once -#include "IProblemVariablesProviderPort.h" -#include "LinkProblemsGenerator.h" +#include "antares-xpansion/lpnamer/problem_modifier/IProblemVariablesProviderPort.h" +#include "antares-xpansion/lpnamer/problem_modifier/LinkProblemsGenerator.h" class ProblemVariablesZipAdapter : public IProblemVariablesProviderPort { public: diff --git a/src/cpp/lpnamer/problem_modifier/XpansionProblemsFromAntaresProvider.h b/src/cpp/lpnamer/problem_modifier/include/antares-xpansion/lpnamer/problem_modifier/XpansionProblemsFromAntaresProvider.h similarity index 91% rename from src/cpp/lpnamer/problem_modifier/XpansionProblemsFromAntaresProvider.h rename to src/cpp/lpnamer/problem_modifier/include/antares-xpansion/lpnamer/problem_modifier/XpansionProblemsFromAntaresProvider.h index 20e0fbf60..61699ef58 100644 --- a/src/cpp/lpnamer/problem_modifier/XpansionProblemsFromAntaresProvider.h +++ b/src/cpp/lpnamer/problem_modifier/include/antares-xpansion/lpnamer/problem_modifier/XpansionProblemsFromAntaresProvider.h @@ -6,7 +6,7 @@ #include -#include "../model/Problem.h" +#include "antares-xpansion/lpnamer/model/Problem.h" #include "IXpansionProblemsProvider.h" class XpansionProblemsFromAntaresProvider : public IXpansionProblemsProvider { diff --git a/src/cpp/lpnamer/problem_modifier/ZipProblemProviderAdapter.h b/src/cpp/lpnamer/problem_modifier/include/antares-xpansion/lpnamer/problem_modifier/ZipProblemProviderAdapter.h similarity index 83% rename from src/cpp/lpnamer/problem_modifier/ZipProblemProviderAdapter.h rename to src/cpp/lpnamer/problem_modifier/include/antares-xpansion/lpnamer/problem_modifier/ZipProblemProviderAdapter.h index 75ebc4f2b..92a107f62 100644 --- a/src/cpp/lpnamer/problem_modifier/ZipProblemProviderAdapter.h +++ b/src/cpp/lpnamer/problem_modifier/include/antares-xpansion/lpnamer/problem_modifier/ZipProblemProviderAdapter.h @@ -4,8 +4,8 @@ #pragma once -#include "IProblemProviderPort.h" -#include "LinkProblemsGenerator.h" +#include "antares-xpansion/lpnamer/problem_modifier/IProblemProviderPort.h" +#include "antares-xpansion/lpnamer/problem_modifier/LinkProblemsGenerator.h" class ZipProblemProviderAdapter : public IProblemProviderPort { public: explicit ZipProblemProviderAdapter(std::filesystem::path lp_dir, diff --git a/src/cpp/lpnamer/problem_modifier/ZipProblemsProviderAdapter.h b/src/cpp/lpnamer/problem_modifier/include/antares-xpansion/lpnamer/problem_modifier/ZipProblemsProviderAdapter.h similarity index 92% rename from src/cpp/lpnamer/problem_modifier/ZipProblemsProviderAdapter.h rename to src/cpp/lpnamer/problem_modifier/include/antares-xpansion/lpnamer/problem_modifier/ZipProblemsProviderAdapter.h index 0036bd8dc..835442acc 100644 --- a/src/cpp/lpnamer/problem_modifier/ZipProblemsProviderAdapter.h +++ b/src/cpp/lpnamer/problem_modifier/include/antares-xpansion/lpnamer/problem_modifier/ZipProblemsProviderAdapter.h @@ -4,7 +4,7 @@ #pragma once -#include "ArchiveReader.h" +#include "antares-xpansion/helpers/ArchiveReader.h" #include "IXpansionProblemsProvider.h" class ZipProblemsProviderAdapter : public IXpansionProblemsProvider { public: diff --git a/src/cpp/multisolver_interface/CMakeLists.txt b/src/cpp/multisolver_interface/CMakeLists.txt index 724001607..4107dcc70 100644 --- a/src/cpp/multisolver_interface/CMakeLists.txt +++ b/src/cpp/multisolver_interface/CMakeLists.txt @@ -14,58 +14,74 @@ # Conditionnal settings of solver source files # --------------------------------------------------------------------------- list(APPEND Solver_sources - ${CMAKE_CURRENT_LIST_DIR}/SolverFactory.cpp + ${CMAKE_CURRENT_LIST_DIR}/SolverFactory.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/multisolver_interface/Solver.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/multisolver_interface/SolverAbstract.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/multisolver_interface/SolverFactory.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/multisolver_interface/dynamic_library.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/multisolver_interface/environment.h + ) list(APPEND XPRESS_LOAD - ${CMAKE_CURRENT_LIST_DIR}/environment.cc + ${CMAKE_CURRENT_LIST_DIR}/environment.cc ) # XPRESS - list(APPEND Solver_sources - ${CMAKE_CURRENT_LIST_DIR}/SolverXpress.cpp - ) +list(APPEND Solver_sources + ${CMAKE_CURRENT_LIST_DIR}/SolverXpress.cpp + ${CMAKE_CURRENT_LIST_DIR}/private/SolverXpress.h +) #Clp - CBc -IF(COIN_OR) - list(APPEND Solver_sources - ${CMAKE_CURRENT_LIST_DIR}/SolverCbc.cpp - ${CMAKE_CURRENT_LIST_DIR}/SolverClp.cpp - ${CMAKE_CURRENT_LIST_DIR}/COIN_common_functions.cpp - ) -ENDIF(COIN_OR) +IF (COIN_OR) + list(APPEND Solver_sources + ${CMAKE_CURRENT_LIST_DIR}/SolverCbc.cpp + ${CMAKE_CURRENT_LIST_DIR}/SolverClp.cpp + ${CMAKE_CURRENT_LIST_DIR}/COIN_common_functions.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/private/COIN_common_functions.h + ${CMAKE_CURRENT_SOURCE_DIR}/private/SolverCbc.h + ${CMAKE_CURRENT_SOURCE_DIR}/private/SolverClp.h + ) +ENDIF (COIN_OR) # --------------------------------------------------------------------------- # Solver library creation and conditionnal link to internal solvers libraries # --------------------------------------------------------------------------- -add_library (solvers STATIC - ${Solver_sources} - ${XPRESS_LOAD} +add_library(solvers) +target_sources(solvers PRIVATE + ${Solver_sources} + ${XPRESS_LOAD} ) -get_target_property(xpansion_interfaces_path xpansion_interfaces INTERFACE_INCLUDE_DIRECTORIES) -target_include_directories (solvers - PUBLIC - ${CMAKE_CURRENT_SOURCE_DIR}/include - PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR} - public - ${xpansion_interfaces_path} + +add_library(antaresXpansion::solvers ALIAS solvers) + +target_include_directories(solvers + PUBLIC + $ + PRIVATE + $ ) target_link_libraries(solvers - PUBLIC - ${CMAKE_DL_LIBS} + PUBLIC + ${PROJECT_NAME}::xpansion_interfaces + ${CMAKE_DL_LIBS} ) #CLP-CBC -if(COIN_OR) - target_link_libraries (solvers - PRIVATE - Coin::Clp - Coin::Cgl - Coin::CoinUtils - Coin::Osi - Coin::Cbc - ) -endif() +if (COIN_OR) + target_link_libraries(solvers + PRIVATE + Coin::Clp + Coin::Cgl + Coin::CoinUtils + Coin::Osi + Coin::Cbc + ) +endif () + +install(DIRECTORY include/antares-xpansion + DESTINATION "include" +) \ No newline at end of file diff --git a/src/cpp/multisolver_interface/COIN_common_functions.cpp b/src/cpp/multisolver_interface/COIN_common_functions.cpp index 99ddfd20f..88bfbcc51 100644 --- a/src/cpp/multisolver_interface/COIN_common_functions.cpp +++ b/src/cpp/multisolver_interface/COIN_common_functions.cpp @@ -4,8 +4,8 @@ #include #include "CoinFinite.hpp" -#include "LogUtils.h" -#include "multisolver_interface/SolverAbstract.h" +#include "antares-xpansion/xpansion_interfaces/LogUtils.h" +#include "antares-xpansion/multisolver_interface/SolverAbstract.h" namespace coin_common { void fill_rows_from_COIN_matrix(const CoinPackedMatrix &matrix, int *mstart, diff --git a/src/cpp/multisolver_interface/SolverFactory.cpp b/src/cpp/multisolver_interface/SolverFactory.cpp index a1501431c..2492d80c6 100644 --- a/src/cpp/multisolver_interface/SolverFactory.cpp +++ b/src/cpp/multisolver_interface/SolverFactory.cpp @@ -1,13 +1,13 @@ #include "SolverXpress.h" -#include "multisolver_interface/environment.h" +#include "antares-xpansion/multisolver_interface/environment.h" #ifdef COIN_OR #include "SolverCbc.h" #include "SolverClp.h" #endif -#include "LogUtils.h" -#include "multisolver_interface/SolverFactory.h" +#include "antares-xpansion/xpansion_interfaces/LogUtils.h" +#include "antares-xpansion/multisolver_interface/SolverFactory.h" std::vector available_solvers; std::vector SolverLoader::GetAvailableSolvers( diff --git a/src/cpp/multisolver_interface/SolverXpress.cpp b/src/cpp/multisolver_interface/SolverXpress.cpp index fbbed0b9e..f657e2c7b 100644 --- a/src/cpp/multisolver_interface/SolverXpress.cpp +++ b/src/cpp/multisolver_interface/SolverXpress.cpp @@ -5,7 +5,7 @@ #include #include -#include "StringManip.h" +#include "antares-xpansion/xpansion_interfaces/StringManip.h" using namespace LoadXpress; using namespace std::literals; diff --git a/src/cpp/multisolver_interface/environment.cc b/src/cpp/multisolver_interface/environment.cc index 86c157e4c..3801e24d4 100644 --- a/src/cpp/multisolver_interface/environment.cc +++ b/src/cpp/multisolver_interface/environment.cc @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "multisolver_interface/environment.h" +#include "antares-xpansion/multisolver_interface/environment.h" #include #include diff --git a/src/cpp/multisolver_interface/include/antares-xpansion/multisolver_interface/Solver.h b/src/cpp/multisolver_interface/include/antares-xpansion/multisolver_interface/Solver.h new file mode 100644 index 000000000..6d54df3ef --- /dev/null +++ b/src/cpp/multisolver_interface/include/antares-xpansion/multisolver_interface/Solver.h @@ -0,0 +1,5 @@ +#pragma once + +#include "antares-xpansion/multisolver_interface/SolverFactory.h" + +/* Empty header to include all the library*/ \ No newline at end of file diff --git a/src/cpp/multisolver_interface/include/multisolver_interface/SolverAbstract.h b/src/cpp/multisolver_interface/include/antares-xpansion/multisolver_interface/SolverAbstract.h similarity index 99% rename from src/cpp/multisolver_interface/include/multisolver_interface/SolverAbstract.h rename to src/cpp/multisolver_interface/include/antares-xpansion/multisolver_interface/SolverAbstract.h index 74a46b068..9740d6510 100644 --- a/src/cpp/multisolver_interface/include/multisolver_interface/SolverAbstract.h +++ b/src/cpp/multisolver_interface/include/antares-xpansion/multisolver_interface/SolverAbstract.h @@ -11,7 +11,7 @@ #include #include -#include "LogUtils.h" +#include "antares-xpansion/xpansion_interfaces/LogUtils.h" class SolverLogManager { public: diff --git a/src/cpp/multisolver_interface/include/multisolver_interface/SolverFactory.h b/src/cpp/multisolver_interface/include/antares-xpansion/multisolver_interface/SolverFactory.h similarity index 95% rename from src/cpp/multisolver_interface/include/multisolver_interface/SolverFactory.h rename to src/cpp/multisolver_interface/include/antares-xpansion/multisolver_interface/SolverFactory.h index cfad21f28..7649e6d75 100644 --- a/src/cpp/multisolver_interface/include/multisolver_interface/SolverFactory.h +++ b/src/cpp/multisolver_interface/include/antares-xpansion/multisolver_interface/SolverFactory.h @@ -2,8 +2,8 @@ #include -#include "ILogger.h" -#include "multisolver_interface/SolverAbstract.h" +#include "antares-xpansion/xpansion_interfaces/ILogger.h" +#include "antares-xpansion/multisolver_interface/SolverAbstract.h" /** * \enum mapper::SOLVER_TYPE diff --git a/src/cpp/multisolver_interface/include/multisolver_interface/dynamic_library.h b/src/cpp/multisolver_interface/include/antares-xpansion/multisolver_interface/dynamic_library.h similarity index 100% rename from src/cpp/multisolver_interface/include/multisolver_interface/dynamic_library.h rename to src/cpp/multisolver_interface/include/antares-xpansion/multisolver_interface/dynamic_library.h diff --git a/src/cpp/multisolver_interface/include/multisolver_interface/environment.h b/src/cpp/multisolver_interface/include/antares-xpansion/multisolver_interface/environment.h similarity index 99% rename from src/cpp/multisolver_interface/include/multisolver_interface/environment.h rename to src/cpp/multisolver_interface/include/antares-xpansion/multisolver_interface/environment.h index fc9041d01..c2c5bf45e 100644 --- a/src/cpp/multisolver_interface/include/multisolver_interface/environment.h +++ b/src/cpp/multisolver_interface/include/antares-xpansion/multisolver_interface/environment.h @@ -16,7 +16,7 @@ #pragma once #include -#include "ILogger.h" +#include "antares-xpansion/xpansion_interfaces/ILogger.h" #include "dynamic_library.h" extern "C" { typedef struct xo_prob_struct* XPRSprob; diff --git a/src/cpp/multisolver_interface/include/multisolver_interface/Solver.h b/src/cpp/multisolver_interface/include/multisolver_interface/Solver.h deleted file mode 100644 index dbe9163a9..000000000 --- a/src/cpp/multisolver_interface/include/multisolver_interface/Solver.h +++ /dev/null @@ -1,5 +0,0 @@ -#pragma once - -#include "multisolver_interface/SolverFactory.h" - -/* Empty header to include all the library*/ \ No newline at end of file diff --git a/src/cpp/multisolver_interface/COIN_common_functions.h b/src/cpp/multisolver_interface/private/COIN_common_functions.h similarity index 100% rename from src/cpp/multisolver_interface/COIN_common_functions.h rename to src/cpp/multisolver_interface/private/COIN_common_functions.h diff --git a/src/cpp/multisolver_interface/SolverCbc.h b/src/cpp/multisolver_interface/private/SolverCbc.h similarity index 99% rename from src/cpp/multisolver_interface/SolverCbc.h rename to src/cpp/multisolver_interface/private/SolverCbc.h index 48e161981..06d303a43 100644 --- a/src/cpp/multisolver_interface/SolverCbc.h +++ b/src/cpp/multisolver_interface/private/SolverCbc.h @@ -7,7 +7,7 @@ #include "CoinHelperFunctions.hpp" #include "CoinMpsIO.hpp" #include "OsiClpSolverInterface.hpp" -#include "multisolver_interface/SolverAbstract.h" +#include "antares-xpansion/multisolver_interface/SolverAbstract.h" /*! * \class class SolverCbc diff --git a/src/cpp/multisolver_interface/SolverClp.h b/src/cpp/multisolver_interface/private/SolverClp.h similarity index 99% rename from src/cpp/multisolver_interface/SolverClp.h rename to src/cpp/multisolver_interface/private/SolverClp.h index 766e4c510..d008cccfe 100644 --- a/src/cpp/multisolver_interface/SolverClp.h +++ b/src/cpp/multisolver_interface/private/SolverClp.h @@ -3,7 +3,7 @@ #include "ClpSimplex.hpp" #include "CoinHelperFunctions.hpp" #include "CoinIndexedVector.hpp" -#include "multisolver_interface/SolverAbstract.h" +#include "antares-xpansion/multisolver_interface/SolverAbstract.h" enum CLP_STATUS { CLP_OPTIMAL, diff --git a/src/cpp/multisolver_interface/SolverXpress.h b/src/cpp/multisolver_interface/private/SolverXpress.h similarity index 98% rename from src/cpp/multisolver_interface/SolverXpress.h rename to src/cpp/multisolver_interface/private/SolverXpress.h index deb82874c..d104cab9f 100644 --- a/src/cpp/multisolver_interface/SolverXpress.h +++ b/src/cpp/multisolver_interface/private/SolverXpress.h @@ -3,8 +3,8 @@ #include #include -#include "multisolver_interface/SolverAbstract.h" -#include "multisolver_interface/environment.h" +#include "antares-xpansion/multisolver_interface/SolverAbstract.h" +#include "antares-xpansion/multisolver_interface/environment.h" /*! * \class class SolverXpress diff --git a/src/cpp/sensitivity/Analysis.cpp b/src/cpp/sensitivity/Analysis.cpp index 2da3ce51a..8545dc4ee 100644 --- a/src/cpp/sensitivity/Analysis.cpp +++ b/src/cpp/sensitivity/Analysis.cpp @@ -1,8 +1,8 @@ #include "Analysis.h" -#include "ProblemModifierCapex.h" -#include "ProblemModifierProjection.h" -#include "SensitivityOutputData.h" +#include "antares-xpansion/sensitivity/ProblemModifierCapex.h" +#include "antares-xpansion/sensitivity/ProblemModifierProjection.h" +#include "antares-xpansion/sensitivity/SensitivityOutputData.h" Analysis::Analysis(SensitivityInputData input_data, std::string candidate_name, std::shared_ptr logger, diff --git a/src/cpp/sensitivity/CMakeLists.txt b/src/cpp/sensitivity/CMakeLists.txt index abca22aba..a5b3c5b5a 100644 --- a/src/cpp/sensitivity/CMakeLists.txt +++ b/src/cpp/sensitivity/CMakeLists.txt @@ -1,25 +1,38 @@ -add_library (sensitivity_core - SensitivityInputReader.cpp - SensitivityMasterLogger.cpp +add_library(sensitivity_core) +target_sources(sensitivity_core PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/sensitivity/ProblemModifierCapex.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/sensitivity/ProblemModifierProjection.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/sensitivity/SensitivityFileLogger.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/sensitivity/SensitivityInputReader.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/sensitivity/SensitivityLogger.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/sensitivity/SensitivityMasterLogger.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/sensitivity/SensitivityProblemModifier.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/sensitivity/SensitivityStudy.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/sensitivity/SensitivityWriter.h + ${CMAKE_CURRENT_SOURCE_DIR}/private/Analysis.h + Analysis.cpp + ProblemModifierCapex.cpp + ProblemModifierProjection.cpp + SensitivityFileLogger.cpp + SensitivityInputReader.cpp SensitivityLogger.cpp - SensitivityFileLogger.cpp - SensitivityStudy.cpp - SensitivityWriter.cpp + SensitivityMasterLogger.cpp SensitivityProblemModifier.cpp - ProblemModifierCapex.cpp - ProblemModifierProjection.cpp - Analysis.h - Analysis.cpp) + SensitivityStudy.cpp + SensitivityWriter.cpp +) -target_include_directories (sensitivity_core - PUBLIC - ${CMAKE_CURRENT_SOURCE_DIR}/include +target_include_directories(sensitivity_core + PUBLIC + $ + PRIVATE + $ ) -target_link_libraries (sensitivity_core - PUBLIC - logger_lib +target_link_libraries(sensitivity_core + PUBLIC + antaresXpansion::logger_lib ) -add_library (${PROJECT_NAME}::sensitivity_core ALIAS sensitivity_core) \ No newline at end of file +add_library(${PROJECT_NAME}::sensitivity_core ALIAS sensitivity_core) \ No newline at end of file diff --git a/src/cpp/sensitivity/ProblemModifierCapex.cpp b/src/cpp/sensitivity/ProblemModifierCapex.cpp index c58ea8fca..6f66da32b 100644 --- a/src/cpp/sensitivity/ProblemModifierCapex.cpp +++ b/src/cpp/sensitivity/ProblemModifierCapex.cpp @@ -1,8 +1,8 @@ -#include "ProblemModifierCapex.h" +#include "antares-xpansion/sensitivity/ProblemModifierCapex.h" #include -#include "solver_utils.h" +#include "antares-xpansion/helpers/solver_utils.h" ProblemModifierCapex::ProblemModifierCapex( double epsilon, double best_ub, diff --git a/src/cpp/sensitivity/ProblemModifierProjection.cpp b/src/cpp/sensitivity/ProblemModifierProjection.cpp index 9a4acc2b2..eabd78ea8 100644 --- a/src/cpp/sensitivity/ProblemModifierProjection.cpp +++ b/src/cpp/sensitivity/ProblemModifierProjection.cpp @@ -1,9 +1,9 @@ -#include "ProblemModifierProjection.h" +#include "antares-xpansion/sensitivity/ProblemModifierProjection.h" #include #include -#include "solver_utils.h" +#include "antares-xpansion/helpers/solver_utils.h" ProblemModifierProjection::ProblemModifierProjection( double epsilon, double best_ub, diff --git a/src/cpp/sensitivity/SensitivityFileLogger.cpp b/src/cpp/sensitivity/SensitivityFileLogger.cpp index aac606bfe..5c92801de 100644 --- a/src/cpp/sensitivity/SensitivityFileLogger.cpp +++ b/src/cpp/sensitivity/SensitivityFileLogger.cpp @@ -1,4 +1,4 @@ -#include "SensitivityFileLogger.h" +#include "antares-xpansion/sensitivity/SensitivityFileLogger.h" #include #include diff --git a/src/cpp/sensitivity/SensitivityInputReader.cpp b/src/cpp/sensitivity/SensitivityInputReader.cpp index aca1f21cf..e70f0a485 100644 --- a/src/cpp/sensitivity/SensitivityInputReader.cpp +++ b/src/cpp/sensitivity/SensitivityInputReader.cpp @@ -1,13 +1,13 @@ -#include "SensitivityInputReader.h" +#include "antares-xpansion/sensitivity/SensitivityInputReader.h" #include #include #include -#include "LogUtils.h" -#include "OutputWriter.h" -#include "common.h" -#include "multisolver_interface/SolverFactory.h" +#include "antares-xpansion/xpansion_interfaces/LogUtils.h" +#include "antares-xpansion/xpansion_interfaces/OutputWriter.h" +#include "antares-xpansion/benders/benders_core/common.h" +#include "antares-xpansion/multisolver_interface/SolverFactory.h" const std::string EPSILON_C("epsilon"); const std::string CAPEX_C("capex"); diff --git a/src/cpp/sensitivity/SensitivityLogger.cpp b/src/cpp/sensitivity/SensitivityLogger.cpp index c438795b1..032981a53 100644 --- a/src/cpp/sensitivity/SensitivityLogger.cpp +++ b/src/cpp/sensitivity/SensitivityLogger.cpp @@ -1,8 +1,8 @@ -#include "SensitivityLogger.h" +#include "antares-xpansion/sensitivity/SensitivityLogger.h" #include -#include "Commons.h" +#include "antares-xpansion/benders/logger/Commons.h" SensitivityLogger::SensitivityLogger(std::ostream& stream) : _stream(stream) { if (_stream.fail()) { diff --git a/src/cpp/sensitivity/SensitivityMasterLogger.cpp b/src/cpp/sensitivity/SensitivityMasterLogger.cpp index c0fb8b8fb..7c9d0d838 100644 --- a/src/cpp/sensitivity/SensitivityMasterLogger.cpp +++ b/src/cpp/sensitivity/SensitivityMasterLogger.cpp @@ -1,4 +1,4 @@ -#include "SensitivityMasterLogger.h" +#include "antares-xpansion/sensitivity/SensitivityMasterLogger.h" void SensitivityMasterLogger::display_message(const std::string& msg) { for (const auto& logger : _loggers) { diff --git a/src/cpp/sensitivity/SensitivityProblemModifier.cpp b/src/cpp/sensitivity/SensitivityProblemModifier.cpp index d6b009bf9..de227ca67 100644 --- a/src/cpp/sensitivity/SensitivityProblemModifier.cpp +++ b/src/cpp/sensitivity/SensitivityProblemModifier.cpp @@ -1,9 +1,9 @@ -#include "SensitivityProblemModifier.h" +#include "antares-xpansion/sensitivity/SensitivityProblemModifier.h" #include #include -#include "solver_utils.h" +#include "antares-xpansion/helpers/solver_utils.h" SensitivityProblemModifier::SensitivityProblemModifier( double epsilon, double best_ub, diff --git a/src/cpp/sensitivity/SensitivityStudy.cpp b/src/cpp/sensitivity/SensitivityStudy.cpp index 38e036664..1dba02a77 100644 --- a/src/cpp/sensitivity/SensitivityStudy.cpp +++ b/src/cpp/sensitivity/SensitivityStudy.cpp @@ -1,4 +1,4 @@ -#include "SensitivityStudy.h" +#include "antares-xpansion/sensitivity/SensitivityStudy.h" #include #include diff --git a/src/cpp/sensitivity/SensitivityWriter.cpp b/src/cpp/sensitivity/SensitivityWriter.cpp index 980da7871..278a4c40e 100644 --- a/src/cpp/sensitivity/SensitivityWriter.cpp +++ b/src/cpp/sensitivity/SensitivityWriter.cpp @@ -1,4 +1,4 @@ -#include "SensitivityWriter.h" +#include "antares-xpansion/sensitivity/SensitivityWriter.h" #include #include diff --git a/src/cpp/sensitivity/include/ProblemModifierCapex.h b/src/cpp/sensitivity/include/antares-xpansion/sensitivity/ProblemModifierCapex.h similarity index 86% rename from src/cpp/sensitivity/include/ProblemModifierCapex.h rename to src/cpp/sensitivity/include/antares-xpansion/sensitivity/ProblemModifierCapex.h index bd9430b55..eabe81cfb 100644 --- a/src/cpp/sensitivity/include/ProblemModifierCapex.h +++ b/src/cpp/sensitivity/include/antares-xpansion/sensitivity/ProblemModifierCapex.h @@ -1,6 +1,6 @@ #pragma once -#include "SensitivityProblemModifier.h" +#include "antares-xpansion/sensitivity/SensitivityProblemModifier.h" class ProblemModifierCapex : public SensitivityProblemModifier { public: diff --git a/src/cpp/sensitivity/include/ProblemModifierProjection.h b/src/cpp/sensitivity/include/antares-xpansion/sensitivity/ProblemModifierProjection.h similarity index 89% rename from src/cpp/sensitivity/include/ProblemModifierProjection.h rename to src/cpp/sensitivity/include/antares-xpansion/sensitivity/ProblemModifierProjection.h index 3d5b4c9f9..02e50c07c 100644 --- a/src/cpp/sensitivity/include/ProblemModifierProjection.h +++ b/src/cpp/sensitivity/include/antares-xpansion/sensitivity/ProblemModifierProjection.h @@ -1,6 +1,6 @@ #pragma once -#include "SensitivityProblemModifier.h" +#include "antares-xpansion/sensitivity/SensitivityProblemModifier.h" class ProblemModifierProjection : public SensitivityProblemModifier { public: diff --git a/src/cpp/sensitivity/include/SensitivityFileLogger.h b/src/cpp/sensitivity/include/antares-xpansion/sensitivity/SensitivityFileLogger.h similarity index 87% rename from src/cpp/sensitivity/include/SensitivityFileLogger.h rename to src/cpp/sensitivity/include/antares-xpansion/sensitivity/SensitivityFileLogger.h index a71f23d10..a040d91eb 100644 --- a/src/cpp/sensitivity/include/SensitivityFileLogger.h +++ b/src/cpp/sensitivity/include/antares-xpansion/sensitivity/SensitivityFileLogger.h @@ -5,8 +5,8 @@ #include #include -#include "SensitivityILogger.h" -#include "SensitivityLogger.h" +#include "antares-xpansion/sensitivity/SensitivityILogger.h" +#include "antares-xpansion/sensitivity/SensitivityLogger.h" class SensitivityFileLogger : public SensitivityILogger { public: diff --git a/src/cpp/sensitivity/include/SensitivityILogger.h b/src/cpp/sensitivity/include/antares-xpansion/sensitivity/SensitivityILogger.h similarity index 84% rename from src/cpp/sensitivity/include/SensitivityILogger.h rename to src/cpp/sensitivity/include/antares-xpansion/sensitivity/SensitivityILogger.h index c2938684e..403f48320 100644 --- a/src/cpp/sensitivity/include/SensitivityILogger.h +++ b/src/cpp/sensitivity/include/antares-xpansion/sensitivity/SensitivityILogger.h @@ -3,8 +3,8 @@ #include -#include "SensitivityInputReader.h" -#include "SensitivityOutputData.h" +#include "antares-xpansion/sensitivity/SensitivityInputReader.h" +#include "antares-xpansion/sensitivity/SensitivityOutputData.h" class SensitivityILogger { public: diff --git a/src/cpp/sensitivity/include/SensitivityInputReader.h b/src/cpp/sensitivity/include/antares-xpansion/sensitivity/SensitivityInputReader.h similarity index 95% rename from src/cpp/sensitivity/include/SensitivityInputReader.h rename to src/cpp/sensitivity/include/antares-xpansion/sensitivity/SensitivityInputReader.h index 0bb55445b..df9235260 100644 --- a/src/cpp/sensitivity/include/SensitivityInputReader.h +++ b/src/cpp/sensitivity/include/antares-xpansion/sensitivity/SensitivityInputReader.h @@ -1,7 +1,7 @@ #pragma once #include -#include +#include "antares-xpansion/multisolver_interface/SolverAbstract.h" #include diff --git a/src/cpp/sensitivity/include/SensitivityLogger.h b/src/cpp/sensitivity/include/antares-xpansion/sensitivity/SensitivityLogger.h similarity index 95% rename from src/cpp/sensitivity/include/SensitivityLogger.h rename to src/cpp/sensitivity/include/antares-xpansion/sensitivity/SensitivityLogger.h index 72df1246a..44d9d32e9 100644 --- a/src/cpp/sensitivity/include/SensitivityLogger.h +++ b/src/cpp/sensitivity/include/antares-xpansion/sensitivity/SensitivityLogger.h @@ -3,7 +3,7 @@ #include -#include "SensitivityILogger.h" +#include "antares-xpansion/sensitivity/SensitivityILogger.h" const std::string indent_1("\t"); const std::string EUROS(" e"); diff --git a/src/cpp/sensitivity/include/SensitivityMasterLogger.h b/src/cpp/sensitivity/include/antares-xpansion/sensitivity/SensitivityMasterLogger.h similarity index 93% rename from src/cpp/sensitivity/include/SensitivityMasterLogger.h rename to src/cpp/sensitivity/include/antares-xpansion/sensitivity/SensitivityMasterLogger.h index 6d33002bd..184dfd91d 100644 --- a/src/cpp/sensitivity/include/SensitivityMasterLogger.h +++ b/src/cpp/sensitivity/include/antares-xpansion/sensitivity/SensitivityMasterLogger.h @@ -4,7 +4,7 @@ #include #include -#include "SensitivityILogger.h" +#include "antares-xpansion/sensitivity/SensitivityILogger.h" class SensitivityMasterLogger : public SensitivityILogger { public: diff --git a/src/cpp/sensitivity/include/SensitivityOutputData.h b/src/cpp/sensitivity/include/antares-xpansion/sensitivity/SensitivityOutputData.h similarity index 97% rename from src/cpp/sensitivity/include/SensitivityOutputData.h rename to src/cpp/sensitivity/include/antares-xpansion/sensitivity/SensitivityOutputData.h index 45615cd33..c4edd3368 100644 --- a/src/cpp/sensitivity/include/SensitivityOutputData.h +++ b/src/cpp/sensitivity/include/antares-xpansion/sensitivity/SensitivityOutputData.h @@ -3,7 +3,7 @@ #include #include -#include "common.h" +#include "antares-xpansion/benders/benders_core/common.h" const std::string MIN_C("min"); const std::string MAX_C("max"); diff --git a/src/cpp/sensitivity/include/SensitivityProblemModifier.h b/src/cpp/sensitivity/include/antares-xpansion/sensitivity/SensitivityProblemModifier.h similarity index 84% rename from src/cpp/sensitivity/include/SensitivityProblemModifier.h rename to src/cpp/sensitivity/include/antares-xpansion/sensitivity/SensitivityProblemModifier.h index 165cb4d05..a85ad38fb 100644 --- a/src/cpp/sensitivity/include/SensitivityProblemModifier.h +++ b/src/cpp/sensitivity/include/antares-xpansion/sensitivity/SensitivityProblemModifier.h @@ -1,8 +1,8 @@ #pragma once -#include +#include "antares-xpansion/multisolver_interface/SolverAbstract.h" -#include "common.h" +#include "antares-xpansion/benders/benders_core/common.h" class SensitivityProblemModifier { public: diff --git a/src/cpp/sensitivity/include/SensitivityStudy.h b/src/cpp/sensitivity/include/antares-xpansion/sensitivity/SensitivityStudy.h similarity index 65% rename from src/cpp/sensitivity/include/SensitivityStudy.h rename to src/cpp/sensitivity/include/antares-xpansion/sensitivity/SensitivityStudy.h index 841d700cd..dad4f6952 100644 --- a/src/cpp/sensitivity/include/SensitivityStudy.h +++ b/src/cpp/sensitivity/include/antares-xpansion/sensitivity/SensitivityStudy.h @@ -1,12 +1,12 @@ #pragma once -#include +#include "antares-xpansion/multisolver_interface/SolverAbstract.h" -#include "SensitivityILogger.h" -#include "SensitivityInputReader.h" -#include "SensitivityOutputData.h" -#include "SensitivityProblemModifier.h" -#include "SensitivityWriter.h" +#include "antares-xpansion/sensitivity/SensitivityILogger.h" +#include "antares-xpansion/sensitivity/SensitivityInputReader.h" +#include "antares-xpansion/sensitivity/SensitivityOutputData.h" +#include "antares-xpansion/sensitivity/SensitivityProblemModifier.h" +#include "antares-xpansion/sensitivity/SensitivityWriter.h" class SensitivityStudy { public: diff --git a/src/cpp/sensitivity/include/SensitivityWriter.h b/src/cpp/sensitivity/include/antares-xpansion/sensitivity/SensitivityWriter.h similarity index 90% rename from src/cpp/sensitivity/include/SensitivityWriter.h rename to src/cpp/sensitivity/include/antares-xpansion/sensitivity/SensitivityWriter.h index 78953a1c9..885f994f9 100644 --- a/src/cpp/sensitivity/include/SensitivityWriter.h +++ b/src/cpp/sensitivity/include/antares-xpansion/sensitivity/SensitivityWriter.h @@ -4,8 +4,8 @@ #include -#include "SensitivityInputReader.h" -#include "SensitivityOutputData.h" +#include "antares-xpansion/sensitivity/SensitivityInputReader.h" +#include "antares-xpansion/sensitivity/SensitivityOutputData.h" const std::string ANTARES_C("antares"); const std::string VERSION_C("version"); diff --git a/src/cpp/sensitivity/Analysis.h b/src/cpp/sensitivity/private/Analysis.h similarity index 82% rename from src/cpp/sensitivity/Analysis.h rename to src/cpp/sensitivity/private/Analysis.h index 9f8af3792..c5413fe9e 100644 --- a/src/cpp/sensitivity/Analysis.h +++ b/src/cpp/sensitivity/private/Analysis.h @@ -1,8 +1,8 @@ #ifndef __ANALYSIS_H__ #define __ANALYSIS_H__ -#include "SensitivityILogger.h" -#include "SensitivityInputReader.h" -#include "SensitivityStudy.h" +#include "antares-xpansion/sensitivity/SensitivityILogger.h" +#include "antares-xpansion/sensitivity/SensitivityInputReader.h" +#include "antares-xpansion/sensitivity/SensitivityStudy.h" class Analysis { public: diff --git a/src/cpp/study-updater/CMakeLists.txt b/src/cpp/study-updater/CMakeLists.txt index 114df51a1..3f729950e 100644 --- a/src/cpp/study-updater/CMakeLists.txt +++ b/src/cpp/study-updater/CMakeLists.txt @@ -1,36 +1,37 @@ -add_library (xpansion_study_updater_lib - ${CMAKE_CURRENT_SOURCE_DIR}/LinkCapacitiesCSVWriter.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/StudyUpdateStrategy.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/StudyUpdateLinkCapacitiesStrategy.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/StudyUpdateLinkParameterStrategy.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/StudyUpdateRunner.cpp +add_library(xpansion_study_updater_lib) +target_sources(xpansion_study_updater_lib PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/LinkCapacitiesCSVWriter.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/StudyUpdateStrategy.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/StudyUpdateLinkCapacitiesStrategy.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/StudyUpdateLinkParameterStrategy.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/StudyUpdateRunner.cpp ${CMAKE_CURRENT_SOURCE_DIR}/LinkParametersCSVOverwriter.cpp ${CMAKE_CURRENT_SOURCE_DIR}/StudyUpdater.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/study-updater/LinkCapacitiesCSVWriter.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/study-updater/StudyUpdateStrategy.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/study-updater/StudyUpdateLinkCapacitiesStrategy.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/study-updater/StudyUpdateLinkParameterStrategy.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/study-updater/StudyUpdateRunner.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/study-updater/LinkParametersCSVOverwriter.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/study-updater/StudyUpdater.h ) -target_link_libraries (xpansion_study_updater_lib - PRIVATE - ${PROJECT_NAME}::lp_namer_helper - ${PROJECT_NAME}::lp_namer_model - ${PROJECT_NAME}::lp_namer_input_reader - ${PROJECT_NAME}::lp_namer_problem_modifier - helpers - ) -get_target_property(lp_namer_model_include lp_namer_model INTERFACE_INCLUDE_DIRECTORIES) -get_target_property(helpers_include helpers INTERFACE_INCLUDE_DIRECTORIES) -get_target_property(lp_namer_helper_include lp_namer_helper INTERFACE_INCLUDE_DIRECTORIES) -get_target_property(lp_namer_input_reader_include lp_namer_input_reader INTERFACE_INCLUDE_DIRECTORIES) -get_target_property(lp_namer_problem_modifier_include lp_namer_problem_modifier INTERFACE_INCLUDE_DIRECTORIES) - +target_link_libraries(xpansion_study_updater_lib + PRIVATE + ${PROJECT_NAME}::lp_namer_helper + ${PROJECT_NAME}::lp_namer_model + ${PROJECT_NAME}::lp_namer_input_reader + antaresXpansion::helpers + PUBLIC + ${PROJECT_NAME}::lp_namer_problem_modifier +) -target_include_directories(xpansion_study_updater_lib - PUBLIC - ${CMAKE_CURRENT_SOURCE_DIR}/include - ${lp_namer_model_include} - ${helpers_include} - ${lp_namer_helper_include} - ${lp_namer_input_reader_include} - ${lp_namer_problem_modifier_include} - ) +target_include_directories(xpansion_study_updater_lib + PUBLIC + $ +) -add_library (${PROJECT_NAME}::xpansion_study_updater_lib ALIAS xpansion_study_updater_lib) \ No newline at end of file +add_library(${PROJECT_NAME}::xpansion_study_updater_lib ALIAS xpansion_study_updater_lib) +install(DIRECTORY include/antares-xpansion + DESTINATION "include" +) \ No newline at end of file diff --git a/src/cpp/study-updater/LinkCapacitiesCSVWriter.cpp b/src/cpp/study-updater/LinkCapacitiesCSVWriter.cpp index 9c97c8391..bc0f97043 100644 --- a/src/cpp/study-updater/LinkCapacitiesCSVWriter.cpp +++ b/src/cpp/study-updater/LinkCapacitiesCSVWriter.cpp @@ -1,8 +1,8 @@ // // Created by marechaljas on 16/06/22. // -#include "LinkCapacitiesCSVWriter.h" -#include "LinkdataRecord.h" +#include "antares-xpansion/study-updater/LinkCapacitiesCSVWriter.h" +#include "antares-xpansion/lpnamer/problem_modifier/LinkdataRecord.h" LinkCapacitiesCSVWriter::LinkCapacitiesCSVWriter( const ActiveLink& link_p, const std::filesystem::path& linkPath) { diff --git a/src/cpp/study-updater/LinkParametersCSVOverwriter.cpp b/src/cpp/study-updater/LinkParametersCSVOverwriter.cpp index c79ffeef6..cb23022e0 100644 --- a/src/cpp/study-updater/LinkParametersCSVOverwriter.cpp +++ b/src/cpp/study-updater/LinkParametersCSVOverwriter.cpp @@ -2,11 +2,11 @@ // Created by marechaljas on 16/06/22. // -#include "LinkParametersCSVOverwriter.h" +#include "antares-xpansion/study-updater/LinkParametersCSVOverwriter.h" -#include "JsonXpansionReader.h" -#include "LinkdataRecord.h" -#include "StudyUpdater.h" +#include "antares-xpansion/helpers/JsonXpansionReader.h" +#include "antares-xpansion/lpnamer/problem_modifier/LinkdataRecord.h" +#include "antares-xpansion/study-updater/StudyUpdater.h" bool LinkParametersCSVOverWriter::open( const std::filesystem::path& linkdataFilename_l) { diff --git a/src/cpp/study-updater/StudyUpdateLinkCapacitiesStrategy.cpp b/src/cpp/study-updater/StudyUpdateLinkCapacitiesStrategy.cpp index dbfa470b9..67b04c3bb 100644 --- a/src/cpp/study-updater/StudyUpdateLinkCapacitiesStrategy.cpp +++ b/src/cpp/study-updater/StudyUpdateLinkCapacitiesStrategy.cpp @@ -2,9 +2,9 @@ // Created by marechaljas on 16/06/22. // -#include "StudyUpdateLinkCapacitiesStrategy.h" +#include "antares-xpansion/study-updater/StudyUpdateLinkCapacitiesStrategy.h" -#include "LinkCapacitiesCSVWriter.h" +#include "antares-xpansion/study-updater/LinkCapacitiesCSVWriter.h" int StudyUpdateLinkCapacitiesStrategy::UpdateLinkCapacities( const ActiveLink& link_p, diff --git a/src/cpp/study-updater/StudyUpdateLinkParameterStrategy.cpp b/src/cpp/study-updater/StudyUpdateLinkParameterStrategy.cpp index fe8df2676..35d8638c0 100644 --- a/src/cpp/study-updater/StudyUpdateLinkParameterStrategy.cpp +++ b/src/cpp/study-updater/StudyUpdateLinkParameterStrategy.cpp @@ -2,9 +2,9 @@ // Created by marechaljas on 16/06/22. // -#include "StudyUpdateLinkParameterStrategy.h" +#include "antares-xpansion/study-updater/StudyUpdateLinkParameterStrategy.h" -#include "LinkParametersCSVOverwriter.h" +#include "antares-xpansion/study-updater/LinkParametersCSVOverwriter.h" int StudyUpdateLinkParameterStrategy::Update( const ActiveLink& link, const std::map& map) { return UpdateLinkDataParameters(link, map); diff --git a/src/cpp/study-updater/StudyUpdateRunner.cpp b/src/cpp/study-updater/StudyUpdateRunner.cpp index c44fc14ea..1d26d23fe 100644 --- a/src/cpp/study-updater/StudyUpdateRunner.cpp +++ b/src/cpp/study-updater/StudyUpdateRunner.cpp @@ -1,4 +1,4 @@ -#include "StudyUpdateRunner.h" +#include "antares-xpansion/study-updater/StudyUpdateRunner.h" namespace po = boost::program_options; StudyUpdaterExeOptions::StudyUpdaterExeOptions() diff --git a/src/cpp/study-updater/StudyUpdateStrategy.cpp b/src/cpp/study-updater/StudyUpdateStrategy.cpp index c7e4c5cdd..1c408a147 100644 --- a/src/cpp/study-updater/StudyUpdateStrategy.cpp +++ b/src/cpp/study-updater/StudyUpdateStrategy.cpp @@ -2,7 +2,7 @@ // Created by marechaljas on 16/06/22. // -#include "StudyUpdateStrategy.h" +#include "antares-xpansion/study-updater/StudyUpdateStrategy.h" static const std::filesystem::path ANTARES_LINK_FOLDER = std::filesystem::path("input") / "links"; diff --git a/src/cpp/study-updater/StudyUpdater.cpp b/src/cpp/study-updater/StudyUpdater.cpp index d67978b9e..9ace90821 100644 --- a/src/cpp/study-updater/StudyUpdater.cpp +++ b/src/cpp/study-updater/StudyUpdater.cpp @@ -1,11 +1,11 @@ -#include "StudyUpdater.h" +#include "antares-xpansion/study-updater/StudyUpdater.h" #include -#include "JsonXpansionReader.h" -#include "StudyUpdateLinkCapacitiesStrategy.h" -#include "StudyUpdateLinkParameterStrategy.h" -#include "StudyUpdateStrategy.h" +#include "antares-xpansion/helpers/JsonXpansionReader.h" +#include "antares-xpansion/study-updater/StudyUpdateLinkCapacitiesStrategy.h" +#include "antares-xpansion/study-updater/StudyUpdateLinkParameterStrategy.h" +#include "antares-xpansion/study-updater/StudyUpdateStrategy.h" constexpr int ANTARES_VERSION_CAPACITIES_IN_INDIVIDUAL_FILES = 820; diff --git a/src/cpp/study-updater/include/LinkCapacitiesCSVWriter.h b/src/cpp/study-updater/include/antares-xpansion/study-updater/LinkCapacitiesCSVWriter.h similarity index 67% rename from src/cpp/study-updater/include/LinkCapacitiesCSVWriter.h rename to src/cpp/study-updater/include/antares-xpansion/study-updater/LinkCapacitiesCSVWriter.h index 6553d09bc..9faf2d1d2 100644 --- a/src/cpp/study-updater/include/LinkCapacitiesCSVWriter.h +++ b/src/cpp/study-updater/include/antares-xpansion/study-updater/LinkCapacitiesCSVWriter.h @@ -3,9 +3,9 @@ // #pragma once -#include "LinkParametersCSVOverwriter.h" -#include "LinkdataRecord.h" -#include "StudyUpdater.h" +#include "antares-xpansion/study-updater/LinkParametersCSVOverwriter.h" +#include "antares-xpansion/lpnamer/problem_modifier/LinkdataRecord.h" +#include "antares-xpansion/study-updater/StudyUpdater.h" class LinkCapacitiesCSVWriter { public: diff --git a/src/cpp/study-updater/include/LinkParametersCSVOverwriter.h b/src/cpp/study-updater/include/antares-xpansion/study-updater/LinkParametersCSVOverwriter.h similarity index 91% rename from src/cpp/study-updater/include/LinkParametersCSVOverwriter.h rename to src/cpp/study-updater/include/antares-xpansion/study-updater/LinkParametersCSVOverwriter.h index 8900a911c..c5d7bc8a0 100644 --- a/src/cpp/study-updater/include/LinkParametersCSVOverwriter.h +++ b/src/cpp/study-updater/include/antares-xpansion/study-updater/LinkParametersCSVOverwriter.h @@ -6,7 +6,7 @@ #include -#include "LinkdataRecord.h" +#include "antares-xpansion/lpnamer/problem_modifier/LinkdataRecord.h" class LinkParametersCSVOverWriter { public: diff --git a/src/cpp/study-updater/include/StudyUpdateLinkCapacitiesStrategy.h b/src/cpp/study-updater/include/antares-xpansion/study-updater/StudyUpdateLinkCapacitiesStrategy.h similarity index 85% rename from src/cpp/study-updater/include/StudyUpdateLinkCapacitiesStrategy.h rename to src/cpp/study-updater/include/antares-xpansion/study-updater/StudyUpdateLinkCapacitiesStrategy.h index c2bc00d6e..cdc9d2bac 100644 --- a/src/cpp/study-updater/include/StudyUpdateLinkCapacitiesStrategy.h +++ b/src/cpp/study-updater/include/antares-xpansion/study-updater/StudyUpdateLinkCapacitiesStrategy.h @@ -4,8 +4,8 @@ #pragma once -#include "ActiveLinks.h" -#include "StudyUpdateStrategy.h" +#include "antares-xpansion/lpnamer/model/ActiveLinks.h" +#include "antares-xpansion/study-updater/StudyUpdateStrategy.h" class StudyUpdateLinkCapacitiesStrategy : public StudyUpdateStrategy { public: explicit StudyUpdateLinkCapacitiesStrategy( diff --git a/src/cpp/study-updater/include/StudyUpdateLinkParameterStrategy.h b/src/cpp/study-updater/include/antares-xpansion/study-updater/StudyUpdateLinkParameterStrategy.h similarity index 92% rename from src/cpp/study-updater/include/StudyUpdateLinkParameterStrategy.h rename to src/cpp/study-updater/include/antares-xpansion/study-updater/StudyUpdateLinkParameterStrategy.h index 318c805ca..78cec4644 100644 --- a/src/cpp/study-updater/include/StudyUpdateLinkParameterStrategy.h +++ b/src/cpp/study-updater/include/antares-xpansion/study-updater/StudyUpdateLinkParameterStrategy.h @@ -4,8 +4,8 @@ #pragma once -#include "ActiveLinks.h" -#include "StudyUpdateStrategy.h" +#include "antares-xpansion/lpnamer/model/ActiveLinks.h" +#include "antares-xpansion/study-updater/StudyUpdateStrategy.h" class StudyUpdateLinkParameterStrategy : public StudyUpdateStrategy { public: explicit StudyUpdateLinkParameterStrategy( diff --git a/src/cpp/study-updater/include/StudyUpdateRunner.h b/src/cpp/study-updater/include/antares-xpansion/study-updater/StudyUpdateRunner.h similarity index 71% rename from src/cpp/study-updater/include/StudyUpdateRunner.h rename to src/cpp/study-updater/include/antares-xpansion/study-updater/StudyUpdateRunner.h index de001e821..fa299c602 100644 --- a/src/cpp/study-updater/include/StudyUpdateRunner.h +++ b/src/cpp/study-updater/include/antares-xpansion/study-updater/StudyUpdateRunner.h @@ -6,12 +6,12 @@ #include #include -#include "ActiveLinks.h" -#include "CandidatesINIReader.h" -#include "LauncherHelpers.h" -#include "LinkProfileReader.h" -#include "OptionsParser.h" -#include "StudyUpdater.h" +#include "antares-xpansion/lpnamer/model/ActiveLinks.h" +#include "antares-xpansion/lpnamer/input_reader/CandidatesINIReader.h" +#include "antares-xpansion/lpnamer/problem_modifier/LauncherHelpers.h" +#include "antares-xpansion/lpnamer/input_reader/LinkProfileReader.h" +#include "antares-xpansion/helpers/OptionsParser.h" +#include "antares-xpansion/study-updater/StudyUpdater.h" class StudyUpdaterExeOptions : public OptionsParser { private: std::filesystem::path xpansion_output_dir_; diff --git a/src/cpp/study-updater/include/StudyUpdateStrategy.h b/src/cpp/study-updater/include/antares-xpansion/study-updater/StudyUpdateStrategy.h similarity index 84% rename from src/cpp/study-updater/include/StudyUpdateStrategy.h rename to src/cpp/study-updater/include/antares-xpansion/study-updater/StudyUpdateStrategy.h index 3b691037e..12a67138b 100644 --- a/src/cpp/study-updater/include/StudyUpdateStrategy.h +++ b/src/cpp/study-updater/include/antares-xpansion/study-updater/StudyUpdateStrategy.h @@ -4,9 +4,9 @@ #pragma once -#include "ActiveLinks.h" -#include "LogUtils.h" -#include "ProblemGenerationLogger.h" +#include "antares-xpansion/lpnamer/model/ActiveLinks.h" +#include "antares-xpansion/xpansion_interfaces/LogUtils.h" +#include "antares-xpansion/lpnamer/helper/ProblemGenerationLogger.h" class StudyUpdateStrategy { public: diff --git a/src/cpp/study-updater/include/StudyUpdater.h b/src/cpp/study-updater/include/antares-xpansion/study-updater/StudyUpdater.h similarity index 89% rename from src/cpp/study-updater/include/StudyUpdater.h rename to src/cpp/study-updater/include/antares-xpansion/study-updater/StudyUpdater.h index 015437108..052cd2dd9 100644 --- a/src/cpp/study-updater/include/StudyUpdater.h +++ b/src/cpp/study-updater/include/antares-xpansion/study-updater/StudyUpdater.h @@ -2,10 +2,10 @@ #include -#include "ActiveLinks.h" -#include "AntaresVersionProvider.h" -#include "LinkProblemsGenerator.h" -#include "ProblemGenerationLogger.h" +#include "antares-xpansion/lpnamer/model/ActiveLinks.h" +#include "antares-xpansion/helpers/AntaresVersionProvider.h" +#include "antares-xpansion/lpnamer/problem_modifier/LinkProblemsGenerator.h" +#include "antares-xpansion/lpnamer/helper/ProblemGenerationLogger.h" /*! * \class StudyUpdater diff --git a/src/cpp/xpansion_interfaces/CMakeLists.txt b/src/cpp/xpansion_interfaces/CMakeLists.txt index b7e01c15d..e5ec3f9c9 100644 --- a/src/cpp/xpansion_interfaces/CMakeLists.txt +++ b/src/cpp/xpansion_interfaces/CMakeLists.txt @@ -6,9 +6,17 @@ # Targets # =========================================================================== -add_library (xpansion_interfaces INTERFACE - ) -target_include_directories(xpansion_interfaces INTERFACE - ${CMAKE_CURRENT_SOURCE_DIR} - ) -add_library (${PROJECT_NAME}::xpansion_interfaces ALIAS xpansion_interfaces) +add_library(xpansion_interfaces INTERFACE) +target_sources(xpansion_interfaces + INTERFACE + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/xpansion_interfaces/ILogger.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/xpansion_interfaces/IWriterLogger.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/xpansion_interfaces/LogUtils.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/xpansion_interfaces/OutputWriter.h + ${CMAKE_CURRENT_SOURCE_DIR}/include/antares-xpansion/xpansion_interfaces/StringManip.h +) +target_include_directories(xpansion_interfaces + INTERFACE + $ +) +add_library(${PROJECT_NAME}::xpansion_interfaces ALIAS xpansion_interfaces) diff --git a/src/cpp/xpansion_interfaces/ILogger.h b/src/cpp/xpansion_interfaces/include/antares-xpansion/xpansion_interfaces/ILogger.h similarity index 98% rename from src/cpp/xpansion_interfaces/ILogger.h rename to src/cpp/xpansion_interfaces/include/antares-xpansion/xpansion_interfaces/ILogger.h index 325ce0ccb..447aea386 100644 --- a/src/cpp/xpansion_interfaces/ILogger.h +++ b/src/cpp/xpansion_interfaces/include/antares-xpansion/xpansion_interfaces/ILogger.h @@ -7,7 +7,7 @@ #include #include -#include "LogUtils.h" +#include "antares-xpansion/xpansion_interfaces/LogUtils.h" typedef std::map LogPoint; diff --git a/src/cpp/xpansion_interfaces/IWriterLogger.h b/src/cpp/xpansion_interfaces/include/antares-xpansion/xpansion_interfaces/IWriterLogger.h similarity index 100% rename from src/cpp/xpansion_interfaces/IWriterLogger.h rename to src/cpp/xpansion_interfaces/include/antares-xpansion/xpansion_interfaces/IWriterLogger.h diff --git a/src/cpp/xpansion_interfaces/LogUtils.h b/src/cpp/xpansion_interfaces/include/antares-xpansion/xpansion_interfaces/LogUtils.h similarity index 100% rename from src/cpp/xpansion_interfaces/LogUtils.h rename to src/cpp/xpansion_interfaces/include/antares-xpansion/xpansion_interfaces/LogUtils.h diff --git a/src/cpp/xpansion_interfaces/OutputWriter.h b/src/cpp/xpansion_interfaces/include/antares-xpansion/xpansion_interfaces/OutputWriter.h similarity index 100% rename from src/cpp/xpansion_interfaces/OutputWriter.h rename to src/cpp/xpansion_interfaces/include/antares-xpansion/xpansion_interfaces/OutputWriter.h diff --git a/src/cpp/xpansion_interfaces/StringManip.h b/src/cpp/xpansion_interfaces/include/antares-xpansion/xpansion_interfaces/StringManip.h similarity index 100% rename from src/cpp/xpansion_interfaces/StringManip.h rename to src/cpp/xpansion_interfaces/include/antares-xpansion/xpansion_interfaces/StringManip.h diff --git a/tests/cpp/TestDoubles/LoggerStub.h b/tests/cpp/TestDoubles/LoggerStub.h index 99f91701a..6b118ac7f 100644 --- a/tests/cpp/TestDoubles/LoggerStub.h +++ b/tests/cpp/TestDoubles/LoggerStub.h @@ -4,7 +4,7 @@ #pragma once -#include "ILogger.h" +#include "antares-xpansion/xpansion_interfaces/ILogger.h" class LoggerNOOPStub : public ILogger { public: diff --git a/tests/cpp/TestDoubles/WriterStub.h b/tests/cpp/TestDoubles/WriterStub.h index 54f17581f..d34182449 100644 --- a/tests/cpp/TestDoubles/WriterStub.h +++ b/tests/cpp/TestDoubles/WriterStub.h @@ -3,7 +3,7 @@ // #pragma once -#include "OutputWriter.h" +#include "antares-xpansion/xpansion_interfaces/OutputWriter.h" class WriterNOOPStub : public Output::OutputWriter { public: diff --git a/tests/cpp/benders/BendersByBatchTest.cpp b/tests/cpp/benders/BendersByBatchTest.cpp index d968bab9a..9452d7400 100644 --- a/tests/cpp/benders/BendersByBatchTest.cpp +++ b/tests/cpp/benders/BendersByBatchTest.cpp @@ -1,12 +1,12 @@ #include -#include "BatchCollection.h" -#include "BendersByBatch.h" +#include "antares-xpansion/benders/benders_by_batch/BatchCollection.h" +#include "antares-xpansion/benders/benders_by_batch/BendersByBatch.h" #include "LogPrefixManip.h" -#include "RandomBatchShuffler.h" +#include "antares-xpansion/benders/benders_by_batch/RandomBatchShuffler.h" #include "gtest/gtest.h" -#include "logger/Master.h" -#include "logger/User.h" +#include "antares-xpansion/benders/logger/Master.h" +#include "antares-xpansion/benders/logger/User.h" class BatchCollectionTest : public ::testing::Test { public: diff --git a/tests/cpp/benders/CMakeLists.txt b/tests/cpp/benders/CMakeLists.txt index f0b655c75..a8fceeb7e 100644 --- a/tests/cpp/benders/CMakeLists.txt +++ b/tests/cpp/benders/CMakeLists.txt @@ -4,11 +4,11 @@ add_executable(benders_sequential_test target_link_libraries(benders_sequential_test PRIVATE - benders_sequential_core - benders_by_batch_core - benders_core - output_core - logger_lib + antaresXpansion::benders_sequential_core + antaresXpansion::benders_by_batch_core + antaresXpansion::benders_core + antaresXpansion::output_core + antaresXpansion::logger_lib tests_utils GTest::Main tests_utils) diff --git a/tests/cpp/benders/benders_sequential_test.cpp b/tests/cpp/benders/benders_sequential_test.cpp index bd381c29d..5dff276eb 100644 --- a/tests/cpp/benders/benders_sequential_test.cpp +++ b/tests/cpp/benders/benders_sequential_test.cpp @@ -1,8 +1,8 @@ #include -#include "ArchiveWriter.h" -#include "BendersSequential.h" -#include "JsonWriter.h" +#include "antares-xpansion/helpers/ArchiveWriter.h" +#include "antares-xpansion/benders/benders_sequential/BendersSequential.h" +#include "antares-xpansion/benders/output/JsonWriter.h" #include "LoggerStub.h" #include "RandomDirGenerator.h" #include "gtest/gtest.h" diff --git a/tests/cpp/full_run/FullRunTest.cpp b/tests/cpp/full_run/FullRunTest.cpp index 161a1bdbd..ee516dc6c 100644 --- a/tests/cpp/full_run/FullRunTest.cpp +++ b/tests/cpp/full_run/FullRunTest.cpp @@ -1,6 +1,6 @@ #include -#include "FullRunOptionsParser.h" +#include "antares-xpansion/full_run/FullRunOptionsParser.h" #include "gtest/gtest.h" namespace po = boost::program_options; diff --git a/tests/cpp/helpers/AntaresVersionProviderTest.cpp b/tests/cpp/helpers/AntaresVersionProviderTest.cpp index 10a21d953..d05dc5a16 100644 --- a/tests/cpp/helpers/AntaresVersionProviderTest.cpp +++ b/tests/cpp/helpers/AntaresVersionProviderTest.cpp @@ -4,7 +4,7 @@ #include -#include "AntaresVersionProvider.h" +#include "antares-xpansion/helpers/AntaresVersionProvider.h" #include "gtest/gtest.h" diff --git a/tests/cpp/helpers/CMakeLists.txt b/tests/cpp/helpers/CMakeLists.txt index 0d8231672..587dbfa94 100644 --- a/tests/cpp/helpers/CMakeLists.txt +++ b/tests/cpp/helpers/CMakeLists.txt @@ -13,11 +13,11 @@ target_include_directories (helpers_test target_link_libraries (helpers_test PRIVATE GTest::Main - helpers - lp_namer_helper - lp_namer_model - lp_namer_input_reader - lp_namer_problem_modifier + antaresXpansion::helpers + antaresXpansion::lp_namer_helper + antaresXpansion::lp_namer_model + antaresXpansion::lp_namer_input_reader + antaresXpansion::lp_namer_problem_modifier ${JSONCPP_LIB} ${PROJECT_NAME}::benders_sequential_core ) diff --git a/tests/cpp/helpers/JsonXpansionReaderTest.cc b/tests/cpp/helpers/JsonXpansionReaderTest.cc index 01fefc098..5408ff851 100644 --- a/tests/cpp/helpers/JsonXpansionReaderTest.cc +++ b/tests/cpp/helpers/JsonXpansionReaderTest.cc @@ -1,7 +1,7 @@ #include #include -#include "JsonXpansionReader.h" +#include "antares-xpansion/helpers/JsonXpansionReader.h" #include "gtest/gtest.h" class JsonXpansionReaderTest : public ::testing::Test { diff --git a/tests/cpp/helpers/OptionsParserTest.cpp b/tests/cpp/helpers/OptionsParserTest.cpp index b8e565a65..c5f801e55 100644 --- a/tests/cpp/helpers/OptionsParserTest.cpp +++ b/tests/cpp/helpers/OptionsParserTest.cpp @@ -1,6 +1,6 @@ #include -#include "OptionsParser.h" +#include "antares-xpansion/helpers/OptionsParser.h" #include "gtest/gtest.h" namespace po = boost::program_options; diff --git a/tests/cpp/json_output_writer/CMakeLists.txt b/tests/cpp/json_output_writer/CMakeLists.txt index b3eef70eb..55016bc1a 100644 --- a/tests/cpp/json_output_writer/CMakeLists.txt +++ b/tests/cpp/json_output_writer/CMakeLists.txt @@ -2,8 +2,8 @@ add_executable(output_writer output_writer_test.cpp) target_link_libraries(output_writer PRIVATE - benders_core - output_core + antaresXpansion::benders_core + antaresXpansion::output_core GTest::Main) #GTest::gmock #target_link_libraries(main PRIVATE GTest::gtest GTest::gtest_main GTest::gmock GTest::gmock_main) diff --git a/tests/cpp/json_output_writer/output_writer_test.cpp b/tests/cpp/json_output_writer/output_writer_test.cpp index 8bc70217f..f6129dbfe 100644 --- a/tests/cpp/json_output_writer/output_writer_test.cpp +++ b/tests/cpp/json_output_writer/output_writer_test.cpp @@ -8,8 +8,8 @@ #include #include -#include "JsonWriter.h" -#include "LogUtils.h" +#include "antares-xpansion/benders/output/JsonWriter.h" +#include "antares-xpansion/xpansion_interfaces/LogUtils.h" #include "gtest/gtest.h" using namespace Output; diff --git a/tests/cpp/logger/CMakeLists.txt b/tests/cpp/logger/CMakeLists.txt index b12d48ddf..7a77f7091 100644 --- a/tests/cpp/logger/CMakeLists.txt +++ b/tests/cpp/logger/CMakeLists.txt @@ -2,7 +2,7 @@ add_executable(logger_test logger_test.cpp) target_link_libraries(logger_test PRIVATE - logger_lib + antaresXpansion::logger_lib tests_utils GTest::Main) diff --git a/tests/cpp/logger/logger_test.cpp b/tests/cpp/logger/logger_test.cpp index 2fcfc1a24..8aeba4891 100644 --- a/tests/cpp/logger/logger_test.cpp +++ b/tests/cpp/logger/logger_test.cpp @@ -3,14 +3,14 @@ #include #include -#include "BendersMathLogger.h" -#include "ILogger.h" +#include "antares-xpansion/benders/benders_core/BendersMathLogger.h" +#include "antares-xpansion/xpansion_interfaces/ILogger.h" #include "LogPrefixManip.h" #include "RandomDirGenerator.h" #include "gtest/gtest.h" -#include "logger/Master.h" -#include "logger/User.h" -#include "logger/UserFile.h" +#include "antares-xpansion/benders/logger/Master.h" +#include "antares-xpansion/benders/logger/User.h" +#include "antares-xpansion/benders/logger/UserFile.h" using namespace xpansion::logger; diff --git a/tests/cpp/lp_namer/ActiveLinkTest.cpp b/tests/cpp/lp_namer/ActiveLinkTest.cpp index 28dfeacea..6d45323cc 100644 --- a/tests/cpp/lp_namer/ActiveLinkTest.cpp +++ b/tests/cpp/lp_namer/ActiveLinkTest.cpp @@ -1,4 +1,4 @@ -#include "ActiveLinks.h" +#include "antares-xpansion/lpnamer/model/ActiveLinks.h" #include "gtest/gtest.h" const double DEFAULT_CAPACITY = 0; diff --git a/tests/cpp/lp_namer/AdditionalConstraintsReaderTest.cc b/tests/cpp/lp_namer/AdditionalConstraintsReaderTest.cc index c77012a73..802dfdbba 100644 --- a/tests/cpp/lp_namer/AdditionalConstraintsReaderTest.cc +++ b/tests/cpp/lp_namer/AdditionalConstraintsReaderTest.cc @@ -1,9 +1,9 @@ #include #include -#include "AdditionalConstraintsReader.h" +#include "antares-xpansion/lpnamer/input_reader/AdditionalConstraintsReader.h" #include "LoggerBuilder.h" -#include "ProblemGenerationLogger.h" +#include "antares-xpansion/lpnamer/helper/ProblemGenerationLogger.h" #include "gtest/gtest.h" class AdditionalConstraintsReaderTest : public ::testing::Test { diff --git a/tests/cpp/lp_namer/AdditionalConstraintsTest.cc b/tests/cpp/lp_namer/AdditionalConstraintsTest.cc index 230b4336b..bdef85172 100644 --- a/tests/cpp/lp_namer/AdditionalConstraintsTest.cc +++ b/tests/cpp/lp_namer/AdditionalConstraintsTest.cc @@ -1,8 +1,8 @@ #include #include -#include "AdditionalConstraints.h" -#include "LauncherHelpers.h" +#include "antares-xpansion/lpnamer/problem_modifier/AdditionalConstraints.h" +#include "antares-xpansion/lpnamer/problem_modifier/LauncherHelpers.h" #include "LoggerBuilder.h" #include "gtest/gtest.h" diff --git a/tests/cpp/lp_namer/AntaresProblemToXpansionProblemTranslatorTest.cpp b/tests/cpp/lp_namer/AntaresProblemToXpansionProblemTranslatorTest.cpp index 3be3ad649..53bf470e5 100644 --- a/tests/cpp/lp_namer/AntaresProblemToXpansionProblemTranslatorTest.cpp +++ b/tests/cpp/lp_namer/AntaresProblemToXpansionProblemTranslatorTest.cpp @@ -1,6 +1,6 @@ #include "gtest/gtest.h" -#include "AntaresProblemToXpansionProblemTranslator.h" +#include "antares-xpansion/lpnamer/problem_modifier/AntaresProblemToXpansionProblemTranslator.h" TEST(AntaresProblemToXpansionProblemTranslatorTest, convertSignToLEGSpan) { std::vector signs = {'<', '=', '>'}; diff --git a/tests/cpp/lp_namer/CMakeLists.txt b/tests/cpp/lp_namer/CMakeLists.txt index 2723eea83..47f53cb8b 100644 --- a/tests/cpp/lp_namer/CMakeLists.txt +++ b/tests/cpp/lp_namer/CMakeLists.txt @@ -43,13 +43,13 @@ add_executable (lp_namer_tests target_link_libraries (lp_namer_tests PRIVATE GTest::Main - helpers - lp_namer_helper - lp_namer_model - lp_namer_input_reader - lp_namer_problem_modifier - xpansion_study_updater_lib - problem_generation_main + antaresXpansion::helpers + antaresXpansion::lp_namer_helper + antaresXpansion::lp_namer_model + antaresXpansion::lp_namer_input_reader + antaresXpansion::lp_namer_problem_modifier + antaresXpansion::xpansion_study_updater_lib + antaresXpansion::problem_generation_main ) diff --git a/tests/cpp/lp_namer/CandidatesINIReaderTest.cpp b/tests/cpp/lp_namer/CandidatesINIReaderTest.cpp index f2c691024..6ab91e1b4 100644 --- a/tests/cpp/lp_namer/CandidatesINIReaderTest.cpp +++ b/tests/cpp/lp_namer/CandidatesINIReaderTest.cpp @@ -1,8 +1,8 @@ #include -#include "CandidatesINIReader.h" +#include "antares-xpansion/lpnamer/input_reader/CandidatesINIReader.h" #include "LoggerBuilder.h" -#include "ProblemGenerationLogger.h" +#include "antares-xpansion/lpnamer/helper/ProblemGenerationLogger.h" #include "gtest/gtest.h" const std::string interco_content_l = diff --git a/tests/cpp/lp_namer/ChronicleMapProviderTest.cpp b/tests/cpp/lp_namer/ChronicleMapProviderTest.cpp index 50da135bb..aa06e8391 100644 --- a/tests/cpp/lp_namer/ChronicleMapProviderTest.cpp +++ b/tests/cpp/lp_namer/ChronicleMapProviderTest.cpp @@ -8,8 +8,8 @@ #include #include -#include "ChronicleMapProvider.h" -#include "ChronicleMapReader.h" +#include "antares-xpansion/lpnamer/model/ChronicleMapProvider.h" +#include "antares-xpansion/lpnamer/model/ChronicleMapReader.h" #include "LoggerBuilder.h" class ChronicleProviderTest : public ::testing::Test { diff --git a/tests/cpp/lp_namer/ChronicleMapReaderTest.cpp b/tests/cpp/lp_namer/ChronicleMapReaderTest.cpp index 82e72690d..cab41bdb2 100644 --- a/tests/cpp/lp_namer/ChronicleMapReaderTest.cpp +++ b/tests/cpp/lp_namer/ChronicleMapReaderTest.cpp @@ -3,7 +3,7 @@ // #include #include "gtest/gtest.h" -#include "ChronicleMapReader.h" +#include "antares-xpansion/lpnamer/model/ChronicleMapReader.h" class ChronicleTest: public ::testing::Test { public: diff --git a/tests/cpp/lp_namer/GeneralDataReadetTests.cpp b/tests/cpp/lp_namer/GeneralDataReadetTests.cpp index 8918e4674..6c5636d67 100644 --- a/tests/cpp/lp_namer/GeneralDataReadetTests.cpp +++ b/tests/cpp/lp_namer/GeneralDataReadetTests.cpp @@ -1,6 +1,6 @@ #include -#include "GeneralDataReader.h" +#include "antares-xpansion/lpnamer/input_reader/GeneralDataReader.h" //Test for the GeneralDataIniReader class class GeneralDataIniReaderTests : public testing::TestWithParam { diff --git a/tests/cpp/lp_namer/LinkProfileReaderTest.cpp b/tests/cpp/lp_namer/LinkProfileReaderTest.cpp index f8dd74348..4abfef5a3 100644 --- a/tests/cpp/lp_namer/LinkProfileReaderTest.cpp +++ b/tests/cpp/lp_namer/LinkProfileReaderTest.cpp @@ -1,8 +1,8 @@ #include -#include "LinkProfileReader.h" +#include "antares-xpansion/lpnamer/input_reader/LinkProfileReader.h" #include "LoggerBuilder.h" -#include "ProblemGenerationLogger.h" +#include "antares-xpansion/lpnamer/helper/ProblemGenerationLogger.h" #include "gtest/gtest.h" const std::string VALID_DIRECT_PROFILE_NAME("temp_direct_profile.txt"); diff --git a/tests/cpp/lp_namer/LinkdataRecordTest.cc b/tests/cpp/lp_namer/LinkdataRecordTest.cc index c2c09ef2c..54bc9c418 100644 --- a/tests/cpp/lp_namer/LinkdataRecordTest.cc +++ b/tests/cpp/lp_namer/LinkdataRecordTest.cc @@ -1,7 +1,7 @@ #include -#include "LinkdataRecord.h" -#include "StudyUpdater.h" +#include "antares-xpansion/lpnamer/problem_modifier/LinkdataRecord.h" +#include "antares-xpansion/study-updater/StudyUpdater.h" #include "gtest/gtest.h" class LinkdataRecordTest : public ::testing::Test diff --git a/tests/cpp/lp_namer/LoggerBuilder.h b/tests/cpp/lp_namer/LoggerBuilder.h index 2cef65ece..95228ab1d 100644 --- a/tests/cpp/lp_namer/LoggerBuilder.h +++ b/tests/cpp/lp_namer/LoggerBuilder.h @@ -1,7 +1,7 @@ #ifndef __TESTS_LOGGER_UTILS_h__ #define __TESTS_LOGGER_UTILS_h__ -#include "ProblemGenerationLogger.h" +#include "antares-xpansion/lpnamer/helper/ProblemGenerationLogger.h" ProblemGenerationLog::ProblemGenerationLoggerSharedPointer emptyLogger(); ProblemGenerationLog::ProblemGenerationLoggerSharedPointer diff --git a/tests/cpp/lp_namer/LpFilesExtractorTest.cpp b/tests/cpp/lp_namer/LpFilesExtractorTest.cpp index 6dbac8a21..5f7081682 100644 --- a/tests/cpp/lp_namer/LpFilesExtractorTest.cpp +++ b/tests/cpp/lp_namer/LpFilesExtractorTest.cpp @@ -1,7 +1,7 @@ #include #include "LoggerBuilder.h" -#include "LpFilesExtractor.h" +#include "antares-xpansion/lpnamer/input_reader/LpFilesExtractor.h" const auto LP_FILE_EXTRACTOR_TEST_DIR = std::filesystem::path("data_test") / "tests_lpnamer" / "LpFilesExtractor"; diff --git a/tests/cpp/lp_namer/MasterProblemBuilderTest.cpp b/tests/cpp/lp_namer/MasterProblemBuilderTest.cpp index 725181d15..f516dc279 100644 --- a/tests/cpp/lp_namer/MasterProblemBuilderTest.cpp +++ b/tests/cpp/lp_namer/MasterProblemBuilderTest.cpp @@ -1,10 +1,10 @@ // // Created by s90365 on 23/08/2021. // -#include +#include #include "LoggerBuilder.h" -#include "MasterProblemBuilder.h" +#include "antares-xpansion/lpnamer/problem_modifier/MasterProblemBuilder.h" #include "gtest/gtest.h" TEST(MasterProblemBuilderTest, test_one_candidate_not_integer) { diff --git a/tests/cpp/lp_namer/MpsTxtWriterTest.cpp b/tests/cpp/lp_namer/MpsTxtWriterTest.cpp index e1c992e59..86347a17f 100644 --- a/tests/cpp/lp_namer/MpsTxtWriterTest.cpp +++ b/tests/cpp/lp_namer/MpsTxtWriterTest.cpp @@ -1,8 +1,8 @@ #include #include -#include "ArchiveWriter.h" -#include "MpsTxtWriter.h" +#include "antares-xpansion/helpers/ArchiveWriter.h" +#include "antares-xpansion/lpnamer/input_reader/MpsTxtWriter.h" #include "gtest/gtest.h" const std::vector EXPECTED_RESULTS = { diff --git a/tests/cpp/lp_namer/NOOPSolver.h b/tests/cpp/lp_namer/NOOPSolver.h index 047bba51e..c773e43e3 100644 --- a/tests/cpp/lp_namer/NOOPSolver.h +++ b/tests/cpp/lp_namer/NOOPSolver.h @@ -5,7 +5,7 @@ #ifndef ANTARESXPANSION_TESTS_CPP_LP_NAMER_NOOPSOLVER_H_ #define ANTARESXPANSION_TESTS_CPP_LP_NAMER_NOOPSOLVER_H_ -#include "multisolver_interface/SolverAbstract.h" +#include "antares-xpansion/multisolver_interface/SolverAbstract.h" class NOOPSolver: public SolverAbstract { public: virtual int get_number_of_instances() override { return 0; } diff --git a/tests/cpp/lp_namer/ProblemConstructionTest.cpp b/tests/cpp/lp_namer/ProblemConstructionTest.cpp index f67483cf4..b313c9410 100644 --- a/tests/cpp/lp_namer/ProblemConstructionTest.cpp +++ b/tests/cpp/lp_namer/ProblemConstructionTest.cpp @@ -4,9 +4,9 @@ #include #include -#include "ProblemNameParser.h" -#include "Problem.h" -#include "multisolver_interface/SolverFactory.h" +#include "antares-xpansion/lpnamer/model/ProblemNameParser.h" +#include "antares-xpansion/lpnamer/model/Problem.h" +#include "antares-xpansion/multisolver_interface/SolverFactory.h" #include "NOOPSolver.h" struct ProblemNameCase { diff --git a/tests/cpp/lp_namer/ProblemGenerationExeOptionsTest.cpp b/tests/cpp/lp_namer/ProblemGenerationExeOptionsTest.cpp index 7025e936a..f1f1292be 100644 --- a/tests/cpp/lp_namer/ProblemGenerationExeOptionsTest.cpp +++ b/tests/cpp/lp_namer/ProblemGenerationExeOptionsTest.cpp @@ -1,8 +1,8 @@ #include #include -#include "ProblemGeneration.h" -#include "ProblemGenerationExeOptions.h" +#include "antares-xpansion/lpnamer/main/ProblemGeneration.h" +#include "antares-xpansion/lpnamer/main/ProblemGenerationExeOptions.h" #include "gtest/gtest.h" namespace po = boost::program_options; diff --git a/tests/cpp/lp_namer/ProblemGenerationLoggerTest.cpp b/tests/cpp/lp_namer/ProblemGenerationLoggerTest.cpp index 19a7dbb5d..30cf17416 100644 --- a/tests/cpp/lp_namer/ProblemGenerationLoggerTest.cpp +++ b/tests/cpp/lp_namer/ProblemGenerationLoggerTest.cpp @@ -1,6 +1,6 @@ #include "LoggerBuilder.h" -#include "ProblemGenerationLogger.h" +#include "antares-xpansion/lpnamer/helper/ProblemGenerationLogger.h" #include "gtest/gtest.h" using namespace ProblemGenerationLog; class ProblemGenerationLoggerTest : public ::testing::Test { diff --git a/tests/cpp/lp_namer/ProblemModifierTest.cpp b/tests/cpp/lp_namer/ProblemModifierTest.cpp index f8749efb8..2009bfcdd 100644 --- a/tests/cpp/lp_namer/ProblemModifierTest.cpp +++ b/tests/cpp/lp_namer/ProblemModifierTest.cpp @@ -1,13 +1,13 @@ -#include -#include -#include -#include +#include "antares-xpansion/lpnamer/model/ActiveLinks.h" +#include "antares-xpansion/lpnamer/problem_modifier/ProblemModifier.h" +#include "antares-xpansion/multisolver_interface/SolverFactory.h" +#include #include #include "LoggerBuilder.h" -#include "Problem.h" +#include "antares-xpansion/lpnamer/model/Problem.h" #include "gtest/gtest.h" const std::string P_LINK = "p_link"; diff --git a/tests/cpp/lp_namer/StudyUpdateTest.cc b/tests/cpp/lp_namer/StudyUpdateTest.cc index b3608848d..03869565e 100644 --- a/tests/cpp/lp_namer/StudyUpdateTest.cc +++ b/tests/cpp/lp_namer/StudyUpdateTest.cc @@ -1,14 +1,14 @@ #include #include -#include "ActiveLinks.h" -#include "CandidatesINIReader.h" -#include "LinkProfileReader.h" -#include "LinkdataRecord.h" +#include "antares-xpansion/lpnamer/model/ActiveLinks.h" +#include "antares-xpansion/lpnamer/input_reader/CandidatesINIReader.h" +#include "antares-xpansion/lpnamer/input_reader/LinkProfileReader.h" +#include "antares-xpansion/lpnamer/problem_modifier/LinkdataRecord.h" #include "LoggerBuilder.h" -#include "ProblemGenerationLogger.h" -#include "StudyUpdateLinkParameterStrategy.h" -#include "StudyUpdater.h" +#include "antares-xpansion/lpnamer/helper/ProblemGenerationLogger.h" +#include "antares-xpansion/study-updater/StudyUpdateLinkParameterStrategy.h" +#include "antares-xpansion/study-updater/StudyUpdater.h" #include "gtest/gtest.h" class StudyUpdateTest : public ::testing::Test { diff --git a/tests/cpp/lp_namer/VariableFileReaderTest.cpp b/tests/cpp/lp_namer/VariableFileReaderTest.cpp index fc29a5a78..393291dd1 100644 --- a/tests/cpp/lp_namer/VariableFileReaderTest.cpp +++ b/tests/cpp/lp_namer/VariableFileReaderTest.cpp @@ -1,7 +1,7 @@ #include #include "LoggerBuilder.h" -#include "VariableFileReader.h" +#include "antares-xpansion/lpnamer/input_reader/VariableFileReader.h" #include "gtest/gtest.h" const char* TEMP_FILE_NAME = "temp_variable.txt"; diff --git a/tests/cpp/lp_namer/WeightsFileReaderTest.cpp b/tests/cpp/lp_namer/WeightsFileReaderTest.cpp index 8991fb749..7387b4813 100644 --- a/tests/cpp/lp_namer/WeightsFileReaderTest.cpp +++ b/tests/cpp/lp_namer/WeightsFileReaderTest.cpp @@ -1,6 +1,6 @@ #include -#include "WeightsFileReader.h" +#include "antares-xpansion/lpnamer/input_reader/WeightsFileReader.h" #include "gtest/gtest.h" using namespace ProblemGenerationLog; class WeightsFileReaderTest : public ::testing::Test { diff --git a/tests/cpp/lp_namer/WeightsFileWriterTest.cpp b/tests/cpp/lp_namer/WeightsFileWriterTest.cpp index 33cdff930..377cc1925 100644 --- a/tests/cpp/lp_namer/WeightsFileWriterTest.cpp +++ b/tests/cpp/lp_namer/WeightsFileWriterTest.cpp @@ -1,6 +1,6 @@ #include -#include "WeightsFileWriter.h" +#include "antares-xpansion/lpnamer/input_reader/WeightsFileWriter.h" #include "gtest/gtest.h" void writeDummyFileInTempLpDir(std::string name) { diff --git a/tests/cpp/outer_loop/CMakeLists.txt b/tests/cpp/outer_loop/CMakeLists.txt index b4da36560..58907949c 100644 --- a/tests/cpp/outer_loop/CMakeLists.txt +++ b/tests/cpp/outer_loop/CMakeLists.txt @@ -3,12 +3,12 @@ add_executable(outer_loop_test target_link_libraries(outer_loop_test PRIVATE - solvers - outer_loop_lib - benders_by_batch_core - benders_core - output_core - logger_lib + antaresXpansion::solvers + antaresXpansion::outer_loop_lib + antaresXpansion::benders_by_batch_core + antaresXpansion::benders_core + antaresXpansion::output_core + antaresXpansion::logger_lib GTest::Main tests_utils) diff --git a/tests/cpp/outer_loop/outer_loop_test.cpp b/tests/cpp/outer_loop/outer_loop_test.cpp index 45e19101f..03e0874e4 100644 --- a/tests/cpp/outer_loop/outer_loop_test.cpp +++ b/tests/cpp/outer_loop/outer_loop_test.cpp @@ -1,13 +1,13 @@ -#include "LoggerFactories.h" -#include "MasterUpdate.h" -#include "OuterLoopBenders.h" -#include "OuterLoopBiLevel.h" -#include "OuterLoopInputDataReader.h" -#include "VariablesGroup.h" -#include "WriterFactories.h" +#include "antares-xpansion/benders/factories/LoggerFactories.h" +#include "antares-xpansion/benders/benders_core/MasterUpdate.h" +#include "antares-xpansion/benders/benders_mpi/OuterLoopBenders.h" +#include "antares-xpansion/benders/outer_loop/OuterLoopBiLevel.h" +#include "antares-xpansion/benders/outer_loop/OuterLoopInputDataReader.h" +#include "antares-xpansion/benders/outer_loop/VariablesGroup.h" +#include "antares-xpansion/benders/factories/WriterFactories.h" #include "gtest/gtest.h" -#include "multisolver_interface/environment.h" +#include "antares-xpansion/multisolver_interface/environment.h" boost::mpi::environment* penv = nullptr; boost::mpi::communicator* pworld = nullptr; diff --git a/tests/cpp/restart_benders/CMakeLists.txt b/tests/cpp/restart_benders/CMakeLists.txt index 7b1becd69..f93b46645 100644 --- a/tests/cpp/restart_benders/CMakeLists.txt +++ b/tests/cpp/restart_benders/CMakeLists.txt @@ -6,8 +6,8 @@ add_executable(restart_lib_tests target_link_libraries(restart_lib_tests PRIVATE - benders_core - logger_lib + antaresXpansion::benders_core + antaresXpansion::logger_lib GTest::Main) target_include_directories(restart_lib_tests diff --git a/tests/cpp/restart_benders/restart_lib_tests.cpp b/tests/cpp/restart_benders/restart_lib_tests.cpp index c53987b0d..4d7333f43 100644 --- a/tests/cpp/restart_benders/restart_lib_tests.cpp +++ b/tests/cpp/restart_benders/restart_lib_tests.cpp @@ -1,11 +1,11 @@ -#include "ILogger.h" -#include "LastIterationReader.h" -#include "LastIterationWriter.h" +#include "antares-xpansion/xpansion_interfaces/ILogger.h" +#include "antares-xpansion/benders/benders_core/LastIterationReader.h" +#include "antares-xpansion/benders/benders_core/LastIterationWriter.h" #include "LoggerStub.h" -#include "StartUp.h" +#include "antares-xpansion/benders/benders_core/StartUp.h" #include "WriterStub.h" -#include "common.h" +#include "antares-xpansion/benders/benders_core/common.h" #include "gtest/gtest.h" bool operator==(const LogPoint& lhs, const LogPoint& rhs) { return lhs.size() == rhs.size() && diff --git a/tests/cpp/sensitivity/CMakeLists.txt b/tests/cpp/sensitivity/CMakeLists.txt index f9273ce02..b5ef6b228 100644 --- a/tests/cpp/sensitivity/CMakeLists.txt +++ b/tests/cpp/sensitivity/CMakeLists.txt @@ -2,7 +2,7 @@ add_executable(sensitivity_test SensitivityInputReaderTest.cpp SensitivityLogge target_link_libraries(sensitivity_test PRIVATE - sensitivity_core + antaresXpansion::sensitivity_core GTest::Main) add_test(NAME unit_sensitivity COMMAND sensitivity_test WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}) diff --git a/tests/cpp/sensitivity/SensitivityInputReaderTest.cpp b/tests/cpp/sensitivity/SensitivityInputReaderTest.cpp index 4f4e1a263..c4d346895 100644 --- a/tests/cpp/sensitivity/SensitivityInputReaderTest.cpp +++ b/tests/cpp/sensitivity/SensitivityInputReaderTest.cpp @@ -1,4 +1,4 @@ -#include "SensitivityInputReader.h" +#include "antares-xpansion/sensitivity/SensitivityInputReader.h" #include "gtest/gtest.h" class SensitivityInputReaderTest : public ::testing::Test { diff --git a/tests/cpp/sensitivity/SensitivityLoggerTest.cpp b/tests/cpp/sensitivity/SensitivityLoggerTest.cpp index 005a94690..e4ab9a730 100644 --- a/tests/cpp/sensitivity/SensitivityLoggerTest.cpp +++ b/tests/cpp/sensitivity/SensitivityLoggerTest.cpp @@ -1,8 +1,8 @@ -#include "Commons.h" -#include "SensitivityFileLogger.h" -#include "SensitivityILogger.h" -#include "SensitivityLogger.h" -#include "SensitivityMasterLogger.h" +#include "antares-xpansion/benders/logger/Commons.h" +#include "antares-xpansion/sensitivity/SensitivityFileLogger.h" +#include "antares-xpansion/sensitivity/SensitivityILogger.h" +#include "antares-xpansion/sensitivity/SensitivityLogger.h" +#include "antares-xpansion/sensitivity/SensitivityMasterLogger.h" #include "gtest/gtest.h" class SensitivityFileLoggerTest : public ::testing::Test { diff --git a/tests/cpp/sensitivity/SensitivityPbModifierTest.cpp b/tests/cpp/sensitivity/SensitivityPbModifierTest.cpp index 9f0d4f70d..8fcec1d3a 100644 --- a/tests/cpp/sensitivity/SensitivityPbModifierTest.cpp +++ b/tests/cpp/sensitivity/SensitivityPbModifierTest.cpp @@ -1,8 +1,8 @@ #include "gtest/gtest.h" -#include -#include "ProblemModifierCapex.h" -#include "ProblemModifierProjection.h" -#include "BendersBase.h" +#include "antares-xpansion/multisolver_interface/SolverFactory.h" +#include "antares-xpansion/sensitivity/ProblemModifierCapex.h" +#include "antares-xpansion/sensitivity/ProblemModifierProjection.h" +#include "antares-xpansion/benders/benders_core/BendersBase.h" const int peak_id = 0; const int semibase_id = 1; diff --git a/tests/cpp/sensitivity/SensitivityStudyTest.cpp b/tests/cpp/sensitivity/SensitivityStudyTest.cpp index 223029bab..c48443338 100644 --- a/tests/cpp/sensitivity/SensitivityStudyTest.cpp +++ b/tests/cpp/sensitivity/SensitivityStudyTest.cpp @@ -1,8 +1,8 @@ -#include "SensitivityFileLogger.h" -#include "SensitivityStudy.h" +#include "antares-xpansion/sensitivity/SensitivityFileLogger.h" +#include "antares-xpansion/sensitivity/SensitivityStudy.h" #include "gtest/gtest.h" -#include "multisolver_interface/SolverFactory.h" -#include "multisolver_interface/environment.h" +#include "antares-xpansion/multisolver_interface/SolverFactory.h" +#include "antares-xpansion/multisolver_interface/environment.h" class SensitivityStudyTest : public ::testing::Test { public: diff --git a/tests/cpp/sensitivity/SensitivityWriterTest.cpp b/tests/cpp/sensitivity/SensitivityWriterTest.cpp index 861745b60..1ddaa0164 100644 --- a/tests/cpp/sensitivity/SensitivityWriterTest.cpp +++ b/tests/cpp/sensitivity/SensitivityWriterTest.cpp @@ -4,7 +4,7 @@ #include #include -#include "SensitivityWriter.h" +#include "antares-xpansion/sensitivity/SensitivityWriter.h" #include "gtest/gtest.h" const std::string peak_name = "peak"; diff --git a/tests/cpp/solvers_interface/CMakeLists.txt b/tests/cpp/solvers_interface/CMakeLists.txt index e6c0587c9..9afb29318 100644 --- a/tests/cpp/solvers_interface/CMakeLists.txt +++ b/tests/cpp/solvers_interface/CMakeLists.txt @@ -10,22 +10,21 @@ # Merge MPS Exe # --------------------------------------------------------------------------- -add_executable (test_solver - ${CMAKE_CURRENT_SOURCE_DIR}/catch2.hpp - ${CMAKE_CURRENT_SOURCE_DIR}/test.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_reading_problem.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_modifying_problem.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_solving_problem.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_exceptions.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/define_datas.hpp - ${CMAKE_CURRENT_SOURCE_DIR}/define_datas.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/test_basis.cpp +add_executable(test_solver + ${CMAKE_CURRENT_SOURCE_DIR}/catch2.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/test.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/test_reading_problem.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/test_modifying_problem.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/test_solving_problem.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/test_exceptions.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/define_datas.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/define_datas.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/test_basis.cpp ) -#get_target_property(xpansion_interfaces_path xpansion_interfaces INTERFACE_INCLUDE_DIRECTORIES) -target_link_libraries (test_solver - PUBLIC - solvers - xpansion_interfaces +target_link_libraries(test_solver + PUBLIC + antaresXpansion::solvers + antaresXpansion::xpansion_interfaces ) add_test(NAME unit_solver COMMAND test_solver WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}) diff --git a/tests/cpp/solvers_interface/define_datas.hpp b/tests/cpp/solvers_interface/define_datas.hpp index 605186f72..696c44ea8 100644 --- a/tests/cpp/solvers_interface/define_datas.hpp +++ b/tests/cpp/solvers_interface/define_datas.hpp @@ -5,7 +5,7 @@ #include #include -#include "multisolver_interface/SolverAbstract.h" +#include "antares-xpansion/multisolver_interface/SolverAbstract.h" /* Contains all the data to check the results of the tests on an instance*/ class InstanceData { diff --git a/tests/cpp/solvers_interface/test_basis.cpp b/tests/cpp/solvers_interface/test_basis.cpp index 5ac9cee99..90eb6fa90 100644 --- a/tests/cpp/solvers_interface/test_basis.cpp +++ b/tests/cpp/solvers_interface/test_basis.cpp @@ -1,6 +1,6 @@ #include "catch2.hpp" #include "define_datas.hpp" -#include "multisolver_interface/Solver.h" +#include "antares-xpansion/multisolver_interface/Solver.h" void assert_basis_equality(SolverAbstract::Ptr expec_solver, SolverAbstract::Ptr current_solver) { diff --git a/tests/cpp/solvers_interface/test_exceptions.cpp b/tests/cpp/solvers_interface/test_exceptions.cpp index c76d09766..4a81405c1 100644 --- a/tests/cpp/solvers_interface/test_exceptions.cpp +++ b/tests/cpp/solvers_interface/test_exceptions.cpp @@ -1,6 +1,6 @@ -#include "LogUtils.h" +#include "antares-xpansion/xpansion_interfaces/LogUtils.h" #include "catch2.hpp" -#include "multisolver_interface/Solver.h" +#include "antares-xpansion/multisolver_interface/Solver.h" TEST_CASE("InvalidStatusException", "[exceptions][invalid_status]") { SolverFactory factory; diff --git a/tests/cpp/solvers_interface/test_modifying_problem.cpp b/tests/cpp/solvers_interface/test_modifying_problem.cpp index 9ae65ca9a..d139cbaf3 100644 --- a/tests/cpp/solvers_interface/test_modifying_problem.cpp +++ b/tests/cpp/solvers_interface/test_modifying_problem.cpp @@ -2,7 +2,7 @@ #include "catch2.hpp" #include "define_datas.hpp" -#include "multisolver_interface/Solver.h" +#include "antares-xpansion/multisolver_interface/Solver.h" TEST_CASE("Modification: deleting rows", "[modif][del-rows]") { AllDatas datas; diff --git a/tests/cpp/solvers_interface/test_reading_problem.cpp b/tests/cpp/solvers_interface/test_reading_problem.cpp index 4ff05f905..8fca0d07f 100644 --- a/tests/cpp/solvers_interface/test_reading_problem.cpp +++ b/tests/cpp/solvers_interface/test_reading_problem.cpp @@ -2,7 +2,7 @@ #include "catch2.hpp" #include "define_datas.hpp" -#include "multisolver_interface/Solver.h" +#include "antares-xpansion/multisolver_interface/Solver.h" TEST_CASE("Un objet solveur peut etre cree et detruit", "[read][init]") { AllDatas datas; diff --git a/tests/cpp/solvers_interface/test_solving_problem.cpp b/tests/cpp/solvers_interface/test_solving_problem.cpp index f80507e9c..a717dbae6 100644 --- a/tests/cpp/solvers_interface/test_solving_problem.cpp +++ b/tests/cpp/solvers_interface/test_solving_problem.cpp @@ -2,7 +2,7 @@ #include "catch2.hpp" #include "define_datas.hpp" -#include "multisolver_interface/Solver.h" +#include "antares-xpansion/multisolver_interface/Solver.h" TEST_CASE("A LP problem is solved", "[solve-lp]") { AllDatas datas; diff --git a/tests/cpp/zip_mps/CMakeLists.txt b/tests/cpp/zip_mps/CMakeLists.txt index 5925207e4..03de92efe 100644 --- a/tests/cpp/zip_mps/CMakeLists.txt +++ b/tests/cpp/zip_mps/CMakeLists.txt @@ -2,7 +2,7 @@ add_executable(zip_mps_lib_tests zip_mps_lib_tests.cpp) target_link_libraries(zip_mps_lib_tests PRIVATE - helpers + antaresXpansion::helpers tests_utils GTest::Main) add_test(NAME zip_mps_lib_tests COMMAND zip_mps_lib_tests WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}) diff --git a/tests/cpp/zip_mps/zip_mps_lib_tests.cpp b/tests/cpp/zip_mps/zip_mps_lib_tests.cpp index e70c5ca33..9722eef30 100644 --- a/tests/cpp/zip_mps/zip_mps_lib_tests.cpp +++ b/tests/cpp/zip_mps/zip_mps_lib_tests.cpp @@ -9,10 +9,10 @@ #include #include -#include "AntaresArchiveUpdater.h" -#include "ArchiveReader.h" -#include "ArchiveWriter.h" -#include "FileInBuffer.h" +#include "antares-xpansion/helpers/AntaresArchiveUpdater.h" +#include "antares-xpansion/helpers/ArchiveReader.h" +#include "antares-xpansion/helpers/ArchiveWriter.h" +#include "antares-xpansion/helpers/FileInBuffer.h" #include "RandomDirGenerator.h" #include "gtest/gtest.h" diff --git a/vcpkg b/vcpkg index f7423ee18..ee2d2a100 160000 --- a/vcpkg +++ b/vcpkg @@ -1 +1 @@ -Subproject commit f7423ee180c4b7f40d43402c2feb3859161ef625 +Subproject commit ee2d2a100103e0f3613c60655dcf15be7d5157b8