Extreme value theory for a thermal energy storage model