Strange using master and hacking constraint_solver/samples/VrpTimeWindows.cs here
for (int i = 0; i < manager.GetNumberOfVehicles(); ++i) {
timeDimension.SetSpanUpperBoundForVehicle(22, i);
}
...
Time Elapsed 00:00:00.78
"/usr/bin/dotnet" run --no-build --project ortools/constraint_solver/samples/VrpTimeWindows.csproj
Objective 71:
Route for Vehicle 0:
0 Time(0,0) -> 9 Time(2,3) -> 14 Time(7,8) -> 16 Time(11,11) -> 0 Time(18,18)
Time of the route: 18min
Route for Vehicle 1:
0 Time(0,0) -> 12 Time(4,4) -> 13 Time(6,6) -> 15 Time(11,11) -> 11 Time(14,14) -> 0 Time(20,20)
Time of the route: 20min
Route for Vehicle 2:
0 Time(2,2) -> 7 Time(4,4) -> 1 Time(8,11) -> 4 Time(10,13) -> 3 Time(16,16) -> 0 Time(24,24)
Time of the route: 24min
Route for Vehicle 3:
0 Time(0,0) -> 5 Time(3,3) -> 8 Time(5,5) -> 6 Time(7,7) -> 2 Time(10,10) -> 10 Time(14,14) -> 0 Time(20,20)
Time of the route: 20min
Total time of all routes: 82min
make[1]: Leaving directory '/home/mizux/work/master'
note: On vehicle 2 we can see start is now (2,2) while it was (0,0) before the change...
note2: I've also looked at the ortools/gen/ortools/constraint_solver/RoutingDimension.cs nothing seems strange
So I would say SetSpanUpperBoundForVehicle() is working as expected at least on master branch.