Class MarketForecaster

    • Field Detail

      • forecastPeriodInHours

        protected final int forecastPeriodInHours
        maximum number of future hours to provide forecasts for
      • marketClearing

        protected final MarketClearing marketClearing
        the algorithm used to clear the market
      • calculatedForecastContainer

        protected final TreeMap<de.dlr.gitlab.fame.time.TimeStamp,​MarketClearingResult> calculatedForecastContainer
        contains all previously calculated forecasts with their associated time
    • Constructor Detail

      • MarketForecaster

        public MarketForecaster​(de.dlr.gitlab.fame.agent.input.DataProvider dataProvider)
                         throws de.dlr.gitlab.fame.agent.input.ParameterData.MissingDataException
        Parameters:
        dataProvider - provides input from config file
        Throws:
        de.dlr.gitlab.fame.agent.input.ParameterData.MissingDataException - if any required data is not provided
    • Method Detail

      • sortMessagesByBidTimeStamp

        protected TreeMap<de.dlr.gitlab.fame.time.TimeStamp,​ArrayList<de.dlr.gitlab.fame.communication.message.Message>> sortMessagesByBidTimeStamp​(ArrayList<de.dlr.gitlab.fame.communication.message.Message> messages)
        Groups given messages by their targeted time of delivery into an ordered Map
        Parameters:
        messages - to group by
        Returns:
        a Map of Messages sorted by TimeStamp of the associated delivery times
      • getResultForRequestedTime

        protected MarketClearingResult getResultForRequestedTime​(de.dlr.gitlab.fame.time.TimeStamp requestedTime)
        Returns stored clearing result for the given time - or throws an Exception if no result is stored
        Parameters:
        requestedTime - to fetch market clearing result for
        Returns:
        the result stored for the requested time
      • saveNextForecast

        protected void saveNextForecast()
        writes out the nearest upcoming forecast after current time