[docs]defini_periods(self,**kwargs):""" The function :bash:`ini_periods` is optional but very recommended. It is used to define the temporal variables ``subsimu_dates``, ``input_dates``, ``tstep_dates`` and ``tstep_all``. The function is automatically called at the initialization of the :bash:`model` class if available. If not available, the temporal variables should be defined manually in the :bash:`ini_data` function (not recommended). :bash:`ini_periods` is a class method that applies to the :bash:`model` plugin itself. Therefore, the only expected argument is :bash:`self`. .. code-block:: python def ini_periods(self, **kwargs): self.subsimu_dates = XXXX self.tstep_dates = XXXXX self.input_dates = XXXXX self.tstep_all = XXXXX """# Define sub-simu datesinfo("Sub-simulations are initialized as one sub-simulation ""covering the full simulation window")self.subsimu_dates=[self.datei,self.datef]# Define modelling time steps for outputsself.tstep_dates={}self.input_dates={}fordd0,dd1inzip(self.subsimu_dates[:-1],self.subsimu_dates[1:]):self.tstep_dates[dd0]=pd.date_range(dd0,dd1,freq=self.output_resolution).to_pydatetime()self.input_dates[dd0]=pd.date_range(dd0,dd1,freq=self.input_resolution).to_pydatetime()