4. Branch and Bound¶
4.1. Theory¶
4.2. Project: Branch and Bound, Lagrangian Relaxation¶
The second project is about Branch and Bound (BnB), Lagrangian Relaxation and the Traveling Salesman Problem (TSP).
Your implementation work will be in the in the branchandbound package. As a preliminary, step, read first the class called BranchAndBoundKnapsack as this class is a good example of what you will do for the TSP, that is:
Implement the state/node representation for the BnB search.
Implement a lower-bounding procedure to prune the BnB search.
4.2.1. Gradescope¶
On Gradescope, find the written assignment on BnB where you will learn about the TSP and model it on paper with this technique. You can already answer to the Exercises 1, while Exercise 2 and 3 will need to wait until you complete your implementation.
4.2.2. Implementation¶
Then, go to your personal LINFO2266 Github repository, where you will specify the classes to model and solve real TSP instances with branch and bound in the package branchandbound (don’t forget to pull to get the latest update).
The implementation work is composed of four steps:
Implement the cheapest incident lower bound procedure in the
CheapestIncidentLowerBoundclass. You can test your result by executingCheapestIncidentLowerBoundTestFast.Implement the one-tree lower bound procedure in the
OneTreeLowerBoundclass. You can test your result by executingOneTreeLowerBoundTestFast.Implement the branch and bound for the TSP in the
BranchAndBoundTSPclass which will use the lower bounding procedures you just implemented earlier. You can check your result by executing the testtestOneTreefromBranchAndBoundTSPTestFast.Implement an enhanced bound calculation for the one-tree based on Lagrangian relaxation in the
HeldKarpLowerBoundclass. You can test your result by executingHeldKarpLowerBoundTestFastand the remaining tests fromBranchAndBoundTSPTestFast.Replace in your branch and bound for the TSP
BranchAndBoundTSP, the bound calculation by your new reinforced bound (note that you can even use the`TSPSuperLowerboundthat takes the best of the two). You can test your result by executingBranchAndBoundTSPTest.
Once your implementation is ready, don’t forget to finish your written assignment, by writing your answer for Exercise 2 and 3! The exercise on the gap computation for the report will require that you modify the branch and bound it-self or do some printing from there.
