-
Notifications
You must be signed in to change notification settings - Fork 42
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
Alias for a simplified BCP parameterisation #603
Conversation
… the branch-cut-and-price algorithm
Codecov Report
@@ Coverage Diff @@
## master #603 +/- ##
==========================================
+ Coverage 85.64% 85.70% +0.06%
==========================================
Files 47 48 +1
Lines 4834 4870 +36
==========================================
+ Hits 4140 4174 +34
- Misses 694 696 +2
Continue to review full report at Codecov.
|
I'll review tomorrow |
I think that before merging this new interface, we must decide on how we define the branching priorities. My suggestion is to define branching priorities only through BlockDecomposition. Currently, we only have The aim of Edit: diagram class of strong branching
|
The main problem here is that we mix variable branching priorities given using One solution may be to define variable branching using names, like
For this, we need to be able to get the JuMP name of a variable (or expression) inside the branching algorithm in Coluna. Then, branching priorities given using One may also parameterise |
Ok, thanks for the explanation. I had doubts about the aim of About your suggestion, I don't think we can rely on MathOptInterface to always provide us the name of the variables and constraints. Currently, if you build your model using the caching optimizer (which is the default mode), Coluna does not receive the name of variables and constraints from MathOptInterface. |
Receiving names of variables (and constraints) is critical for branching. In many cases, the user needs to see on which variable the branching is performed. Otherwise we cannot position Coluna as useful for research purposes. In the worst case the name should be passed through |
This is too advanced for me. Created variables may just receive some default (f.e. empty) name. The user then knows that branching is done on a variable not defined by him. |
I agree that showing names of variables in branching is very useful when you implement a new application or in the R&D phase. However, I don't think we need them in production, so it's not so critical nor a requirement. I guess created variables receive an empty name. However, I think we should be able to propagate the branching rule defined on the original variables because the latter may disappear. This propagation is done by MathOptInterface with a bridge that we will define for the BlockDecomposition.BranchingPriority attribute. I think it's very important to not try to bypass what has been done in MathOptInterface because we'll gain nothing except new bugs. The names should be provided by JuMP and MathOptInterface, not by BlockDecomposition. |
In research, there is no production phase.
I completely agree, but you said that we cannot count on that. I general, I do not understand what do you suggest to do with branching. |
I think we can define both branching priorities and branching rules through BlockDecomposition branchingpriority!(x; rule = Coluna.VarBranchingRule(), root_priority = 1, non_root_priority = 2) Before starting the optimization, Coluna can group variables that have the same branching rules. Names are not a requirement anymore. |
- Modification of the VarBranchingRule algorithm : now all the fractional variables of the maximum branching priority (set in BlockDecomposition) are selected
brpriority = getbranchingpriority(master, var_id) | ||
if (brpriority > max_priority) | ||
max_priority = brpriority | ||
selected_vars = [(var_id, val)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it mean that you create a new array each time you find a non-integer variable that has a greater priority than the current greatest priority?
I personally think it's better to loop twice over the solution. A first time to get the greatest branching priority, a second time to fill the groups
array.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I have modified the code in the latest commit as you suggested
Co-authored-by: Guillaume Marques <[email protected]>
Introduces
Coluna.Algorithm.BranchCutAndPriceAlgorithm
alias for a simplified parameterisation of the branch-cut-and-price algorithm.Addresses issue #478.