agregator.py
def __is_delta_temperature_error(self):
        """
        Detect if there is an error due to a difference between the forecast and the real temperature
        :return: If there is errors due to a difference of temperature
        """

        ###############################################################################################################
        #
        # Load & prepare data
        #

        subject_efficiency = getattr(self.subject, "_efficiency_factor")
        subject_thermal_capacity = units.value(self.thermal_process.thermal_volumic_capacity)
        subject_thermal_outside_coupling = units.value(self._outside_coupling.thermal_conductivity)

        temperature = [self._historic_for_correction[0][1]]
        error = 0.

        #
        # Load & prepare data
        #
        ###############################################################################################################

        ###############################################################################################################
        #
        # Compute difference of temperature regarding to the real temperature in contrast to the forecast temperature
        #
        for time, \
            init_temp,\
            opt_temp, \
            found_temp,\
            temperature_ext_forecast,\
            temperature_ext,\
            power \
                in self._historic_for_correction:

            last_temperature = temperature[-1]

            outside_leverage = self.__external_leverage(
                thermal_capacity=subject_thermal_capacity,
                thermal_conductivity=subject_thermal_outside_coupling,
                external_temperature=temperature_ext,
                internal_temperature=last_temperature)

            inner_production = self.__internal_production(
                internal_temperature=init_temp,
                power_on=power,
                subject_efficiency=subject_efficiency,
                subject_energy=units.value(self.subject.power),
                thermal_capacity=subject_thermal_capacity)

            correction_leverage = 0
            if self._current_correction is not None:
                correction_leverage = self.__external_leverage(
                    thermal_capacity=subject_thermal_capacity,
                    thermal_conductivity=self._current_correction.thermal_conductivity,
                    external_temperature=units.value(self._current_correction.temperature),
                    internal_temperature=last_temperature)

            final_temperature = outside_leverage + inner_production + correction_leverage

            error += found_temp - final_temperature

            temperature.append(final_temperature)

        debug("| | + {} {}".format(abs(error), ForecastController.DELTA_TOLERANCE * len(self._historic_for_correction)))
        return abs(error) <= ForecastController.DELTA_TOLERANCE * len(self._historic_for_correction)

        #
        # Compute difference of temperature regarding to the real temperature in contrast to the forecast temperature
        #
        ###############################################################################################################

        Detect if there is an error due to a difference between the forecast and the real temperature
        :return: If there is errors due to a difference of temperature
        
Detect if there is an error due to a difference between the forecast and the real temperature
Detect if there is an error due to a difference between the forecast and the real temperature
def __is_delta_temperature_error(self):
         Load & prepare data
        subject_efficiency = getattr(self.subject, "_efficiency_factor")
        subject_thermal_capacity = units.value(self.thermal_process.thermal_volumic_capacity)
        subject_thermal_outside_coupling = units.value(self._outside_coupling.thermal_conductivity)
        temperature = [self._historic_for_correction[0][1]]
        error = 0.
         Load & prepare data
         Compute difference of temperature regarding to the real temperature in contrast to the forecast temperature
        for time, \
            init_temp,\
            opt_temp, \
            found_temp,\
            temperature_ext_forecast,\
            temperature_ext,\
            power \
                in self._historic_for_correction:
            last_temperature = temperature[-1]
            outside_leverage = self.__external_leverage(
                thermal_capacity=subject_thermal_capacity,
                thermal_conductivity=subject_thermal_outside_coupling,
                external_temperature=temperature_ext,
                internal_temperature=last_temperature)
            inner_production = self.__internal_production(
                internal_temperature=init_temp,
                power_on=power,
                subject_efficiency=subject_efficiency,
                subject_energy=units.value(self.subject.power),
                thermal_capacity=subject_thermal_capacity)
            correction_leverage = 0
            if self._current_correction is not None:
                correction_leverage = self.__external_leverage(
                    thermal_capacity=subject_thermal_capacity,
                    thermal_conductivity=self._current_correction.thermal_conductivity,
                    external_temperature=units.value(self._current_correction.temperature),
                    internal_temperature=last_temperature)
            final_temperature = outside_leverage + inner_production + correction_leverage
            error += found_temp - final_temperature
            temperature.append(final_temperature)
        debug("| | + {} {}".format(abs(error), ForecastController.DELTA_TOLERANCE * len(self._historic_for_correction)))
        return abs(error) <= ForecastController.DELTA_TOLERANCE * len(self._historic_for_correction)
         Compute difference of temperature regarding to the real temperature in contrast to the forecast temperature
def __is_delta_temperature_error ( self ) : subject_efficiency = getattr ( self . subject , "_efficiency_factor" ) subject_thermal_capacity = units . value ( self . thermal_process . thermal_volumic_capacity ) subject_thermal_outside_coupling = units . value ( self . _outside_coupling . thermal_conductivity ) temperature = [ self . _historic_for_correction [ 0 ] [ 1 ] ] error = 0. for time , init_temp , opt_temp , found_temp , temperature_ext_forecast , temperature_ext , power in self . _historic_for_correction : last_temperature = temperature [ - 1 ] outside_leverage = self . __external_leverage ( thermal_capacity = subject_thermal_capacity , thermal_conductivity = subject_thermal_outside_coupling , external_temperature = temperature_ext , internal_temperature = last_temperature ) inner_production = self . __internal_production ( internal_temperature = init_temp , power_on = power , subject_efficiency = subject_efficiency , subject_energy = units . value ( self . subject . power ) , thermal_capacity = subject_thermal_capacity ) correction_leverage = 0 if self . _current_correction is not None : correction_leverage = self . __external_leverage ( thermal_capacity = subject_thermal_capacity , thermal_conductivity = self . _current_correction . thermal_conductivity , external_temperature = units . value ( self . _current_correction . temperature ) , internal_temperature = last_temperature ) final_temperature = outside_leverage + inner_production + correction_leverage error += found_temp - final_temperature temperature . append ( final_temperature ) debug ( "| | + {} {}" . format ( abs ( error ) , ForecastController . DELTA_TOLERANCE * len ( self . _historic_for_correction ) ) ) return abs ( error ) <= ForecastController . DELTA_TOLERANCE * len ( self . _historic_for_correction )
Detect if there is an error due to a difference between the forecast and the real temperature
Detect if there is an error due to a difference between the forecast and the real temperature
"""
        Detect if there is an error due to a difference between the forecast and the real temperature
        :return: If there is errors due to a difference of temperature
        """ ############################################################################################################### # # Load & prepare data # # # Load & prepare data # ############################################################################################################### ############################################################################################################### # # Compute difference of temperature regarding to the real temperature in contrast to the forecast temperature # # # Compute difference of temperature regarding to the real temperature in contrast to the forecast temperature # ###############################################################################################################
If there is errors due to a difference of temperature
If there is errors due to a difference of temperature
self