Iterated Local Search (ILS) with Random Variable Neighborhood Descent (RVND) and Hybrid Genetic Search (HGS) metaheuristics for the purpose of solving the Hybrid Electric Vehicle -- Traveling Salesman Problem with time windows (HEVTSP).
The code depends on the program_options Boost lib.
Compile and run:
$ mkdir -p build && cd build
$ cmake ..
$ ./hevtsptw --in <instance_file>
The instances can be found in the input folder. To select between the ILS solver, the HGS solver, or both solvers, one must change the #define SOLVER directive accordingly and recompile the source code.
One must run the solver with the --h or --help flag in order to be provided with all the accepted parameters.
The CMake file will automatically create the folders solutions and logs. The former contains the cost of the best solution found by the solver along with the execution time for each run; the latter contains the logs, i.e. the parameters, passed onto the program.
One can also view the solutions as it goes by setting the pLevel flag properly. For now, the user should provide this flag with the parameter 1 in order to see the final solution.
The solution is presented as follows: number route duration. The number corresponds to the number of customers served. route is the actual best tour found in the form customer_id operation_mode. The duration is the time it takes for a vehicle to deliver the goods following the path with the modes of operation provided.
For instance: 10 0 1 1 1 3 1 8 1 4 1 6 2 7 0 2 2 5 0 0 0 d:140.18 means a solution with 10 customers, a tour 0 1 1 1 3 1 8 1 4 1 6 2 7 0 2 2 5 0 0 0, and a duration of 140.18 minutes.
By: Yure Rocha.