Loading [MathJax]/extensions/tex2jax.js
Antares Xpansion
Investment simulations for Antares studies
All Classes Namespaces Files Functions Variables Typedefs Pages
SensitivityInputReader.h
1#pragma once
2
3#include <iostream>
4#include <json/json.h>
5
6#include "antares-xpansion/multisolver_interface/SolverAbstract.h"
7
9{
10 double epsilon;
11 double best_ub;
12 double benders_capex;
13 std::map<std::string, double> benders_solution;
14 std::map<std::string, int> name_to_id;
15 std::shared_ptr<SolverAbstract> last_master;
16 std::filesystem::path basis_file_path;
17 std::map<std::string, std::pair<double, double>> candidates_bounds;
18 bool capex;
19 std::vector<std::string> projection;
20};
21
23{
24public:
25 SensitivityInputReader() = default;
26 explicit SensitivityInputReader(const std::filesystem::path& json_input_path,
27 const std::filesystem::path& benders_output_path,
28 std::filesystem::path last_master_path,
29 std::filesystem::path basis_path,
30 std::filesystem::path structure_path);
31 ~SensitivityInputReader() = default;
32
33 SensitivityInputData get_input_data() const;
34
35private:
36 Json::Value _json_data;
37 Json::Value _benders_data;
38 std::filesystem::path _last_master_path;
39 std::filesystem::path _basis_file_path;
40 std::filesystem::path _structure_file_path;
41
42 std::shared_ptr<SolverAbstract> get_last_master() const;
43 double get_best_ub() const;
44 double get_benders_capex() const;
45 std::map<std::string, double> get_benders_solution() const;
46 std::map<std::string, int> get_name_to_id() const;
47 std::vector<std::string> get_projection() const;
48 std::map<std::string, std::pair<double, double>> get_candidates_bounds(
49 SolverAbstract* last_master,
50 const std::map<std::string, int>& name_to_id) const;
51};
Definition SensitivityInputReader.h:23
Definition SolverAbstract.h:200
Definition SensitivityInputReader.h:9