'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]
    new_results = {}
    status = self.STATUS_MAP[results_dict['status']]
    new_results[s.STATUS] = status
    if (new_results[s.STATUS] in s.SOLUTION_PRESENT):
        primal_val = results_dict['pobj']
        new_results[s.VALUE] = (primal_val + data[s.OFFSET])
        new_results[s.PRIMAL] = results_dict['x']
        new_results[s.EQ_DUAL] = results_dict['y'][:dims[s.EQ_DIM]]
        new_results[s.INEQ_DUAL] = results_dict['y'][dims[s.EQ_DIM]:]
    return new_results
