Skip to content

refactor(routing): standardize cost terminology - #1299

Open
Juan-Francisco-Robles wants to merge 29 commits into
NVIDIA:mainfrom
ogaai:routing-cost-standarization
Open

refactor(routing): standardize cost terminology#1299
Juan-Francisco-Robles wants to merge 29 commits into
NVIDIA:mainfrom
ogaai:routing-cost-standarization

Conversation

@Juan-Francisco-Robles

Copy link
Copy Markdown

Description

Summary

This PR standardizes naming across the routing package by replacing
distance terminology with cost terminology wherever the value
represents the generic cuOpt cost matrix rather than a physical distance.

The change improves semantic consistency across routing internals and
aligns the implementation with the existing data_model_view.hpp
documentation, which already describes the cost matrix as supporting
arbitrary user-defined metrics (e.g. time, miles, meters, euros, or
other real-valued costs).

All changes are limited to the routing package and do not modify
optimization behavior.

Changes Made

  • Renamed distance-related routing helpers, variables, and types to
    cost-based equivalents where appropriate.

  • Replaced:

    • distance_dimcost_dim
    • distance_node_tcost_node_t
    • distance_route_tcost_route_t
  • Renamed:

    • distance_node.cuhcost_node.cuh
    • distance_route.cuhcost_route.cuh
  • Updated all dependent routing internals and local-search consumers.

  • Adjusted wording in data_model_view.hpp to consistently refer to
    generic optimization costs rather than physical distance.

Scope

Affected components include:

  • routing node and route helpers
  • local search internals
  • GES lexicographic search
  • diversity helpers/macros
  • routing problem internals
  • utility kernels

Impact

  • No behavioral or algorithmic changes
  • No optimization-result changes
  • Purely semantic/cosmetic refactor
  • Improves clarity and maintainability
  • Better separates generic optimization costs from physical distance concepts

Validation

  • Project builds successfully
  • Existing routing tests pass

Notes

This change touches internal routing identifiers and file names.
Downstream branches using the old distance_* internal symbols may
require rebasing or reference updates.

Issue

N/A

Checklist

  • I am familiar with the Contributing Guidelines.
  • Testing
    • New or existing tests cover these changes
    • Added tests
    • Created an issue to follow-up
    • NA
  • Documentation
    • The documentation is up to date with these changes
    • Added new documentation
    • NA

All files referenced in this commit are part of the routing package of the
cuOpt library.

Replace distance naming with cost naming where the value represents the cuOpt
cost matrix rather than physical distance. Rename distance route/node helpers
to cost counterparts and update routing internals that consume those types.

Affected routing files:
- cpp/include/cuopt/routing/data_model_view.hpp
- cpp/src/routing/arc_value.hpp
- cpp/src/routing/dimensions.cuh
- cpp/src/routing/diversity/helpers.hpp
- cpp/src/routing/diversity/macros.hpp
- cpp/src/routing/ges/lexicographic_search/lexicographic_search.cu
- cpp/src/routing/ges/lexicographic_search/node_stack.cuh
- cpp/src/routing/local_search/compute_compatible.cu
- cpp/src/routing/local_search/permutation_helper.cuh
- cpp/src/routing/local_search/sliding_tsp.cu
- cpp/src/routing/local_search/sliding_window.cu
- cpp/src/routing/local_search/two_opt.cu
- cpp/src/routing/local_search/vrp/fragment_kernels.cuh
- cpp/src/routing/local_search/vrp/vrp_search.cu
- cpp/src/routing/node/cost_node.cuh
- cpp/src/routing/node/node.cuh
- cpp/src/routing/problem/problem.cu
- cpp/src/routing/route/cost_route.cuh
- cpp/src/routing/route/dimensions_route.cuh
- cpp/src/routing/route/mismatch_route.cuh
- cpp/src/routing/route/prize_route.cuh
- cpp/src/routing/route/service_time_route.cuh
- cpp/src/routing/route/tasks_route.cuh
- cpp/src/routing/route/vehicle_fixed_cost_route.cuh
- cpp/src/routing/util_kernels/set_nodes_data.cuh

This improves clarity without changing route optimization behavior.

Signed-off-by: Juan Francisco Robles <juanfrancisco.robles@oga.ai>
@copy-pr-bot

copy-pr-bot Bot commented May 26, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@coderabbitai

coderabbitai Bot commented May 26, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 9c74556c-3058-42f9-bb3a-31e3f51a153c

📥 Commits

Reviewing files that changed from the base of the PR and between 361d41f and f08648c.

📒 Files selected for processing (28)
  • cpp/include/cuopt/routing/data_model_view.hpp
  • cpp/src/routing/arc_value.hpp
  • cpp/src/routing/dimensions.cuh
  • cpp/src/routing/diversity/helpers.hpp
  • cpp/src/routing/diversity/macros.hpp
  • cpp/src/routing/ges/lexicographic_search/lexicographic_search.cu
  • cpp/src/routing/ges/lexicographic_search/node_stack.cuh
  • cpp/src/routing/local_search/compute_compatible.cu
  • cpp/src/routing/local_search/permutation_helper.cuh
  • cpp/src/routing/local_search/sliding_tsp.cu
  • cpp/src/routing/local_search/sliding_window.cu
  • cpp/src/routing/local_search/two_opt.cu
  • cpp/src/routing/local_search/vrp/fragment_kernels.cuh
  • cpp/src/routing/local_search/vrp/vrp_search.cu
  • cpp/src/routing/node/cost_node.cuh
  • cpp/src/routing/node/node.cuh
  • cpp/src/routing/problem/problem.cu
  • cpp/src/routing/route/cost_route.cuh
  • cpp/src/routing/route/dimensions_route.cuh
  • cpp/src/routing/route/distance_route.cuh
  • cpp/src/routing/route/mismatch_route.cuh
  • cpp/src/routing/route/prize_route.cuh
  • cpp/src/routing/route/service_time_route.cuh
  • cpp/src/routing/route/tasks_route.cuh
  • cpp/src/routing/route/vehicle_fixed_cost_route.cuh
  • cpp/src/routing/util_kernels/set_nodes_data.cuh
  • cpp/tests/routing/CMakeLists.txt
  • cpp/tests/routing/unit_tests/cost_boundary_initialization.cu
💤 Files with no reviewable changes (1)
  • cpp/src/routing/route/distance_route.cuh
🚧 Files skipped from review as they are similar to previous changes (26)
  • cpp/src/routing/util_kernels/set_nodes_data.cuh
  • cpp/tests/routing/CMakeLists.txt
  • cpp/src/routing/route/prize_route.cuh
  • cpp/src/routing/local_search/vrp/vrp_search.cu
  • cpp/src/routing/problem/problem.cu
  • cpp/src/routing/local_search/permutation_helper.cuh
  • cpp/src/routing/route/tasks_route.cuh
  • cpp/src/routing/dimensions.cuh
  • cpp/src/routing/route/vehicle_fixed_cost_route.cuh
  • cpp/src/routing/local_search/two_opt.cu
  • cpp/include/cuopt/routing/data_model_view.hpp
  • cpp/src/routing/route/mismatch_route.cuh
  • cpp/src/routing/diversity/helpers.hpp
  • cpp/tests/routing/unit_tests/cost_boundary_initialization.cu
  • cpp/src/routing/diversity/macros.hpp
  • cpp/src/routing/local_search/compute_compatible.cu
  • cpp/src/routing/local_search/vrp/fragment_kernels.cuh
  • cpp/src/routing/route/dimensions_route.cuh
  • cpp/src/routing/route/service_time_route.cuh
  • cpp/src/routing/local_search/sliding_window.cu
  • cpp/src/routing/node/node.cuh
  • cpp/src/routing/arc_value.hpp
  • cpp/src/routing/route/cost_route.cuh
  • cpp/src/routing/node/cost_node.cuh
  • cpp/src/routing/ges/lexicographic_search/node_stack.cuh
  • cpp/src/routing/local_search/sliding_tsp.cu

📝 Walkthrough

Walkthrough

Refactors routing to use a COST primary dimension across enums, dispatch, node and route storage, local-search calculations, shared-memory buffers, initialization, documentation, and CUDA tests.

Changes

Dimension System and Local Search Refactoring

Layer / File(s) Summary
Dimension dispatch and cost storage
cpp/src/routing/dimensions.cuh, cpp/src/routing/arc_value.hpp, cpp/src/routing/node/*, cpp/src/routing/route/*
Renames the primary dimension to COST, replaces distance node and route types with cost types, and updates dimension-to-storage mappings.
Problem setup and search dimension wiring
cpp/src/routing/problem/problem.cu, cpp/src/routing/ges/lexicographic_search/*
Problem classification, feasibility checks, node-stack storage, shared-memory sizing, and buffered arc validation now use cost dimensions.
Local-search cost calculations
cpp/src/routing/local_search/*
Fragment updates, candidate sorting, sliding TSP evaluation, reverse-cost accumulation, and two-opt calculations now use cost fields and COST arcs.
Cost boundary initialization and validation
cpp/src/routing/util_kernels/set_nodes_data.cuh, cpp/tests/routing/*
Route endpoint initialization clears COST values. New VRP and PDP CUDA tests verify forward and backward cost boundaries.
Terminology and metadata updates
cpp/include/cuopt/routing/data_model_view.hpp, cpp/src/routing/diversity/*, cpp/src/routing/route/*
Documentation uses cost-specific terminology, and affected source files update copyright years.

Estimated code review effort: 4 (Complex) | ~45 minutes

Suggested reviewers: tmckayus

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 4.35% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the routing terminology refactor from distance to cost.
Description check ✅ Passed The description accurately explains the cost terminology changes, scope, impact, and validation for the routing refactor.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 7

🧹 Nitpick comments (4)
cpp/src/routing/local_search/vrp/vrp_search.cu (1)

22-40: 💤 Low value

Consider renaming compute_reverse_distances to compute_reverse_costs for terminology consistency.

The kernel now computes and stores values in cost_dim.reverse_cost using dim_t::COST, but the function name still references "distances". This is a minor inconsistency that could be addressed as a follow-up.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@cpp/src/routing/local_search/vrp/vrp_search.cu` around lines 22 - 40, Rename
the kernel compute_reverse_distances to compute_reverse_costs to match the fact
it computes cost_dim.reverse_cost using dim_t::COST; update all references and
declarations (e.g., the kernel definition template<typename i_t, typename f_t,
request_t REQUEST> __global__ void compute_reverse_distances(typename
solution_t<i_t, f_t, REQUEST>::view_t solution) and any kernel launches) and
ensure the symbol name change is reflected where
route.dimensions.cost_dim.reverse_cost and
get_arc_of_dimension<i_t,f_t,dim_t::COST> are used so callers and tests compile
against compute_reverse_costs.
cpp/src/routing/ges/lexicographic_search/lexicographic_search.cu (2)

391-396: 💤 Low value

Minor: Same naming inconsistency as above.

The variable is_delivery_time_dist_feasible at line 392 should also be renamed for consistency.

Suggested rename
           if (forward_feasible) {
-            bool is_delivery_time_dist_feasible =
+            bool is_delivery_time_cost_feasible =
               node_stack.delivery_node.time_dim.forward_feasible(
                 node_stack.s_route.vehicle_info()) &&
               node_stack.delivery_node.cost_dim.forward_feasible(node_stack.s_route.vehicle_info());
-            if (!is_delivery_time_dist_feasible) {
+            if (!is_delivery_time_cost_feasible) {
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@cpp/src/routing/ges/lexicographic_search/lexicographic_search.cu` around
lines 391 - 396, Rename the local boolean is_delivery_time_dist_feasible to
match the naming used elsewhere (e.g., is_delivery_time_and_dist_feasible) for
consistency; update its declaration and all uses in the block where
node_stack.delivery_node.time_dim.forward_feasible(...) and
node_stack.delivery_node.cost_dim.forward_feasible(...) are checked (symbols:
node_stack, delivery_node, time_dim, cost_dim, forward_feasible, s_route,
vehicle_info) so the new name replaces the old one throughout that conditional.

311-316: 💤 Low value

Minor: Variable name is_delivery_time_dist_feasible is misleading after the refactor.

The variable now checks cost_dim instead of distance_dim, but the name still contains "dist". Consider renaming to is_delivery_time_cost_feasible for clarity.

Suggested rename
           if (is_forward_feasible) {
-            bool is_delivery_time_dist_feasible =
+            bool is_delivery_time_cost_feasible =
               node_stack.delivery_node.time_dim.forward_feasible(
                 node_stack.s_route.vehicle_info()) &&
               node_stack.delivery_node.cost_dim.forward_feasible(node_stack.s_route.vehicle_info());
-            if (!is_delivery_time_dist_feasible) {
+            if (!is_delivery_time_cost_feasible) {
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@cpp/src/routing/ges/lexicographic_search/lexicographic_search.cu` around
lines 311 - 316, The variable name is_delivery_time_dist_feasible is misleading
because it now checks delivery_node.cost_dim rather than distance; rename it to
is_delivery_time_cost_feasible wherever declared and referenced (the boolean
assigned from
node_stack.delivery_node.time_dim.forward_feasible(node_stack.s_route.vehicle_info())
&&
node_stack.delivery_node.cost_dim.forward_feasible(node_stack.s_route.vehicle_info())
and the subsequent if (!...) check) so the identifier matches the checked
dimensions (refer to node_stack, delivery_node, time_dim, cost_dim, and
s_route.vehicle_info()) and update all usages accordingly.
cpp/src/routing/ges/lexicographic_search/node_stack.cuh (1)

213-218: 💤 Low value

Minor: Variable name shared_for_dist_buffers is now misleading.

The variable name still references "dist" but is now used for cost dimension buffer sizing.

Suggested rename
     if (solution_ptr->problem_ptr->dimensions_info.cost_dim.has_constraints()) {
-      const size_t shared_for_dist_buffers =
+      const size_t shared_for_cost_buffers =
         (2 + (max_neighbors<i_t, REQUEST>(k_max) + 1)) *
         (solution_ptr->get_max_active_nodes_for_all_routes() + 1) * sizeof(f_t);
-      sh_size += shared_for_dist_buffers;
+      sh_size += shared_for_cost_buffers;
     }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@cpp/src/routing/ges/lexicographic_search/node_stack.cuh` around lines 213 -
218, The local variable shared_for_dist_buffers is misnamed because it actually
sizes buffers for the cost dimension; rename it to something clearer like
shared_for_cost_buffers (or shared_for_cost_dim_buffers) where it's declared and
used in the block guarded by
solution_ptr->problem_ptr->dimensions_info.cost_dim.has_constraints(), and
update any references (e.g., the sh_size += shared_for_dist_buffers line) to the
new name so the intent (cost-dimension buffer sizing) is clear.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@cpp/src/routing/route/dimensions_route.cuh`:
- Around line 267-268: The comment above the `cost_dim` member is stale and
still says "distance route"; update that comment to reflect the correct
terminology (e.g., "cost route" or remove misleading problem-space reference)
next to the `cost_route_t<i_t, f_t> cost_dim;` declaration so the comment
matches the symbol name and coding guidelines about avoiding misleading
problem-space terms.

In `@cpp/src/routing/route/mismatch_route.cuh`:
- Line 141: The `@brief` on the helper that returns the shared-memory size is
misleadingly referring to a "cost route"; update the brief to state it computes
shared-memory size for a mismatch_route_t (the mismatch-route storage helper) so
the comment matches the actual type and purpose (refer to mismatch_route_t and
the shared-memory size helper in mismatch_route.cuh).

In `@cpp/src/routing/route/prize_route.cuh`:
- Line 151: Update the documentation comment for the shared-memory size helper
to use prize-specific wording: replace "cost route" with "prize route" (or
similar) in the `@brief` that documents the function associated with prize_route_t
(the helper that returns shared memory size for a route of given size), so the
comment matches the prize_route_t API and avoids confusion.

In `@cpp/src/routing/route/service_time_route.cuh`:
- Line 143: Update the documentation string so the `@brief` describes sizing
shared memory for service-time data rather than a "cost route": change the
phrase to reference service_time_route_t (or “service-time route”) and indicate
it returns the shared memory size required to store service-time data for a
route of a given size; update the comment above the function that computes
shared memory for service_time_route_t accordingly.

In `@cpp/src/routing/route/tasks_route.cuh`:
- Line 138: The doc comment for the shared-memory-size helper incorrectly calls
it a "cost route"; update the `@brief` to refer to tasks-route storage instead.
Locate the helper function that computes shared memory size for tasks_route_t
(reference symbol tasks_route_t and the shared-size helper function near its
comment) and replace "cost route" with "tasks-route" (or "tasks-route storage")
so the brief accurately describes that it returns the shared memory size
required to store a tasks_route_t of a given size.

In `@cpp/src/routing/route/vehicle_fixed_cost_route.cuh`:
- Line 107: Update the doc comment's `@brief` to explicitly reference "vehicle
fixed cost route" instead of the generic "cost route": replace "Get the shared
memory size required to store a cost route of a given size" with "Get the shared
memory size required to store a vehicle fixed cost route of a given size" in the
header comment above the vehicle_fixed_cost_route declarations so the API docs
clearly target the vehicle-fixed-cost route data.

In `@cpp/src/routing/util_kernels/set_nodes_data.cuh`:
- Around line 57-58: Add a unit/regression test that verifies COST boundary
initialization after route setup: exercise the route setup path that
constructs/populates a route, then assert route.template
get_dim<dim_t::COST>().cost_backward[n_nodes_route] == 0.f and route.template
get_dim<dim_t::COST>().cost_forward[0] == 0.f; place the test alongside existing
routing unit tests (matching the project's test patterns for .cpp/.cc/.cxx) and
name it to reflect "COST boundary initialization" so future changes to
get_dim<dim_t::COST>(), cost_backward, cost_forward or route initialization will
fail the test if regressions occur.

---

Nitpick comments:
In `@cpp/src/routing/ges/lexicographic_search/lexicographic_search.cu`:
- Around line 391-396: Rename the local boolean is_delivery_time_dist_feasible
to match the naming used elsewhere (e.g., is_delivery_time_and_dist_feasible)
for consistency; update its declaration and all uses in the block where
node_stack.delivery_node.time_dim.forward_feasible(...) and
node_stack.delivery_node.cost_dim.forward_feasible(...) are checked (symbols:
node_stack, delivery_node, time_dim, cost_dim, forward_feasible, s_route,
vehicle_info) so the new name replaces the old one throughout that conditional.
- Around line 311-316: The variable name is_delivery_time_dist_feasible is
misleading because it now checks delivery_node.cost_dim rather than distance;
rename it to is_delivery_time_cost_feasible wherever declared and referenced
(the boolean assigned from
node_stack.delivery_node.time_dim.forward_feasible(node_stack.s_route.vehicle_info())
&&
node_stack.delivery_node.cost_dim.forward_feasible(node_stack.s_route.vehicle_info())
and the subsequent if (!...) check) so the identifier matches the checked
dimensions (refer to node_stack, delivery_node, time_dim, cost_dim, and
s_route.vehicle_info()) and update all usages accordingly.

In `@cpp/src/routing/ges/lexicographic_search/node_stack.cuh`:
- Around line 213-218: The local variable shared_for_dist_buffers is misnamed
because it actually sizes buffers for the cost dimension; rename it to something
clearer like shared_for_cost_buffers (or shared_for_cost_dim_buffers) where it's
declared and used in the block guarded by
solution_ptr->problem_ptr->dimensions_info.cost_dim.has_constraints(), and
update any references (e.g., the sh_size += shared_for_dist_buffers line) to the
new name so the intent (cost-dimension buffer sizing) is clear.

In `@cpp/src/routing/local_search/vrp/vrp_search.cu`:
- Around line 22-40: Rename the kernel compute_reverse_distances to
compute_reverse_costs to match the fact it computes cost_dim.reverse_cost using
dim_t::COST; update all references and declarations (e.g., the kernel definition
template<typename i_t, typename f_t, request_t REQUEST> __global__ void
compute_reverse_distances(typename solution_t<i_t, f_t, REQUEST>::view_t
solution) and any kernel launches) and ensure the symbol name change is
reflected where route.dimensions.cost_dim.reverse_cost and
get_arc_of_dimension<i_t,f_t,dim_t::COST> are used so callers and tests compile
against compute_reverse_costs.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: bbf9b4f5-5897-4bb3-90ca-5f578d66d74e

📥 Commits

Reviewing files that changed from the base of the PR and between 6d0433a and ff66723.

📒 Files selected for processing (26)
  • cpp/include/cuopt/routing/data_model_view.hpp
  • cpp/src/routing/arc_value.hpp
  • cpp/src/routing/dimensions.cuh
  • cpp/src/routing/diversity/helpers.hpp
  • cpp/src/routing/diversity/macros.hpp
  • cpp/src/routing/ges/lexicographic_search/lexicographic_search.cu
  • cpp/src/routing/ges/lexicographic_search/node_stack.cuh
  • cpp/src/routing/local_search/compute_compatible.cu
  • cpp/src/routing/local_search/permutation_helper.cuh
  • cpp/src/routing/local_search/sliding_tsp.cu
  • cpp/src/routing/local_search/sliding_window.cu
  • cpp/src/routing/local_search/two_opt.cu
  • cpp/src/routing/local_search/vrp/fragment_kernels.cuh
  • cpp/src/routing/local_search/vrp/vrp_search.cu
  • cpp/src/routing/node/cost_node.cuh
  • cpp/src/routing/node/node.cuh
  • cpp/src/routing/problem/problem.cu
  • cpp/src/routing/route/cost_route.cuh
  • cpp/src/routing/route/dimensions_route.cuh
  • cpp/src/routing/route/distance_route.cuh
  • cpp/src/routing/route/mismatch_route.cuh
  • cpp/src/routing/route/prize_route.cuh
  • cpp/src/routing/route/service_time_route.cuh
  • cpp/src/routing/route/tasks_route.cuh
  • cpp/src/routing/route/vehicle_fixed_cost_route.cuh
  • cpp/src/routing/util_kernels/set_nodes_data.cuh
💤 Files with no reviewable changes (1)
  • cpp/src/routing/route/distance_route.cuh

Comment thread cpp/src/routing/route/dimensions_route.cuh Outdated
Comment thread cpp/src/routing/route/mismatch_route.cuh Outdated
Comment thread cpp/src/routing/route/prize_route.cuh Outdated
Comment thread cpp/src/routing/route/service_time_route.cuh Outdated
Comment thread cpp/src/routing/route/tasks_route.cuh Outdated
Comment thread cpp/src/routing/route/vehicle_fixed_cost_route.cuh Outdated
Comment thread cpp/src/routing/util_kernels/set_nodes_data.cuh

@rg20 rg20 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR.

I have minor comments, these already caught by coderabbit

@@ -265,7 +265,7 @@ class dimensions_route_t {
request_route_t<i_t, f_t, REQUEST> requests;

// distance route

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// distance route
// cost route

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @rg20 for pointing this out. This modification was not correctly applied during the standardization process carried out in this PR. Issue resolved in commit:
refactor(routing): update distance reference comments in routing files.


/**
* @brief Get the shared memory size required to store a distance route of a given size
* @brief Get the shared memory size required to store a cost route of a given size

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* @brief Get the shared memory size required to store a cost route of a given size
* @brief Get the shared memory size required to store a mismatch route of a given size

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As done in the previous issue, this one has been also resolved in commit:
refactor(routing): update distance reference comments in routing files.

Comment thread cpp/src/routing/route/prize_route.cuh Outdated

/**
* @brief Get the shared memory size required to store a distance route of a given size
* @brief Get the shared memory size required to store a cost route of a given size

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* @brief Get the shared memory size required to store a cost route of a given size
* @brief Get the shared memory size required to store a prize route of a given size

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolved in commit:
refactor(routing): update distance reference comments in routing files.


/**
* @brief Get the shared memory size required to store a distance route of a given size
* @brief Get the shared memory size required to store a cost route of a given size

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* @brief Get the shared memory size required to store a cost route of a given size
* @brief Get the shared memory size required to store a service time route of a given size

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolved in commit:
refactor(routing): update distance reference comments in routing files.

Comment thread cpp/src/routing/route/tasks_route.cuh Outdated

/**
* @brief Get the shared memory size required to store a distance route of a given size
* @brief Get the shared memory size required to store a cost route of a given size

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* @brief Get the shared memory size required to store a cost route of a given size
* @brief Get the shared memory size required to store a tasks route of a given size

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolved in commit:
refactor(routing): update distance reference comments in routing files.


/**
* @brief Get the shared memory size required to store a distance route of a given size
* @brief Get the shared memory size required to store a cost route of a given size

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* @brief Get the shared memory size required to store a cost route of a given size
* @brief Get the shared memory size required to store a vehicle fixed cost route of a given size

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolved in commit:
refactor(routing): update distance reference comments in routing files.

@rg20 rg20 added improvement Improves an existing functionality non-breaking Introduces a non-breaking change labels May 26, 2026
@rg20 rg20 added this to the 26.08 milestone May 26, 2026
Modify comments related to distance references in dimensions, route, prize, service, tasks, and vehicle fixed files under /cpp/routing.

Signed-off-by: Juanfran-Robles <juanfrancisco.robles@oga.ai>
Cover VRP and PDP route setup by dirtying COST boundary buffers and verifying set_route_data resets cost_forward[0] and cost_backward[n]

Signed-off-by: Juanfran-Robles <juanfrancisco.robles@oga.ai>
@Juan-Francisco-Robles

Copy link
Copy Markdown
Author

All review comments have been addressed.
Added a routing test covering COST boundary initialization to ensure set_route_data correctly resets cost_forward[0] and cost_backward[n].
Ready for re-review.

@github-actions

Copy link
Copy Markdown

🔔 Hi @anandhkb, this pull request has had no activity for 7 days. Please update or let us know if it can be closed. Thank you!

If this is an "epic" issue, then please add the "epic" label to this issue.
If it is a PR and not ready for review, then please convert this to draft.
If you just want to switch off this notification, then use the "skip inactivity reminder" label.

@tmckayus

Copy link
Copy Markdown
Contributor

/ok to test ac4e9b4

@tmckayus

Copy link
Copy Markdown
Contributor

@josembd please see the error from check_style below. If you run the pre-commit hooks to fix the style errors, then the cpp build will run and we can get full test results.

If you are seeing this message in CI, reproduce locally with: pre-commit run --all-files.
To run pre-commit as part of git workflow, use pre-commit install.

@github-actions

github-actions Bot commented Jul 27, 2026

Copy link
Copy Markdown

CI Test Summary

✅ All 31 test job(s) passed.

Signed-off-by: Jose Maria Baca <josemaria.baca@oga.ai>
@josembd

josembd commented Jul 28, 2026

Copy link
Copy Markdown

Thanks for pointing this out, @tmckayus. The routing pre-commit issues have been fixed in 9f30942, and the relevant checks pass locally.

Could you please authorize CI for this SHA with /ok to test 9f309421?

@rg20
rg20 removed request for Bubullzz and yuwenchen95 July 28, 2026 15:49
@rg20

rg20 commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

/ok to test 9f30942

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

🔔 Hi @anandhkb @rg20, this pull request has had no activity for 7 days. Please update or let us know if it can be closed. Thank you!

If this is an "epic" issue, then please add the "epic" label to this issue.
If it is a PR and not ready for review, then please convert this to draft.
If you just want to switch off this notification, then use the "skip inactivity reminder" label.

@josembd

josembd commented Aug 6, 2026

Copy link
Copy Markdown

Hi @rg20, thanks for reviewing and approving the PR.

We noticed that this PR is still open in the 26.08 milestone, which is due today. Could you let us know whether anything else is needed from our side before it can be merged, such as updating the branch with the latest changes, rerunning the checks, or retargeting the PR to the release/26.08 branch?

We also have another contribution that introduces a separate feature, but its implementation depends on the changes introduced in this PR. More generally, for this and future contributions with technical dependencies between them, what workflow do you prefer? Should we wait until the prerequisite PR is merged before opening the dependent one, or is it acceptable to open it as a stacked PR in the meantime?

Since these are among our first contributions to cuOpt, we want to make sure we are following the workflow that is most convenient for the maintainers.

Thanks for your guidance.

@ramakrishnap-nv

Copy link
Copy Markdown
Collaborator

Hi @rg20, thanks for reviewing and approving the PR.

We noticed that this PR is still open in the 26.08 milestone, which is due today. Could you let us know whether anything else is needed from our side before it can be merged, such as updating the branch with the latest changes, rerunning the checks, or retargeting the PR to the release/26.08 branch?

We also have another contribution that introduces a separate feature, but its implementation depends on the changes introduced in this PR. More generally, for this and future contributions with technical dependencies between them, what workflow do you prefer? Should we wait until the prerequisite PR is merged before opening the dependent one, or is it acceptable to open it as a stacked PR in the meantime?

Since these are among our first contributions to cuOpt, we want to make sure we are following the workflow that is most convenient for the maintainers.

Thanks for your guidance.

Hi @Juan-Francisco-Robles,

Since the release is today, we normally don't merge any new PRs since there are chances of breakages. So I will move this to 26.10 version.

@ramakrishnap-nv ramakrishnap-nv modified the milestones: 26.08, 26.10 Aug 6, 2026
@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@github-actions

Copy link
Copy Markdown

🔔 Hi @anandhkb @rg20, this pull request has had no activity for 7 days. Please update or let us know if it can be closed. Thank you!

If this is an "epic" issue, then please add the "epic" label to this issue.
If it is a PR and not ready for review, then please convert this to draft.
If you just want to switch off this notification, then use the "skip inactivity reminder" label.

1 similar comment
@github-actions

Copy link
Copy Markdown

🔔 Hi @anandhkb @rg20, this pull request has had no activity for 7 days. Please update or let us know if it can be closed. Thank you!

If this is an "epic" issue, then please add the "epic" label to this issue.
If it is a PR and not ready for review, then please convert this to draft.
If you just want to switch off this notification, then use the "skip inactivity reminder" label.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Improves an existing functionality non-breaking Introduces a non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants