'Saves the values of the dual variables.
Parameters
result_vec : array_like
A vector containing the dual variable values.
constraints : list
A list of the LinEqConstr/LinLeqConstr in the problem.
constr_types : type
A list of constraint types to consider.'

def _save_dual_values(self, result_vec, constraints, constr_types):

    constr_offsets = {}
    offset = 0
    for constr in constraints:
        constr_offsets[constr.constr_id] = offset
        offset += (constr.size[0] * constr.size[1])
    active_constraints = []
    for constr in self.constraints:
        if (type(constr) in constr_types):
            active_constraints.append(constr)
    self._save_values(result_vec, active_constraints, constr_offsets)
