Class DynamicProgrammingStrategist

  • Direct Known Subclasses:
    ProfitMaximiser, 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.
    Evelyn Sperber, Christoph Schimeczek
    • 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
        generalInput - general parameters associated with strategists
        specificInput - specific parameters for this type of strategist
        storage - device to be optimised
        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 class Strategist
        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
        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
        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
        timePeriod - at which the (dis-)charging action happens
        externalEnergyDelta - planned to take place; > 0: charging < 0: discharging
        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
        initialState - internal energy state at the beginning of the transition
        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
        initialState - internal energy state at the beginning of the transition
        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 class ArbitrageStrategist
        targetTime - for which to provide the forecast
        forecasted external charging power in MW
      • storeElectricityPriceForecast

        public void storeElectricityPriceForecast​(de.dlr.gitlab.fame.time.TimePeriod timePeriod,
                                                  double electricityPriceForecastInEURperMWH)
        Description copied from class: Strategist
        Stores given electricity price forecast for the associated TimePeriod: price-forecasting method
        storeElectricityPriceForecast in class Strategist
        timePeriod - associated with the forecast data
        electricityPriceForecastInEURperMWH - forecast for the electricity price in EUR per MWh