'Run the solver.
Parameters
objfunc : callable
objection function
initval : iterable
initial guess for the parameter values
fargs : tuple
other arguments to be passed to the statistic function
kwargs : dict
other keyword arguments to be passed to the solver'

def __call__(self, objfunc, initval, fargs, **kwargs):

    kwargs[u'iter'] = kwargs.pop(u'maxiter', self._maxiter)
    if (u'epsilon' not in kwargs):
        kwargs[u'epsilon'] = self._eps
    if (u'acc' not in kwargs):
        kwargs[u'acc'] = self._acc
    disp = kwargs.pop(u'verblevel', None)
    model = fargs[0]
    pars = [getattr(model, name) for name in model.param_names]
    bounds = [par.bounds for par in pars if (not (par.fixed or par.tied))]
    bounds = np.asarray(bounds)
    for i in bounds:
        if (i[0] is None):
            i[0] = DEFAULT_BOUNDS[0]
        if (i[1] is None):
            i[1] = DEFAULT_BOUNDS[1]
    bounds = np.asarray(bounds, dtype=np.float)
    eqcons = np.array(model.eqcons)
    ineqcons = np.array(model.ineqcons)
    (fitparams, final_func_val, numiter, exit_mode, mess) = self.opt_method(objfunc, initval, args=fargs, full_output=True, disp=disp, bounds=bounds, eqcons=eqcons, ieqcons=ineqcons, **kwargs)
    self.fit_info[u'final_func_val'] = final_func_val
    self.fit_info[u'numiter'] = numiter
    self.fit_info[u'exit_mode'] = exit_mode
    self.fit_info[u'message'] = mess
    if (exit_mode != 0):
        warnings.warn(u"The    fit    may    be    unsuccessful;    check    fit_info['message']    for    more    information.", AstropyUserWarning)
    return (fitparams, self.fit_info)
