Skip to content

Commit

Permalink
Inactive trucks should not be shown in the output of cvrp_reload.py e…
Browse files Browse the repository at this point in the history
…xample output
  • Loading branch information
arnabanimesh authored Jan 25, 2025
1 parent 56817ee commit 1b5ada9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ortools/routing/samples/cvrp_reload.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,8 @@ def print_solution(

for vehicle_id in range(data["num_vehicles"]):
index = routing.Start(vehicle_id)
if routing.IsEnd(assignment.Value(routing.NextVar(index))):
continue
plan_output = f"Route for vehicle {vehicle_id}:\n"
distance = 0
while not routing.IsEnd(index):
Expand Down

0 comments on commit 1b5ada9

Please sign in to comment.