Skip to contents

Reads CVRP (and VRPTW) instances in VRPLIB/CVRPLIB format (extended TSPLIB), such as the X set by Uchoa et al. Supports Euclidean coordinates (EDGE_WEIGHT_TYPE : EUC_2D); time-window and service-time sections are read when present.

Usage

read_vrplib(path, num_vehicles = NULL)

Arguments

path

Path to the .vrp file.

num_vehicles

Number of available vehicles. If NULL, uses the VEHICLES/TRUCKS field, the -k<n> suffix in the name, or – as a last resort – the number of clients (always feasible).

Value

A vrp_model() ready for vrp_solve().