Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion cpp/src/routing/adapters/assignment_adapter.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,14 @@ assignment_t<i_t> ges_solver_t<i_t, f_t, REQUEST>::get_ges_assignment(
std::vector<double> departure_forward_h(node_infos_h.size(), 0.);
std::vector<double> actual_arrival_h(node_infos_h.size(), 0.);
std::vector<double> earliest_arrival_backward_h(node_infos_h.size(), 0.);
std::vector<double> latest_arrival_forward_h(node_infos_h.size(), 0.);
if (problem.dimensions_info.has_dimension(detail::dim_t::TIME)) {
departure_forward_h = cuopt::host_copy(route.dimensions.time_dim.departure_forward);
actual_arrival_h = cuopt::host_copy(route.dimensions.time_dim.actual_arrival);
earliest_arrival_backward_h =
cuopt::host_copy(route.dimensions.time_dim.earliest_arrival_backward);
latest_arrival_forward_h =
cuopt::host_copy(route.dimensions.time_dim.latest_arrival_forward);
}

i_t drop_return_trip = sol.problem_ptr->drop_return_trip_h[vehicle_id];
Expand All @@ -128,7 +131,8 @@ assignment_t<i_t> ges_solver_t<i_t, f_t, REQUEST>::get_ges_assignment(
if (sol_status == solution_status_t::SUCCESS) {
if (sol.problem_ptr->dimensions_info.time_dim.should_compute_travel_time()) {
cuopt_assert(abs(actual_arrival_h[i] -
max(earliest_arrival_backward_h[i], departure_forward_h[i])) < 0.0001f,
max(min(earliest_arrival_backward_h[i], latest_arrival_forward_h[i]),
departure_forward_h[i])) < 0.0001f,
"Feasible time mismatch!");
} else {
cuopt_assert(abs(actual_arrival_h[i] - departure_forward_h[i]) < 0.0001f,
Expand Down
20 changes: 12 additions & 8 deletions cpp/src/routing/solution/solution.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -243,10 +243,12 @@ DI node_t<i_t, f_t, REQUEST> create_depot_node(const typename problem_t<i_t, f_t
? problem.fleet_info.latest_time[vehicle_id]
: min(problem.order_info.latest_time[DEPOT], problem.fleet_info.latest_time[vehicle_id]);

node.time_dim.window_start = earliest;
node.time_dim.window_end = latest;
node.time_dim.departure_forward = node.time_dim.window_start;
node.time_dim.departure_backward = node.time_dim.window_end;
node.time_dim.window_start = earliest;
node.time_dim.window_end = latest;
node.time_dim.departure_forward = node.time_dim.window_start;
node.time_dim.departure_backward = node.time_dim.window_end;
node.time_dim.latest_arrival_forward = latest;
node.time_dim.earliest_arrival_backward = earliest;

constexpr_for<node_t<i_t, f_t, REQUEST>::max_capacity_dim>([&](auto i) {
if (i < node.capacity_dim.n_capacity_dimensions) { node.capacity_dim.demand[i] = 0; }
Expand Down Expand Up @@ -277,10 +279,12 @@ constexpr node_t<i_t, f_t, REQUEST> create_depot_node(const problem_t<i_t, f_t>*
: min(problem->order_info_h.latest_time[DEPOT],
problem->fleet_info_h.latest_time[vehicle_id]);

node.time_dim.window_start = earliest;
node.time_dim.window_end = latest;
node.time_dim.departure_forward = node.time_dim.window_start;
node.time_dim.departure_backward = node.time_dim.window_end;
node.time_dim.window_start = earliest;
node.time_dim.window_end = latest;
node.time_dim.departure_forward = node.time_dim.window_start;
node.time_dim.departure_backward = node.time_dim.window_end;
node.time_dim.latest_arrival_forward = latest;
node.time_dim.earliest_arrival_backward = earliest;

constexpr_for<node_t<i_t, f_t, REQUEST>::max_capacity_dim>([&](auto i) {
if (i < node.capacity_dim.n_capacity_dimensions) { node.capacity_dim.demand[i] = 0; }
Expand Down
6 changes: 0 additions & 6 deletions cpp/tests/routing/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
ConfigureTest(ROUTING_TEST ${CMAKE_CURRENT_SOURCE_DIR}/level0/l0_routing_test.cu)
ConfigureTest(ROUTING_GES_TEST ${CMAKE_CURRENT_SOURCE_DIR}/level0/l0_ges_test.cu)

# ConfigureTest(SCROSS_GES_TEST ${CMAKE_CURRENT_SOURCE_DIR}/level0/l0_scross_test.cu)
ConfigureTest(VEHICLE_ORDER_TEST ${CMAKE_CURRENT_SOURCE_DIR}/level0/l0_vehicle_order_match.cu)
ConfigureTest(VEHICLE_TYPES_TEST ${CMAKE_CURRENT_SOURCE_DIR}/level0/l0_vehicle_types_test.cu)
ConfigureTest(OBJECTIVE_FUNCTION_TEST ${CMAKE_CURRENT_SOURCE_DIR}/level0/l0_objective_function_test.cu)
Expand All @@ -28,11 +27,6 @@ ConfigureTest(RETAIL_L1TEST ${CMAKE_CURRENT_SOURCE_DIR}/level1/l1_retail_test.cu
# ##################################################################################################
# - L1 tests for quick regression check --------------------------------------------------------------------------
ConfigureTest(ROUTING_L1TEST ${CMAKE_CURRENT_SOURCE_DIR}/level1/l1_routing_test.cu)
ConfigureTest(CYCLE_FINDER_L1TEST ${CMAKE_CURRENT_SOURCE_DIR}/level1/l1_cycle_finder.cu)

# ##################################################################################################
# - L2 tests for full regression check --------------------------------------------------------------------------
ConfigureTest(ROUTING_L2TEST ${CMAKE_CURRENT_SOURCE_DIR}/l2_routing_test.cu) # #####################################################################################################

# # - ${CMAKE_CURRENT_SOURCE_DIR} unit tests ----------------------------------------------------------------------------
ConfigureTest(ROUTING_UNIT_TEST
Expand Down
59 changes: 0 additions & 59 deletions cpp/tests/routing/l2_routing_test.cu

This file was deleted.

180 changes: 0 additions & 180 deletions cpp/tests/routing/level1/l1_cycle_finder.cu

This file was deleted.

41 changes: 0 additions & 41 deletions cpp/tests/routing/utilities/mg_utilities.hpp

This file was deleted.