GRID
GRID (Graph-based modelling Interface for Domain-Independent Dynamic Programming) is a Python interface for high-level, declarative modelling of Vehicle Routing Problems on top of Domain-Independent Dynamic Programming (DIDP).
A routing problem is described as a directed graph of nodes, edges, and vehicle types. Routing requirements are configured either through native features (predefined attributes with built-in semantics covering common VRP variants such as CVRP, VRPTW, and PDPTW) or through custom features (user-defined variables and expressions for variants beyond the native catalogue, such as the Electric CVRP). GRID compiles the resulting model to a DyPDL model and solves it with a DIDP solver.
GRID was introduced at CP 2026; see Citation for details.
Installation
GRID requires Python >= 3.10 and is available on PyPI:
pip install pygridopt
The dependencies (DIDPPy, NetworkX, and NumPy) are installed automatically.
Example
A minimal Capacitated VRP with three customers, two vehicles of capacity 10, and a fully connected symmetric graph:
import grid
demands = {1: 3, 2: 5, 3: 2}
distances = {
(0, 1): 4, (0, 2): 6, (0, 3): 5,
(1, 2): 3, (1, 3): 7, (2, 3): 4,
}
distances.update({(j, i): d for (i, j), d in distances.items()})
model = grid.RoutingModel()
model.add_vehicle_type(id=0, count=2, capacity=10)
model.add_node(id=0, depot=True)
for customer, demand in demands.items():
model.add_node(id=customer, demand=demand)
for (i, j), d in distances.items():
model.add_edge(
node_from=model.get_node(i),
node_to=model.get_node(j),
distance=d,
)
model.set_objective(metric="distance")
result = model.solve(solver="CABS", time_limit=10)
print(f"Optimal: {result['Optimal']}")
print(f"Cost: {result['Cost']}")
print(f"Routes: {result['Solution']}")
Documentation
The documentation is available at pygridopt.readthedocs.io. It includes a quickstart, a guide to native and custom features with worked PDPTW and ECVRP examples, and an API reference.
Citation
If you use GRID in your research, please cite:
@InProceedings{giordana_et_al:LIPIcs.CP.2026.26,
author = {Giordana, Fabio and Kiziltan, Zeynep and Kuroiwa, Ryo},
title = {{GRID: Graph-Based Modelling Interface for Domain-Independent Dynamic Programming}},
booktitle = {32nd International Conference on Principles and Practice of Constraint Programming (CP 2026)},
pages = {26:1--26:23},
series = {Leibniz International Proceedings in Informatics (LIPIcs)},
ISBN = {978-3-95977-432-1},
ISSN = {1868-8969},
year = {2026},
volume = {379},
editor = {Beldiceanu, Nicolas},
publisher = {Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
address = {Dagstuhl, Germany},
URL = {https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.CP.2026.26},
URN = {urn:nbn:de:0030-drops-266584},
doi = {10.4230/LIPIcs.CP.2026.26},
annote = {Keywords: Modelling \& Modelling Languages, Dynamic Programming}
}
License
GRID is distributed under the Apache License 2.0.
Metadata
Release files for pygridopt 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pygridopt-0.0.4.tar.gz | 34.3 kB | Without provenance | Details for pygridopt-0.0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pygridopt-0.0.4-py3-none-any.whl | Python 3 | none | any | Details for pygridopt-0.0.4-py3-none-any.whl |
Total release size: 71.5 kB
Release files / pygridopt-0.0.4.tar.gz
| Download URL | pygridopt-0.0.4.tar.gz |
|---|---|
| Size | 34.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3a616c31dda5cfe1253a927252c4044e6b9f7ca1644686f0605ed65d201ab628
|
|
BLAKE2b-256 checksum How to use checksums |
5e3c5b6673a7ba06cbf2bfcdf600f53eb0d8aed3d14083e36838b018ed590557
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.5
|
Release files / pygridopt-0.0.4-py3-none-any.whl
| Download URL | pygridopt-0.0.4-py3-none-any.whl |
|---|---|
| Size | 37.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
99ff04e2c3d769853490289212f2de5d4ec1a5097382e07fa80dda37288d5d0a
|
|
BLAKE2b-256 checksum How to use checksums |
e1db1198ecfb57859ed4ac3336db4f7005eeb708598e25f91d13586f6bd5aef3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.5
|
Security for pygridopt 0.0.4
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.