Skip to content

Commit

Permalink
upd
Browse files Browse the repository at this point in the history
  • Loading branch information
a-zakir committed Dec 17, 2024
1 parent 25f0088 commit db1e44f
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/libs/antares/study/parts/short-term-storage/container.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "antares/study/parts/short-term-storage/container.h"

#include <algorithm>
#include <numeric>
#include <string>

#include <yuni/io/file.h>
Expand Down Expand Up @@ -194,12 +195,13 @@ bool STStorageInput::saveDataSeriesToFolder(const std::string& folder) const

std::size_t STStorageInput::cumulativeConstraintCount() const
{
size_t result = 0;
for (const auto& cluster: storagesByIndex)
{
result += cluster.additional_constraints.size();
}
return result;
return std::accumulate(storagesByIndex.begin(),
storagesByIndex.end(),
0.,
[](double acc, const auto& cluster)
{
return cluster.additional_constraints.size();
});
}

std::size_t STStorageInput::count() const
Expand Down

0 comments on commit db1e44f

Please sign in to comment.