This is a modern implementation of the time and load-dependent electric vehicle routing problem (TLD-EVRP) using a large neighborhood search algorithm, optimized with local search operators and a set partitioning model.
This directory stores files from the Singapore Coca-Cola Company and small-scale datasets.
-
Customer2ID.txt: The customer numbers in the data files are serial numbers generated by Coca-Cola. e.g. 502785770. This file will map such serial numbers to the virtual numbers from 1 to 1987. -
resource.txt: This file contains the original resources from the Coca-Cola Company. Each line describes a customer with its serial number, organization's name, and position. -
ODMatrix.txt: This file is a distance matrix file. Each row contains three numbers (a, b, c), where a and b are customers' virtual numbers and c is the distance between a and b in real life.
This directory stores all implementation variants of the algorithm.
This directory stores all large-scale datasets.
This directory stores all final results.
Below is a simple description of an input file.
VehicleNumber
VechicleCapacity
Electricity
[Node]
...(not used)
[pickup]
PickupId1 CustomerId1 Demand1 ServeTime1
PickupId2 CustomerId2 Demand2 ServeTime2
...
[Speed 1]
InitialSpeed1
StartTime1_1 EndTime1_1 FloatNumber1_1 Speed1_1
StartTime1_2 EndTime1_2 FloatNumber1_2 Speed1_2
...
[Speed 2]
InitialSpeed2
...
[speed choice matrix]
...(describes the chosen speed id between each pair of nodes)
VehicleNumber is assumed to be equal to the number of customers. Node 0 is considered to be the repository.
The difference between a large-scale dataset and a small-scale dataset is that the speed choice matrix of a large-scale dataset is of size
-
Gurobi-12.0.0
-
clang-13
Assume Gurobi is installed at:
/Library/gurobi1200/macos_universal2/
You can compile the programs using the following commands:
cd src
GUROBI_HOME="/Library/gurobi1200/macos_universal2/"
clang++ <file_name>.cpp -I${GUROBI_HOME}/include/ -L${GUROBI_HOME}/lib -lgurobi_c++ -lgurobi120 -o <executable_name>
For example, to compile main.cpp, you can run the following command:
clang++ main.cpp -I${GUROBI_HOME}/include/ -L${GUROBI_HOME}/lib -lgurobi_c++ -lgurobi120 -o main
./<executable_name> <data_file_path>
<data_file_path> should be a relative path from the root directory of the project.
An example of running this is as follows:
./main dataset/Q=1000_200_1.txt