Skip to content

Commit

Permalink
Fix circular dependencies on CMake targets (#2140)
Browse files Browse the repository at this point in the history
close #2137

---------

Co-authored-by: Florian Omnès <[email protected]>
  • Loading branch information
a-zakir and flomnes authored May 31, 2024
1 parent 2470e70 commit 6e0e94f
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 43 deletions.
1 change: 0 additions & 1 deletion src/solver/optimisation/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ set(RTESOLVER_OPT
include/antares/solver/optimisation/adequacy_patch_csr/constraints/CsrBindingConstraintHour.h
adequacy_patch_csr/constraints/CsrBindingConstraintHour.cpp

include/antares/solver/optimisation/opt_period_string_generator_base.h
include/antares/solver/optimisation/opt_rename_problem.h
opt_rename_problem.cpp

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@
#define __SOLVER_OPTIMISATION_FUNCTIONS_H__

#include <antares/optimization-options/options.h>
#include <antares/solver/utils/opt_period_string_generator.h>
#include <antares/writer/i_writer.h>
#include "antares/config/config.h"
#include "antares/solver/optimisation/opt_structure_probleme_a_resoudre.h"
#include "antares/study/parameters/adq-patch-params.h"

#include "adequacy_patch_csr/hourly_csr_problem.h"
#include "opt_period_string_generator_base.h"

using AdqPatchParams = Antares::Data::AdequacyPatch::AdqPatchParams;
using OptimizationOptions = Antares::Solver::Optimization::OptimizationOptions;
Expand Down

This file was deleted.

1 change: 0 additions & 1 deletion src/solver/utils/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ target_link_libraries(utils
Antares::result_writer #ortools_utils.h
Antares::optimization-options
antares-core #enum.h
model_antares #opt_period_string_generator.h -> antares/solver/optimisation/opt_period_string_generator_base.h
)

target_include_directories(utils
Expand Down
4 changes: 0 additions & 4 deletions src/solver/utils/filename.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@

#include <sstream>

#include "antares/solver/optimisation/opt_period_string_generator_base.h"

#include "include/antares/solver/utils/opt_period_string_generator.h"

// ------------------------------------
// Optimization period factory
// ------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion src/solver/utils/include/antares/solver/utils/filename.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include <memory>
#include <string>

#include "antares/solver/optimisation/opt_period_string_generator_base.h"
#include "opt_period_string_generator.h"

std::shared_ptr<OptPeriodStringGenerator> createOptPeriodAsString(bool isOptimizationWeekly,
unsigned int day,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
** along with Antares_Simulator. If not, see <https://opensource.org/license/mpl-2-0/>.
*/
#pragma once
#include <string>

/*
MPS and criterion generated files wear the same time interval sequence in their names.
Expand All @@ -35,7 +36,12 @@
called.
*/

#include "antares/solver/optimisation/opt_period_string_generator_base.h"
class OptPeriodStringGenerator
{
public:
virtual std::string to_string() const = 0;
virtual ~OptPeriodStringGenerator() = default;
};

// ------------------------------------
// Daily optimization
Expand Down

0 comments on commit 6e0e94f

Please sign in to comment.