This function is used internally by essR to evaluate the objective function when the local solvers are invoked.
For internal use of MEIGOR.