Class MonthlyEquivalence


  • public class MonthlyEquivalence
    extends ElectrolyzerStrategist
    Strategist for operation of an electrolysis unit operation plus corresponding bidding strategies for purchasing grey electricity and selling green electricity. This Strategist tries to maximise profits while **not** jeopardizing the monthly green hydrogen production equivalence. It considers forecasts of:
    • costs for buying green electricity from a PPA contract partner,
    • costs for buying grey electricity from the day-ahead market,
    • rewards of selling green electricity to the day-head market,
    • rewards of selling green hydrogen to the fuels market,
    • amount of available green electricity produced by a PPA contract partner,
    • operational restrictions of the employed electrolysis unit.
    Based on these forecasts a multi-layered operation and bidding strategy is devised, considering:
    • The sum of produced hydrogen is (just) below the sum of its green electricity equivalent produced by the PPA contract partner (monthly equivalence).
    • If electricity prices exceed their corresponding hydrogen value, all green electricity is sold.
    • Surplus green electricity is sold, if the electricity price is above the negative corresponding hydrogen value.
    • Green electricity is curtailed if electricity prices are below that threshold and monthly equivalence is not endangered.
    Months are considered to have an identical number of hours.
    Author:
    Christoph Schimeczek, Johannes Kochems
    • Constructor Detail

      • MonthlyEquivalence

        protected MonthlyEquivalence​(de.dlr.gitlab.fame.agent.input.ParameterData input)
                              throws de.dlr.gitlab.fame.agent.input.ParameterData.MissingDataException
        Parameters:
        input - parameters associated with this strategist
        Throws:
        de.dlr.gitlab.fame.agent.input.ParameterData.MissingDataException - if any required input is missing
    • Method Detail

      • getTimesMissingPpaForecast

        public ArrayList<de.dlr.gitlab.fame.time.TimeStamp> getTimesMissingPpaForecast​(de.dlr.gitlab.fame.time.TimePeriod firstTime)
        Returns list of times at which PPA forecasts are missing but needed for schedule planning
        Parameters:
        firstTime - first time period to be covered by a created schedule
        Returns:
        List of TimeStamps at which PpaInformation is not yet defined
      • storePpaForecast

        public void storePpaForecast​(de.dlr.gitlab.fame.time.TimePeriod timePeriod,
                                     PpaInformation ppaInformation)
        Stores given PpaInformation at the specified TimePeriod
        Parameters:
        timePeriod - at which the PpaInformation is valid
        ppaInformation - to be stored for later reference
      • getPpaForPeriod

        public PpaInformation getPpaForPeriod​(de.dlr.gitlab.fame.time.TimePeriod timePeriod)
        Returns PpaInformation stored earlier for the given TimePeriod
        Parameters:
        timePeriod - to search for
        Returns:
        previously stored PpaInformation for the specified TimePeriod or null if no data is available at the specified TimePeriod
      • storeMeritOrderForesight

        public void storeMeritOrderForesight​(de.dlr.gitlab.fame.time.TimePeriod timePeriod,
                                             SupplyOrderBook supplyForecast,
                                             DemandOrderBook demandForecast)
        Description copied from class: Strategist
        Stores given supply and demand bid forecasts for the associated TimePeriod: merit-order forecasting method
        Overrides:
        storeMeritOrderForesight in class Strategist
        Parameters:
        timePeriod - associated with the forecast data
        supplyForecast - forecasted supply OrderBook
        demandForecast - forecasted demand OrderBook
      • getValidSchedule

        public DispatchSchedule getValidSchedule​(de.dlr.gitlab.fame.time.TimeStamp targetTime)
        Description copied from class: ElectrolyzerStrategist
        Returns a valid schedule for the given target time
        Overrides:
        getValidSchedule in class ElectrolyzerStrategist
        Parameters:
        targetTime - to return a valid schedule for
        Returns:
        the previous schedule (if still valid) or a newly created one
      • updateSchedule

        protected void updateSchedule​(de.dlr.gitlab.fame.time.TimePeriod timePeriod)
        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
        Parameters:
        timePeriod - first period of the schedule to be created
      • getHourWithLowestEconomicPotential

        protected int getHourWithLowestEconomicPotential​(int endOfHorizon)
        Parameters:
        endOfHorizon - last step of planning horizon
        Returns:
        Hour with lowest, but positive economic potential among those with scheduled purchase; -1 if no such hour exists
      • updateProducedHydrogenTotal

        public void updateProducedHydrogenTotal​(double producedHydrogenInMWH)
        Description copied from class: ElectrolyzerStrategist
        Updates produced hydrogen total by adding the given amount
        Overrides:
        updateProducedHydrogenTotal in class ElectrolyzerStrategist
        Parameters:
        producedHydrogenInMWH - amount of produced hydrogen to add to the total
      • updateGreenElectricitySurplus

        public void updateGreenElectricitySurplus​(double greenElectricitySurplusInMWH)
        Adds the given green electricity surplus (or deficit if negative) to the running total of the current months green electricity surplus
        Parameters:
        greenElectricitySurplusInMWH - amount of green electricity surplus to add
      • resetMonthly

        public void resetMonthly​(de.dlr.gitlab.fame.time.TimeStamp beginOfNextMonth)
        Resets the current status of the Strategist to a new month: deletes the schedule and resets the green electricity surplus to Zero
        Parameters:
        beginOfNextMonth - first TimeStamp at the beginning of the next month
      • getInternalEnergySchedule

        protected double[] getInternalEnergySchedule()
        Replaces internal energy schedule: the relevant state to monitor in the schedule is the green electricity surplus
        Overrides:
        getInternalEnergySchedule in class ElectrolyzerStrategist
        Returns:
        array representing the expected internal energy state of the controlled flexibility