Skip to content

Commit

Permalink
Output results : fix annual aggregation (#2580)
Browse files Browse the repository at this point in the history
  • Loading branch information
guilpier-code authored Jan 15, 2025
1 parent 600b914 commit d11f5d2
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/solver/variable/storage/intermediate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -273,13 +273,11 @@ void IntermediateValues::computeMonthlyAveragesForCurrentYear()
void IntermediateValues::computeYearlyAveragesForCurrentYear()
{
year = 0.; // Re-initialization (a previous MC year could have left a non-nil value)

// Compute current year average
for (uint w = pRange->week[Data::rangeBegin]; w <= pRange->week[Data::rangeEnd]; ++w)
for (uint d = pRange->day[Data::rangeBegin]; d <= pRange->day[Data::rangeEnd]; ++d)
{
year += week[w];
year += day[d];
}
year /= pRange->week[Data::rangeCount];
year *= HOURS_PER_DAY / (double)pRange->hour[Data::rangeCount];
}

void IntermediateValues::computeProbabilitiesForTheCurrentYear()
Expand Down

0 comments on commit d11f5d2

Please sign in to comment.