Vehicle routing open-source optimization machine (VROOM)
Project description
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/pyvroom
Install the Python dependencies:
pip install -r pyvroom/build-requirements.txt
Install 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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
File details
Details for the file pyvroomwheels-1.13.5-cp312-cp312-win_amd64.whl
.
File metadata
- Download URL: pyvroomwheels-1.13.5-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 1.7 MB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 841961cdfd0812c84544e291e6c8b9f1a821488258d3f3f20f98ba84dc73b6e5 |
|
MD5 | dc5090e21a777c30fa56b32d5c444cfd |
|
BLAKE2b-256 | 3ba033e8d6b1452d94fbe120819f29e428cefa26f97cc78ca050a3e13157c16b |
File details
Details for the file pyvroomwheels-1.13.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: pyvroomwheels-1.13.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 3.1 MB
- Tags: CPython 3.12, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 71cc7b9e9b138446638cadc5a5cd4d7582a31d1054f34d23ad0d17285d29de13 |
|
MD5 | 3a54666c0cea150af8c219466a9fc309 |
|
BLAKE2b-256 | f7eb9fff551a1a11f71f5afc0d44e66d8c7fc92ec8b90a67ecb61cd6e6bfd336 |
File details
Details for the file pyvroomwheels-1.13.5-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
.
File metadata
- Download URL: pyvroomwheels-1.13.5-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 2.8 MB
- Tags: CPython 3.12, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 70c3921b61aa2739ef5b22bd860b5ea9f719aa74206cab69b8d910b147d60026 |
|
MD5 | 071efded4474288c27c31813583a1df8 |
|
BLAKE2b-256 | 31f2a7bc6aec024098c661cf0d9156da3683829a20553f5301f3d442b5562290 |
File details
Details for the file pyvroomwheels-1.13.5-cp312-cp312-macosx_14_0_arm64.whl
.
File metadata
- Download URL: pyvroomwheels-1.13.5-cp312-cp312-macosx_14_0_arm64.whl
- Upload date:
- Size: 3.3 MB
- Tags: CPython 3.12, macOS 14.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 28bd262234e554f0c3c89ed630e7335b9f128e9b0bad4bd87f3b40f97998092d |
|
MD5 | 9a0b3949acac02a54e0e5012d2eff311 |
|
BLAKE2b-256 | 5df525a51510c88dbf1f8813eb32796617697ad272757c9b6075609e823f184c |
File details
Details for the file pyvroomwheels-1.13.5-cp311-cp311-win_amd64.whl
.
File metadata
- Download URL: pyvroomwheels-1.13.5-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 1.7 MB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ebf705d73cedf796f1bf0fe11cd84dab2df003d9919d0e769d9d639b082772c |
|
MD5 | 6e72ba92b138fd5ac89f829edcbfab20 |
|
BLAKE2b-256 | 23cec35ea19ec5a280fd4783fb31f0ab6da9ee177da81622dd069be77487374e |
File details
Details for the file pyvroomwheels-1.13.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: pyvroomwheels-1.13.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 3.1 MB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ad4a0ff4319471948506de10214d5a67e559d416fa37b4068acf498770d1f6d2 |
|
MD5 | c380c6d8558779ddd7c7bfee722adc03 |
|
BLAKE2b-256 | 14449c215d449c41ab6004ec54bb266bd41eff57b18a9311a213f9d687d79b77 |
File details
Details for the file pyvroomwheels-1.13.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
.
File metadata
- Download URL: pyvroomwheels-1.13.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 2.8 MB
- Tags: CPython 3.11, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5db87ed409cdbb721793e526e1615eaca9f50b1da31ee524efce90209e1c6935 |
|
MD5 | 3265ce4d09e8332c123ae883b80001c5 |
|
BLAKE2b-256 | 1056072c5dd0d48db7dfbb503aa36780679b4029fea140c470f1b0ec0a6e5476 |
File details
Details for the file pyvroomwheels-1.13.5-cp311-cp311-macosx_14_0_arm64.whl
.
File metadata
- Download URL: pyvroomwheels-1.13.5-cp311-cp311-macosx_14_0_arm64.whl
- Upload date:
- Size: 3.3 MB
- Tags: CPython 3.11, macOS 14.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 44ac16a1f64ccf6a559fc1b32d70aa1e7364a9336f406cba6f15c92ff25e245b |
|
MD5 | 605afa3877c85c91b4af01854853efe1 |
|
BLAKE2b-256 | 00efd810c35177dd7e2e5d72e36daaf54ae110efe21bb5650da91fc628c53463 |
File details
Details for the file pyvroomwheels-1.13.5-cp310-cp310-win_amd64.whl
.
File metadata
- Download URL: pyvroomwheels-1.13.5-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 1.7 MB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 90171fd40aee28efbfcfb0d43719a99db035aa22cd3dfa6caa3fdcc223c85fac |
|
MD5 | 140b4201d16bb1eed5b7c63254dfe83d |
|
BLAKE2b-256 | baa53cc774a6523bdc647631ff112c6c7a2410acb9aad3d07bd11aabb8cbfc87 |
File details
Details for the file pyvroomwheels-1.13.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: pyvroomwheels-1.13.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 3.1 MB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b6cee98bc21035635183c9bb8a5f121410dc97bc63f09eaf0c037b9d7846cc14 |
|
MD5 | 1cce5f45c442d75167aed5e1b0a0e3f7 |
|
BLAKE2b-256 | 4b6996ecbfdb0c8254fdfb7da4e5e580d3b62ec9b5eb47265036ec91132eb349 |
File details
Details for the file pyvroomwheels-1.13.5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
.
File metadata
- Download URL: pyvroomwheels-1.13.5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 2.8 MB
- Tags: CPython 3.10, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a840754533bfaa6e7819e7a70d335439a0366c573fb5a01f389f2dab28b237eb |
|
MD5 | 89330e2fda75a9ff39275f2bee78c1dc |
|
BLAKE2b-256 | ff0166a7f3e759394c1bff5977fb9bf75f4486bffcc72362a04541cec97347ed |
File details
Details for the file pyvroomwheels-1.13.5-cp310-cp310-macosx_14_0_arm64.whl
.
File metadata
- Download URL: pyvroomwheels-1.13.5-cp310-cp310-macosx_14_0_arm64.whl
- Upload date:
- Size: 3.3 MB
- Tags: CPython 3.10, macOS 14.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a9fa1177c089a5e04d15ca2d394c67a3c21f22b90349dded290c0bbbd28e78f1 |
|
MD5 | cf721a5c6dd38a6c0c6c6a591742e87f |
|
BLAKE2b-256 | e2a3e49d7bee1b14bfa675bd60b24dfc2dc0972a43960085381e8b51a3c632f3 |
File details
Details for the file pyvroomwheels-1.13.5-cp39-cp39-win_amd64.whl
.
File metadata
- Download URL: pyvroomwheels-1.13.5-cp39-cp39-win_amd64.whl
- Upload date:
- Size: 1.7 MB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f58143efd44d5034c2b7ffff99f9dd236464ac5d0e0f2eb251b1c5c17efd5d5a |
|
MD5 | d7df57b363b45adb4d13cb539c626b4d |
|
BLAKE2b-256 | 4ace385a3811c2fa2bf3a6089b7bd89795525a7bd14111bca06b95a1acdf5d33 |
File details
Details for the file pyvroomwheels-1.13.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: pyvroomwheels-1.13.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 3.1 MB
- Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6b1338314f0ff661692955adf88cc5dd8da50ed98e2e4adad499374a84a7583d |
|
MD5 | 177f92bab4d7a04ceacb81a3fc79fd10 |
|
BLAKE2b-256 | a657d096200067026f67752d0404d24822dfd1785aa88d63e0b272825b030359 |
File details
Details for the file pyvroomwheels-1.13.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
.
File metadata
- Download URL: pyvroomwheels-1.13.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 2.8 MB
- Tags: CPython 3.9, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a3a3207db1a4f432f2e1dd2d967dd53d540f42e8a192b181664d4a2d5a3d52ff |
|
MD5 | 2abc86a4d5c77656d27adacbd1efb506 |
|
BLAKE2b-256 | f14c9546f77e97fd9974ef82a9c446fed767c5415e7ac1b8ea52bf720b551532 |
File details
Details for the file pyvroomwheels-1.13.5-cp39-cp39-macosx_14_0_arm64.whl
.
File metadata
- Download URL: pyvroomwheels-1.13.5-cp39-cp39-macosx_14_0_arm64.whl
- Upload date:
- Size: 3.3 MB
- Tags: CPython 3.9, macOS 14.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 574b5d591583fbd03644d1ff4889f0a4d448072cad2d4cfd24328967fb20118a |
|
MD5 | 6ac3b7652b0a2241b46cba8b3b0307f1 |
|
BLAKE2b-256 | 72df3fdd168d9151c72bb206e7b67e6b0e63791bc33dc0ba09ae716c7bc3f80e |
File details
Details for the file pyvroomwheels-1.13.5-cp38-cp38-win_amd64.whl
.
File metadata
- Download URL: pyvroomwheels-1.13.5-cp38-cp38-win_amd64.whl
- Upload date:
- Size: 1.7 MB
- Tags: CPython 3.8, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 80bb21a88c8e044c23955b0e029c6af1f957104ffe217a46e73c0a222ee944da |
|
MD5 | 1aae92c06c9238c621a4842c88449982 |
|
BLAKE2b-256 | 6c5a9062a5ed4976beec71e21d1931036ee271c36d9388b8a2ec9cbeb5b50247 |
File details
Details for the file pyvroomwheels-1.13.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: pyvroomwheels-1.13.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 3.1 MB
- Tags: CPython 3.8, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f6e255886d7919079f709cc816e79660e6c233514c8dc58e920085e61ce0f22f |
|
MD5 | 32d0483cb6b7d9e6711f65b11616a0ee |
|
BLAKE2b-256 | 5d0c30aae1aae169927ed734be60e89d15801bcf7151b1b275befbe7ba8f8f10 |
File details
Details for the file pyvroomwheels-1.13.5-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
.
File metadata
- Download URL: pyvroomwheels-1.13.5-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 2.8 MB
- Tags: CPython 3.8, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 23381c71ef26ebe5472ef8c7d33f5485bf7655924b5bb83b014cb1bffe12a149 |
|
MD5 | 05bf5fb20b870dbb56a76d564b65f231 |
|
BLAKE2b-256 | af75084a12c7f1f6bf30972fc383c191c648026459dc8b5b704dfb2fc8142b24 |
File details
Details for the file pyvroomwheels-1.13.5-cp38-cp38-macosx_14_0_arm64.whl
.
File metadata
- Download URL: pyvroomwheels-1.13.5-cp38-cp38-macosx_14_0_arm64.whl
- Upload date:
- Size: 3.3 MB
- Tags: CPython 3.8, macOS 14.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 42783c14ae585faabcda00bc260a2b6decc8a2f31bb48d30060ed291cdcf2bd6 |
|
MD5 | b49fe8be2f97fbd345821ae686aca82f |
|
BLAKE2b-256 | 4baa17521653aff88945c80d6212a74501b25b6ed4447c7f5304280289fd8dbf |
File details
Details for the file pyvroomwheels-1.13.5-cp37-cp37m-win_amd64.whl
.
File metadata
- Download URL: pyvroomwheels-1.13.5-cp37-cp37m-win_amd64.whl
- Upload date:
- Size: 1.7 MB
- Tags: CPython 3.7m, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3f0b09a369877b739cde2487909dba0c414fea2f575993dd3748940c43d2f9fa |
|
MD5 | 09d80ba4631274354c70482b56901811 |
|
BLAKE2b-256 | 1da5b857acaebdf83d93a25115464675baa9e84be05fafa71020496520a650c1 |
File details
Details for the file pyvroomwheels-1.13.5-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: pyvroomwheels-1.13.5-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 3.1 MB
- Tags: CPython 3.7m, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7eddf010565a6bdb5de066d5e30c7bcab8683ff6308e1a50aa160d421d654cfe |
|
MD5 | 1556dd75bf071eec5dcf237fc7bbae37 |
|
BLAKE2b-256 | 665b81afe1dcb6d929c0e50ca654449cc23730f786362fb89bba8889bb410c06 |
File details
Details for the file pyvroomwheels-1.13.5-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
.
File metadata
- Download URL: pyvroomwheels-1.13.5-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 2.8 MB
- Tags: CPython 3.7m, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c7c651220922d8023a6d59d1523f571e277d7064cd091c2a87c3d496b31b694e |
|
MD5 | 5de565c09107f3e670306b779110f6bd |
|
BLAKE2b-256 | 9e5b79baa69c17588f6fe7eba7e48690d39152d23d10722ebe4352d0b8127624 |