Skip to content

Commit

Permalink
Inactive trucks should not be shown in the output of cvrp_reload.ipyn…
Browse files Browse the repository at this point in the history
…b example output
  • Loading branch information
arnabanimesh authored Jan 26, 2025
1 parent 1b5ada9 commit 1ea1cfb
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion examples/notebook/routing/cvrp_reload.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,8 @@
"\n",
" for vehicle_id in range(data[\"num_vehicles\"]):\n",
" index = routing.Start(vehicle_id)\n",
" if routing.IsEnd(assignment.Value(routing.NextVar(index))):\n",
" continue\n",
" plan_output = f\"Route for vehicle {vehicle_id}:\\n\"\n",
" distance = 0\n",
" while not routing.IsEnd(index):\n",
Expand Down Expand Up @@ -490,7 +492,11 @@
]
}
],
"metadata": {},
"metadata": {
"language_info": {
"name": "python"
}
},
"nbformat": 4,
"nbformat_minor": 5
}

0 comments on commit 1ea1cfb

Please sign in to comment.