Loading [MathJax]/extensions/MathMenu.js
Antares Xpansion
Investment simulations for Antares studies
All Classes Namespaces Files Functions Variables Typedefs Pages
StudyUpdater.h
1#pragma once
2
3#include <filesystem>
4
5#include "antares-xpansion/helpers/AntaresVersionProvider.h"
6#include "antares-xpansion/lpnamer/helper/ProblemGenerationLogger.h"
7#include "antares-xpansion/lpnamer/model/ActiveLinks.h"
8#include "antares-xpansion/lpnamer/problem_modifier/LinkProblemsGenerator.h"
9
16{
17private:
18 // path to the antares study
19 std::filesystem::path studyPath_;
20 // antares version
21 int antaresVersion_;
22 std::shared_ptr<ProblemGenerationLog::ProblemGenerationLogger> logger_;
23
24public:
30 explicit StudyUpdater(std::filesystem::path studyPath_p,
31 const AntaresVersionProvider& antares_version_provider,
32 std::shared_ptr<ProblemGenerationLog::ProblemGenerationLogger> logger);
33
37 virtual ~StudyUpdater() = default;
38
49 [[nodiscard]] int updateLinkdataFile(const ActiveLink& link_p,
50 const std::map<std::string, double>& investments_p) const;
51
61 [[nodiscard]] int update(const std::vector<ActiveLink>& links_p,
62 const std::map<std::string, double>& investments_p);
63
73 int update(const std::vector<ActiveLink>& links_p, const std::filesystem::path& jsonPath_p);
74};
Definition AntaresVersionProvider.h:14
Class that updates an antares study after an antares-xpansion execution.
Definition StudyUpdater.h:16
virtual ~StudyUpdater()=default
default destructor of calass StudyUpdater
int updateLinkdataFile(const ActiveLink &link_p, const std::map< std::string, double > &investments_p) const
updates the linkdata file for a given link according to the investments of its candidates
Definition StudyUpdater.cpp:21
StudyUpdater(std::filesystem::path studyPath_p, const AntaresVersionProvider &antares_version_provider, std::shared_ptr< ProblemGenerationLog::ProblemGenerationLogger > logger)
constructor of class StudyUpdater
Definition StudyUpdater.cpp:12
int update(const std::vector< ActiveLink > &links_p, const std::map< std::string, double > &investments_p)
updates the linkdata files for multiple candidates from a solution Point
Definition StudyUpdater.cpp:47