Forecasting time series with constraints