def fun_var(x, cf_cov, **kwargs):
    """Objective function given by the variance associated with
    a capacity distribution and a capacity factors covariance matrix.

    :param x: State vector.
    :param cf_cov: pv/wind capacity factors covariances.
    :type x: :py:class:`numpy.array`
    :type cf_cov: :py:class:`numpy.array`

    :returns: Value of objective function.
    :rtype: float
    """
    obj = x.dot(cf_cov.dot(x))
    return obj
