'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):

    new_results = {}
    if (results_dict['status'] != s.SOLVER_ERROR):
        solver_cache = cached_data[self.name()]
        self.prob_ = results_dict['problem']
        vartypes = []
        self.prob_.getcoltype(vartypes, 0, (len(data[s.C]) - 1))
        solver_cache.prev_result = {'problem': self.prob_, 'obj': data[s.C], 'mat': data[s.A], 'rhs': data[s.B], 'cone_ind': data[s.DIMS][s.SOC_DIM], 'vartype': vartypes}
    (status_map_lp, status_map_mip) = self.get_status_maps()
    if self.is_mip(data):
        new_results[s.STATUS] = status_map_mip[results_dict['status']]
    else:
        new_results[s.STATUS] = status_map_lp[results_dict['status']]
    if (new_results[s.STATUS] in s.SOLUTION_PRESENT):
        new_results[s.PRIMAL] = results_dict['x']
        new_results[s.VALUE] = results_dict['obj_value']
        if (not self.is_mip(data)):
            new_results[s.EQ_DUAL] = results_dict['y']
    new_results[s.XPRESS_IIS] = results_dict[s.XPRESS_IIS]
    new_results[s.XPRESS_TROW] = results_dict[s.XPRESS_TROW]
    return new_results
