Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
flomnes committed Dec 30, 2024
1 parent 48e4e6a commit 16c02fe
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 17 deletions.
4 changes: 2 additions & 2 deletions src/libs/antares/study/area/list.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1197,8 +1197,8 @@ bool AreaList::loadFromFolder(const StudyLoadOptions& options)
for (const auto& area: areas | std::views::values)
{
fs::path cluster_folder = stsFolder / "clusters" / area->id.c_str();
ret = area->shortTermStorage.createSTStorageClustersFromIniFile(cluster_folder) &&
ret;
ret = area->shortTermStorage.createSTStorageClustersFromIniFile(cluster_folder)
&& ret;

const auto constraints_folder = stsFolder / "constraints" / area->id.c_str();
ret = area->shortTermStorage.LoadConstraintsFromIniFile(constraints_folder) && ret;
Expand Down
2 changes: 1 addition & 1 deletion src/libs/antares/study/parts/short-term-storage/series.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ void fillIfEmpty(std::vector<double>& v, double value)
{
v.resize(HOURS_PER_YEAR, value);
}
};
}

void Series::fillDefaultSeriesIfEmpty()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ int OPT_DecompteDesVariablesEtDesContraintesDuProblemeAOptimiser(PROBLEME_HEBDO*
for (const auto& additional_constraints: storage.additional_constraints)
{
ProblemeAResoudre->NombreDeContraintes += additional_constraints.constraints
.size();
.size();
}
}
}
Expand Down
21 changes: 8 additions & 13 deletions src/solver/optimisation/opt_gestion_second_membre_cas_lineaire.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,19 +61,14 @@ static void shortTermStorageCumulationRHS(
for (const auto& constraint: additional_constraints.constraints)
{
const int cnt = CorrespondancesDesContraintesHebdomadaires
.ShortTermStorageCumulation[constraint.globalIndex];

SecondMembre[cnt] = std::accumulate(constraint.hours.begin(),
constraint.hours.end(),
0.0,
[weekFirstHour, &additional_constraints
](
const double sum,
const int hour)
{
return sum + additional_constraints.rhs[
weekFirstHour + hour - 1];
});
.ShortTermStorageCumulation[constraint.globalIndex];

SecondMembre[cnt] = std::accumulate(
constraint.hours.begin(),
constraint.hours.end(),
0.0,
[weekFirstHour, &additional_constraints](const double sum, const int hour)
{ return sum + additional_constraints.rhs[weekFirstHour + hour - 1]; });
}
}
}
Expand Down

0 comments on commit 16c02fe

Please sign in to comment.