using System.Collections.Generic;
using Volpe.Cafe.ModelSettings;

namespace Volpe.Cafe.DfsSrModels.Aggregators
{
    /// <summary>
    /// Defines methods for aggregating forecast fleet data from individual forecast vehicles or from the historic
    /// fleet data.
    /// </summary>
    public interface IForecastFleetAggregator
    {
        /// <summary>
        /// Gets the modeling settings used for analysis.
        /// </summary>
        ModelingSettings Settings { get; }

        /// <summary>
        /// Aggregates the forecast fleet for the given scenario and model year. If the given <paramref name="year"/>
        /// is less than the first analysis year, the historic fleet data will be used for aggregation. Otherwise, the
        /// forecast fleet will be aggregated from the specified list of forecast vehicles.
        /// </summary>
        /// <param name="scen">The compliance scenario being analyzed.</param>
        /// <param name="year">The model year being analyzed.</param>
        /// <param name="forecastVehs">
        ///     A list of forecast vehicles to use for aggregation. Not applicable if <paramref name="year"/> is less
        ///     than the first analysis year.
        /// </param>
        /// <returns>
        /// The aggregated forecast fleet data, based on either the historic fleet or the analysis fleet of the given
        /// vintage.
        /// </returns>
        ForecastFleet AggregateFleetData(Scenario scen, int year, IList<ForecastVehicle> forecastVehs);

        /// <summary>
        /// Aggregates the specified list of forecast vehicles for the given scenario and model year.
        /// </summary>
        /// <param name="scen">The compliance scenario being analyzed.</param>
        /// <param name="year">The model year being analyzed.</param>
        /// <param name="forecastVehs">A list of forecast vehicles to use for aggregation.</param>
        /// <returns>The aggregated forecast fleet data, based on the analysis fleet of the given vintage.</returns>
        ForecastFleet AggregateAnalysisFleetData(Scenario scen, int year, IList<ForecastVehicle> forecastVehs);

        /// <summary>
        /// Aggregates the historic fleet data for the given scenario and model year.
        /// </summary>
        /// <param name="scen">The compliance scenario being analyzed.</param>
        /// <param name="year">The model year being analyzed.</param>
        /// <returns>The aggregated forecast fleet data, based on the historic fleet of the given vintage.</returns>
        ForecastFleet AggregateHistoricFleetData(Scenario scen, int year);

    }
}
