plot.mtsp_ga: Plot the MTSP solution

Description Usage Arguments Examples

View source: R/mtsp.R

Description

Plot the MTSP solution (currently only implemented for the non-depot algorithms).

Usage

1
2
3
4
## S3 method for class 'mtsp_ga'
plot(x, dat = NULL, ...)

ggplotter(x, dat, ...)

Arguments

x

The list returned by mtsp.

dat

A matrix of x,y positions passed to mtsp. Only needed when return_all=FALSE was used.

...

Unused.

Examples

1
2
3
4
5
6
set.seed(1)
n = 25
xy = matrix(rnorm(n*2), ncol=2)
run = mtsp(xy, nSalesmen=5, CostType=2, popSize=80, 
           numIter=10, algorithm="mtsp_ga", return_all=TRUE)
plot(run) 

daffp/mtsp documentation built on Sept. 23, 2020, 2:39 p.m.