Loading...
Searching...
No Matches
tsp.py File Reference

This example demonstrates how to use a GamsModelInstance to implement the sub tour elimination algorithm for the Traveling Salesman Problem (TSP) problem. More...

Go to the source code of this file.

Detailed Description

This example demonstrates how to use a GamsModelInstance to implement the sub tour elimination algorithm for the Traveling Salesman Problem (TSP) problem.

Similar to benders_2stage.py example, we have a placeholder for the sub tour elimination constraint that gets generated in each iteration of the algorithm. In contrast to the Benders example, here we regenerate the GamsModelInstance if the original number of placeholders was not big enough. We continue this process until all sub tours are eliminated.

Definition in file tsp.py.