## 2 Materials and Methods
### The Analogs Ensembles Method  
Numerical weather prediction (NWP) forecasts from MeteoFrance (ARPEGE) are used in this work as the reference deterministic forecasting method. Forecasts for relative humidity (RH), air temperature measured at 2 m above ground level (T2) and global solar horizontal irradiance (GHI) are used as the base to generate probabilistic forecasts while using the Analogs Ensembles (AnEn) method [28; 29]. The clear sky index (CSI) is also required for the AnEn, and it is computed as a ratio between the  
Figure 1: Schematic illustration of the Drahi-X study case microgrid. current GHI (forecasted or measured) and the clear-sky GHI value. Clear-sky GHI estimations are computed while using the empirical model that was proposed by [30]. Figure 2 shows the workflow principle of the AnEn, and it is based on the availability of two data-sets with historical data of ground measurements and forecasts. When a new forecast is available for day D + 1, it is compared with the forecasts in the database and a certain number of past \"similar\" forecasts are chosen. The similarity criteria to establish a similarity score between the current forecast (day D + 1) and the forecasts in the database is obtained while using Equation (1). \[\|F_{t},A_{t^{\prime}}\|=\sum_{i=1}^{N_{v}}\frac{W_{i}}{\sigma_{fi}}\sqrt{\sum _{j=t-w}^{t+w}{(F_{i,t+j}-A_{i,t^{\prime}+j})^{2}}} \tag{1}\]  
where \(\|F_{t},A_{t^{\prime}}\|\) is the error between the forecast for time \(t\) and the analog forecast at time \(t^{\prime}\) in the database (similarity score), \(W_{i}\) is the weight of the \(i\)th variable, \(N_{v}\) is the number of variables, \(\sigma_{fi}\) is the standard deviation of the time series of past forecasts of a given variable \(i\), \(F_{i,t+j}\) is the forecast of the \(i\)th variable at time \(t+j\), \(A_{i,t^{\prime}+j}\) is an analog forecast sample of the \(i\)th variable at time \(t^{\prime}+j\) and \(w\) is the number of hours before and after the target hour that conform the time window, which has a length of \(2w+1\). The corresponding ground measurements to the \"similar\" forecasts chosen are used in order to build the ensembles. The AnEn works under the premise that past predictions that are very similar to a given forecast (in terms of meteorological conditions), might present similar errors. This allows for making the pertinent corrections to the current forecast (day D + 1), based on the past errors found in the database. An advantage of this method is its short computation time (\(<\)30 s with a two-year database), when compared to the several-hours required by commercial probabilistic forecasting methods, such as the one produced by the European centre for medium range weather forecasts (ECMWF). From the above-mentioned ensembles, different quantiles are obtained with probability levels that range from 10% to 90% (\(AnEn_{\tau=0.1}\) to \(AnEn_{\tau=0.9}\)), which are used as deterministic forecasts. The notation \(AnEn_{\tau}\) refers to a quantile with the probability level \(\tau\) obtained from an ensemble produced with the Analogs Ensembles method. This forecasting approach is called quantile forecasting (QF), and it is used as a novel forecasting method in the domain of MG scheduling. Even when each independent quantile forecast is considered to be deterministic, the quantile forecasting approach is considered a probabilistic forecasting method, as different quantiles (with different probability levels) can be obtained. The base for this forecasting strategy is the ensembles of analogs (obtained with the above-mentioned AnEn method) from where the quantiles are obtained. Figure 2: Diagram that sketches the working principle of the AnEn (taken from [28]). The idea of using this forecasting approach is to decrease the uncertainty of a deterministic forecast by \"forcing\" the forecasting errors to happen in a known \"direction\".