13 std::filesystem::path weights_file_path_;
14 size_t number_of_active_years_;
15 std::shared_ptr<ProblemGenerationLog::ProblemGenerationLogger> logger_;
16 bool null_weights =
true;
17 std::vector<double> weights_list_;
19 int CountValues()
const;
20 bool AreAllWeightsNull()
const;
21 double GetWeightFromLine(
const std::string& line,
int idx)
const;
22 void CheckValue(
const double line,
int idx);
23 void CheckFileIsNotEmpty(std::ifstream& file)
const;
27 const std::filesystem::path& weights_file_path,
28 const size_t number_of_active_years,
29 std::shared_ptr<ProblemGenerationLog::ProblemGenerationLogger> logger):
30 weights_file_path_(weights_file_path),
31 number_of_active_years_(number_of_active_years),
38 using LogUtils::XpansionError<std::runtime_error>::XpansionError;
43 using WeightsFileError::WeightsFileError;
48 using WeightsFileError::WeightsFileError;
53 using WeightsFileError::WeightsFileError;
58 using WeightsFileError::WeightsFileError;
63 using WeightsFileError::WeightsFileError;
74 std::vector<double> WeightsList()
const