def evalMetric(self, x, w1=None, w2=None):
        '''Evaluates the weighted sum metric at given values of the
        design variables.

        :param iterable x: values of the design variables, this is passed as
            the first argument to the function fqoi

        :param float w1: value to weight the mean by

        :param float w2: value to weight the std by

        :return: metric_value - value of the metric evaluated at the design
            point given by x

        :rtype: float

        '''
        if w1 is None:
            w1 = self.w1
        if w2 is None:
            w2 = self.w2

        if self.verbose:
            print('----------')
            print('At design: ' + str(x))

        self._N_dv = len(_makeIter(x))

        if self.verbose:
            print('Evaluating surrogate')
        if self.surrogate is None:
            def fqoi(u):
                return self.fqoi(x, u)

            def fgrad(u):
                return self.jac(x, u)
            jac = self.jac
        else:
            fqoi, fgrad, surr_jac = self._makeSurrogates(x)
            jac = surr_jac

        u_samples = self._getParameterSamples()

        if self.verbose: print('Evaluating quantity of interest at samples')
        q_samples, grad_samples = self._evalSamples(u_samples, fqoi, fgrad, jac)

        if self.verbose: print('Evaluating metric')
        return self._evalWeightedSumMetric(q_samples, grad_samples)
Evaluates the weighted sum metric at given values of the
        design variables.

        :param iterable x: values of the design variables, this is passed as
            the first argument to the function fqoi

        :param float w1: value to weight the mean by

        :param float w2: value to weight the std by

        :return: metric_value - value of the metric evaluated at the design
            point given by x

        :rtype: float