TTSP

Top  Previous  Next

This class is for travelling salesman optimization.

 

There is support for asymmetric matrices in the Pro version. This is especially important if you have many places in dense urban areas with many one-way restrictions.

 

In the Standard version, the input matrix is made symmetrical before optimization.

 

The algorithm uses random permutations, but you can control the randomness using the RandSeed property.

 

Typically you will get the true optimum solution for instances with up to ~100 places to visit. With >100 places the quality of the solution degrades slowly.

 

Set properties PercentWithoutImproveStop, MinCalcTime and TimeLimit to control for how long time the optimization should continue.

 

Recommended values give a fairly good solution for up to 600 places.

With more places, increase the time values further.

With a faster CPU than 2013-standard, you can decrease the time.

With multiple threads, you can also decrease the time.

 

Generally test how much time is really needed for your setup, if you are going to do similar calculations for the same area, many times.

 

Set Mode before running the optimization.

 

It is also possible to monitor progress event, and eventually ask the algorithm to stop earlier.

When using PercentWithoutImproveStop, the progress may decrease when a new improvement is found.

 

After the optimization has finished, you have access to cost and optimized sequence (key result).