'Converts the solver output into standard form.
Parameters
results_dict : dict
The solver output.
data : dict
Information about the problem.
cached_data : dict
A map of solver name to cached problem data.
Returns
dict
The solver output in standard form.'

def format_results(self, results_dict, data, cached_data):

    dims = data[s.DIMS]
    if (results_dict['status'] != s.SOLVER_ERROR):
        solver_cache = cached_data[self.name()]
        solver_cache.prev_result = {'model': results_dict['model'], 'variables': results_dict['variables'], 'gur_constrs': results_dict['gur_constrs'], 'c': data[s.C], 'A': data[s.A], 'b': data[s.B]}
    new_results = {}
    new_results[s.STATUS] = results_dict['status']
    new_results[s.SOLVE_TIME] = results_dict[s.SOLVE_TIME]
    if (new_results[s.STATUS] in s.SOLUTION_PRESENT):
        primal_val = results_dict['primal    objective']
        new_results[s.VALUE] = (primal_val + data[s.OFFSET])
        new_results[s.PRIMAL] = results_dict['x']
        if (not self.is_mip(data)):
            new_results[s.EQ_DUAL] = results_dict['y'][0:dims[s.EQ_DIM]]
            new_results[s.INEQ_DUAL] = results_dict['y'][dims[s.EQ_DIM]:]
    return new_results
