Description Usage Arguments Value Examples
Runs the MTSP solver
1 2 3 4 5 6 7 8 9 10 11 |
xy |
A |
dmat |
A |
nSalesmen |
An integer giving the number of salespersons (must be >= 2). |
minTour |
An integer giving the minimum tour length for any of the salesmen. |
CostType |
Possible values are the integers 1 or 2; 1 minimises the total distance travelled and 2 minimises the maximum distance travelled across the salepersons. |
popSize |
The population size / search space of the GA (should be divisible by 8 but this is corrected within program). |
numIter |
is the desired number of iterations for the algorithm to run. |
Epsilon |
A double giving a multiplier on blancing the costs beteen total distance and minmax (only used for |
return_all |
Logical on whether ro return full ouput. Defaults to |
Returns the solution to the MTSP. Depending on return_all
may return the inputs and best_tour
: returns
a list where each element gives the sites visited by each salesperson, minDist
: is the best cost found by the algorithm,
minDistTotal
gives tht total distance travelled for all salespersons, and minMaxTotal
gives the maximum distance travelled by any one salesperson.
1 2 3 4 5 6 7 8 9 10 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.