Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
174 commits
Select commit Hold shift + click to select a range
594ec3f
add initial files
akifcorduk Oct 31, 2025
f10535f
add some comments and file name changes
akifcorduk Nov 4, 2025
649062c
initial data structures
akifcorduk Nov 10, 2025
fe4cc7a
find all initial cliques
akifcorduk Nov 12, 2025
1d46ec9
remove small cliques
akifcorduk Nov 13, 2025
1474bc5
renumber cliques on addlt
akifcorduk Nov 13, 2025
b82f63f
clique extension is working
akifcorduk Nov 17, 2025
1289cbc
Merge branch 'main' of github.com:NVIDIA/cuopt into cliques
akifcorduk Nov 17, 2025
60edd8e
add extended cliques into formulation
akifcorduk Nov 18, 2025
103b4c2
find constraints to remove
akifcorduk Nov 18, 2025
adc9c73
wip
akifcorduk Nov 19, 2025
5934c12
Merge branch 'main' of github.com:NVIDIA/cuopt into cliques
akifcorduk Jan 16, 2026
43f2ed0
Merge branch 'main' of github.com:NVIDIA/cuopt into cliques
akifcorduk Jan 23, 2026
3001b52
habdle range constraints
akifcorduk Jan 23, 2026
b45c27e
fix bugs and covert to gpu problem
akifcorduk Jan 26, 2026
21e565a
fix a log
akifcorduk Jan 26, 2026
3ae6047
move preprocessing to presolve
akifcorduk Jan 27, 2026
2c78d02
fix issues and handle ai reviews
akifcorduk Jan 30, 2026
8409f17
fix bugs adj list
akifcorduk Feb 2, 2026
22f778b
style checks
akifcorduk Feb 3, 2026
12c8fcf
fix excluded cliques and fix extended set packing constraints
akifcorduk Feb 3, 2026
5d16246
tests if threre are any complements of a variable in the extended clique
akifcorduk Feb 3, 2026
6319046
fix variables if complements share a clique
akifcorduk Feb 3, 2026
96385fe
add timing
akifcorduk Feb 3, 2026
7cd0a4a
wip
akifcorduk Feb 3, 2026
447713f
fix the knapsack indices
akifcorduk Feb 4, 2026
db8951a
fix weight and set packing issue
akifcorduk Feb 5, 2026
ab2339b
fix obj scale issue
akifcorduk Feb 5, 2026
7e322eb
Merge branch 'main' of github.com:NVIDIA/cuopt into cliques
akifcorduk Feb 6, 2026
d7f6a80
without cliques
akifcorduk Feb 6, 2026
f58b8c5
with cliques
akifcorduk Feb 6, 2026
4d7166a
initial clique cut implemnetation
akifcorduk Feb 6, 2026
cb10992
add timer to cliques
akifcorduk Feb 9, 2026
78aa3f1
add comments fix redundant code
akifcorduk Feb 9, 2026
be32e73
convert unique check to assert
akifcorduk Feb 9, 2026
933beb0
add complement of the var to the adj list
akifcorduk Feb 9, 2026
c196ee2
adjust timer
akifcorduk Feb 9, 2026
454667b
Merge branch 'cliques' into clique_cuts
akifcorduk Feb 9, 2026
524207a
fix the bug of fixing more vars
akifcorduk Feb 10, 2026
e51dbc8
Merge branch 'cliques' into clique_cuts
akifcorduk Feb 10, 2026
bc345bb
fix issues on clique table
akifcorduk Feb 10, 2026
e4b840d
Merge branch 'cliques' into clique_cuts
akifcorduk Feb 10, 2026
dd7ff4a
handle infeasibility in bb and cliques
akifcorduk Feb 10, 2026
b758b9f
fix timer issues
akifcorduk Feb 11, 2026
b246e8c
fix compilation
akifcorduk Feb 11, 2026
d869579
Merge branch 'fix_timer' into clique_cuts
akifcorduk Feb 11, 2026
66d4598
fix compile issues
akifcorduk Feb 11, 2026
0392a62
disable jobserver flag when not actually using jobserver
aliceb-nv Feb 11, 2026
ee54477
disable jobserver unless explicitely requested
aliceb-nv Feb 11, 2026
f876fc0
better workaround fix build
aliceb-nv Feb 11, 2026
b978096
fix timer issues on clique cuts
akifcorduk Feb 11, 2026
41ba6ea
fix resize issue
akifcorduk Feb 11, 2026
71a2159
Merge branch 'main' of github.com:NVIDIA/cuopt into clique_cuts
akifcorduk Feb 12, 2026
0993c2f
fix merge conflicts
akifcorduk Feb 12, 2026
373ede6
without clique cuts
akifcorduk Feb 12, 2026
64ae63c
fix infeasible proof and with cuts
akifcorduk Feb 12, 2026
eed3768
clique cuts without preprocessing
akifcorduk Feb 12, 2026
39c4a26
clique cut with proprocessing
akifcorduk Feb 12, 2026
bf5ddc3
no clique cuts with preprocessing
akifcorduk Feb 12, 2026
674fa64
no clique cut no preprocessing
akifcorduk Feb 12, 2026
1c02baa
Merge branch 'main' of github.com:NVIDIA/cuopt into fix_timer
akifcorduk Feb 16, 2026
7de08d2
add timers to right_looking_lu and refactoring the basis
akifcorduk Feb 17, 2026
942de9c
remove timers from cuts
akifcorduk Feb 17, 2026
0b944d1
convert lambda to function and remove unnecessary checks
akifcorduk Feb 17, 2026
01d68c3
Merge branch 'main' of github.com:NVIDIA/cuopt into cliques
akifcorduk Feb 17, 2026
ba1df82
fix merge conflicts, reduce timers
akifcorduk Feb 17, 2026
b1b30a7
revert changes
akifcorduk Feb 17, 2026
f395672
fix reverse_iterator
akifcorduk Feb 17, 2026
cf452ca
wip work units
akifcorduk Feb 17, 2026
71b7f2f
fix thrust changes
akifcorduk Feb 17, 2026
82b2d64
handle review comments
akifcorduk Feb 18, 2026
d074884
add extension heuristics and fix mip gap issues
akifcorduk Feb 18, 2026
0c81173
handle review comments
akifcorduk Feb 18, 2026
609c578
move timer with inout parameters
akifcorduk Feb 19, 2026
3d32acd
fix merge conflicts
akifcorduk Feb 19, 2026
0c54ecf
fix merge conflicts
akifcorduk Feb 19, 2026
d01fd3b
Merge branch 'main' of github.com:NVIDIA/cuopt into cliques
akifcorduk Feb 19, 2026
d5791dc
handle ai reviewS
akifcorduk Feb 19, 2026
fc414e7
revert cmake comment
akifcorduk Feb 19, 2026
fff860c
Merge branch 'fix_timer' into cliques
akifcorduk Feb 19, 2026
9803df2
Merge branch 'main' of github.com:NVIDIA/cuopt into cliques
akifcorduk Feb 20, 2026
3acb6a9
fix adjacency checks
akifcorduk Feb 20, 2026
6f6783b
fix adjacency set and var degree
akifcorduk Feb 20, 2026
8bc9fb0
add copy of variable bounds
akifcorduk Feb 20, 2026
ba7b9ff
remove the set packing if it covers set partitioning
akifcorduk Feb 20, 2026
d82e592
use append row
akifcorduk Feb 23, 2026
e328595
Merge branch 'cliques' into clique_cuts
akifcorduk Feb 23, 2026
8e9ecb1
fix merge conflicts
akifcorduk Feb 23, 2026
0283afe
without initial presolve
akifcorduk Feb 23, 2026
232a8b2
add clique tests
akifcorduk Feb 23, 2026
721f491
wip clique cuts test
akifcorduk Feb 24, 2026
86cfe6a
add tests that problem concersions are correct
akifcorduk Feb 24, 2026
b7bb761
cuts wip
akifcorduk Feb 24, 2026
3979c72
old presolve timer
akifcorduk Feb 24, 2026
812322e
no cliques
akifcorduk Feb 24, 2026
c295930
with corrected work units
akifcorduk Feb 24, 2026
a4b162e
corrected obj rounding
akifcorduk Feb 24, 2026
6d91c07
old presolve time limit
akifcorduk Feb 24, 2026
607b797
new presolve time limit and cliques
akifcorduk Feb 24, 2026
ce0ee3d
Merge branch 'cliques' into clique_cuts
akifcorduk Feb 24, 2026
0d2a80d
without preprocessing
akifcorduk Feb 24, 2026
72da24d
with preprocessing
akifcorduk Feb 24, 2026
5e58a67
fix row names bug
akifcorduk Feb 24, 2026
208ce2a
Merge branch 'cliques' into clique_cuts
akifcorduk Feb 24, 2026
d0c5a42
fix thrust build + more timer checks
aliceb-nv Feb 24, 2026
d559b34
Merge branch 'main' into fix-thrust-build
aliceb-nv Feb 24, 2026
2ced639
Merge commit 'refs/pull/902/head' of github.com:NVIDIA/cuopt into cli…
akifcorduk Feb 24, 2026
b8af6c0
Merge branch 'cliques' into clique_cuts
akifcorduk Feb 24, 2026
67240f5
review comment
aliceb-nv Feb 24, 2026
a15424f
fix thrust solve
aliceb-nv Feb 24, 2026
5b8b86a
Merge commit 'refs/pull/902/head' of github.com:NVIDIA/cuopt into cli…
akifcorduk Feb 24, 2026
88c413b
Merge commit 'refs/pull/902/head' of github.com:NVIDIA/cuopt into cli…
akifcorduk Feb 24, 2026
02d4c09
fix timers on probing cache
akifcorduk Feb 25, 2026
b85424c
Merge branch 'cliques' into clique_cuts
akifcorduk Feb 25, 2026
18dd670
without initial presolve
akifcorduk Feb 25, 2026
0b9460c
without clique preprocessing
akifcorduk Feb 25, 2026
bdedb6c
restore timers
akifcorduk Feb 25, 2026
31c6bab
enable preprocessinG
akifcorduk Feb 25, 2026
02bc9b8
with clique timer
akifcorduk Feb 25, 2026
fa2330c
inside else
akifcorduk Feb 25, 2026
b176767
ranged rows
akifcorduk Feb 25, 2026
0d44fd1
original timer
akifcorduk Feb 26, 2026
36ac698
do one by one replacement and add only when it removes some
akifcorduk Feb 27, 2026
2ec06d3
don't do fix difference
akifcorduk Feb 27, 2026
68e0fad
odn't add covering clique when set partitioing
akifcorduk Feb 27, 2026
46cb9e8
add asserts
akifcorduk Feb 27, 2026
4f24830
500 window
akifcorduk Feb 27, 2026
af4c502
1000 window
akifcorduk Feb 27, 2026
a3a1bcd
3 s timer
akifcorduk Feb 27, 2026
2f87719
3s timer
akifcorduk Feb 27, 2026
4457d33
longer dominance window, shorter runtime
akifcorduk Feb 28, 2026
d4d4d6d
increase the limits
akifcorduk Feb 28, 2026
492b6f3
cut gap measurement wip
akifcorduk Mar 2, 2026
358ee24
add clique config tests
akifcorduk Mar 2, 2026
878d18e
larger work estimate
akifcorduk Mar 2, 2026
b643042
with initial cliques
akifcorduk Mar 2, 2026
549d3c5
with initial clique
akifcorduk Mar 2, 2026
550b1c0
without initial cliques
akifcorduk Mar 2, 2026
9faf89b
without initial clique and no infeasible on complement
akifcorduk Mar 3, 2026
d1e202e
with intiial cliques
akifcorduk Mar 3, 2026
f9206de
only clique cuts
akifcorduk Mar 3, 2026
56034b0
Merge branch 'main' of github.com:NVIDIA/cuopt into clique_cuts
akifcorduk Mar 6, 2026
d6ee91b
test cliques with extended cliques
akifcorduk Mar 6, 2026
c8301f5
some refactor and reenable all cuts
akifcorduk Mar 6, 2026
a4a2a5c
increase the work estimate
akifcorduk Mar 6, 2026
f9b5898
longer time for init cliques, more work estimate, only clique cuts
akifcorduk Mar 6, 2026
787b824
old timer
akifcorduk Mar 6, 2026
6f21155
deterministic checks
akifcorduk Mar 6, 2026
38132a5
handle ai reviews
akifcorduk Mar 6, 2026
e924706
download neos via scriot
akifcorduk Mar 6, 2026
2f7e170
better work units and clean up
akifcorduk Mar 6, 2026
d718b8b
name space cleanup
akifcorduk Mar 6, 2026
ff6605a
fix adj list timer
akifcorduk Mar 7, 2026
43bf1ea
increase clique table timer
akifcorduk Mar 7, 2026
349c7bf
reduce work estimates
akifcorduk Mar 7, 2026
e27e142
fix clique generation times
akifcorduk Mar 7, 2026
8a34777
with higher probing cache time
akifcorduk Mar 8, 2026
7b3604f
better work units and timers
akifcorduk Mar 9, 2026
f9b39f6
better work estimate in extend cliques
akifcorduk Mar 9, 2026
395d5f0
higher work unit
akifcorduk Mar 9, 2026
5fb1b5c
longer time for clique table gen
akifcorduk Mar 9, 2026
d200169
clean up
akifcorduk Mar 9, 2026
ceba8eb
cleanup
akifcorduk Mar 9, 2026
d939d6a
fix test
akifcorduk Mar 9, 2026
c5d57ca
Merge branch 'main' of github.com:NVIDIA/cuopt into clique_cuts
akifcorduk Mar 9, 2026
cfe2fdb
cuts in backgroun
akifcorduk Mar 10, 2026
5e4ee56
lower work estimates and reduce the probing cache time
akifcorduk Mar 10, 2026
2472f33
remove cuts in submip and rins
akifcorduk Mar 10, 2026
dc9a762
without hyper threading
akifcorduk Mar 10, 2026
6dd44b5
without clique cuts and modify problem
akifcorduk Mar 10, 2026
64e78db
fix initial cliques
akifcorduk Mar 10, 2026
74678e5
with clique cuts
akifcorduk Mar 10, 2026
be217bd
without modify problem
akifcorduk Mar 10, 2026
32c7a7a
disable initial cliques
akifcorduk Mar 10, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion benchmarks/linear_programming/cuopt/run_mip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,10 @@ int run_single_file(std::string file_path,
CUOPT_LOG_ERROR("Parsing MPS failed exiting!");
return -1;
}
// Use the benchmark filename for downstream instance-level reporting.
// This keeps per-instance metrics aligned with the run list even if the MPS NAME card differs.
mps_data_model.set_problem_name(base_filename);

if (initial_solution_dir.has_value()) {
auto initial_solutions = read_solution_from_dir(
initial_solution_dir.value(), base_filename, mps_data_model.get_variable_names());
Expand All @@ -209,6 +213,7 @@ int run_single_file(std::string file_path,
settings.tolerances.absolute_tolerance = 1e-6;
settings.presolver = cuopt::linear_programming::presolver_t::Default;
settings.reliability_branching = reliability_branching;
settings.clique_cuts = -1;
settings.seed = 42;
cuopt::linear_programming::benchmark_info_t benchmark_info;
settings.benchmark_info_ptr = &benchmark_info;
Expand Down Expand Up @@ -413,7 +418,16 @@ int main(int argc, char* argv[])
int reliability_branching = program.get<int>("--reliability-branching");
bool deterministic = program.get<bool>("--determinism");

if (num_cpu_threads < 0) { num_cpu_threads = omp_get_max_threads() / n_gpus; }
if (num_cpu_threads < 0) {
num_cpu_threads = omp_get_max_threads() / n_gpus;
// std::ifstream smt_file("/sys/devices/system/cpu/smt/active");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove commented code?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is non-production code, I would rather merge it now as the time is a bit tight for this PR.

// if (smt_file.is_open()) {
// int smt_active = 0;
// smt_file >> smt_active;
// if (smt_active) { num_cpu_threads /= 2; }
// }
num_cpu_threads = std::max(num_cpu_threads, 1);
}

if (program.is_used("--out-dir")) {
out_dir = program.get<std::string>("--out-dir");
Expand Down
1 change: 1 addition & 0 deletions cpp/include/cuopt/linear_programming/constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
#define CUOPT_MIP_MIXED_INTEGER_ROUNDING_CUTS "mip_mixed_integer_rounding_cuts"
#define CUOPT_MIP_MIXED_INTEGER_GOMORY_CUTS "mip_mixed_integer_gomory_cuts"
#define CUOPT_MIP_KNAPSACK_CUTS "mip_knapsack_cuts"
#define CUOPT_MIP_CLIQUE_CUTS "mip_clique_cuts"
#define CUOPT_MIP_STRONG_CHVATAL_GOMORY_CUTS "mip_strong_chvatal_gomory_cuts"
#define CUOPT_MIP_REDUCED_COST_STRENGTHENING "mip_reduced_cost_strengthening"
#define CUOPT_MIP_CUT_CHANGE_THRESHOLD "mip_cut_change_threshold"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ class mip_solver_settings_t {
i_t mir_cuts = -1;
i_t mixed_integer_gomory_cuts = -1;
i_t knapsack_cuts = -1;
i_t clique_cuts = -1;
i_t strong_chvatal_gomory_cuts = -1;
i_t reduced_cost_strengthening = -1;
f_t cut_change_threshold = 1e-3;
Expand Down
96 changes: 75 additions & 21 deletions cpp/src/branch_and_bound/branch_and_bound.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include <branch_and_bound/pseudo_costs.hpp>

#include <cuts/cuts.hpp>
#include <mip_heuristics/presolve/conflict_graph/clique_table.cuh>

#include <dual_simplex/basis_solves.hpp>
#include <dual_simplex/bounds_strengthening.hpp>
Expand Down Expand Up @@ -241,9 +242,11 @@ template <typename i_t, typename f_t>
branch_and_bound_t<i_t, f_t>::branch_and_bound_t(
const user_problem_t<i_t, f_t>& user_problem,
const simplex_solver_settings_t<i_t, f_t>& solver_settings,
f_t start_time)
f_t start_time,
std::shared_ptr<detail::clique_table_t<i_t, f_t>> clique_table)
: original_problem_(user_problem),
settings_(solver_settings),
clique_table_(std::move(clique_table)),
original_lp_(user_problem.handle_ptr, 1, 1, 1),
Arow_(1, 1, 0),
incumbent_(1),
Expand Down Expand Up @@ -1967,6 +1970,31 @@ mip_status_t branch_and_bound_t<i_t, f_t>::solve(mip_solution_t<i_t, f_t>& solut

root_relax_soln_.resize(original_lp_.num_rows, original_lp_.num_cols);

if (settings_.clique_cuts != 0 && clique_table_ == nullptr) {
signal_extend_cliques_.store(false, std::memory_order_release);
typename ::cuopt::linear_programming::mip_solver_settings_t<i_t, f_t>::tolerances_t
tolerances_for_clique{};
tolerances_for_clique.presolve_absolute_tolerance = settings_.primal_tol;
tolerances_for_clique.absolute_tolerance = settings_.primal_tol;
tolerances_for_clique.relative_tolerance = settings_.zero_tol;
tolerances_for_clique.integrality_tolerance = settings_.integer_tol;
tolerances_for_clique.absolute_mip_gap = settings_.absolute_mip_gap_tol;
tolerances_for_clique.relative_mip_gap = settings_.relative_mip_gap_tol;
auto* signal_ptr = &signal_extend_cliques_;
clique_table_future_ =
std::async(std::launch::async,
[this,
tolerances_for_clique,
signal_ptr]() -> std::shared_ptr<detail::clique_table_t<i_t, f_t>> {
user_problem_t<i_t, f_t> problem_copy = original_problem_;
cuopt::timer_t timer(std::numeric_limits<double>::infinity());
std::shared_ptr<detail::clique_table_t<i_t, f_t>> table;
detail::find_initial_cliques(
problem_copy, tolerances_for_clique, &table, timer, false, signal_ptr);
return table;
});
}

i_t original_rows = original_lp_.num_rows;
simplex_solver_settings_t lp_settings = settings_;
lp_settings.inside_mip = 1;
Expand Down Expand Up @@ -2002,38 +2030,44 @@ mip_status_t branch_and_bound_t<i_t, f_t>::solve(mip_solution_t<i_t, f_t>& solut
exploration_stats_.total_lp_iters = root_relax_soln_.iterations;
exploration_stats_.total_lp_solve_time = toc(exploration_stats_.start_time);

auto finish_clique_thread = [this]() {
if (clique_table_future_.valid()) {
signal_extend_cliques_.store(true, std::memory_order_release);
clique_table_ = clique_table_future_.get();
}
};

if (root_status == lp_status_t::INFEASIBLE) {
settings_.log.printf("MIP Infeasible\n");
// FIXME: rarely dual simplex detects infeasible whereas it is feasible.
// to add a small safety net, check if there is a primal solution already.
// Uncomment this if the issue with cost266-UUE is resolved
// if (settings.heuristic_preemption_callback != nullptr) {
// settings.heuristic_preemption_callback();
// }
finish_clique_thread();
return mip_status_t::INFEASIBLE;
}
if (root_status == lp_status_t::UNBOUNDED) {
settings_.log.printf("MIP Unbounded\n");
if (settings_.heuristic_preemption_callback != nullptr) {
settings_.heuristic_preemption_callback();
}
finish_clique_thread();
return mip_status_t::UNBOUNDED;
}
if (root_status == lp_status_t::TIME_LIMIT) {
solver_status_ = mip_status_t::TIME_LIMIT;
set_final_solution(solution, -inf);
finish_clique_thread();
return solver_status_;
}

if (root_status == lp_status_t::WORK_LIMIT) {
solver_status_ = mip_status_t::WORK_LIMIT;
set_final_solution(solution, -inf);
finish_clique_thread();
return solver_status_;
}

if (root_status == lp_status_t::NUMERICAL_ISSUES) {
solver_status_ = mip_status_t::NUMERICAL;
set_final_solution(solution, -inf);
finish_clique_thread();
return solver_status_;
}

Expand Down Expand Up @@ -2064,6 +2098,7 @@ mip_status_t branch_and_bound_t<i_t, f_t>::solve(mip_solution_t<i_t, f_t>& solut

if (num_fractional == 0) {
set_solution_at_root(solution, cut_info);
finish_clique_thread();
return mip_status_t::OPTIMAL;
}

Expand All @@ -2078,8 +2113,16 @@ mip_status_t branch_and_bound_t<i_t, f_t>::solve(mip_solution_t<i_t, f_t>& solut
}

cut_pool_t<i_t, f_t> cut_pool(original_lp_.num_cols, settings_);
cut_generation_t<i_t, f_t> cut_generation(
cut_pool, original_lp_, settings_, Arow_, new_slacks_, var_types_);
cut_generation_t<i_t, f_t> cut_generation(cut_pool,
original_lp_,
settings_,
Arow_,
new_slacks_,
var_types_,
original_problem_,
clique_table_,
&clique_table_future_,
&signal_extend_cliques_);

std::vector<f_t> saved_solution;
#ifdef CHECK_CUTS_AGAINST_SAVED_SOLUTION
Expand All @@ -2090,7 +2133,8 @@ mip_status_t branch_and_bound_t<i_t, f_t>::solve(mip_solution_t<i_t, f_t>& solut
f_t last_objective = root_objective_;
f_t root_relax_objective = root_objective_;

i_t cut_pool_size = 0;
f_t cut_generation_start_time = tic();
i_t cut_pool_size = 0;
for (i_t cut_pass = 0; cut_pass < settings_.max_cut_passes; cut_pass++) {
if (num_fractional == 0) {
set_solution_at_root(solution, cut_info);
Expand All @@ -2109,16 +2153,25 @@ mip_status_t branch_and_bound_t<i_t, f_t>::solve(mip_solution_t<i_t, f_t>& solut
#endif

// Generate cuts and add them to the cut pool
f_t cut_start_time = tic();
cut_generation.generate_cuts(original_lp_,
settings_,
Arow_,
new_slacks_,
var_types_,
basis_update,
root_relax_soln_.x,
basic_list,
nonbasic_list);
f_t cut_start_time = tic();
bool problem_feasible = cut_generation.generate_cuts(original_lp_,
settings_,
Arow_,
new_slacks_,
var_types_,
basis_update,
root_relax_soln_.x,
root_relax_soln_.z,
basic_list,
nonbasic_list,
exploration_stats_.start_time);
if (!problem_feasible) {
if (settings_.heuristic_preemption_callback != nullptr) {
settings_.heuristic_preemption_callback();
}
finish_clique_thread();
return mip_status_t::INFEASIBLE;
}
f_t cut_generation_time = toc(cut_start_time);
if (cut_generation_time > 1.0) {
settings_.log.debug("Cut generation time %.2f seconds\n", cut_generation_time);
Expand Down Expand Up @@ -2339,8 +2392,9 @@ mip_status_t branch_and_bound_t<i_t, f_t>::solve(mip_solution_t<i_t, f_t>& solut
}

print_cut_info(settings_, cut_info);

f_t cut_generation_time = toc(cut_generation_start_time);
if (cut_info.has_cuts()) {
settings_.log.printf("Cut generation time: %.2f seconds\n", cut_generation_time);
settings_.log.printf("Cut pool size : %d\n", cut_pool_size);
settings_.log.printf("Size with cuts : %d constraints, %d variables, %d nonzeros\n",
original_lp_.num_rows,
Expand Down
16 changes: 13 additions & 3 deletions cpp/src/branch_and_bound/branch_and_bound.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,17 @@

#include <omp.h>

#include <atomic>
#include <functional>
#include <future>
#include <memory>
#include <vector>

namespace cuopt::linear_programming::detail {
template <typename i_t, typename f_t>
struct clique_table_t;
}

namespace cuopt::linear_programming::dual_simplex {

enum class mip_status_t {
Expand Down Expand Up @@ -68,7 +76,8 @@ class branch_and_bound_t {
public:
branch_and_bound_t(const user_problem_t<i_t, f_t>& user_problem,
const simplex_solver_settings_t<i_t, f_t>& solver_settings,
f_t start_time);
f_t start_time,
std::shared_ptr<detail::clique_table_t<i_t, f_t>> clique_table = nullptr);

// Set an initial guess based on the user_problem. This should be called before solve.
void set_initial_guess(const std::vector<f_t>& user_guess) { guess_ = user_guess; }
Expand Down Expand Up @@ -106,8 +115,6 @@ class branch_and_bound_t {

void set_concurrent_lp_root_solve(bool enable) { enable_concurrent_lp_root_solve_ = enable; }

bool stop_for_time_limit(mip_solution_t<i_t, f_t>& solution);

// Repair a low-quality solution from the heuristics.
bool repair_solution(const std::vector<f_t>& leaf_edge_norms,
const std::vector<f_t>& potential_solution,
Expand Down Expand Up @@ -141,6 +148,9 @@ class branch_and_bound_t {
private:
const user_problem_t<i_t, f_t>& original_problem_;
const simplex_solver_settings_t<i_t, f_t> settings_;
std::shared_ptr<detail::clique_table_t<i_t, f_t>> clique_table_;
std::future<std::shared_ptr<detail::clique_table_t<i_t, f_t>>> clique_table_future_;
std::atomic<bool> signal_extend_cliques_{false};

work_limit_context_t work_unit_context_{"B&B"};

Expand Down
Loading
Loading