Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 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
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
8a0568c
Merge branch 'main' into node-queue
nguidotti Jan 9, 2026
0ab7911
Merge branch 'main' into diving-heuristics
nguidotti Jan 9, 2026
0f6285c
revert type change
nguidotti Jan 9, 2026
95765e3
Merge branch 'main' into node-queue
nguidotti Jan 9, 2026
2d10ace
fix race condition on guided diving
nguidotti Jan 12, 2026
01b791d
addressing reviewer's feedback
nguidotti Jan 14, 2026
f88f371
fix node queue naming
nguidotti Jan 14, 2026
640d378
Merge remote-tracking branch 'origin/main' into node-queue
nguidotti Jan 14, 2026
9df919d
Merge remote-tracking branch 'origin/main' into diving-heuristics
nguidotti Jan 14, 2026
b220c3f
Merge branch 'node-queue' into diving-heuristics
nguidotti Jan 14, 2026
2df9f73
fixed incorrect calculation of variable locks. addressing reviewer's …
nguidotti Jan 14, 2026
f01fc5f
fixed logic inversion
nguidotti Jan 14, 2026
110ebda
fix incorrect fallback for guided diving
nguidotti Jan 15, 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
4 changes: 3 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 @@ -373,6 +373,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
6 changes: 3 additions & 3 deletions cpp/src/dual_simplex/bounds_strengthening.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 @@ -154,7 +154,7 @@ bool bounds_strengthening_t<i_t, f_t>::bounds_strengthening(
bool is_infeasible =
check_infeasibility<i_t, f_t>(min_a, max_a, cnst_lb, cnst_ub, settings.primal_tol);
if (is_infeasible) {
settings.log.printf(
settings.log.debug(
"Iter:: %d, Infeasible constraint %d, cnst_lb %e, cnst_ub %e, min_a %e, max_a %e\n",
iter,
i,
Expand Down Expand Up @@ -211,7 +211,7 @@ bool bounds_strengthening_t<i_t, f_t>::bounds_strengthening(
new_ub = std::min(new_ub, upper_bounds[k]);

if (new_lb > new_ub + 1e-6) {
settings.log.printf(
settings.log.debug(
"Iter:: %d, Infeasible variable after update %d, %e > %e\n", iter, k, new_lb, new_ub);
return false;
}
Expand Down
Loading