parameters: (self, solution: Dict[str, Any], inverse_data: Dict[str, Any])
docstring: Returns the solution to the original problem given the inverse_data.
docstring_summary: Returns the solution to the original problem given the inverse_data.
docstring_tokens: Returns the solution to the original problem given the inverse_data .
function: def invert(self, solution: Dict[str, Any], inverse_data: Dict[str, Any]) -> Solution:
          """Returns the solution to the original problem given the inverse_data."""
  
          status = solution['status']
          dual_vars = None
  
          if status in s.SOLUTION_PRESENT:
              opt_val = solution['value'] + inverse_data[s.OFFSET]
              primal_vars = {inverse_data[SCIP.VAR_ID]: solution['primal']}
  
              if "eq_dual" in solution and not inverse_data['is_mip']:
                  eq_dual = utilities.get_dual_values(
                      result_vec=solution['eq_dual'],
                      parse_func=utilities.extract_dual_value,
                      constraints=inverse_data[SCIP.EQ_CONSTR],
                  )
                  leq_dual = utilities.get_dual_values(
                      result_vec=solution['ineq_dual'],
                      parse_func=utilities.extract_dual_value,
                      constraints=inverse_data[SCIP.NEQ_CONSTR],
                  )
  
                  eq_dual.update(leq_dual)
                  dual_vars = eq_dual
  
              return Solution(status, opt_val, primal_vars, dual_vars, {})
          else:
              return failure_solution(status)
function_tokens: def invert ( self , solution : Dict [ str , Any ] , inverse_data : Dict [ str , Any ] ) -> Solution : status = solution [ 'status' ] dual_vars = None if status in s . SOLUTION_PRESENT : opt_val = solution [ 'value' ] + inverse_data [ s . OFFSET ] primal_vars = { inverse_data [ SCIP . VAR_ID ] : solution [ 'primal' ] } if "eq_dual" in solution and not inverse_data [ 'is_mip' ] : eq_dual = utilities . get_dual_values ( result_vec = solution [ 'eq_dual' ] , parse_func = utilities . extract_dual_value , constraints = inverse_data [ SCIP . EQ_CONSTR ] , ) leq_dual = utilities . get_dual_values ( result_vec = solution [ 'ineq_dual' ] , parse_func = utilities . extract_dual_value , constraints = inverse_data [ SCIP . NEQ_CONSTR ] , ) eq_dual . update ( leq_dual ) dual_vars = eq_dual return Solution ( status , opt_val , primal_vars , dual_vars , { } ) else : return failure_solution ( status )