Antares Xpansion
Investment simulations for Antares studies
Loading...
Searching...
No Matches
LinkProfileReader.h
1#ifndef ANTARESXPANSION_LINKPROFILEREADER_H
2#define ANTARESXPANSION_LINKPROFILEREADER_H
3
4#include <filesystem>
5#include <map>
6#include <utility>
7
8#include "antares-xpansion/lpnamer/helper/ProblemGenerationLogger.h"
9#include "antares-xpansion/lpnamer/model/Candidate.h"
10#include "antares-xpansion/lpnamer/model/LinkProfile.h"
11
13{
14public:
15 explicit LinkProfileReader(
16 std::shared_ptr<ProblemGenerationLog::ProblemGenerationLogger> logger):
17 logger_(std::move(logger))
18 {
19 }
20
21 std::vector<LinkProfile> ReadLinkProfile(const std::filesystem::path& direct_filename,
22 const std::filesystem::path& indirect_file_name);
23 std::vector<LinkProfile> ReadLinkProfile(const std::filesystem::path& direct_filename);
24 std::map<std::string, std::vector<LinkProfile>> getLinkProfileMap(
25 const std::filesystem::path& capacity_folder,
26 const std::vector<CandidateData>& candidateList);
27
28private:
29 void importProfile(std::map<std::string, std::vector<LinkProfile>>& mapLinkProfile,
30 const std::filesystem::path& capacitySubfolder,
31 const std::string& direct_profile_name,
32 const std::string& indirect_profile_name);
33
34 void ReadLinkProfile(const std::filesystem::path& filename,
35 std::vector<LinkProfile>& result,
36 bool fillDirectProfile);
37
38 void ConstructChronicle(std::vector<LinkProfile>& result, int chronicle_id) const;
39 void UpdateProfile(std::vector<LinkProfile>& result,
40 bool directProfile,
41 double value,
42 int chronicle_id,
43 size_t time_step) const;
44 void EnsureFileIsGood(const std::filesystem::path& direct_filename) const;
45 std::shared_ptr<ProblemGenerationLog::ProblemGenerationLogger> logger_;
46};
47
48#endif // ANTARESXPANSION_LINKPROFILEREADER_H
Definition LinkProfileReader.h:13