Skip to content

Commit

Permalink
add missings file
Browse files Browse the repository at this point in the history
  • Loading branch information
a-zakir committed Oct 13, 2023
1 parent f073a0d commit 819093d
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/cpp/benders/benders_core/include/BendersBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ class BendersBase {
private:
BendersBaseOptions _options;
unsigned int _totalNbProblems = 0;
std::filesystem::path _log_name;
std::filesystem::path _log_name = "";
BendersRelevantIterationsData relevantIterationData_ = {
std::make_shared<WorkerMasterData>(), nullptr};
WorkerMasterPtr _master;
Expand Down
2 changes: 1 addition & 1 deletion tests/cpp/benders/benders_sequential_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class BendersSequentialDouble : public BendersSequential {
void InitializeProblems() override {
MatchProblemToId();

auto solver_log_manager = std::make_shared<SolverLogManager>(log_name());
auto solver_log_manager = SolverLogManager(log_name());
reset_master(new WorkerMaster(master_variable_map, get_master_path(),
get_solver_name(), get_log_level(),
_data.nsubproblem, solver_log_manager,
Expand Down
6 changes: 3 additions & 3 deletions tests/cpp/lp_namer/MasterProblemBuilderTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ TEST(MasterProblemBuilderTest, test_one_candidate_not_integer) {
candidates.insert(candidates.end(), candidateFromLink.begin(),
candidateFromLink.end());
}
auto solver_log_manager = std::make_shared<SolverLogManager>("");
auto solver_log_manager = SolverLogManager("");
auto master_problem = MasterProblemBuilder(master_formulation)
.build(solver_name, candidates, solver_log_manager);
ASSERT_EQ(master_problem->get_ncols(), 1);
Expand Down Expand Up @@ -87,7 +87,7 @@ TEST(MasterProblemBuilderTest, test_one_candidate_integer_problem_integer) {
candidateFromLink.end());
}

auto solver_log_manager = std::make_shared<SolverLogManager>("");
auto solver_log_manager = SolverLogManager("");
auto master_problem = MasterProblemBuilder(master_formulation)
.build(solver_name, candidates, solver_log_manager);
ASSERT_EQ(master_problem->get_ncols(), 2);
Expand Down Expand Up @@ -150,7 +150,7 @@ TEST(MasterProblemBuilderTest, test_one_candidate_integer_problem_relaxed) {
candidateFromLink.end());
}

auto solver_log_manager = std::make_shared<SolverLogManager>("");
auto solver_log_manager = SolverLogManager("");
auto master_problem = MasterProblemBuilder(master_formulation)
.build(solver_name, candidates, solver_log_manager);
ASSERT_EQ(master_problem->get_ncols(), 1);
Expand Down
3 changes: 1 addition & 2 deletions tests/cpp/sensitivity/SensitivityPbModifierTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@ class SensitivityProblemModifierTest : public ::testing::Test
std::string solver_name = "CBC";
SolverFactory factory;

auto solver_log_manager =
std::make_shared<SolverLogManager>(std::tmpnam(nullptr));
auto solver_log_manager = SolverLogManager(std::tmpnam(nullptr));
SolverAbstract::Ptr solver_model =
factory.create_solver(solver_name, solver_log_manager);
solver_model->init();
Expand Down
3 changes: 1 addition & 2 deletions tests/cpp/sensitivity/SensitivityStudyTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ class SensitivityStudyTest : public ::testing::Test {

void init_solver(std::string solver_name, std::string last_master_mps_path) {
SolverFactory factory;
auto solver_log_manager =
std::make_shared<SolverLogManager>(std::tmpnam(nullptr));
auto solver_log_manager = SolverLogManager(std::tmpnam(nullptr));
math_problem = factory.create_solver(solver_name, solver_log_manager);
math_problem->init();
math_problem->read_prob_mps(last_master_mps_path);
Expand Down

0 comments on commit 819093d

Please sign in to comment.