-
Notifications
You must be signed in to change notification settings - Fork 227
Root Heuristics (RINS, CPU FJ) #1699
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
6cfc5f2
allow RINS and CPU FJ to run during the cut passes. fixed objective f…
nguidotti 5ea38a8
silent postsolve messages for submip
nguidotti 1a4c4a6
fixed uninitialized FJ constraint weights when the problem grows
nguidotti 89b439c
Merge branch 'fix-fj-infinite-constraints' into root-heuristics
nguidotti File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| /* clang-format off */ | ||
| /* | ||
| * SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| */ | ||
| /* clang-format on */ | ||
|
|
||
| #pragma once | ||
|
|
||
| #include <branch_and_bound/worker.hpp> | ||
| #include <dual_simplex/user_problem.hpp> | ||
| #include "feasibility_jump/fj_cpu_worker.cuh" | ||
|
|
||
| namespace cuopt::mathematical_optimization::mip { | ||
|
|
||
| template <typename i_t, typename f_t> | ||
| struct root_heuristics_t { | ||
| std::unique_ptr<diving_worker_t<i_t, f_t>> submip_worker_; | ||
| fj_cpu_worker_t<i_t, f_t> fj_cpu_worker_; | ||
| std::vector<simplex::variable_type_t> var_types_; | ||
| csr_matrix_t<i_t, f_t> Arow_; | ||
|
|
||
| root_heuristics_t(const csr_matrix_t<i_t, f_t>& Arow, | ||
| const std::vector<simplex::variable_type_t>& var_types) | ||
| : submip_worker_(nullptr), var_types_(var_types), Arow_(Arow) {}; | ||
|
|
||
| ~root_heuristics_t() { stop(); } | ||
|
|
||
| void stop() | ||
| { | ||
| fj_cpu_worker_.stop(); | ||
| if (submip_worker_) { | ||
| submip_worker_->halt = true; | ||
| diving_worker_t<i_t, f_t>* worker = submip_worker_.get(); | ||
| #pragma omp taskwait depend(in : *worker) | ||
| } | ||
| } | ||
|
nguidotti marked this conversation as resolved.
|
||
|
|
||
| void create_submip_worker(i_t id, | ||
| const simplex::lp_problem_t<i_t, f_t>& lp, | ||
| const simplex::simplex_solver_settings_t<i_t, f_t>& settings, | ||
| f_t root_obj, | ||
| const std::vector<simplex::variable_status_t>& root_vstatus, | ||
| const std::vector<f_t>& sol) | ||
| { | ||
| submip_worker_ = | ||
| std::make_unique<diving_worker_t<i_t, f_t>>(id, lp, Arow_, var_types_, settings); | ||
| submip_worker_->start_node = mip_node_t<i_t, f_t>(root_obj, root_vstatus); | ||
| submip_worker_->leaf_vstatus = root_vstatus; | ||
| submip_worker_->leaf_solution.x = sol; | ||
| submip_worker_->recompute_bounds = false; | ||
| submip_worker_->recompute_basis = true; | ||
| submip_worker_->search_strategy = search_strategy_t::SUBMIP; | ||
| submip_worker_->set_active(); | ||
| } | ||
| }; | ||
| } // namespace cuopt::mathematical_optimization::mip | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.