Package agents.forecast
Class MarketForecaster
- java.lang.Object
-
- de.dlr.gitlab.fame.agent.Agent
-
- agents.forecast.Forecaster
-
- agents.forecast.MarketForecaster
-
- All Implemented Interfaces:
de.dlr.gitlab.fame.agent.AgentAbility
- Direct Known Subclasses:
MeritOrderForecaster
,PriceForecaster
public abstract class MarketForecaster extends Forecaster
Common base class related toDayAheadMarket
forecasting; issuesMarketForecaster.Products.ForecastRequest
s to ask for required forecasts; uses forecasted bids to clear market ahead of time and thus provide forecasts- Author:
- Christoph Schimeczek
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MarketForecaster.Products
Products ofMarketForecaster
s
-
Field Summary
Fields Modifier and Type Field Description protected TreeMap<de.dlr.gitlab.fame.time.TimeStamp,MarketClearingResult>
calculatedForecastContainer
contains all previously calculated forecasts with their associated timeprotected int
forecastPeriodInHours
maximum number of future hours to provide forecasts forprotected MarketClearing
marketClearing
the algorithm used to clear the market
-
Constructor Summary
Constructors Constructor Description MarketForecaster(de.dlr.gitlab.fame.agent.input.DataProvider dataProvider)
Creates aMarketForecaster
-
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 storedprotected void
saveNextForecast()
writes out the nearest upcoming forecast after current timeprotected 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
-
-
-
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
Creates aMarketForecaster
- 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
-
-