Python Vehicle Routing Open-source Optimization Machine
Good solution, fast… in Python.
Pyvroom is an Python wrapper to the excellent VROOM optimization engine for solving vehicle routing problems.
The library aims to solve several well-known types of vehicle routing problems, including:
Travelling salesman.
Capacitated vehicle routing.
Routing with time windows.
Multi-depot heterogeneous vehicle.
Pickup-and-delivery.
VROOM can also solve any mix of the above problem types.
Basic usage
>>> import vroom
>>> problem_instance = vroom.Input()
>>> problem_instance.set_durations_matrix(
... profile="car",
... matrix_input=[[0, 2104, 197, 1299],
... [2103, 0, 2255, 3152],
... [197, 2256, 0, 1102],
... [1299, 3153, 1102, 0]],
... )
>>> problem_instance.add_vehicle([vroom.Vehicle(47, start=0, end=0),
... vroom.Vehicle(48, start=2, end=2)])
>>> problem_instance.add_job([vroom.Job(1414, location=0),
... vroom.Job(1515, location=1),
... vroom.Job(1616, location=2),
... vroom.Job(1717, location=3)])
>>> solution = problem_instance.solve(exploration_level=5, nb_threads=4)
>>> solution.summary.cost
6411
>>> solution.routes.columns
Index(['vehicle_id', 'type', 'arrival', 'duration', 'setup', 'service',
'waiting_time', 'location_index', 'id', 'description'],
dtype='object')
>>> solution.routes[["vehicle_id", "type", "arrival", "location_index", "id"]]
vehicle_id type arrival location_index id
0 47 start 0 0 <NA>
1 47 job 2104 1 1515
2 47 job 4207 0 1414
3 47 end 4207 0 <NA>
4 48 start 0 2 <NA>
5 48 job 1102 3 1717
6 48 job 2204 2 1616
7 48 end 2204 2 <NA>
Usage with a routing engine
>>> import vroom
>>> problem_instance = vroom.Input(
... servers={"auto": "valhalla1.openstreetmap.de:443"},
... router=vroom._vroom.ROUTER.VALHALLA
... )
>>> problem_instance.add_vehicle(vroom.Vehicle(1, start=(2.44, 48.81), profile="auto"))
>>> problem_instance.add_job([
... vroom.Job(1, location=(2.44, 48.81)),
... vroom.Job(2, location=(2.46, 48.7)),
... vroom.Job(3, location=(2.42, 48.6)),
... ])
>>> sol = problem_instance.solve(exploration_level=5, nb_threads=4)
>>> print(sol.summary.duration)
2704
Installation
Pyvroom currently makes binaries for on macOS and Linux. There is also a Windows build that can be used, but it is somewhat experimental.
Installation of the pre-compiled releases should be as simple as:
pip install pyvroom
Building from source
Building the source distributions requires:
Download the Pyvroom repository on you local machine:
git clone --recurse-submodules https://github.com/VROOM-Project/pyvroomInstall the Python dependencies:
pip install -r pyvroom/build-requirements.txtInstall asio headers, and openssl and crypto libraries and headers. On Linux and macOS this involve using package managers like apt, yum or brew. The exact package name may vary a bit between systems.
The installation can then be done with:
pip install pyvroom/
Alternatively it is also possible to install the package from source using Conan. This is also likely the only option if installing on Windows.
To install using Conan, do the following:
cd pyvroom/
conan install --build=openssl --install-folder conan_build .
Documentation
The code is currently only documented with Pydoc. This means that the best way to learn Pyvroom for now is to either look at the source code or use dir() and help() to navigate the interface.
It is also useful to take a look at the VROOM API documentation. The interface there is mostly the same.
Metadata
Release files for pyvroomwheels 1.13.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
Total release size: 62.1 MB
Release files / pyvroomwheels-1.13.5-cp312-cp312-win_amd64.whl
| Download URL | pyvroomwheels-1.13.5-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 1.7 MB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
841961cdfd0812c84544e291e6c8b9f1a821488258d3f3f20f98ba84dc73b6e5
|
|
BLAKE2b-256 checksum How to use checksums |
3ba033e8d6b1452d94fbe120819f29e428cefa26f97cc78ca050a3e13157c16b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.0.0 CPython/3.12.4
|
Release files / pyvroomwheels-1.13.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | pyvroomwheels-1.13.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 3.1 MB |
| Tags | CPython 3.12 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
71cc7b9e9b138446638cadc5a5cd4d7582a31d1054f34d23ad0d17285d29de13
|
|
BLAKE2b-256 checksum How to use checksums |
f7eb9fff551a1a11f71f5afc0d44e66d8c7fc92ec8b90a67ecb61cd6e6bfd336
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.0.0 CPython/3.12.4
|
Release files / pyvroomwheels-1.13.5-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | pyvroomwheels-1.13.5-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 2.8 MB |
| Tags | CPython 3.12 Linux glibc 2.17+ ARM64 |
|
SHA-256 checksum How to use checksums |
70c3921b61aa2739ef5b22bd860b5ea9f719aa74206cab69b8d910b147d60026
|
|
BLAKE2b-256 checksum How to use checksums |
31f2a7bc6aec024098c661cf0d9156da3683829a20553f5301f3d442b5562290
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.0.0 CPython/3.12.4
|
Release files / pyvroomwheels-1.13.5-cp312-cp312-macosx_14_0_arm64.whl
| Download URL | pyvroomwheels-1.13.5-cp312-cp312-macosx_14_0_arm64.whl |
|---|---|
| Size | 3.3 MB |
| Tags | CPython 3.12 macOS 14.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
28bd262234e554f0c3c89ed630e7335b9f128e9b0bad4bd87f3b40f97998092d
|
|
BLAKE2b-256 checksum How to use checksums |
5df525a51510c88dbf1f8813eb32796617697ad272757c9b6075609e823f184c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.0.0 CPython/3.12.4
|
Release files / pyvroomwheels-1.13.5-cp311-cp311-win_amd64.whl
| Download URL | pyvroomwheels-1.13.5-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 1.7 MB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
7ebf705d73cedf796f1bf0fe11cd84dab2df003d9919d0e769d9d639b082772c
|
|
BLAKE2b-256 checksum How to use checksums |
23cec35ea19ec5a280fd4783fb31f0ab6da9ee177da81622dd069be77487374e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.0.0 CPython/3.12.4
|
Release files / pyvroomwheels-1.13.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | pyvroomwheels-1.13.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 3.1 MB |
| Tags | CPython 3.11 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
ad4a0ff4319471948506de10214d5a67e559d416fa37b4068acf498770d1f6d2
|
|
BLAKE2b-256 checksum How to use checksums |
14449c215d449c41ab6004ec54bb266bd41eff57b18a9311a213f9d687d79b77
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.0.0 CPython/3.12.4
|
Release files / pyvroomwheels-1.13.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | pyvroomwheels-1.13.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 2.8 MB |
| Tags | CPython 3.11 Linux glibc 2.17+ ARM64 |
|
SHA-256 checksum How to use checksums |
5db87ed409cdbb721793e526e1615eaca9f50b1da31ee524efce90209e1c6935
|
|
BLAKE2b-256 checksum How to use checksums |
1056072c5dd0d48db7dfbb503aa36780679b4029fea140c470f1b0ec0a6e5476
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.0.0 CPython/3.12.4
|
Release files / pyvroomwheels-1.13.5-cp311-cp311-macosx_14_0_arm64.whl
| Download URL | pyvroomwheels-1.13.5-cp311-cp311-macosx_14_0_arm64.whl |
|---|---|
| Size | 3.3 MB |
| Tags | CPython 3.11 macOS 14.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
44ac16a1f64ccf6a559fc1b32d70aa1e7364a9336f406cba6f15c92ff25e245b
|
|
BLAKE2b-256 checksum How to use checksums |
00efd810c35177dd7e2e5d72e36daaf54ae110efe21bb5650da91fc628c53463
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.0.0 CPython/3.12.4
|
Release files / pyvroomwheels-1.13.5-cp310-cp310-win_amd64.whl
| Download URL | pyvroomwheels-1.13.5-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 1.7 MB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
90171fd40aee28efbfcfb0d43719a99db035aa22cd3dfa6caa3fdcc223c85fac
|
|
BLAKE2b-256 checksum How to use checksums |
baa53cc774a6523bdc647631ff112c6c7a2410acb9aad3d07bd11aabb8cbfc87
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.0.0 CPython/3.12.4
|
Release files / pyvroomwheels-1.13.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | pyvroomwheels-1.13.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 3.1 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
b6cee98bc21035635183c9bb8a5f121410dc97bc63f09eaf0c037b9d7846cc14
|
|
BLAKE2b-256 checksum How to use checksums |
4b6996ecbfdb0c8254fdfb7da4e5e580d3b62ec9b5eb47265036ec91132eb349
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.0.0 CPython/3.12.4
|
Release files / pyvroomwheels-1.13.5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | pyvroomwheels-1.13.5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 2.8 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ ARM64 |
|
SHA-256 checksum How to use checksums |
a840754533bfaa6e7819e7a70d335439a0366c573fb5a01f389f2dab28b237eb
|
|
BLAKE2b-256 checksum How to use checksums |
ff0166a7f3e759394c1bff5977fb9bf75f4486bffcc72362a04541cec97347ed
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.0.0 CPython/3.12.4
|
Release files / pyvroomwheels-1.13.5-cp310-cp310-macosx_14_0_arm64.whl
| Download URL | pyvroomwheels-1.13.5-cp310-cp310-macosx_14_0_arm64.whl |
|---|---|
| Size | 3.3 MB |
| Tags | CPython 3.10 macOS 14.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
a9fa1177c089a5e04d15ca2d394c67a3c21f22b90349dded290c0bbbd28e78f1
|
|
BLAKE2b-256 checksum How to use checksums |
e2a3e49d7bee1b14bfa675bd60b24dfc2dc0972a43960085381e8b51a3c632f3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.0.0 CPython/3.12.4
|
Release files / pyvroomwheels-1.13.5-cp39-cp39-win_amd64.whl
| Download URL | pyvroomwheels-1.13.5-cp39-cp39-win_amd64.whl |
|---|---|
| Size | 1.7 MB |
| Tags | CPython 3.9 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
f58143efd44d5034c2b7ffff99f9dd236464ac5d0e0f2eb251b1c5c17efd5d5a
|
|
BLAKE2b-256 checksum How to use checksums |
4ace385a3811c2fa2bf3a6089b7bd89795525a7bd14111bca06b95a1acdf5d33
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.0.0 CPython/3.12.4
|
Release files / pyvroomwheels-1.13.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | pyvroomwheels-1.13.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 3.1 MB |
| Tags | CPython 3.9 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
6b1338314f0ff661692955adf88cc5dd8da50ed98e2e4adad499374a84a7583d
|
|
BLAKE2b-256 checksum How to use checksums |
a657d096200067026f67752d0404d24822dfd1785aa88d63e0b272825b030359
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.0.0 CPython/3.12.4
|
Release files / pyvroomwheels-1.13.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | pyvroomwheels-1.13.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 2.8 MB |
| Tags | CPython 3.9 Linux glibc 2.17+ ARM64 |
|
SHA-256 checksum How to use checksums |
a3a3207db1a4f432f2e1dd2d967dd53d540f42e8a192b181664d4a2d5a3d52ff
|
|
BLAKE2b-256 checksum How to use checksums |
f14c9546f77e97fd9974ef82a9c446fed767c5415e7ac1b8ea52bf720b551532
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.0.0 CPython/3.12.4
|
Release files / pyvroomwheels-1.13.5-cp39-cp39-macosx_14_0_arm64.whl
| Download URL | pyvroomwheels-1.13.5-cp39-cp39-macosx_14_0_arm64.whl |
|---|---|
| Size | 3.3 MB |
| Tags | CPython 3.9 macOS 14.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
574b5d591583fbd03644d1ff4889f0a4d448072cad2d4cfd24328967fb20118a
|
|
BLAKE2b-256 checksum How to use checksums |
72df3fdd168d9151c72bb206e7b67e6b0e63791bc33dc0ba09ae716c7bc3f80e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.0.0 CPython/3.12.4
|
Release files / pyvroomwheels-1.13.5-cp38-cp38-win_amd64.whl
| Download URL | pyvroomwheels-1.13.5-cp38-cp38-win_amd64.whl |
|---|---|
| Size | 1.7 MB |
| Tags | CPython 3.8 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
80bb21a88c8e044c23955b0e029c6af1f957104ffe217a46e73c0a222ee944da
|
|
BLAKE2b-256 checksum How to use checksums |
6c5a9062a5ed4976beec71e21d1931036ee271c36d9388b8a2ec9cbeb5b50247
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.0.0 CPython/3.12.4
|
Release files / pyvroomwheels-1.13.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | pyvroomwheels-1.13.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 3.1 MB |
| Tags | CPython 3.8 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
f6e255886d7919079f709cc816e79660e6c233514c8dc58e920085e61ce0f22f
|
|
BLAKE2b-256 checksum How to use checksums |
5d0c30aae1aae169927ed734be60e89d15801bcf7151b1b275befbe7ba8f8f10
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.0.0 CPython/3.12.4
|
Release files / pyvroomwheels-1.13.5-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | pyvroomwheels-1.13.5-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 2.8 MB |
| Tags | CPython 3.8 Linux glibc 2.17+ ARM64 |
|
SHA-256 checksum How to use checksums |
23381c71ef26ebe5472ef8c7d33f5485bf7655924b5bb83b014cb1bffe12a149
|
|
BLAKE2b-256 checksum How to use checksums |
af75084a12c7f1f6bf30972fc383c191c648026459dc8b5b704dfb2fc8142b24
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.0.0 CPython/3.12.4
|
Release files / pyvroomwheels-1.13.5-cp38-cp38-macosx_14_0_arm64.whl
| Download URL | pyvroomwheels-1.13.5-cp38-cp38-macosx_14_0_arm64.whl |
|---|---|
| Size | 3.3 MB |
| Tags | CPython 3.8 macOS 14.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
42783c14ae585faabcda00bc260a2b6decc8a2f31bb48d30060ed291cdcf2bd6
|
|
BLAKE2b-256 checksum How to use checksums |
4baa17521653aff88945c80d6212a74501b25b6ed4447c7f5304280289fd8dbf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.0.0 CPython/3.12.4
|
Release files / pyvroomwheels-1.13.5-cp37-cp37m-win_amd64.whl
| Download URL | pyvroomwheels-1.13.5-cp37-cp37m-win_amd64.whl |
|---|---|
| Size | 1.7 MB |
| Tags | CPython 3.7 CPython 3.7 pymalloc Windows x86-64 |
|
SHA-256 checksum How to use checksums |
3f0b09a369877b739cde2487909dba0c414fea2f575993dd3748940c43d2f9fa
|
|
BLAKE2b-256 checksum How to use checksums |
1da5b857acaebdf83d93a25115464675baa9e84be05fafa71020496520a650c1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.0.0 CPython/3.12.4
|
Release files / pyvroomwheels-1.13.5-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | pyvroomwheels-1.13.5-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 3.1 MB |
| Tags | CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
7eddf010565a6bdb5de066d5e30c7bcab8683ff6308e1a50aa160d421d654cfe
|
|
BLAKE2b-256 checksum How to use checksums |
665b81afe1dcb6d929c0e50ca654449cc23730f786362fb89bba8889bb410c06
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.0.0 CPython/3.12.4
|
Release files / pyvroomwheels-1.13.5-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | pyvroomwheels-1.13.5-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 2.8 MB |
| Tags | CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.17+ ARM64 |
|
SHA-256 checksum How to use checksums |
c7c651220922d8023a6d59d1523f571e277d7064cd091c2a87c3d496b31b694e
|
|
BLAKE2b-256 checksum How to use checksums |
9e5b79baa69c17588f6fe7eba7e48690d39152d23d10722ebe4352d0b8127624
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.0.0 CPython/3.12.4
|
Security for pyvroomwheels 1.13.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.