Optimal random replacement models with continuously processing jobs