'do an optimization test starting at x0 for all the optimizers'

def bench_run(self, x0, methods=None, **minimizer_kwargs):

    kwargs = self.minimizer_kwargs
    if (methods is None):
        methods = ['COBYLA', 'Powell', 'L-BFGS-B', 'BFGS', 'CG', 'TNC', 'SLSQP', 'Newton-CG', 'dogleg', 'trust-ncg', 'trust-exact']
    fonly_methods = ['COBYLA', 'Powell']
    for method in fonly_methods:
        if (method not in methods):
            continue
        t0 = time.time()
        res = scipy.optimize.minimize(self.fun, x0, method=method, **kwargs)
        t1 = time.time()
        self.add_result(res, (t1 - t0), method)
    gradient_methods = ['L-BFGS-B', 'BFGS', 'CG', 'TNC', 'SLSQP']
    if (self.der is not None):
        for method in gradient_methods:
            if (method not in methods):
                continue
            t0 = time.time()
            res = scipy.optimize.minimize(self.fun, x0, method=method, jac=self.der, **kwargs)
            t1 = time.time()
            self.add_result(res, (t1 - t0), method)
    hessian_methods = ['Newton-CG', 'dogleg', 'trust-ncg', 'trust-exact']
    if (self.hess is not None):
        for method in hessian_methods:
            if (method not in methods):
                continue
            t0 = time.time()
            res = scipy.optimize.minimize(self.fun, x0, method=method, jac=self.der, hess=self.hess, **kwargs)
            t1 = time.time()
            self.add_result(res, (t1 - t0), method)
