This downloads and reads data files from CVRPLIB. This package is inspired by and built upon TSPLIB.jl
] add CVRPLIB
For example, to download the X-n242-k48
instance:
cvrp, vrp_file, sol_file = readCVRPLIB("X-n242-k48")
It returns three values. vrp_file
is the path for the downloaded .vrp
file and sol_file
is the path for the .sol
file.
cvrp
is the main data of the following struct:
mutable struct CVRP
name :: String
dimension :: Int
weight_type :: String
weights :: Matrix{Int}
capacity :: Int
distance :: Float64
service_time :: Float64
coordinates :: Matrix{Float64}
demand :: Vector{Int}
depot :: Int
dummy :: Int
customers :: Vector{Int}
end
Note:
weights
,capacity
, anddemand
are integer valued.distance
is the distance limit for each route. If no duration constraint, it is set toInf
.service_time
is the time for service at each customer node. It is set to0.0
, when the service time is not presented.dimension
is the number of nodes in the data, including the depot.- The index
depot
is usually1
.
- KnapsackLib.jl: Knapsack algorithms in Julia
- FacilityLocationProblems.jl: Facility Location Problems Lib
- AssignmentProblems.jl: Assignment Problems Lib
- BPPLib.jl: Bin Packing and Cutting Stock Problems Lib
- CARPData.jl: Capacitated Arc Routing Problem Lib
- MDVSP.jl: Multi-Depot Vehicle Scheduling Problem Lib
- TSPLIB.jl: Traveling Salesman Problem Lib