Skip to content

Commit

Permalink
fix routing example in python
Browse files Browse the repository at this point in the history
  • Loading branch information
lperron committed Jan 29, 2025
1 parent 446f853 commit 780dc3d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ortools/routing/samples/vrp_pickup_delivery_fifo.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def print_solution(data, manager, routing, assignment):
print(f"Objective: {assignment.ObjectiveValue()}")
total_distance = 0
for vehicle_id in range(data["num_vehicles"]):
if not routing.IsVehicleUsed(solution, vehicle_id):
if not routing.IsVehicleUsed(assignment, vehicle_id):
continue
index = routing.Start(vehicle_id)
plan_output = f"Route for vehicle {vehicle_id}:\n"
Expand Down

0 comments on commit 780dc3d

Please sign in to comment.