Generate cuopt_routing.proto and VRP mapper via field_registry codegen
Open
@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.protofrom the registry and delete the hand-authored file. - Generate the proto ↔
cpu_routing_problem_tconversion and deletegrpc_routing_problem_mapper.cpp. - Extend
ci/verify_grpc_codegen.shcoverage to the routing proto/mapper.
Known blockers / considerations
- The routing sub-messages fit the existing
repeated_messagesmechanism (cf.quadratic_constraintsinfield_registry.yaml). - No proto3
map<>support ingenerate_conversions.pyyet —RoutingSolution.objective_valuesismap<int32, double>. Either add map support to the generator or model it as parallelrepeatedkey/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 = -1default), PDP pickup/delivery indices, breaks, vehicle/order matching, precedence, and initial solutions.
🤖 Generated with Claude Code
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.