Skip to content

refactor(routing): standardize cost terminology#1299

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

refactor(routing): standardize cost terminology#1299
Juan-Francisco-Robles wants to merge 3 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 link
Copy Markdown

copy-pr-bot Bot commented May 26, 2026

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
Copy link
Copy Markdown

coderabbitai Bot commented May 26, 2026

Review Change Stack

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: d1e0cb46-8948-4445-bc6a-bd18bdb107d5

📥 Commits

Reviewing files that changed from the base of the PR and between ff66723 and 9e3e2ad.

📒 Files selected for processing (8)
  • 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/tests/routing/CMakeLists.txt
  • cpp/tests/routing/unit_tests/cost_boundary_initialization.cu
✅ Files skipped from review due to trivial changes (4)
  • cpp/src/routing/route/tasks_route.cuh
  • cpp/src/routing/route/mismatch_route.cuh
  • cpp/src/routing/route/service_time_route.cuh
  • cpp/src/routing/route/prize_route.cuh
🚧 Files skipped from review as they are similar to previous changes (2)
  • cpp/src/routing/route/vehicle_fixed_cost_route.cuh
  • cpp/src/routing/route/dimensions_route.cuh

📝 Walkthrough

Walkthrough

Refactors the routing primary dimension from "distance" to "cost": enums, dispatch helpers, node/route storage, local-search kernels, shared-memory layouts, Doxygen, and unit tests updated to use COST and cost_* buffers.

Changes

Dimension System and Local Search Refactoring

Layer / File(s) Summary
Core dimension enum and dispatch system
cpp/src/routing/dimensions.cuh, cpp/src/routing/arc_value.hpp, cpp/include/cuopt/routing/data_model_view.hpp, cpp/src/routing/diversity/helpers.hpp, cpp/src/routing/diversity/macros.hpp
dim_t enum changes from DIST = 0 to COST = 0. Arc dispatch, dimension-info access, enabled_dimensions member naming, and diversity constraint classification updated to use COST. Minor Doxygen wording adjusted for cost matrix.
Node-level cost storage and computation
cpp/src/routing/node/cost_node.cuh, cpp/src/routing/node/node.cuh
distance_node_t replaced by cost_node_t with cost_forward/cost_backward fields; accumulation, excess, combine, and get_cost updated to use cost and vehicle max_cost. node_t now includes cost_node.cuh and stores cost_dim.
Route-level cost storage and dimensions wiring
cpp/src/routing/route/cost_route.cuh, cpp/src/routing/route/dimensions_route.cuh
New cost_route_t<i_t,f_t> added with forward/backward cost buffers, view/copy helpers, shared-memory sizing, and compute_cost. dimensions_route_t maps dim_t::COST to cost_route_t and stores cost_dim instead of a distance route.
Problem setup and dimension configuration
cpp/src/routing/problem/problem.cu
populate_dimensions_info() initializes and wires dim_t::COST and COST objective weight; TSP/CVRP classification loops treat COST as the non-disqualifying dimension.
Local search fragment and permutation updates
cpp/src/routing/local_search/permutation_helper.cuh, 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
CVRP fragment forward/backward updates, fragment accumulation, two-opt and VRP fragment evaluations now use cost_dim and cost_forward/reverse_cost fields and dim_t::COST arc evaluations.
Viable matrix sorting by cost
cpp/src/routing/local_search/compute_compatible.cu
Stable-sort comparators now use get_arc_cost() to order viable_from_matrix and viable_to_matrix by cost.
Sliding TSP cumulative cost computation
cpp/src/routing/local_search/sliding_tsp.cu
Distance-based kernels replaced by cost-based kernels; compute_cumulative_costs added; eval_move and perform_sliding_tsp call sites updated to use cost prefix arrays.
GES lexicographic search stack and buffer management
cpp/src/routing/ges/lexicographic_search/node_stack.cuh, cpp/src/routing/ges/lexicographic_search/lexicographic_search.cu
copy_forward_data and item layout use cost_forward; shared-memory sizing and precomputed buffers keyed by cost_dim.has_constraints(); accessors and runtime checks validate COST arcs; feasibility checks use cost_dim.
Utility updates and documentation corrections
cpp/src/routing/util_kernels/set_nodes_data.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/tests/routing/*
set_route_data initializes cost boundary entries; multiple Doxygen @brief comments updated to reference cost/prize/service-time routes; new unit test cost_boundary_initialization.cu added and included in CMake.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Suggested labels

non-breaking

Suggested reviewers

  • rgsl888prabhu
  • aliceb-nv
🚥 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 'refactor(routing): standardize cost terminology' clearly and directly describes the main change: renaming distance-related identifiers to cost-based equivalents across the routing package.
Description check ✅ Passed The description is related to the changeset, providing context about why the refactoring was done (semantic consistency with existing cost matrix documentation) and details about what was changed.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

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
Copy link
Copy Markdown
Contributor

@rg20 rg20 left a comment

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>
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.

2 participants