Antares Xpansion
Investment simulations for Antares studies
Loading...
Searching...
No Matches
ProblemGeneration.h
1//
2// Created by marechaljas on 27/10/23.
3//
4
5#pragma once
6
7#include <filesystem>
8#include <optional>
9#include <string>
10
11#include <antares/solver/lps/LpsFromAntares.h>
12
13#include "ConfigurationManager.h"
14#include "ProblemGenerationOptions.h"
15#include "antares-xpansion/helpers/ArchiveReader.h"
16#include "antares-xpansion/lpnamer/helper/ProblemGenerationLogger.h"
17#include "antares-xpansion/lpnamer/input_reader/MpsTxtWriter.h"
18#include "antares-xpansion/lpnamer/main/ProblemGenerationExeOptions.h"
19#include "antares-xpansion/lpnamer/model/Problem.h"
20#include "antares-xpansion/lpnamer/model/SimulationInputMode.h"
21#include "antares-xpansion/multisolver_interface/SolverAbstract.h"
22#include "antares-xpansion/multisolver_interface/SolverConfig.h"
23
25{
26public:
28 virtual ~ProblemGeneration() = default;
29 std::filesystem::path updateProblems();
30 const ProblemGenerationOptions& options_;
31
32private:
33 virtual void RunProblemGeneration(
34 const std::filesystem::path& xpansion_output_dir,
35 const std::string& master_formulation,
36 const std::string& additionalConstraintFilename_l,
37 const std::filesystem::path& archive_path,
38 std::shared_ptr<ProblemGenerationLog::ProblemGenerationLogger> logger,
39 const std::filesystem::path& log_file_path,
40 const std::filesystem::path& weights_file,
41 bool unnamed_problems);
42
43 void ExtractUtilsFiles(const std::filesystem::path& antares_archive_path,
44 const std::filesystem::path& xpansion_output_dir,
45 std::shared_ptr<ProblemGenerationLog::ProblemGenerationLogger> logger);
46 std::vector<std::shared_ptr<Problem>> getXpansionProblems(
47 SolverLogManager& solver_log_manager,
48 const std::vector<ProblemData>& mpsList,
49 std::filesystem::path& lpDir_,
50 std::shared_ptr<ArchiveReader> reader);
51 virtual void set_solver(std::filesystem::path study_dir,
53
54 Antares::Solver::LpsFromAntares lps_;
55 std::optional<SimulationInputMode> mode_;
56 virtual void performAntaresSimulation(const std::filesystem::path& output);
57 SolverConfig solver_config_{"Coin"};
58
59protected:
60 ConfigurationManager configuration_manager_;
62};
Definition ConfigurationManager.h:11
Definition ProblemGenerationLogger.h:91
Definition ProblemGenerationOptions.h:14
Definition ProblemGeneration.h:25
Class to store the configuration of a solver Invariant: name is lowercase.
Definition SolverConfig.h:12
Definition SolverAbstract.h:20
Definition ConfigurationManager.h:14