Skip to content

Latest commit

 

History

History

README.md

Build Instructions

  1. Create a Build Directory:

    mkdir build
  2. Navigate to the Build Directory:

    cd build
  3. Run CMake:

    cmake ..
  4. Compile the Project:

    make

After compilation, the executable files will be available in the build directory.

Usage

1. Two Bucket Adaptive K Algorithm

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_results

Parameters:

  • edge_group_dir: Directory containing edge group files and paths.txt
  • total_amount: Total amount/capacity to route
  • output_dir: Directory where results will be saved

Note: This version has a fixed initial k value of 100.


2. Multi Bucket Fixed K Algorithm

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 10

Parameters:

  • edge_group_dir: Directory containing edge group files and paths.txt
  • total_amount: Total amount/capacity to route
  • output_dir: Directory where results will be saved
  • initial_k: K value for the algorithm

3. Multi Bucket Adaptive K 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_results

Parameters:

  • edge_group_dir: Directory containing edge group files and paths.txt
  • total_amount: Total amount/capacity to route
  • output_dir: Directory where results will be saved

Note: This version has a fixed initial k value of 640.


Output Files

Each algorithm generates the following output files in the specified output directory:

  • summary.txt: Contains algorithm statistics, performance metrics, and k value history
  • details.txt: Contains detailed path selection information for each round