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 <antares/solver/lps/LpsFromAntares.h>
8
9#include <filesystem>
10#include <optional>
11#include <string>
12
13// clang-format off
14#include "antares-xpansion/lpnamer/input_reader/MpsTxtWriter.h"
15#include "antares-xpansion/lpnamer/model/Problem.h"
16#include "antares-xpansion/lpnamer/model/SimulationInputMode.h"
17#include "antares-xpansion/helpers/ArchiveReader.h"
18#include "antares-xpansion/lpnamer/main/ProblemGenerationExeOptions.h"
19#include "antares-xpansion/lpnamer/helper/ProblemGenerationLogger.h"
20#include "ProblemGenerationOptions.h"
21#include "antares-xpansion/multisolver_interface/SolverAbstract.h"
22#include "antares-xpansion/multisolver_interface/SolverConfig.h"
23// clang-format on
24
26 public:
28 virtual ~ProblemGeneration() = default;
29 std::filesystem::path updateProblems();
30 const ProblemGenerationOptions& options_;
31
32 private:
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, bool unnamed_problems);
41
42 void ProcessWeights(
43 const std::filesystem::path& xpansion_output_dir,
44 const std::filesystem::path& weights_file,
45 std::shared_ptr<ProblemGenerationLog::ProblemGenerationLogger> logger);
46 void ExtractUtilsFiles(
47 const std::filesystem::path& antares_archive_path,
48 const std::filesystem::path& xpansion_output_dir,
49 std::shared_ptr<ProblemGenerationLog::ProblemGenerationLogger> logger);
50 std::vector<std::shared_ptr<Problem>> getXpansionProblems(
51 SolverLogManager& solver_log_manager, SolverConfig solver_name,
52 const std::vector<ProblemData>& mpsList, std::filesystem::path& lpDir_,
53 std::shared_ptr<ArchiveReader> reader,
54 const Antares::Solver::LpsFromAntares& lps);
55 virtual void set_solver(
56 std::filesystem::path study_dir,
58
59 Antares::Solver::LpsFromAntares lps_;
60 std::optional<SimulationInputMode> mode_;
61 virtual void performAntaresSimulation(const std::filesystem::path& output);
62 std::filesystem::path simulation_dir_;
63 SolverConfig solver_config_{"Coin"};
64};
Definition ProblemGenerationLogger.h:73
Definition ProblemGenerationOptions.h:10
Definition ProblemGeneration.h:25
Class to store the configuration of a solver Invariant: name is lowercase.
Definition SolverConfig.h:11
Definition SolverAbstract.h:16