This repository contains a C++17 implementation of a demand‑responsive feeder/shuttle scheduling model solved with the Hexaly optimizer (formerly LocalSolver). It reads passenger and stop data, builds an optimization model, and writes solution artifacts such as bus routes, timetables, and passenger assignments. The code is used in this academic paper.
Outputs are written to data/output/ (e.g., xsol_*.txt, ysol_*.txt, dsol_*.txt).
- macOS with a modern C++ compiler (Apple Clang recommended)
- CMake >= 3.22
- Hexaly SDK 14.0+ installed
- Default expected location on macOS:
/opt/hexaly_14_0 - Or set
HEXALY_HOMEto your SDK root
- Default expected location on macOS:
Install Hexaly and ensure headers and libraries are available. On macOS the default package usually installs under /opt/hexaly_14_0.
If you installed somewhere else, set an environment variable before configuring the build:
export HEXALY_HOME=/path/to/hexaly_14_0The build system will also accept a CMake hint:
cmake -DHEXALY_ROOT=/path/to/hexaly_14_0 ..cmake -S . -B build
cmake --build build --config DebugNotes:
- On macOS, the build sets rpath to the detected Hexaly library directory to help the executable find the
.dylibat runtime. - Ensure your Hexaly license is set up according to Hexaly’s documentation (license file or environment variable).
Run the executable from the repository root (or from the build/ directory):
./build/HexalyThe program expects input files under data/input/ and writes results to data/output/.
Input files (examples provided in data/input/):
passengers20.txtarrivals20.txtdepartures20.txtmandatory.txtoptional5.txt
Output files (written to data/output/):
xsol_<instance>.txt— bus routes (stop sequences)ysol_<instance>.txt— passenger to bus/trip/stop assignmentdsol_<instance>.txt— bus departure timetable
src/main.cpp— optimization model and program entry pointdata/input/— sample input data filesdata/output/— outputs written by the programCMakeLists.txt— build configuration, including Hexaly SDK detection