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 [[nodiscard]] std::shared_ptr<MathLoggerDriver> BuildMathLogger(bool benders_log_console) const;
31 void StartMessage();
32 void EndMessage(const double execution_time);
33 void AddCriterionOutputs();
34 bool isCriterionListEmpty() const;
35 void SetupLoggerAndOutputWriter(const BendersBaseOptions& benders_options);
36
37public:
38 explicit BendersApp(const std::filesystem::path& options_file,
39 boost::mpi::communicator& world,
40 const SOLVER& solver);
41 int Run();
42 std::filesystem::path LogReportsName() const;
43};
44#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