20 std::shared_ptr<ILogger> logger,
21 std::shared_ptr<Output::OutputWriter> writer,
22 mpi::communicator& world,
23 std::shared_ptr<MathLoggerDriver> mathLoggerDriver);
27 std::string BendersName()
const override
39 void master_build_cuts(
const std::vector<SubProblemDataMap>& gathered_subproblem_map);
40 void SetSubproblemDataCostAndSimplexIter(
41 const std::vector<SubProblemDataMap>& gathered_subproblem_map);
43 mpi::communicator& _world;
46 void step_1_solve_master();
47 void step_2_solve_subproblems_and_build_cuts();
48 void step_4_update_best_solution(
int rank);
50 SubProblemDataMap get_subproblem_cut_package();
52 void solve_master_and_create_trace();
54 void do_solve_master_create_trace_and_update_cuts();
56 virtual void gather_subproblems_cut_package_and_build_cuts(
57 const SubProblemDataMap& subproblem_data_map,
58 const Timer& process_timer);
60 void write_exception_message(
const std::exception& ex)
const;
62 void check_if_some_proc_had_a_failure(
int success);
65 [[nodiscard]]
bool shouldParallelize()
const final
70 void PreRunInitialization();
78 void BroadCast(T& value,
int root)
const
80 mpi::broadcast(_world, value, root);
84 void BroadCast(T* values,
int n,
int root)
const
86 mpi::broadcast(_world, values, n, root);
90 void Gather(
const T& value, std::vector<T>& vector_of_values,
int root)
const
92 mpi::gather(_world, value, vector_of_values, root);
95 void BuildMasterProblem();
107 template<
typename T,
typename Op>
108 void Reduce(
const T& in_value, T& out_value, Op op,
int root)
const
110 mpi::reduce(_world, in_value, out_value, op, root);
113 template<
typename T,
typename Op>
114 void AllReduce(
const T& in_value, T& out_value, Op op)
const
116 mpi::all_reduce(_world, in_value, out_value, op);
119 virtual void GatherCuts(
const SubProblemDataMap& subproblem_data_map,
const Timer& walltime);
120 void BroadCastVariablesIndices();
121 virtual void ComputeSubproblemsContributionToCriteria(
122 const SubProblemDataMap& subproblem_data_map);
124 const std::string& name,
125 const std::shared_ptr<SubproblemWorker>& worker)
override;
126 void UpdateMaxCriterionArea();