Class MarketForecaster

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  MarketForecaster.Products
      Products of MarketForecasters
      • Nested classes/interfaces inherited from class de.dlr.gitlab.fame.agent.Agent

        de.dlr.gitlab.fame.agent.Agent.WarmUpStatus
    • Constructor Summary

      Constructors 
      Constructor Description
      MarketForecaster​(de.dlr.gitlab.fame.agent.input.DataProvider dataProvider)
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      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
      protected void saveNextForecast()
      writes out the nearest upcoming forecast after current time
      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
      • Methods inherited from class de.dlr.gitlab.fame.agent.Agent

        addContract, call, executeActions, executeWarmUp, fulfilNext, fulfilNext, getId, getNextRandomNumberGenerator, getPostOffice, handleMessage, initialiseActions, now, receive, sendMessageTo, sendMessageTo, store, store, toString, warmUp
    • 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