If you encounter any trouble while building or running the code, please check:
- the wiki for build and usage instructions
- the API documentation at docs/API.md
- open or closed issues covering a similar problem.
Contributions to the code-base are very welcome. If you plan to work on something you want to submit a PR for, feel free to open an issue in order to discuss implementation details or make sure your idea fits with the scope or aim of the project.
- The tip of the
master
branch is the current dev version. - Separate tasks are done in branches, using explicit names like
feature/*
,experiment/*
,refactor/*
,fix/*
whenever possible. - Branches are usually merged using a non-fast-forward merge.
- Custom types use upper CamelCase (e.g.
LocalSearch
) - Variables and functions use lowercase with underscore (e.g.
addition_cost
) - Non-static private data members are prefixed with an underscore (e.g.
_matrix
)
A generic vroom
namespace contains every type that needs to be
exposed, such as Job
, Vehicle
, Location
, Amount
etc. Then
there are several namespace specializations.
utils
: helper data structures, functions and algorithmsio
: everything related to command-line arguments, input and output handlingrouting
: wrappers for the routing layerheuristics
: VRP heuristics stuffls
: local search phase stufftsp
: specific code for the TSPcvrp
: CVRP-specific local search operatorsvrptw
: VRPTW-specific local search operators
To ensure a consistent formatting of the code-base, please run
./scripts/format.sh
prior to submitting a PR. A convenient way to
automate code formatting is to use a commit hook. Create the file
.git/hooks/pre-commit
containing:
#!/bin/sh
./scripts/format.sh
then make sure it's executable: chmod +x .git/hooks/pre-commit
.
Running make tidy
from the src
folder will run all checks from
.clang-tidy
, applying automatic fixes if available.
Unfortunately, the script will also mess with third-party code we have
in the include
folder: the changes there should not be added for
commit.
A basic way to filter out errors from third-party code is:
make tidy | tee tidy.log
grep "warnings-as-errors" tidy.log | grep -v include