Skip to content

AustinLBuchanan/separation_examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Separation Examples

TSP examples showing how to use separation. The first set of codes solve the subtour elimination linear program ("subtour LP"). The latter codes solve the "full" TSP using callback functions where violated inequalities are added on-the-fly.

Subtour LP codes

First is a multi-commodity flow (MCF) code that doesn't use separation, but is useful for debugging purposes.

  1. subtour_LP_via_MCF

Second is a CUT model that uses inequalities of the form x(S,V\S) >= 1. Separating these inequalities reduces to a min cut problem which we solve via NetworkX. We adopt a cutting plane approach in which the LP relaxation is solved, a violated cut constraint is added, then repeat until there are no more violated inequalities.

  1. subtour_LP_via_CUT_naive_cutting_plane_method

Third is a Dantzig-Fulkerson-Johnson (DFJ) model that uses inequalities of the form x(E(S)) <= |S|-1. Separating these inequalities also reduces to a min cut problem.

  1. subtour_LP_via_DFJ_naive_cutting_plane_method

The fourth and fifth codes exploit situations where the support graph (of the LP solution) is disconnected. Whenever this is the case, we can easily find an inequality whose violation is one. Only when the support graph is connected does it resort to solving min cut problems.

  1. subtour_LP_via_CUT_smarter_cutting_plane_method

  2. subtour_LP_via_DFJ_smarter_cutting_plane_method

TSP codes

Again, we have an MCF code that doesn't use separation, but is useful for debugging purposes.

  1. TSP_via_MCF

Integer separation codes

Next are codes that separate integer solutions x, including CUT and DFJ models. Because x is assumed to be integer, the separation problem reduces to finding connected components.

  1. TSP_via_CUT_integer_separation

  2. TSP_via_DFJ_integer_separation

Fractional separation codes

Then we have codes that separate (possibly) fractional solutions x, including CUT and DFJ codes that solve a min cut problem in each callback.

  1. TSP_via_CUT_naive_fractional_separation

  2. TSP_via_DFJ_naive_fractional_separation

Finally, we have CUT and DFJ codes that exploit situations where the support graph is disconnected and violated inequalities are easy to find. Min cut problems are solved only as a last resort.

  1. TSP_via_CUT_smarter_fractional_separation

  2. TSP_via_DFJ_smarter_fractional_separation

Codes for Symmetric Instances That Use Gomory-Hu Trees

When the costs are symmetric, we can work with an undirected graph and compute min cuts using a Gomory-Hu tree.

  1. symmetric_subtour_LP_via_CUT_naive_Gomory_Hu_tree

  2. symmetric_subtour_LP_via_DFJ_naive_Gomory_Hu_tree

  3. symmetric_subtour_LP_via_CUT_smarter_Gomory_Hu_tree

  4. symmetric_subtour_LP_via_DFJ_smarter_Gomory_Hu_tree

  5. symmetric_TSP_via_CUT_Gomory_Hu_tree

  6. symmetric_TSP_via_DFJ_Gomory_Hu_tree

There are also some 'hybrid' codes that choose whether to add DFJ or CUT constraints depending on which has fewer nonzeros.

  1. symmetric_subtour_LP_via_hybrid_smarter_Gomory_Hu_tree

  2. symmetric_TSP_via_hybrid_Gomory_Hu_tree

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published