Antares Xpansion
Investment simulations for Antares studies
Loading...
Searching...
No Matches
BendersApp.h
1#ifndef ANTARES_XPANSION_SRC_CPP_BENDERS_FACTORIES_INCLUDE_BENDERSFACTORY_H
2#define ANTARES_XPANSION_SRC_CPP_BENDERS_FACTORIES_INCLUDE_BENDERSFACTORY_H
3#include <antares-xpansion/benders/benders_core/SimulationOptions.h>
4#include <variant>
5
6#include "antares-xpansion/benders/benders_core/CriterionComputation.h"
7#include "antares-xpansion/benders/benders_core/common.h"
8#include "antares-xpansion/benders/benders_mpi/BendersMPI.h"
9
11{
12 boost::mpi::communicator* pworld_ = nullptr;
13 SOLVER solver_ = SOLVER::BENDERS;
14 SimulationOptions options_;
15 BendersLoggerBase benders_loggers_;
18 criterion_input_holder_;
19 std::shared_ptr<BendersBase> benders_ = nullptr;
20 Logger logger_ = nullptr;
21 std::shared_ptr<Output::OutputWriter> writer_ = nullptr;
22 std::shared_ptr<MathLoggerDriver> math_log_driver_;
23 BENDERSMETHOD method_ = BENDERSMETHOD::BENDERS;
24 std::string context_ = bendersmethod_to_string(BENDERSMETHOD::BENDERS);
25 std::string positive_unsupplied_file_;
26 static constexpr const char* const LOLD_FILE = "LOLD.txt";
27
28 [[nodiscard]] int RunExternalLoop();
29 [[nodiscard]] int RunBenders();
30 void InitializeBendersEnvironment(bool outer_loop);
31 void SetupMathLogger(bool benders_log_console) const;
32 void StartMessage();
33 void EndMessage(const double execution_time);
34 void AddCriterionOutputs();
35 bool isCriterionListEmpty() const;
36 void SetupLoggerAndOutputWriter(const BendersBaseOptions& benders_options);
37
38public:
39 explicit BendersApp(const std::filesystem::path& options_file,
40 boost::mpi::communicator& world,
41 const SOLVER& solver);
42 int Run();
43 std::filesystem::path LogReportsName() const;
44};
45#endif // ANTARES_XPANSION_SRC_CPP_BENDERS_FACTORIES_INCLUDE_BENDERSFACTORY_H
Definition BendersApp.h:11
this class contains all data read from user input file
Definition CriterionInputDataReader.h:83
this class contains all data read from user input file
Definition CriterionInputDataReader.h:103
Definition SimulationOptions.h:6
Definition common.h:205
Definition ILogger.h:135