Antares Xpansion
Investment simulations for Antares studies
Loading...
Searching...
No Matches
ProblemGenerationOptions.h
1//
2// Created by marechaljas on 27/10/23.
3//
4
5#pragma once
6
7#include <antares-xpansion/xpansion_interfaces/LogUtils.h>
8#include <filesystem>
9#include <vector>
10
11#include "antares-xpansion/core/ProblemFormat.h"
12
14{
15public:
16 virtual ~ProblemGenerationOptions() = default;
17 [[nodiscard]] virtual std::filesystem::path XpansionOutputDir() const = 0;
18 [[nodiscard]] virtual std::string MasterFormulation() const = 0;
19 [[nodiscard]] virtual std::string AdditionalConstraintsFilename() const = 0;
20 [[nodiscard]] virtual std::filesystem::path ArchivePath() const = 0;
21 [[nodiscard]] virtual std::filesystem::path WeightsFile() const = 0;
22 [[nodiscard]] virtual std::vector<int> ActiveYears() const = 0;
23 [[nodiscard]] virtual bool UnnamedProblems() const = 0;
24 [[nodiscard]] virtual ProblemsFormat Format() const = 0;
25 [[nodiscard]] virtual std::filesystem::path deduceXpansionDirIfEmpty(
26 std::filesystem::path xpansion_output_dir,
27 const std::filesystem::path& archive_path) const
28 = 0;
29 [[nodiscard]] virtual std::filesystem::path StudyPath() const = 0;
30
31 class ConflictingParameters: public LogUtils::XpansionError<std::runtime_error>
32 {
33 using LogUtils::XpansionError<std::runtime_error>::XpansionError;
34
35 public:
36 explicit ConflictingParameters(const std::string& err_message,
37 const std::string& log_location):
38 XpansionError(err_message, log_location)
39 {
40 }
41 };
42
43 class MismatchedParameters: public LogUtils::XpansionError<std::runtime_error>
44 {
45 using LogUtils::XpansionError<std::runtime_error>::XpansionError;
46
47 public:
48 explicit MismatchedParameters(const std::string& err_message,
49 const std::string& log_location):
50 XpansionError(err_message, log_location)
51 {
52 }
53 };
54
55 class MissingParameters: public LogUtils::XpansionError<std::runtime_error>
56 {
57 using LogUtils::XpansionError<std::runtime_error>::XpansionError;
58
59 public:
60 explicit MissingParameters(const std::string& err_message, const std::string& log_location):
61 XpansionError(err_message, log_location)
62 {
63 }
64 };
65};
Definition ProblemGenerationOptions.h:32
Definition ProblemGenerationOptions.h:44
Definition ProblemGenerationOptions.h:56
Definition ProblemGenerationOptions.h:14