Skip to content

Conversation

@rg20
Copy link
Contributor

@rg20 rg20 commented Sep 2, 2025

Description

This PR implements node presolve using the bounds strengthening algorithm. At each node in branch-and-bound tree, host presolve is run to (i) improve the bounds on the variables (ii) to detect infeasibility and fathom nodes accordingly

Details

  • The bounds strengthening takes into account of integrality constraints. This leads to more infeasibility detection than doing the dual simplex.
  • Bounds strengthening is done only starting with the constraints that are associated with the branched variables (all up to the root node) only. For examples, if the current node is depth 7, only constraints relating to these 7 variables are considered changed for the first iteration of bounds strengthening. This greatly improves the performance of the node presolve
  • This bounds strengthening is performed on the cpu

Issue

Closes #276

Checklist

  • I am familiar with the Contributing Guidelines.
  • Testing
    • New or existing tests cover these changes
    • Added tests
    • Created an issue to follow-up
    • NA
  • Documentation
    • The documentation is up to date with these changes
    • Added new documentation
    • NA

@rg20 rg20 requested a review from a team as a code owner September 2, 2025 21:17
@rg20 rg20 requested review from aliceb-nv and hlinsen September 2, 2025 21:17
@copy-pr-bot
Copy link

copy-pr-bot bot commented Sep 2, 2025

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@rg20 rg20 marked this pull request as draft September 2, 2025 21:17
@rg20 rg20 changed the title [Skip CI] Implement node presolve [WIP] Implement node presolve Sep 2, 2025
@anandhkb anandhkb added this to the 25.10 milestone Sep 4, 2025
@rg20 rg20 added improvement Improves an existing functionality non-breaking Introduces a non-breaking change labels Sep 4, 2025
@rg20 rg20 marked this pull request as ready for review September 4, 2025 16:12
@rg20 rg20 changed the title [WIP] Implement node presolve Implement node presolve Sep 5, 2025
std::vector<f_t> constraint_ub(m);

// FIXME:: Instead of initializing constraint_changed to true, we can only look
// at the constraints corresponding to branched variable in branch and bound
Copy link
Contributor

Choose a reason for hiding this comment

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

This is an important optimization, you might want to have a specific bound strengthening function just for this maybe

bool bound_strengthening(const std::vector<char>& row_sense, 
                                              const simplex_solver_settings_t<i_t, f_t>& settings, 
                                              const lp_problem_t<i_t, f_t>& problem, 
                                              const std::vector<variable_type_t>& var_types, 
                                              i_t branched_var, 
                                              f_t branched_var_lower_bound,
                                              f_t  branched_var_upper_bound)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I actually tried this, but it does not do a good job. I think it might be related to not using the strengthened bounds from the parent.

@rg20
Copy link
Contributor Author

rg20 commented Sep 8, 2025

/ok to test 16488a0

Copy link
Contributor

@kaatish kaatish left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@rg20
Copy link
Contributor Author

rg20 commented Sep 10, 2025

/merge

@rapids-bot rapids-bot bot merged commit 167192b into NVIDIA:branch-25.10 Sep 10, 2025
102 checks passed
aliceb-nv pushed a commit that referenced this pull request Sep 22, 2025
This PR implements node presolve using the bounds strengthening algorithm. At each node in branch-and-bound tree,  host presolve is run to (i) improve the bounds on the variables (ii) to detect infeasibility and fathom nodes accordingly

**Details**

- The bounds strengthening takes into account of integrality constraints. This leads to more infeasibility detection than doing the dual simplex. 
- Bounds strengthening is done only starting with the constraints that are associated with the branched variables (all up to the root node) only.  For examples, if the current node is depth 7, only constraints relating to these 7 variables are considered changed for the first iteration of bounds strengthening. This greatly improves the performance of the node presolve
- This bounds strengthening is performed on the cpu

## Issue
Closes #276

Authors:
  - Rajesh Gandham (https://github.com/rg20)

Approvers:
  - Kumar Aatish (https://github.com/kaatish)

URL: #368
aliceb-nv pushed a commit that referenced this pull request Sep 22, 2025
This PR implements node presolve using the bounds strengthening algorithm. At each node in branch-and-bound tree,  host presolve is run to (i) improve the bounds on the variables (ii) to detect infeasibility and fathom nodes accordingly

**Details**

- The bounds strengthening takes into account of integrality constraints. This leads to more infeasibility detection than doing the dual simplex. 
- Bounds strengthening is done only starting with the constraints that are associated with the branched variables (all up to the root node) only.  For examples, if the current node is depth 7, only constraints relating to these 7 variables are considered changed for the first iteration of bounds strengthening. This greatly improves the performance of the node presolve
- This bounds strengthening is performed on the cpu

## Issue
Closes #276

Authors:
  - Rajesh Gandham (https://github.com/rg20)

Approvers:
  - Kumar Aatish (https://github.com/kaatish)

URL: #368
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Improves an existing functionality non-breaking Introduces a non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEA] Node Presolve

4 participants