Skip to content
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

Run conquer algorithm in TreeSearch only if conquer_output of the node is empty #1076

Merged
merged 3 commits into from
Sep 27, 2023

Conversation

rrsadykov
Copy link
Collaborator

@rrsadykov rrsadykov commented Sep 25, 2023

This pull request is a way to ensure that the conquer is not run again needlessly 1) after strong branching 2) at the root of the diving. After running the conquer algorithm, its output (OptimizationState) is put to the node so that the divide algorithm can use it even if it is not run immediately after.

In the future, we would need to define two conquer algorithms for the branch-and-bound (one for the root and one for other nodes), as for the moment we always rely on strong branching to do complete evaluation of the candidate branches. Sometimes, we may want to do a "partial" evaluation in the strong branching. Then, we would need to define an empty conquer algorithm which does nothing and returns nothing. In the when it is used, we would rely on the node to already possess a conquer output, which we then pass to the divide algorithm.

Now, we run conquer only if conquer_output is empty
@rrsadykov rrsadykov requested a review from guimarqu September 25, 2023 16:46
@rrsadykov
Copy link
Collaborator Author

Now, Node and SbNode are the same. We should remove SbNode?

@codecov
Copy link

codecov bot commented Sep 26, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (cb8cf62) 82.91% compared to head (65ce361) 82.88%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1076      +/-   ##
==========================================
- Coverage   82.91%   82.88%   -0.04%     
==========================================
  Files          89       89              
  Lines        7151     7150       -1     
==========================================
- Hits         5929     5926       -3     
- Misses       1222     1224       +2     
Files Coverage Δ
src/Algorithm/branching/branchingalgo.jl 85.84% <100.00%> (-2.12%) ⬇️
src/Algorithm/branching/printer.jl 96.87% <100.00%> (ø)
src/Algorithm/branching/sbnode.jl 42.85% <100.00%> (-1.59%) ⬇️
src/Algorithm/branching/scores.jl 90.47% <100.00%> (ø)
src/Algorithm/branching/single_var_branching.jl 87.75% <100.00%> (+0.25%) ⬆️
src/Algorithm/treesearch.jl 66.66% <100.00%> (+1.44%) ⬆️
src/Algorithm/treesearch/branch_and_bound.jl 91.04% <100.00%> (-0.81%) ⬇️
src/TreeSearch/TreeSearch.jl 15.38% <100.00%> (+7.05%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@guimarqu guimarqu merged commit adea8e0 into master Sep 27, 2023
4 of 5 checks passed
@guimarqu guimarqu deleted the node_conquer_output branch September 27, 2023 07:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants