-
Create a Build Directory:
mkdir build
-
Navigate to the Build Directory:
cd build -
Run CMake:
cmake ..
-
Compile the Project:
make
After compilation, the executable files will be available in the build directory.
This algorithm uses two buckets with adaptive k value adjustment.
Usage:
build/rerank_two_bucket_adaptive_k <edge_group_dir> <total_amount> <output_dir>Example:
build/rerank_two_bucket_adaptive_k cpp_graph/1_3 100 output_resultsParameters:
edge_group_dir: Directory containing edge group files and paths.txttotal_amount: Total amount/capacity to routeoutput_dir: Directory where results will be saved
Note: This version has a fixed initial k value of 100.
This algorithm uses multiple buckets with a fixed k value that you specify.
Usage:
build/rerank_multi_bucket_fixed_k <edge_group_dir> <total_amount> <output_dir> <initial_k>Example:
build/rerank_multi_bucket_fixed_k cpp_graph/1_3 1000 output_results 10Parameters:
edge_group_dir: Directory containing edge group files and paths.txttotal_amount: Total amount/capacity to routeoutput_dir: Directory where results will be savedinitial_k: K value for the algorithm
This algorithm uses multiple buckets with adaptive k value adjustment.
Usage:
build/rerank_multi_bucket_adaptive_k <edge_group_dir> <total_amount> <output_dir>Example:
build/rerank_multi_bucket_adaptive_k cpp_graph/1_3 100 output_resultsParameters:
edge_group_dir: Directory containing edge group files and paths.txttotal_amount: Total amount/capacity to routeoutput_dir: Directory where results will be saved
Note: This version has a fixed initial k value of 640.
Each algorithm generates the following output files in the specified output directory:
summary.txt: Contains algorithm statistics, performance metrics, and k value historydetails.txt: Contains detailed path selection information for each round