diff --git a/src/solver/ts-generator/availability.cpp b/src/solver/ts-generator/availability.cpp index 6223ce2b07..bc8cd3fda1 100644 --- a/src/solver/ts-generator/availability.cpp +++ b/src/solver/ts-generator/availability.cpp @@ -76,7 +76,7 @@ class AvailabilityTSgenerator final uint nbOfSeriesToGen_; - MersenneTwister& rndgenerator; + MersenneTwister& randomGenerator_; static constexpr int Log_size = 4000; @@ -96,10 +96,10 @@ class AvailabilityTSgenerator final AvailabilityTSgenerator::AvailabilityTSgenerator(bool derated, unsigned int nbOfSeriesToGen, - MersenneTwister& rndGenerator): + MersenneTwister& randomGenerator): derated(derated), nbOfSeriesToGen_(nbOfSeriesToGen), - rndgenerator(rndGenerator) + randomGenerator_(randomGenerator) { } @@ -160,7 +160,7 @@ int AvailabilityTSgenerator::durationGenerator(Data::StatisticalLaw law, return expec; } - double rndnumber = rndgenerator.next(); + double rndnumber = randomGenerator_.next(); switch (law) { @@ -372,7 +372,7 @@ void AvailabilityTSgenerator::run(AvailabilityTSGeneratorData& tsGenerationData) if (lf[dayInTheYear] > 0. && lf[dayInTheYear] <= FAILURE_RATE_EQ_1) { - A = rndgenerator.next(); + A = randomGenerator_.next(); last = FPOW[dayInTheYear][AUN]; if (A > last) @@ -408,7 +408,7 @@ void AvailabilityTSgenerator::run(AvailabilityTSGeneratorData& tsGenerationData) } last = PPOW[dayInTheYear][AUN_app]; - A = rndgenerator.next(); + A = randomGenerator_.next(); if (A > last) { diff --git a/src/tools/ts-generator/main.cpp b/src/tools/ts-generator/main.cpp index 83fcfb8606..7a43c6e334 100644 --- a/src/tools/ts-generator/main.cpp +++ b/src/tools/ts-generator/main.cpp @@ -38,23 +38,23 @@ std::vector getClustersToGen(Data::AreaList& areas, const std::string& clustersToGen) { std::vector clusters; - const auto ids = splitStringIntoPairs(clustersToGen, ';', '.'); + const auto pairsAreaCluster = splitStringIntoPairs(clustersToGen, ';', '.'); - for (const auto& [areaID, clusterID]: ids) + for (const auto& [areaName, clusterName]: pairsAreaCluster) { - logs.info() << "Searching for area: " << areaID << " and cluster: " << clusterID; + logs.info() << "Searching for area: " << areaName << " and cluster: " << clusterName; - auto* area = areas.find(areaID); + auto* area = areas.find(areaName); if (!area) { - logs.warning() << "Area not found: " << areaID; + logs.warning() << "Area not found: " << areaName; continue; } - auto* cluster = area->thermal.list.findInAll(clusterID); + auto* cluster = area->thermal.list.findInAll(clusterName); if (!cluster) { - logs.warning() << "Cluster not found: " << clusterID; + logs.warning() << "Cluster not found: " << clusterName; continue; }