This project solves a time-constrained prize-collecting path planning problem using the Gurobi optimizer. The goal is to find a path that maximizes collected reward (or likelihood) without exceeding a total time budget.
- C++17 compatible compiler
- Gurobi Optimizer installed and licensed
- CMake ≥ 3.11
- OpenMP
Make sure the GUROBI_HOME environment variable is set properly:
export GUROBI_HOME=/path/to/gurobimkdir build && cd build
cmake ..
make -j./ts <input_csv> <budget> <warm_start_flag><input_csv>: Path to input CSV file with node information (default:../filtered_GW191127_050227_7dt.csv)<budget>: Maximum allowed time (default:1400)<warm_start_flag>:1to enable warm-start from a known path,0otherwise
./ts ../filtered_GW191127_050227_7dt.csv 1400 1-
Results (including chosen path, total cost, and total prize) will be printed to
stdout. -
They can also be written to a CSV file:
../result.csv
main.cpp: Entry point, handles argument parsingReadData.cpp: Parses input CSV and loads node informationILP_gurobi.cpp: Formulates and solves the ILP using GurobiCMakeLists.txt: Build configuration
- A valid warm-start path is currently included only for a 1400 budget.