Forecast-based stochastic optimization for a load powered by wave energy