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

namespace Volpe.Cafe.TechAnalysis
{
    /// <summary>
    /// Contains the effect of applying a technology on a particular vehicle.
    /// </summary>
    [Serializable]
    public class TechEffect
    {
        /// <summary>
        /// Gets or sets whether this technology effect contains valid data.
        /// </summary>
        /// <remarks>
        /// This value will be <c>true</c> if the vehicle simulation database contains a simulation result for both
        /// <see cref="KeyRef"/> and <see cref="KeyNew"/> technology keys. If a simulation result for one or both
        /// of the keys is missing, this value will be <c>false</c>.
        /// </remarks>
        public bool IsValid { get; set; }

        //----- technology key info -----
        /// <summary>
        /// Gets or sets the technology key of a vehicle before application of a technology.
        /// </summary>
        public TechKey KeyRef { get; set; }
        /// <summary>
        /// Gets or sets the new technology key of a vehicle after application of a technology.
        /// </summary>
        public TechKey KeyNew { 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 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 non-battery cost associated with technology application.
        /// </summary>
        public double NonBatteryCost { 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; }

    }
}
