Skip to content

Instantly share code, notes, and snippets.

@bsommardahl
Created May 15, 2012 13:40
Show Gist options
  • Save bsommardahl/2701863 to your computer and use it in GitHub Desktop.
Save bsommardahl/2701863 to your computer and use it in GitHub Desktop.
EAFPowerCalculator
public class EAFPowerCalculator : IEAFPowerCalculator
{
#region IEAFPowerCalculator Members
public Megawatts Calculate(Megawatts eafPowerRate, Minutes extraDelay, Minutes secondCharge, Minutes powerOn)
{
var delay = extraDelay + secondCharge + powerOn;
double delayRate = (60 - Convert.ToDouble(delay.Value))/60;
double power = eafPowerRate.Value*delayRate;
return new Megawatts(power);
}
#endregion
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment