R/filterTSPInstances.R
filterTSPInstances.Rd
Given a directory of TSP problems in the TSPlib format with file extension .tsp, this function reads the specifications of each TSPlib instance in that directory and returns a data frame with rowwise information about each instance.
Basically the function is a wrapper around getTSPInstancesOverview
.
filterTSPInstances(directory = NULL, expr = NULL, paths.only = FALSE, opt.known = FALSE)
directory | [ |
---|---|
expr | [ |
paths.only | [ |
opt.known | [ |
[data.frame
]
if (FALSE) { # Get a data frame of instances and its properties for all instances # with more than 4000 nodes filterTSPInstances("path/to/instances", quote(dimension > 4000)) # Now get only the full file names of all instances with edge weight type # EUC_2D or CEIL_2D (see tsplib documentation for details) filterTSPInstances("path/to/instances", expr = quote(edge_weight_type %in% c("EUC_2D", "CEIL_2D")), paths.only = TRUE ) }