Package agents.flexibility
Class Strategist
- java.lang.Object
-
- agents.flexibility.Strategist
-
- Direct Known Subclasses:
ArbitrageStrategist
,ElectrolyzerStrategist
,HeatPumpStrategist
public abstract class Strategist extends Object
Base class for strategists that operate some kind of flexibility, e.g., an energy storage or flexible electrolysis- Author:
- Christoph Schimeczek, Felix Nitsch
-
-
Field Summary
Fields Modifier and Type Field Description static de.dlr.gitlab.fame.agent.input.ParameterBuilder
bidToleranceParam
Strategist input parameter: safety margin at biddingprotected double[]
demandScheduleInMWH
schedule for the electricity demand (or charging) scheduleprotected static String
ERR_PROVIDE_FORECAST
Error message if usedStrategist
type cannot provide forecastsprotected static String
ERR_UNKNOWN_STRATEGIST
Error message if usedStrategist
type is not implementedprotected static String
ERR_UNKNOWN_UPDATE_TYPE
Error message if usedStrategist.ForecastUpdateType
is not implementedprotected static String
ERR_USE_MERIT_ORDER_FORECAST
Error message if usedStrategist
type cannot process merit order forecastprotected static String
ERR_USE_PRICE_FORECAST
Error message if usedStrategist
type cannot deal with incoming forecastsstatic de.dlr.gitlab.fame.agent.input.ParameterBuilder
forecastPeriodParam
Strategist input parameter: number of time steps of the used forecastprotected int
forecastSteps
number of time steps of available forecastsstatic de.dlr.gitlab.fame.agent.input.ParameterBuilder
forecastUpdateTypeParam
Strategist input parameter: forecast update typestatic de.dlr.gitlab.fame.time.TimeSpan
OPERATION_PERIOD
Hard coded time granularity ofStrategist
protected double[]
priceScheduleInEURperMWH
schedule for the expected electricity pricesprotected double[]
scheduledBidPricesInEURperMWH
schedule for the electricity bid pricesstatic de.dlr.gitlab.fame.agent.input.ParameterBuilder
scheduleDurationParam
Strategist input parameter: number of time steps of the created schedulesprotected int
scheduleDurationPeriods
number of time steps of the created schedules
-
Constructor Summary
Constructors Modifier Constructor Description protected
Strategist(de.dlr.gitlab.fame.agent.input.ParameterData input)
Creates new Strategist based on the given input
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
callOnSensitivity(MeritOrderSensitivity sensitivity, de.dlr.gitlab.fame.time.TimePeriod timePeriod)
optional action called on given MeritOrderSensitivitiesvoid
clearSensitivitiesBefore(de.dlr.gitlab.fame.time.TimeStamp time)
Removes any stored MeritOrderSensitivity whose associated TimePeriod ends before the given timeprotected abstract MeritOrderSensitivity
createBlankSensitivity()
DispatchSchedule
createSchedule(de.dlr.gitlab.fame.time.TimePeriod timePeriod)
Creates aDispatchSchedule
for the connected flexibilityprotected abstract double[]
getInternalEnergySchedule()
protected ArrayList<de.dlr.gitlab.fame.time.TimeStamp>
getMissingForecastTimes(TreeMap<de.dlr.gitlab.fame.time.TimePeriod,?> map, de.dlr.gitlab.fame.time.TimePeriod firstTime)
Returns list of times at which given TreeMap are requested for schedule planningprotected MeritOrderSensitivity
getSensitivityForPeriod(de.dlr.gitlab.fame.time.TimePeriod timePeriod)
Returns MeritOrderSensitivity associated with the given TimePeriodArrayList<de.dlr.gitlab.fame.time.TimeStamp>
getTimesMissingElectricityForecasts(de.dlr.gitlab.fame.time.TimePeriod firstTime)
Returns list of times at which electricity price forecasts are missing needed for schedule planningvoid
storeElectricityPriceForecast(de.dlr.gitlab.fame.time.TimePeriod timePeriod, double electricityPriceForecastInEURperMWH)
Stores given electricity price forecast for the associated TimePeriod: price-forecasting methodvoid
storeMeritOrderForesight(de.dlr.gitlab.fame.time.TimePeriod timePeriod, SupplyOrderBook supplyForecast, DemandOrderBook demandForecast)
Stores given supply and demand bid forecasts for the associated TimePeriod: merit-order forecasting methodprotected void
updateBidSchedule()
Updates the bid schedules considering safety margins for the bid prices and market price limitsprotected abstract void
updateSchedule(de.dlr.gitlab.fame.time.TimePeriod timePeriod)
Updates schedule arrays starting at the given TimePeriod with the given initial energy level
-
-
-
Field Detail
-
ERR_PROVIDE_FORECAST
protected static final String ERR_PROVIDE_FORECAST
Error message if usedStrategist
type cannot provide forecasts- See Also:
- Constant Field Values
-
ERR_USE_PRICE_FORECAST
protected static final String ERR_USE_PRICE_FORECAST
Error message if usedStrategist
type cannot deal with incoming forecasts- See Also:
- Constant Field Values
-
ERR_USE_MERIT_ORDER_FORECAST
protected static final String ERR_USE_MERIT_ORDER_FORECAST
Error message if usedStrategist
type cannot process merit order forecast- See Also:
- Constant Field Values
-
ERR_UNKNOWN_STRATEGIST
protected static final String ERR_UNKNOWN_STRATEGIST
Error message if usedStrategist
type is not implemented- See Also:
- Constant Field Values
-
ERR_UNKNOWN_UPDATE_TYPE
protected static final String ERR_UNKNOWN_UPDATE_TYPE
Error message if usedStrategist.ForecastUpdateType
is not implemented- See Also:
- Constant Field Values
-
OPERATION_PERIOD
public static final de.dlr.gitlab.fame.time.TimeSpan OPERATION_PERIOD
Hard coded time granularity ofStrategist
-
forecastSteps
protected final int forecastSteps
number of time steps of available forecasts
-
scheduleDurationPeriods
protected final int scheduleDurationPeriods
number of time steps of the created schedules
-
demandScheduleInMWH
protected double[] demandScheduleInMWH
schedule for the electricity demand (or charging) schedule
-
priceScheduleInEURperMWH
protected double[] priceScheduleInEURperMWH
schedule for the expected electricity prices
-
scheduledBidPricesInEURperMWH
protected double[] scheduledBidPricesInEURperMWH
schedule for the electricity bid prices
-
forecastPeriodParam
public static final de.dlr.gitlab.fame.agent.input.ParameterBuilder forecastPeriodParam
Strategist input parameter: number of time steps of the used forecast
-
scheduleDurationParam
public static final de.dlr.gitlab.fame.agent.input.ParameterBuilder scheduleDurationParam
Strategist input parameter: number of time steps of the created schedules
-
bidToleranceParam
public static final de.dlr.gitlab.fame.agent.input.ParameterBuilder bidToleranceParam
Strategist input parameter: safety margin at bidding
-
forecastUpdateTypeParam
public static final de.dlr.gitlab.fame.agent.input.ParameterBuilder forecastUpdateTypeParam
Strategist input parameter: forecast update type
-
-
Constructor Detail
-
Strategist
protected Strategist(de.dlr.gitlab.fame.agent.input.ParameterData input) throws de.dlr.gitlab.fame.agent.input.ParameterData.MissingDataException
Creates new Strategist based on the given input- Parameters:
input
- parameters associated with strategists- Throws:
de.dlr.gitlab.fame.agent.input.ParameterData.MissingDataException
- if any required input is missing
-
-
Method Detail
-
clearSensitivitiesBefore
public void clearSensitivitiesBefore(de.dlr.gitlab.fame.time.TimeStamp time)
Removes any stored MeritOrderSensitivity whose associated TimePeriod ends before the given time- Parameters:
time
- limiting TimeStamp - earlier events to be deleted
-
getTimesMissingElectricityForecasts
public ArrayList<de.dlr.gitlab.fame.time.TimeStamp> getTimesMissingElectricityForecasts(de.dlr.gitlab.fame.time.TimePeriod firstTime)
Returns list of times at which electricity price forecasts are missing needed for schedule planning- Parameters:
firstTime
- first time period to be covered by a created schedule- Returns:
- List of
TimeStamp
s at whichMeritOrderSensitivity
is not yet defined
-
getMissingForecastTimes
protected ArrayList<de.dlr.gitlab.fame.time.TimeStamp> getMissingForecastTimes(TreeMap<de.dlr.gitlab.fame.time.TimePeriod,?> map, de.dlr.gitlab.fame.time.TimePeriod firstTime)
Returns list of times at which given TreeMap are requested for schedule planning- Parameters:
map
- to be inspected for existing TimeSegment keysfirstTime
- first time period to be covered by a created schedule- Returns:
- List of
TimeStamp
s at which entries are requested
-
storeMeritOrderForesight
public void storeMeritOrderForesight(de.dlr.gitlab.fame.time.TimePeriod timePeriod, SupplyOrderBook supplyForecast, DemandOrderBook demandForecast)
Stores given supply and demand bid forecasts for the associated TimePeriod: merit-order forecasting method- Parameters:
timePeriod
- associated with the forecast datasupplyForecast
- forecasted supply OrderBookdemandForecast
- forecasted demand OrderBook
-
createBlankSensitivity
protected abstract MeritOrderSensitivity createBlankSensitivity()
- Returns:
- an empty
MeritOrderSensitivity
item of the type used by thisArbitrageStrategist
-type
-
callOnSensitivity
protected void callOnSensitivity(MeritOrderSensitivity sensitivity, de.dlr.gitlab.fame.time.TimePeriod timePeriod)
optional action called on given MeritOrderSensitivities- Parameters:
sensitivity
- to be modifiedtimePeriod
- that the sensitivity is valid for
-
storeElectricityPriceForecast
public void storeElectricityPriceForecast(de.dlr.gitlab.fame.time.TimePeriod timePeriod, double electricityPriceForecastInEURperMWH)
Stores given electricity price forecast for the associated TimePeriod: price-forecasting method- Parameters:
timePeriod
- associated with the forecast dataelectricityPriceForecastInEURperMWH
- forecast for the electricity price in EUR per MWh
-
getSensitivityForPeriod
protected MeritOrderSensitivity getSensitivityForPeriod(de.dlr.gitlab.fame.time.TimePeriod timePeriod)
Returns MeritOrderSensitivity associated with the given TimePeriod- Parameters:
timePeriod
- to search for associated MeritOrderSensitivity- Returns:
- MeritOrderSensitivity associated with the given TimePeriod
-
createSchedule
public DispatchSchedule createSchedule(de.dlr.gitlab.fame.time.TimePeriod timePeriod)
Creates aDispatchSchedule
for the connected flexibility- Parameters:
timePeriod
- first TimePeriod element of the schedule to be created- Returns:
- created
DispatchSchedule
for the specifiedTimePeriod
-
updateBidSchedule
protected void updateBidSchedule()
Updates the bid schedules considering safety margins for the bid prices and market price limits
-
updateSchedule
protected abstract void updateSchedule(de.dlr.gitlab.fame.time.TimePeriod timePeriod)
Updates schedule arrays starting at the given TimePeriod with the given initial energy level- Parameters:
timePeriod
- first period of the schedule to be created
-
getInternalEnergySchedule
protected abstract double[] getInternalEnergySchedule()
- Returns:
- array representing the expected internal energy state of the controlled flexibility
-
-