17 ActiveLink(
int idLink,
const std::string& linkName,
const std::string& linkor,
18 const std::string& linkex,
19 const double& already_installed_capacity,
20 std::shared_ptr<ProblemGenerationLog::ProblemGenerationLogger> logger);
21 ActiveLink(
int idLink, std::string linkName, std::string linkor,
22 std::string linkex,
const double& already_installed_capacity,
23 std::map<unsigned, unsigned> mc_year_to_chronicle,
24 std::shared_ptr<ProblemGenerationLog::ProblemGenerationLogger> logger);
26 void setAlreadyInstalledLinkProfiles(
27 const std::vector<LinkProfile>& linkProfile);
30 const std::vector<LinkProfile>& candidate_profile);
31 [[nodiscard]]
const std::vector<Candidate>& getCandidates()
const;
33 [[nodiscard]]
double already_installed_direct_profile(
size_t timeStep)
const;
34 [[nodiscard]]
double already_installed_indirect_profile(
35 size_t timeStep)
const;
36 [[nodiscard]]
double already_installed_direct_profile(
size_t chronicle_number,
37 size_t timeStep)
const;
38 [[nodiscard]]
double already_installed_indirect_profile(
39 size_t chronicle_number,
size_t timeStep)
const;
41 [[nodiscard]]
unsigned get_idLink()
const;
42 [[nodiscard]] LinkName get_LinkName()
const;
43 [[nodiscard]] std::string get_linkor()
const;
44 [[nodiscard]]
const std::string& linkor()
const;
45 [[nodiscard]] std::string get_linkex()
const;
46 [[nodiscard]]
const std::string& linkex()
const;
47 [[nodiscard]]
double get_already_installed_capacity()
const;
49 [[nodiscard]] std::map<unsigned int, unsigned int> McYearToChronicle()
const {
50 return mc_year_to_chronicle_;
53 [[nodiscard]]
unsigned long number_of_chronicles()
const;
56 std::map<unsigned, unsigned> mc_year_to_chronicle_;
62 double _already_installed_capacity = 1;
64 std::vector<LinkProfile> _already_installed_profile = {};
65 std::vector<Candidate> _candidates = {};
66 std::shared_ptr<ProblemGenerationLog::ProblemGenerationLogger> logger_;
72 std::vector<CandidateData> candidateList,
73 std::map<std::string, std::vector<LinkProfile>> profile_map,
75 std::shared_ptr<ProblemGenerationLog::ProblemGenerationLogger> logger);
78 const std::vector<CandidateData>& candidateList,
79 const std::map<std::string, std::vector<LinkProfile>>& profile_map,
80 std::shared_ptr<ProblemGenerationLog::ProblemGenerationLogger> logger);
83 :
public LogUtils::XpansionError<std::runtime_error> {
84 using LogUtils::XpansionError<std::runtime_error>::XpansionError;
87 :
public LogUtils::XpansionError<std::runtime_error> {
88 using LogUtils::XpansionError<std::runtime_error>::XpansionError;
91 :
public LogUtils::XpansionError<std::runtime_error> {
92 using LogUtils::XpansionError<std::runtime_error>::XpansionError;
95 :
public LogUtils::XpansionError<std::runtime_error> {
96 using LogUtils::XpansionError<std::runtime_error>::XpansionError;
99 :
public LogUtils::XpansionError<std::runtime_error> {
100 using LogUtils::XpansionError<std::runtime_error>::XpansionError;
103 const std::vector<ActiveLink>& getLinks();
108 double installed_capacity;
109 std::string profile_name;
114 void checkCandidateNameDuplication()
const;
115 void checkLinksValidity();
117 int getLinkIndexOf(
int link_id)
const;
119 void launchExceptionIfNoLinkProfileAssociated(
120 const std::string& profileName)
const;
123 void raise_errors_if_link_data_differs_from_existing_link(
124 const LinkData& link_data,
const LinkName& link_name)
const;
127 LinkProfile getProfileFromProfileMap(
const std::string& profile_name)
const;
128 std::vector<LinkProfile> getProfilesFromProfileMap(
129 const std::string& profile_name)
const;
131 std::map<LinkName, LinkData> _links_data;
132 std::unordered_map<LinkName, std::string> linkToAlreadyInstalledProfileName;
133 std::unordered_map<LinkName, double> linkToAlreadyInstalledCapacity;
134 const std::vector<CandidateData> _candidateDatas;
135 const std::map<std::string, std::vector<LinkProfile>> _profile_map;
136 std::vector<ActiveLink> _links;
138 std::shared_ptr<ProblemGenerationLog::ProblemGenerationLogger> logger_;