using Volpe.Cafe.Logging;
using Volpe.Cafe.MarketData.Design;
using Volpe.Cafe.ModelSettings;

namespace Volpe.Cafe.DfsSrModels.SalesEstimators
{
    /// <summary>
    /// Defines methods for estimating new total light-duty and total HDPUV sales from the aggregate forecast fleet
    /// data.
    /// </summary>
    public interface ISalesEstimator
    {
        /// <summary>
        /// Gets the product plan industry data used for analysis.
        /// </summary>
        IIndustry Data { get; }

        /// <summary>
        /// Gets the modeling settings used for analysis.
        /// </summary>
        ModelingSettings Settings { get; }

        /// <summary>
        /// Gets the object used for writing log files generated during compliance modeling.
        /// </summary>
        ILogger LogWriter { get; }

        /// <summary>
        /// Estimates the total light-duty sales for the given scenario, iteration, and model year.
        /// </summary>
        /// <param name="scen">The compliance scenario being analyzed.</param>
        /// <param name="iteration">The iteration trial being analyzed.</param>
        /// <param name="year">The model year being analyzed.</param>
        /// <param name="baseFleet">The aggregate forecast fleet from the baseline scenario.</param>
        /// <param name="scenFleet">The aggregate forecast fleet from the action alternative scenario.</param>
        /// <returns>The estimated total light-duty sales for the given scenario, iteration, and model year.</returns>
        double CalcNewLightDutySales(
            Scenario scen, int iteration, int year, ForecastFleet baseFleet, ForecastFleet scenFleet);

        /// <summary>
        /// Estimates the total HDPUV sales for the given scenario, iteration, and model year.
        /// </summary>
        /// <inheritdoc cref="CalcNewLightDutySales" path="/param"/>
        /// <returns>The estimated total HDPUV sales for the given scenario, iteration, and model year.</returns>
        double CalcNewHdpuvSales(
            Scenario scen, int iteration, int year, ForecastFleet baseFleet, ForecastFleet scenFleet);

    }
}
