Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
c9081a6
implemented diving heuristics. sorted starting nodes for diving based…
nguidotti Dec 3, 2025
046a501
moved diving heuristics to a separated file
nguidotti Dec 3, 2025
6ea6d72
organized code. added toggle to disable each type of diving.
nguidotti Dec 3, 2025
5422b97
restrict calling RINS to the best-first threads
nguidotti Dec 4, 2025
73c1a63
fix invalid branch var in line search diving
nguidotti Dec 4, 2025
3a77cca
moved asserts
nguidotti Dec 9, 2025
0f7af4e
replace inf and max with STL calls
nguidotti Dec 9, 2025
79368c3
Fix incorrect infeasible list
chris-maes Dec 12, 2025
6334ad7
implemented diving heuristics. sorted starting nodes for diving based…
nguidotti Dec 3, 2025
2c94a7c
moved diving heuristics to a separated file
nguidotti Dec 3, 2025
0e815e1
organized code. added toggle to disable each type of diving.
nguidotti Dec 3, 2025
29a2a33
moved asserts
nguidotti Dec 9, 2025
5a3ef60
unified global node heap. fathom node in the diving node that was alr…
nguidotti Dec 4, 2025
c181ccf
refactoring code
nguidotti Dec 12, 2025
501c20d
fix style
nguidotti Dec 12, 2025
0ee757a
small fixes
nguidotti Dec 12, 2025
546b116
unified the best-first and diving heap into a single object. imposed …
nguidotti Dec 15, 2025
06d531a
adjusted column spacing in bnb logs. added opening mode for logger.
nguidotti Dec 15, 2025
ae742c2
revert fixes for dual simplex. changed RINS and SubMIP to use guided …
nguidotti Dec 15, 2025
b5f2c7e
moved bound propagation logs to debug mode
nguidotti Dec 15, 2025
eb5c695
addressing code rabbit suggestions
nguidotti Dec 15, 2025
5cf5ac0
added explicit conversion to float
nguidotti Dec 15, 2025
d7dfb0d
missing code revert in basis update
nguidotti Dec 15, 2025
55e64cc
fixed variable type
nguidotti Dec 15, 2025
a26a816
Merge remote-tracking branch 'origin/main' into node-queue
nguidotti Dec 15, 2025
17d3d7c
Merge remote-tracking branch 'origin/main' into diving-heuristics
nguidotti Dec 16, 2025
0b1e994
added comments
nguidotti Dec 16, 2025
9effdc8
added missing spacing
nguidotti Dec 16, 2025
6d43e03
updated logs
nguidotti Dec 16, 2025
98f670f
Merge branch 'main' into adjust-bnb-logs
nguidotti Dec 18, 2025
d54ecbd
Merge branch 'main' into node-queue
nguidotti Dec 18, 2025
0aa344e
Merge branch 'main' into diving-heuristics
nguidotti Dec 18, 2025
fbb9966
refactoring
nguidotti Dec 18, 2025
7a5284e
Merge branch 'adjust-bnb-logs' into diving-heuristics
nguidotti Dec 18, 2025
78f38a4
adjust header spacing
nguidotti Dec 19, 2025
668da14
Merge branch 'adjust-bnb-logs' into diving-heuristics
nguidotti Dec 19, 2025
dd8955f
fix compilation error
nguidotti Dec 19, 2025
9f07cbb
Merge branch 'main' into diving-heuristics
nguidotti Dec 19, 2025
cb1208f
Merge branch 'main' into diving-heuristics
nguidotti Jan 6, 2026
ed20d95
Merge branch 'main' into node-queue
nguidotti Jan 6, 2026
426b445
added cli option for disabling each diving heuristic
nguidotti Jan 6, 2026
319bd22
fix style
nguidotti Jan 6, 2026
3e52ffe
fix infeasible list (#694)
nguidotti Jan 6, 2026
1178493
Merge branch 'main' into diving-heuristics
nguidotti Jan 7, 2026
972b187
created a struct with all persistent data used by each worker
nguidotti Dec 15, 2025
d076da2
replace hashmap with a vector
nguidotti Dec 16, 2025
d8e3541
fix missing initialization
nguidotti Dec 16, 2025
4796733
added a setting for each type of task. changed how to set the number …
nguidotti Dec 17, 2025
308237e
first version of the new parallel b&b
nguidotti Dec 19, 2025
a0fa4e1
refactoring and fixing bugs
nguidotti Jan 7, 2026
25b0bed
several bug fixes
nguidotti Jan 7, 2026
25dac02
handle master suspension. added overdecomposition.
nguidotti Jan 7, 2026
85eab64
fix incorrect number of workers
nguidotti Jan 7, 2026
227d7f8
removed ramp-up phase
nguidotti Jan 7, 2026
5aecd63
added some comments
nguidotti Jan 7, 2026
8dd2d08
fix incorrect termination status
nguidotti Jan 8, 2026
1dcee03
replace upper bound lock with atomic
nguidotti Jan 8, 2026
9e2e5c7
improve idling master thread
nguidotti Jan 8, 2026
34f7eaa
added ramp-up-phase
nguidotti Jan 8, 2026
769a3d8
refactoring
nguidotti Jan 8, 2026
c54033c
updating code to match the new parallel bnb
nguidotti Jan 8, 2026
28c61b8
Merge branch 'main' into diving-heuristics
nguidotti Jan 8, 2026
4bcf801
removed command line options
nguidotti Jan 8, 2026
d91369d
fix style
nguidotti Jan 8, 2026
4ee57f9
fix compilation failure
nguidotti Jan 9, 2026
b99a9c7
separated objective estimate and variable selection
nguidotti Jan 9, 2026
43f8b31
separating objective estimate from variable selection
nguidotti Jan 9, 2026
a36bf03
added log
nguidotti Jan 9, 2026
d4c9d54
Merge branch 'node-queue' into diving-heuristics
nguidotti Jan 9, 2026
b9a14bf
Merge branch 'diving-heuristics' into parallel-bnb-v2
nguidotti Jan 9, 2026
7c5c996
small refactor
nguidotti Jan 9, 2026
5753de8
code cleanup
nguidotti Jan 9, 2026
421cbfd
fix reporting frequency
nguidotti Jan 9, 2026
6faeed0
fix style
nguidotti Jan 9, 2026
d7046e3
added missing stl headers. fix incorrect round-robin.
nguidotti Jan 9, 2026
14441d1
refactor to eliminate enum
nguidotti Jan 12, 2026
89cc6de
fix race condition in guided diving
nguidotti Jan 12, 2026
525f013
reliability branching from #599
nguidotti Jan 9, 2026
0fa76f1
modfiied reliability branching to reuse basis from node
nguidotti Jan 12, 2026
0926349
replaced mutex with a vector of mutexes
nguidotti Jan 12, 2026
2c069c0
restrict reliability branching to main thread
nguidotti Jan 12, 2026
f043ac9
fixed unintialized pseudocost. added adaptive rule for the number of …
nguidotti Jan 13, 2026
24a3838
re-enable reliability branching
nguidotti Jan 13, 2026
ccca7fe
setting reliable_threshold to 1
nguidotti Jan 13, 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
3 changes: 2 additions & 1 deletion cpp/src/dual_simplex/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# cmake-format: off
# SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-FileCopyrightText: Copyright (c) 2024-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
# cmake-format: on

Expand Down Expand Up @@ -31,6 +31,7 @@ set(DUAL_SIMPLEX_SRC_FILES
${CMAKE_CURRENT_SOURCE_DIR}/triangle_solve.cpp
${CMAKE_CURRENT_SOURCE_DIR}/vector_math.cpp
${CMAKE_CURRENT_SOURCE_DIR}/pinned_host_allocator.cu
${CMAKE_CURRENT_SOURCE_DIR}/diving_heuristics.cpp
)

# Uncomment to enable debug info
Expand Down
16 changes: 14 additions & 2 deletions cpp/src/dual_simplex/basis_solves.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* clang-format off */
/*
* SPDX-FileCopyrightText: Copyright (c) 2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* SPDX-License-Identifier: Apache-2.0
*/
/* clang-format on */
Expand Down Expand Up @@ -613,6 +613,8 @@ i_t factorize_basis(const csc_matrix_t<i_t, f_t>& A,
template <typename i_t, typename f_t>
i_t basis_repair(const csc_matrix_t<i_t, f_t>& A,
const simplex_solver_settings_t<i_t, f_t>& settings,
const std::vector<f_t>& lower,
const std::vector<f_t>& upper,
const std::vector<i_t>& deficient,
const std::vector<i_t>& slacks_needed,
std::vector<i_t>& basis_list,
Expand Down Expand Up @@ -658,7 +660,15 @@ i_t basis_repair(const csc_matrix_t<i_t, f_t>& A,
nonbasic_list[nonbasic_map[replace_j]] = bad_j;
vstatus[replace_j] = variable_status_t::BASIC;
// This is the main issue. What value should bad_j take on.
vstatus[bad_j] = variable_status_t::NONBASIC_FREE;
if (lower[bad_j] == -inf && upper[bad_j] == inf) {
vstatus[bad_j] = variable_status_t::NONBASIC_FREE;
} else if (lower[bad_j] > -inf) {
vstatus[bad_j] = variable_status_t::NONBASIC_LOWER;
} else if (upper[bad_j] < inf) {
vstatus[bad_j] = variable_status_t::NONBASIC_UPPER;
} else {
assert(1 == 0);
}
}

return 0;
Expand Down Expand Up @@ -849,6 +859,8 @@ template int factorize_basis<int>(const csc_matrix_t<int, double>& A,

template int basis_repair<int, double>(const csc_matrix_t<int, double>& A,
const simplex_solver_settings_t<int, double>& settings,
const std::vector<double>& lower,
const std::vector<double>& upper,
const std::vector<int>& deficient,
const std::vector<int>& slacks_needed,
std::vector<int>& basis_list,
Expand Down
4 changes: 3 additions & 1 deletion cpp/src/dual_simplex/basis_solves.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* clang-format off */
/*
* SPDX-FileCopyrightText: Copyright (c) 2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* SPDX-License-Identifier: Apache-2.0
*/
/* clang-format on */
Expand Down Expand Up @@ -42,6 +42,8 @@ i_t factorize_basis(const csc_matrix_t<i_t, f_t>& A,
template <typename i_t, typename f_t>
i_t basis_repair(const csc_matrix_t<i_t, f_t>& A,
const simplex_solver_settings_t<i_t, f_t>& settings,
const std::vector<f_t>& lower,
const std::vector<f_t>& upper,
const std::vector<i_t>& deficient,
const std::vector<i_t>& slacks_needed,
std::vector<i_t>& basis_list,
Expand Down
7 changes: 5 additions & 2 deletions cpp/src/dual_simplex/basis_updates.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* clang-format off */
/*
* SPDX-FileCopyrightText: Copyright (c) 2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* SPDX-License-Identifier: Apache-2.0
*/
/* clang-format on */
Expand Down Expand Up @@ -2046,6 +2046,8 @@ template <typename i_t, typename f_t>
int basis_update_mpf_t<i_t, f_t>::refactor_basis(
const csc_matrix_t<i_t, f_t>& A,
const simplex_solver_settings_t<i_t, f_t>& settings,
const std::vector<f_t>& lower,
const std::vector<f_t>& upper,
std::vector<i_t>& basic_list,
std::vector<i_t>& nonbasic_list,
std::vector<variable_status_t>& vstatus)
Expand All @@ -2066,7 +2068,8 @@ int basis_update_mpf_t<i_t, f_t>::refactor_basis(
deficient,
slacks_needed) == -1) {
settings.log.debug("Initial factorization failed\n");
basis_repair(A, settings, deficient, slacks_needed, basic_list, nonbasic_list, vstatus);
basis_repair(
A, settings, lower, upper, deficient, slacks_needed, basic_list, nonbasic_list, vstatus);

#ifdef CHECK_BASIS_REPAIR
const i_t m = A.m;
Expand Down
7 changes: 6 additions & 1 deletion cpp/src/dual_simplex/basis_updates.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* clang-format off */
/*
* SPDX-FileCopyrightText: Copyright (c) 2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* SPDX-License-Identifier: Apache-2.0
*/
/* clang-format on */
Expand Down Expand Up @@ -223,6 +223,9 @@ class basis_update_mpf_t {
reset_stats();
}

basis_update_mpf_t(const basis_update_mpf_t& other) = default;
basis_update_mpf_t& operator=(const basis_update_mpf_t& other) = default;

void print_stats() const
{
i_t total_L_transpose_calls = total_sparse_L_transpose_ + total_dense_L_transpose_;
Expand Down Expand Up @@ -373,6 +376,8 @@ class basis_update_mpf_t {
// Compute L*U = A(p, basic_list)
int refactor_basis(const csc_matrix_t<i_t, f_t>& A,
const simplex_solver_settings_t<i_t, f_t>& settings,
const std::vector<f_t>& lower,
const std::vector<f_t>& upper,
std::vector<i_t>& basic_list,
std::vector<i_t>& nonbasic_list,
std::vector<variable_status_t>& vstatus);
Expand Down
Loading