Class DynamicProgrammingStrategist
- java.lang.Object
-
- agents.flexibility.Strategist
-
- agents.storage.arbitrageStrategists.ArbitrageStrategist
-
- agents.storage.arbitrageStrategists.DynamicProgrammingStrategist
-
- Direct Known Subclasses:
ProfitMaximiser
,ProfitMaximiserPriceTaker
,SystemCostMinimiser
public abstract class DynamicProgrammingStrategist extends ArbitrageStrategist
Provides basic functions for dynamic programming-based optimisation of dispatch strategies. The states storage states considered are the discretised (internal) storage energy levels. The full merit-order forecast information is required to implement a perfect-foresight optimisation. Optimisation is done by finding the best sequence of states, also considering (dis-)charging efficiencies. Self discharge is not considered during optimisation, but tracked during schedule building. I.e., self discharge will not trigger rescheduling events, but the found schedule is not guaranteed to be optimal.- Author:
- Evelyn Sperber, Christoph Schimeczek
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class agents.storage.arbitrageStrategists.ArbitrageStrategist
ArbitrageStrategist.StrategistType
-
-
Field Summary
Fields Modifier and Type Field Description protected int[][]
bestNextState
bestNextState[t][i]: best next internal state identified when current state is i in period tprotected double
internalEnergyPerState
delta of internal energy in MWH associated with an increase of one discrete charging stateprotected int
numberOfEnergyStates
total number of discrete states representing the storage state of chargeprotected int
numberOfTransitionStates
number of discrete states to model an energy state transitionstatic de.dlr.gitlab.fame.agent.input.Tree
parameters
Specific input parameters for storage strategists using dynamic programming-
Fields inherited from class agents.storage.arbitrageStrategists.ArbitrageStrategist
logger, scheduledInitialInternalEnergyInMWH, storage, StrategistTypeParam
-
Fields inherited from class agents.flexibility.Strategist
bidToleranceParam, demandScheduleInMWH, ERR_PROVIDE_FORECAST, ERR_UNKNOWN_STRATEGIST, ERR_UNKNOWN_UPDATE_TYPE, ERR_USE_MERIT_ORDER_FORECAST, ERR_USE_PRICE_FORECAST, forecastPeriodParam, forecastSteps, forecastUpdateTypeParam, OPERATION_PERIOD, priceScheduleInEURperMWH, scheduledBidPricesInEURperMWH, scheduleDurationParam, scheduleDurationPeriods
-
-
Constructor Summary
Constructors Constructor Description DynamicProgrammingStrategist(de.dlr.gitlab.fame.agent.input.ParameterData generalInput, de.dlr.gitlab.fame.agent.input.ParameterData specificInput, Device storage)
Creates aDynamicProgrammingStrategist
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract double
calcBidPrice(de.dlr.gitlab.fame.time.TimePeriod timePeriod, double externalEnergyDelta)
Calculates bidding price for given time period and planned external energy deltaprotected int
calcFinalStateLowerBound(int initialState)
Calculates lowest final state reachable from given initial stateprotected int
calcFinalStateUpperBound(int initialState)
Calculates highest final state reachable from given initial stateprotected abstract void
clearPlanningArrays()
replaces all entries in the planning arrays with 0 or Integer.MIN_VALUEdouble
getChargingPowerForecastInMW(de.dlr.gitlab.fame.time.TimeStamp targetTime)
Returns forecasted external charging power, if possible - otherwise throws a RuntimeEceptionprotected abstract void
optimiseDispatch(de.dlr.gitlab.fame.time.TimePeriod startPeriod)
optimise the dispatch based on the specific optimisation targetvoid
updateSchedule(de.dlr.gitlab.fame.time.TimePeriod startTimePeriod)
Updates schedule arrays starting at the given TimePeriod with the given initial energy levelprotected void
updateScheduleArrays(de.dlr.gitlab.fame.time.TimePeriod firstPeriod)
For scheduling period: updates arrays for expected initial energy levels, (dis-)charging power and bidding prices-
Methods inherited from class agents.storage.arbitrageStrategists.ArbitrageStrategist
calcNumberOfEnergyStates, callOnSensitivity, createStrategist, ensureWithinEnergyBounds, getInternalEnergySchedule
-
Methods inherited from class agents.flexibility.Strategist
clearSensitivitiesBefore, createBlankSensitivity, createSchedule, getMissingForecastTimes, getSensitivityForPeriod, getTimesMissingElectricityForecasts, storeElectricityPriceForecast, storeMeritOrderForesight, updateBidSchedule
-
-
-
-
Field Detail
-
parameters
public static final de.dlr.gitlab.fame.agent.input.Tree parameters
Specific input parameters for storage strategists using dynamic programming
-
numberOfTransitionStates
protected final int numberOfTransitionStates
number of discrete states to model an energy state transition
-
numberOfEnergyStates
protected final int numberOfEnergyStates
total number of discrete states representing the storage state of charge
-
internalEnergyPerState
protected final double internalEnergyPerState
delta of internal energy in MWH associated with an increase of one discrete charging state
-
bestNextState
protected final int[][] bestNextState
bestNextState[t][i]: best next internal state identified when current state is i in period t
-
-
Constructor Detail
-
DynamicProgrammingStrategist
public DynamicProgrammingStrategist(de.dlr.gitlab.fame.agent.input.ParameterData generalInput, de.dlr.gitlab.fame.agent.input.ParameterData specificInput, Device storage) throws de.dlr.gitlab.fame.agent.input.ParameterData.MissingDataException
Creates aDynamicProgrammingStrategist
- Parameters:
generalInput
- general parameters associated with strategistsspecificInput
- specific parameters for this type of strategiststorage
- device to be optimised- Throws:
de.dlr.gitlab.fame.agent.input.ParameterData.MissingDataException
- if any required input is missing
-
-
Method Detail
-
updateSchedule
public void updateSchedule(de.dlr.gitlab.fame.time.TimePeriod startTimePeriod)
Description copied from class:Strategist
Updates schedule arrays starting at the given TimePeriod with the given initial energy level- Specified by:
updateSchedule
in classStrategist
- Parameters:
startTimePeriod
- first period of the schedule to be created
-
clearPlanningArrays
protected abstract void clearPlanningArrays()
replaces all entries in the planning arrays with 0 or Integer.MIN_VALUE
-
optimiseDispatch
protected abstract void optimiseDispatch(de.dlr.gitlab.fame.time.TimePeriod startPeriod)
optimise the dispatch based on the specific optimisation target- Parameters:
startPeriod
- first period of the schedule to be created
-
updateScheduleArrays
protected final void updateScheduleArrays(de.dlr.gitlab.fame.time.TimePeriod firstPeriod)
For scheduling period: updates arrays for expected initial energy levels, (dis-)charging power and bidding prices- Parameters:
firstPeriod
- of the new schedule
-
calcBidPrice
protected abstract double calcBidPrice(de.dlr.gitlab.fame.time.TimePeriod timePeriod, double externalEnergyDelta)
Calculates bidding price for given time period and planned external energy delta- Parameters:
timePeriod
- at which the (dis-)charging action happensexternalEnergyDelta
- planned to take place; > 0: charging < 0: discharging- Returns:
- bidding price depending on time and type of action
-
calcFinalStateLowerBound
protected final int calcFinalStateLowerBound(int initialState)
Calculates lowest final state reachable from given initial state- Parameters:
initialState
- internal energy state at the beginning of the transition- Returns:
- lower bound (inclusive) of discrete states reachable from specified initialState
-
calcFinalStateUpperBound
protected final int calcFinalStateUpperBound(int initialState)
Calculates highest final state reachable from given initial state- Parameters:
initialState
- internal energy state at the beginning of the transition- Returns:
- upper bound (inclusive) of discrete states reachable from specified initialState
-
getChargingPowerForecastInMW
public double getChargingPowerForecastInMW(de.dlr.gitlab.fame.time.TimeStamp targetTime)
Description copied from class:ArbitrageStrategist
Returns forecasted external charging power, if possible - otherwise throws a RuntimeEception- Specified by:
getChargingPowerForecastInMW
in classArbitrageStrategist
- Parameters:
targetTime
- for which to provide the forecast- Returns:
- forecasted external charging power in MW
-
-