NVIDIA / NVIDIA/cuopt

Generate cuopt_routing.proto and VRP mapper via field_registry codegen

Open
#1,616 5 comments 0 reactions 1 assignee View on GitHub

@aliceb-nv is already working on this.

Since Jul 24, 2026.

awaiting response
Dominant language
Cuda
Stars
1k
Forks
233
Avg merge
4d 4h
Merged PRs (30d)
95

Description

Summary

Bring VRP under the gRPC field_registry codegen so cpp/src/grpc/cuopt_routing.proto and the proto ↔ cpu_routing_problem_t conversion are generated (like the math-opt LP/MIP protos), replacing the hand-authored proto and the ~377-line hand-written cpp/src/grpc/grpc_routing_problem_mapper.cpp.

Follow-up to #1597, where this was intentionally deferred to keep that PR focused/landable (see thread).

Scope
  • Model the routing messages in field_registry.yaml: RoutingProblem, RoutingSolverSettings, RoutingSolution, and sub-messages (CostMatrix, CapacityDimension, VehicleBreak/PerVehicleBreaks/UniformBreakDimension, MatchEntry, PrecedenceEntry, ServiceTimeEntry, RoutingObjectiveFunction, InitialSolution).
  • Generate cuopt_routing.proto from the registry and delete the hand-authored file.
  • Generate the proto ↔ cpu_routing_problem_t conversion and delete grpc_routing_problem_mapper.cpp.
  • Extend ci/verify_grpc_codegen.sh coverage to the routing proto/mapper.
Known blockers / considerations
  • The routing sub-messages fit the existing repeated_messages mechanism (cf. quadratic_constraints in field_registry.yaml).
  • No proto3 map<> support in generate_conversions.py yet — RoutingSolution.objective_values is map<int32, double>. Either add map support to the generator or model it as parallel repeated key/value arrays.
  • The current mapper has bespoke logic that doesn't fully fit the array-id chunked model: cost-matrix grouping by vehicle_type, capacity dimensions (name + demand + capacity), per-vehicle service times (vehicle_id = -1 default), PDP pickup/delivery indices, breaks, vehicle/order matching, precedence, and initial solutions.

🤖 Generated with Claude Code

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.