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::environment* penv_ = nullptr;
13 boost::mpi::communicator* pworld_ = nullptr;
14 SOLVER solver_ = SOLVER::BENDERS;
15 SimulationOptions options_;
16 BendersLoggerBase benders_loggers_;
19 criterion_input_holder_;
20 std::shared_ptr<BendersBase> benders_ = nullptr;
21 Logger logger_ = nullptr;
22 std::shared_ptr<Output::OutputWriter> writer_ = nullptr;
23 std::shared_ptr<MathLoggerDriver> math_log_driver_;
24 BENDERSMETHOD method_ = BENDERSMETHOD::BENDERS;
25 std::string context_ = bendersmethod_to_string(BENDERSMETHOD::BENDERS);
26 std::string positive_unsupplied_file_;
27 static constexpr const char* const LOLD_FILE = "LOLD.txt";
28
29 [[nodiscard]] int RunExternalLoop();
30 [[nodiscard]] int RunBenders();
31 [[nodiscard]] std::shared_ptr<MathLoggerDriver> BuildMathLogger(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::environment& env,
41 boost::mpi::communicator& world,
42 const SOLVER& solver);
43 int Run();
44 std::filesystem::path LogReportsName() const;
45};
46#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:203
Definition ILogger.h:131