Installation

Instructions for downloading and installing binaries for different Operative systems instructions and additional notes and corrections not included in this documentation can be found in Installation wiki

To use vrpRouting: PostgreSQL server, pgRouting and postGIS needs to be installed.

There is no package for vrpRouting

Get the vrpRouting sources

The vrpRouting latest release can be found in https://github.com/pgRouting/vrprouting/releases/latest

To get this release, download the repository or download the

Download the repository

git clone git://github.com/pgRouting/vrprouting.git
cd vrprouting
git checkout v0.4.0

Download this release

wget -O vrprouting-0.4.0.tar.gz https://github.com/pgRouting/vrprouting/archive/v0.4.0.tar.gz

Short Version

Extracting the tar ball

tar xvfz vrprouting-0.4.0.tar.gz
cd vrprouting-0.4.0

To compile assuming you have all the dependencies in your search path:

mkdir build
cd build
cmake ..
make
sudo make install

Once vrpRouting is installed, it needs to be enabled in each individual database you want to use it in.

Enabling and upgrading in the database

Enabling the database

vrpRouting is an extension and depends on postGIS. Enabling postGIS before enabling vrpRouting in the database

CREATE EXTENSION vrprouting CASCADE;

Upgrading the database

When the database has an old version of vrpRouting then an upgrade is needed.

ALTER EXTENSION vrprouting UPDATE TO "0.4.0";

See also

Dependencies

Compilation Dependencies

To be able to compile vrpRouting, make sure that the following dependencies are met:

  • C and C++ compilers with C++17 standard support

  • Postgresql version >= TBD

  • The Boost Graph Library (BGL) >= 1.65

  • CMake >= 3.12

  • VROOM >= 1.12.0

optional dependencies

For user’s documentation

  • Sphinx > 4.0.0

  • Latex

For developer’s documentation

  • Doxygen >= TBD

For testing:

  • pgtap

  • pg_prove

For using:

  • PostGIS version >= 3

Example: Installing dependencies on linux

Installing the compilation dependencies

Database dependencies

This example is for PostgreSQL 13 and PostGIS 3

sudo apt-get install
    postgresql-13 \
    postgresql-server-dev-13 \
    postgresql-13-postgis-3 \
    postgresql-13-postgis-3-scripts \
    postgresql-13-pgrouting

Build dependencies

sudo apt-get install
    cmake \
    g++ \
    libboost-graph-dev

Build dependencies (VROOM)

Install VROOM dependencies

sudo apt-get install libssl-dev libasio-dev libglpk-dev

Build VROOM v1.12.0

git clone --depth 1 --branch v1.12.0 https://github.com/VROOM-Project/vroom ~/vroom-1.12.0

# init the required submodules
cd ~/vroom-1.12.0/
git submodule update --init

# Using "shared" target for creating Position Independent Code, disabling use of routing
cd ~/vroom-1.12.0/src
USE_ROUTING=false make shared

Optional dependencies

For documentation and testing

sudo apt-get install -y python-sphinx \
    texlive \
    doxygen \
    libtap-parser-sourcehandler-pgtap-perl \
    postgresql-13-pgtap

Configuring

vrpRouting uses the cmake system to do the configuration.

The build directory is different from the source directory

Create the build directory

$ mkdir build

Configurable variables

To see the variables that can be configured

Here, the variable VROOM_INSTALL_PATH corresponds to the location of the root directory of VROOM.

$ cd build
$ cmake -DVROOM_INSTALL_PATH=/path/to/vroom-dir/ -L ..

Configuring The Documentation

Most of the effort of the documentation has being on the HTML files. Some variables for the documentation:

Variable

Default

Comment

WITH_DOC

BOOL=OFF

Turn on/off building the documentation

BUILD_HTML

BOOL=ON

If ON, turn on/off building HTML for user’s documentation

BUILD_DOXY

BOOL=ON

If ON, turn on/off building HTML for developer’s documentation

BUILD_LATEX

BOOL=OFF

If ON, turn on/off building PDF

BUILD_MAN

BOOL=OFF

If ON, turn on/off building MAN pages

DOC_USE_BOOTSTRAP

BOOL=OFF

If ON, use sphinx-bootstrap for HTML pages of the users documentation

Configuring with documentation

$ cmake -DVROOM_INSTALL_PATH=/home/manas/Codes/GSOC-2022/MyFork/vroom-v1.12.0 -DWITH_DOC=ON ..

Note

Most of the effort of the documentation has being on the html files.

Building

Using make to build the code and the documentation

The following instructions start from path/to/pgrouting/build

$ make          # build the code but not the documentation
$ make doc      # build only the documentation
$ make all doc  # build both the code and the documentation

We have tested on several platforms, For installing or reinstalling all the steps are needed.

Warning

The sql signatures are configured and build in the cmake command.

MinGW on Windows

$ mkdir build
$ cd build
$ cmake -G"MSYS Makefiles" ..
$ make
$ make install

Linux

The following instructions start from path/to/repository

mkdir build
cd build
cmake  ..
make
sudo make install

When the configuration changes:

rm -rf build

and start the build process as mentioned above.

Testing

Currently there is no make test and testing is done as follows

The following instructions start from path/to/pgrouting/

tools/testers/doc_queries_generator.pl
createdb  -U <user> ___vrp___test___
bash ./tools/testers/pg_prove_tests.sh <user>
dropdb  -U <user> ___vrp___test___

See Also

Indices and tables