-
Notifications
You must be signed in to change notification settings - Fork 0
Instances
Martín Costabal edited this page Aug 19, 2020
·
8 revisions
As you have probably seen throughout this repository, several instances have been implemented in the Instances folder. Also, in many of them we have provided some of its data files, which can be accessed from the OR Brescia Instance Compilation. These are:
- VRP: The Capacitated Vehicle Routing Problem.
- IRP: Inventory Routing Problem, the formulation and instances come from Archetti et al 2017 .
- IRPCS : Inventory Routing Problem with Stockouts and Cassettes (the instances of Larrain et al. 2017).
- TSP : Traveling Salesman Problem. This is an exception, it was taken from the gurobi Example's webpage.
- MVRPD: Multi-period vehicle routing problem with due dates. Formulation and instances from Larrain et al. 2019).
- OISRC : The Optimal Interval Scheduling with Resource Constraints by Angelelli.
To implement this instances, an abstract class was designed to cover the common needs and methods. A brief but thorough description of its methods can be found below.
The abstract class Instance provides a template for a proper execution of the VMND heuristic for a type of problem. All these methods are already implemented for this instances (there are a few exceptions, but they can all be properly loaded and executed).
-
__init__: Constructor, can require a path if it is created from a txt (or .dat) file, usually with the help some other (parsing) function. The attributes of the instance must have instance features, as the number of vehicles, number of nodes or retailers, number of periods, among others. -
createInstance: Returns a gurobipyModel()with the instance already loaded. -
exportMPS: Requires a path to write the .mps model. -
genNeighborhoods: Returns aNeighborhoodsobject with all its features already loaded. -
genLazy: Returns a separation function. -
genTestFunction: This method generates a function that tests the solutions given by the output model of therunmethod. Typically subtour or numerical. -
run: Makes sure the model is already written in .mps format and invokes thesolverfunction from VMND.py , running the desired heuristic. -
analyzeRes: Expected to go afterrun, prints or saves the desired feature (instance dependent). -
visualizeRes: Also instance dependent. It generates a matplotlibplotwith the desired output feature (see User's Guide).