agregator.py
def __recompute_with_temperature_error(self, time):
        """
        Method used to recompute the decision operation if an forecast error is detected
        :param time: Time
        """

        if len(self._history_temperature) > 0:
            debug("| | + due to temperature error : {}".format(numpy.mean(self._history_temperature[-20:])))
        else:
            debug("| | + due to temperature error")

        self._current_temperature_correction = \
            units.value(
                units.convert(
                    getattr(self._outside_process, "temperature"),
                    units.celsius
                )
            ) - self._outside_temperature_forecast[time]

        self._power_on, self.temperature_optimal = self.__optimize(
            cost=self._cost,
            first_decision=self._power_on[time],
            correction=self._current_correction,
            delta_temperature_outside_correction=self._current_temperature_correction)

        debug("| | |- Correction temperature {} {} {}".format(
            units.value(
                units.convert(
                    getattr(
                        self._outside_process,
                        "temperature"
                    ),
                    units.celsius
                )
            ) - self._outside_temperature_forecast[time],
            units.value(units.convert(getattr(self._outside_process, "temperature"), units.celsius)),
            self._outside_temperature_forecast[time]))

        Method used to recompute the decision operation if an forecast error is detected
        :param time: Time
        
Method used to recompute the decision operation if an forecast error is detected
Method used to recompute the decision operation if an forecast error is detected
def __recompute_with_temperature_error(self, time):
        if len(self._history_temperature) > 0:
            debug("| | + due to temperature error : {}".format(numpy.mean(self._history_temperature[-20:])))
        else:
            debug("| | + due to temperature error")
        self._current_temperature_correction = \
            units.value(
                units.convert(
                    getattr(self._outside_process, "temperature"),
                    units.celsius
                )
            ) - self._outside_temperature_forecast[time]
        self._power_on, self.temperature_optimal = self.__optimize(
            cost=self._cost,
            first_decision=self._power_on[time],
            correction=self._current_correction,
            delta_temperature_outside_correction=self._current_temperature_correction)
        debug("| | |- Correction temperature {} {} {}".format(
            units.value(
                units.convert(
                    getattr(
                        self._outside_process,
                        "temperature"
                    ),
                    units.celsius
                )
            ) - self._outside_temperature_forecast[time],
            units.value(units.convert(getattr(self._outside_process, "temperature"), units.celsius)),
            self._outside_temperature_forecast[time]))
def __recompute_with_temperature_error ( self , time ) : if len ( self . _history_temperature ) > 0 : debug ( "| | + due to temperature error : {}" . format ( numpy . mean ( self . _history_temperature [ - 20 : ] ) ) ) else : debug ( "| | + due to temperature error" ) self . _current_temperature_correction = units . value ( units . convert ( getattr ( self . _outside_process , "temperature" ) , units . celsius ) ) - self . _outside_temperature_forecast [ time ] self . _power_on , self . temperature_optimal = self . __optimize ( cost = self . _cost , first_decision = self . _power_on [ time ] , correction = self . _current_correction , delta_temperature_outside_correction = self . _current_temperature_correction ) debug ( "| | |- Correction temperature {} {} {}" . format ( units . value ( units . convert ( getattr ( self . _outside_process , "temperature" ) , units . celsius ) ) - self . _outside_temperature_forecast [ time ] , units . value ( units . convert ( getattr ( self . _outside_process , "temperature" ) , units . celsius ) ) , self . _outside_temperature_forecast [ time ] ) )
Method used to recompute the decision operation if an forecast error is detected
Method used to recompute the decision operation if an forecast error is detected
"""
        Method used to recompute the decision operation if an forecast error is detected
        :param time: Time
        """
self
time
None