/// <summary> /// Gets all production measurements based the given frame time, work unit information, and the unit completion time. /// </summary> /// <param name="frameTime">The work unit frame time.</param> /// <param name="frames">The number of frames in the work unit.</param> /// <param name="credit">The base credit assigned to the work unit.</param> /// <param name="kFactor">The KFactor assigned to the work unit.</param> /// <param name="preferredDays">The preferred deadline (in decimal days).</param> /// <param name="maximumDays">The final deadline (in decimal days).</param> /// <param name="unitTime">The overall unit completion time.</param> /// <returns>The production measurements for the work unit.</returns> public static ProductionValues GetProductionValues(TimeSpan frameTime, int frames, double credit, double kFactor, double preferredDays, double maximumDays, TimeSpan unitTime) { var value = new ProductionValues { UPD = GetUPD(frameTime, frames), Multiplier = GetBonusMultiplier(kFactor, preferredDays, maximumDays, unitTime), Credit = GetBonusCredit(credit, kFactor, preferredDays, maximumDays, unitTime), PPD = GetBonusPPD(frameTime, frames, credit, kFactor, preferredDays, maximumDays, unitTime) }; return(value); }
/// <summary> /// Gets all production measurements based the given frame time, work unit information, and the unit completion time. /// </summary> /// <param name="frameTime">The work unit frame time.</param> /// <param name="frames">The number of frames in the work unit.</param> /// <param name="baseCredit">The base credit assigned to the work unit.</param> /// <param name="kFactor">The KFactor assigned to the work unit.</param> /// <param name="preferredDays">The preferred deadline (in decimal days).</param> /// <param name="maximumDays">The final deadline (in decimal days).</param> /// <param name="unitTimeByDownloadTime">The overall unit completion time based on the unit's download time.</param> /// <param name="unitTimeByFrameTime">The overall unit completion time based on the unit's current frame time.</param> /// <returns>The production measurements for the work unit.</returns> public static ProductionValues GetProductionValues(TimeSpan frameTime, int frames, double baseCredit, double kFactor, double preferredDays, double maximumDays, TimeSpan unitTimeByDownloadTime, TimeSpan unitTimeByFrameTime) { var value = new ProductionValues { TimePerFrame = frameTime, BaseCredit = baseCredit, BasePPD = GetPPD(frameTime, frames, baseCredit, kFactor, preferredDays, maximumDays, TimeSpan.Zero), PreferredTime = TimeSpan.FromDays(preferredDays), MaximumTime = TimeSpan.FromDays(maximumDays), KFactor = kFactor, UnitTimeByDownloadTime = unitTimeByDownloadTime, DownloadTimeBonusMulti = GetMultiplier(kFactor, preferredDays, maximumDays, unitTimeByDownloadTime), DownloadTimeBonusCredit = GetCredit(baseCredit, kFactor, preferredDays, maximumDays, unitTimeByDownloadTime), DownloadTimeBonusPPD = GetPPD(frameTime, frames, baseCredit, kFactor, preferredDays, maximumDays, unitTimeByDownloadTime), UnitTimeByFrameTime = unitTimeByFrameTime, FrameTimeBonusMulti = GetMultiplier(kFactor, preferredDays, maximumDays, unitTimeByFrameTime), FrameTimeBonusCredit = GetCredit(baseCredit, kFactor, preferredDays, maximumDays, unitTimeByFrameTime), FrameTimeBonusPPD = GetPPD(frameTime, frames, baseCredit, kFactor, preferredDays, maximumDays, unitTimeByFrameTime) }; return(value); }