From 83e3553d4898d6b9f85cc4558c7fee71679835b4 Mon Sep 17 00:00:00 2001 From: Robert Gottlieb Date: Wed, 29 May 2024 12:27:39 -0400 Subject: [PATCH] Add custom branching rule --- Project.toml | 2 +- examples/ParBB/subroutines.jl | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 726e316..72b888a 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "SourceCodeMcCormick" uuid = "a7283dc5-4ecf-47fb-a95b-1412723fc960" authors = ["Robert Gottlieb "] -version = "0.3.0" +version = "0.3.1" [deps] CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" diff --git a/examples/ParBB/subroutines.jl b/examples/ParBB/subroutines.jl index f3edd87..9789f25 100644 --- a/examples/ParBB/subroutines.jl +++ b/examples/ParBB/subroutines.jl @@ -334,6 +334,12 @@ function default_upper_heuristic(m::EAGO.GlobalOptimizer) return bool end +# Add a custom branching function that branches at the midpoint +import EAGO: select_branch_point +function select_branch_point(t::ExtendGPU, m::EAGO.GlobalOptimizer, i) + return EAGO._mid(EAGO.BranchVar(), m, i) +end + # Disable epigraph reformation, preprocessing, and postprocessing import EAGO: reform_epigraph_min! function reform_epigraph_min!(m::EAGO.GlobalOptimizer)