Carlos Alcaraz beat Daniil Medvedev 6-4 6-4 to set up a semi-final against Novak Djokovic at the ATP Finals in Turin.