Skip to content

Commit

Permalink
bug
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelbynum committed Sep 5, 2023
1 parent 1c0567b commit 651cb48
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions coramin/algorithms/multitree/multitree.py
Original file line number Diff line number Diff line change
Expand Up @@ -956,12 +956,20 @@ def solve(self, model: _BlockData, timer: HierarchicalTimer = None) -> MultiTree
break

if rel_res.best_feasible_objective is not None:
self._oa_cut_helper(self.config.feasibility_tolerance)
self._partition_helper()

integer_var_values, rhs_var_bounds = self._get_nlp_specs_from_rel()
start_primal_bound = self._get_primal_bound()
nlp_res = self._solve_nlp_with_fixed_vars(
integer_var_values, rhs_var_bounds
)
self._oa_cut_helper(self.config.feasibility_tolerance)
self._partition_helper()
end_primal_bound = self._get_primal_bound()

if not math.isclose(start_primal_bound, end_primal_bound, rel_tol=1e-4, abs_tol=1e-4):
relaxed_binaries, relaxed_integers = push_integers(self._relaxation)
num_lb, num_ub, avg_lb, avg_ub = self._perform_obbt(vars_to_tighten)
pop_integers(relaxed_binaries, relaxed_integers)
else:
self.config.solver_output_logger.warning(
f"relaxation did not find a feasible solution: "
Expand Down

0 comments on commit 651cb48

Please sign in to comment.