Skip to content

Branch-and-Cut method for solving CVRP using CVRPSEP routines and CPLEX generic callback

License

Notifications You must be signed in to change notification settings

NicolaFarronato/CVRP_BranchAndCutExample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CVRP Two Index Vehicle Flow Formulation
Branch-and-cut example using CPLEX with CVRPSEP

Instance E-n51-k5.vrp

This repo implements in C++ the two index vehicle flow formulation[2] and the solution using the branch-and-cut (BC) method. BC is implemented using CVRPSEP[1] through a CPLEX generic callback.

The program can read all classical CVRP instances, that can be found in http://vrp.atd-lab.inf.puc-rio.br/index.php/en/. Moreover, a python file (print_result.py) is provided to print the output routes if the solution is found.

If the user wants to use a legacy LazyConstraintCallback it can be found in Cvrpsep_callback.h. Then

Important

This is just an example to start working with CPLEX, using generic and legacy callbacks.

Requirements

Input Example

Arg Comment
-i Path to the instance (*.vrp)
-c Config json file (see the example in the folder config)

Output

The output folder is given in the build location. These files are useful for checking the input model given to CPLEX and for printing the output graph using the Python file provided.

File Comment
coords.txt Coordinates of the costumers with a third value representing the demand
distances.txt Distance matrix of the nodes
model.lp Input model for cplex (in order to verify if the written constraints are correct)
solutionEdges.txt Edges of the solution graph

Citation

@article{article,
author = {Lysgaard, Jens},
year = {2003},
month = {01},
pages = {},
title = {CVRPSEP: A package of separation routines for the Capacitated Vehicle Routing Problem}
},
@book{toth2014vehicle,
  title={Vehicle routing: problems, methods, and applications},
  author={Toth, Paolo and Vigo, Daniele},
  year={2014},
  publisher={SIAM}
}

About

Branch-and-Cut method for solving CVRP using CVRPSEP routines and CPLEX generic callback

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published