From f32c576db7dc532f3ffe0ee86ad23c9613baf25d Mon Sep 17 00:00:00 2001 From: Laurent Perron Date: Mon, 16 Oct 2023 15:43:30 +0200 Subject: [PATCH] fix #3949 --- examples/python/prize_collecting_vrp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/python/prize_collecting_vrp.py b/examples/python/prize_collecting_vrp.py index 8230c48e46..5544367dbc 100755 --- a/examples/python/prize_collecting_vrp.py +++ b/examples/python/prize_collecting_vrp.py @@ -92,7 +92,7 @@ def print_solution(manager, routing, assignment): plan_output += f' {node} ->' previous_index = index index = assignment.Value(routing.NextVar(index)) - route_distance += routing.GetArcCostForVehicle(previous_index, index, 0) + route_distance += routing.GetArcCostForVehicle(previous_index, index, v) plan_output += f' {manager.IndexToNode(index)}\n' plan_output += f'Distance of the route: {route_distance}m\n' plan_output += f'Value collected: {value_collected}\n'