using System;
using Volpe.Cafe.ModelSettings;
using TechKey = Volpe.Cafe.TechKeys.TechKey128;

namespace Volpe.Cafe.TechAnalysis
{
    /// <summary>
    /// Represents the accumulated impact arising from application of pending technologies to a specific vehicle model
    /// and in a specific model year. The impact includes various cost and fuel consumption improvement metrics
    /// associated with technology application.
    /// </summary>
    [Serializable]
    public class TechImpact
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="TechImpact"/> class.
        /// </summary>
        /// <param name="tech">The technology associated with this instance.</param>
        public TechImpact(TechnologyInfo tech)
        {
            this.Technology = tech;
        }

        //----- affected technology info -----
        /// <summary>
        /// Gets or sets the technology associated with this <see cref="TechImpact"/> instance.
        /// </summary>
        public TechnologyInfo Technology { get; set; }
        /// <summary>
        /// Gets or sets the technology key of a vehicle associated with technology application.
        /// </summary>
        public TechKey TechKey { get; set; }

        //----- fuel economy/consumption improvements -----
        /// <summary>
        /// Gets or sets the fuel economy improvement factor (for primary fuel) associated with the technology key of a
        /// vehicle before application of a technology.
        /// </summary>
        public double FE1ImprvRef { get; set; }
        /// <summary>
        /// Gets or sets the fuel economy improvement factor (for secondary fuel) associated with the technology key of
        /// a vehicle before application of a technology.
        /// </summary>
        public double FE2ImprvRef { get; set; }
        /// <summary>
        /// Gets or sets the fuel economy improvement factor (for primary fuel) associated with the new technology key
        /// of a vehicle after application of a technology.
        /// </summary>
        public double FE1ImprvNew { get; set; }
        /// <summary>
        /// Gets or sets the fuel economy improvement factor (for secondary fuel) associated with the new technology
        /// key of a vehicle after application of a technology.
        /// </summary>
        public double FE2ImprvNew { get; set; }
        /// <summary>
        /// Gets or sets the fuel economy adjustment factor (for primary fuel) associated with technology application.
        /// </summary>
        public double FE1Adjustment { get; set; }
        /// <summary>
        /// Gets or sets the fuel economy adjustment factor (for secondary fuel) associated with technology
        /// application.
        /// </summary>
        public double FE2Adjustment { get; set; }
        /// <summary>
        /// Gets or sets the fuel share (for secondary fuel) associated with technology application.
        /// </summary>
        public double FS2 { get; set; }

        //----- costs -----
        /// <summary>
        /// Gets or sets the battery cost associated with the technology key of a vehicle before application of a
        /// technology.
        /// </summary>
        public double BatteryCostRef { get; set; }
        /// <summary>
        /// Gets or sets the battery cost associated with the technology key of a vehicle after application of a
        /// technology.
        /// </summary>
        public double BatteryCostNew { get; set; }
        /// <summary>
        /// Gets or sets the battery cost associated with technology application.
        /// </summary>
        public double BatteryCost { get; set; }
        /// <summary>
        /// Gets or sets the overall cost associated with technology application.
        /// </summary>
        public double TechCost { get; set; }
        /// <summary>
        /// Gets or sets the maintenance and repair cost associated with technology application.
        /// </summary>
        public double MaintRepairCost { get; set; }

        //----- credits -----
        /// <summary>
        /// Gets or sets the ZEV credit associated with technology application.
        /// </summary>
        public double ZEVCredit { get; set; }

        //----- weight changes -----
        /// <summary>
        /// Gets or sets the change in curb weight associated with technology application.
        /// </summary>
        public double DeltaCW { get; set; }
        /// <summary>
        /// Gets or sets the change in GVWR associated with technology application.
        /// </summary>
        public double DeltaGVWR { get; set; }
        /// <summary>
        /// Gets or sets the change in GCWR associated with technology application.
        /// </summary>
        public double DeltaGCWR { get; set; }

    }
}
