1#ifndef SRC_CPP_BENDERS_BENDERS_BY_BATCH_INCLUDE_BENDERSBYBATCH_H_
2#define SRC_CPP_BENDERS_BENDERS_BY_BATCH_INCLUDE_BENDERSBYBATCH_H_
3#include "BatchCollection.h"
4#include "antares-xpansion/benders/benders_mpi/BendersMPI.h"
5#include "antares-xpansion/benders/benders_mpi/common_mpi.h"
9 std::vector<unsigned> random_batch_permutation_;
12 using BendersMpi::BendersMpi;
15 void BuildCut(
const std::vector<std::string>& batch_sub_problems,
17 std::vector<double>& external_loop_criterion_current_batch);
19 std::string BendersName()
const override
21 return "Benders By Batch mpi";
25 void InitializeProblems()
override;
26 void BroadcastSingleSubpbCostsUnderApprox();
27 void ComputeXCut()
override;
32 void GetSubproblemCut(SubProblemDataMap& subproblem_cut_package,
33 const std::vector<std::string>& batch_sub_problems,
34 double* batch_subproblems_costs_contribution_in_gap_per_proc);
38 void SeparationLoop();
39 void UpdateRemainingEpsilon();
42 size_t number_of_batch_;
43 unsigned current_batch_id_;
44 int number_of_sub_problem_resolved_;
45 double remaining_epsilon_;
46 double cumulative_subproblems_timer_per_iter_;
48 int first_unsolved_batch_;
Definition BatchCollection.h:25
Definition BendersByBatch.h:8
void BuildCut(const std::vector< std::string > &batch_sub_problems, double *sum, std::vector< double > &external_loop_criterion_current_batch)
Build subproblem cut Method to build subproblem cuts and add them to the Master problem.
Definition BendersByBatch.cpp:266
bool ShouldRelaxationStop() const override
Check if initial relaxation should stop.
Definition BendersByBatch.cpp:414
void UpdateStoppingCriterion() override
Update stopping criterion.
Definition BendersByBatch.cpp:388
Class use run the benders algorithm in parallel.
Definition BendersMPI.h:20