cuopt-routing-api-python

Construct and solve VRP, TSP, and PDP problems with NVIDIA cuOpt Python routing API.

Updated May 23, 2026
One-click install
npx skills add https://github.com/yo-steven/skills-exploration-20260522 --skill cuopt-routing-api-python-yo-steven
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cuopt-routing-api-python
Source: https://github.com/yo-steven/skills-exploration-20260522/tree/main/skills/cuopt/cuopt-routing-api-python
Command: npx skills add https://github.com/yo-steven/skills-exploration-20260522 --skill cuopt-routing-api-python-yo-steven

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes assets (resource) components.

What problem does it solve?

It helps you build and solve vehicle routing problems (VRP, TSP, and PDP) in Python using NVIDIA cuOpt by structuring routing data and ensuring it’s consistent before you attempt to solve.

Core Features & Use Cases

  • Python API-only routing workflow: Create a cuOpt routing data model and solve it using the Python cuopt.routing interface (no C API workflow).
  • Problem setup validation via required components: Configure cost matrices, order locations, fleet sizing, and add the right optional inputs like time windows, capacities, pickup-delivery pairing, and precedence constraints.
  • Solution inspection and debugging: Retrieve status, routes, objective cost, error messages, and infeasible orders to guide iteration toward feasibility.

Quick Start

Confirm your problem type (VRP/TSP/PDP) and provide cost matrix plus order locations as typed cuDF objects, then create a DataModel, add the cost matrix, and call routing.Solve(dm, routing.SolverSettings()).

Frequently Asked Questions about cuopt-routing-api-python

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I solve a vehicle routing problem with time windows in Python?

To solve a vehicle routing problem with time windows in Python, build a cuOpt DataModel, add float32 cost matrices and int32 order locations as cuDF objects, configure fleet sizing and constraints, then call routing.Solve to produce routes.

What is needed to set up a pickup and delivery problem using cuOpt?

Setting up a pickup and delivery problem using cuOpt requires building a DataModel with typed cuDF inputs for cost matrices and order locations, then adding fleet configuration and pickup-delivery pairing constraints before solving.

Can I use cuOpt to solve VRP with only Python code?

Yes, you can solve VRP with only Python code by using the cuopt.routing Python interface to create a DataModel, add constraints like capacities and precedence, and call routing.Solve without needing the C API.

How do I check if my vehicle routing solution is feasible?

To check if your vehicle routing solution is feasible, inspect the solution status by calling solution.get_status(), which provides diagnostics including error messages, objective cost, and any infeasible orders to guide iteration.

Why does my cuOpt routing model return infeasible orders?

Your cuOpt routing model returns infeasible orders when constraint inputs like time windows, capacities, or precedence conflict with the fleet configuration, and you can retrieve these diagnostics via solution.get_status() to adjust the DataModel.