Package agents.policy

Class PolicyItem

  • All Implemented Interfaces:
    de.dlr.gitlab.fame.communication.transfer.Portable
    Direct Known Subclasses:
    Cfd, Cp, FinancialCfd, Fit, Mpfix, Mpvar

    public abstract class PolicyItem
    extends Object
    implements de.dlr.gitlab.fame.communication.transfer.Portable
    Abstract base class for set-specific support policy parametrisations
    Author:
    Johannes Kochems, Christoph Schimeczek
    • Constructor Detail

      • PolicyItem

        public PolicyItem()
    • Method Detail

      • buildPolicy

        public static PolicyItem buildPolicy​(PolicyItem.SupportInstrument instrument,
                                             de.dlr.gitlab.fame.agent.input.ParameterData group)
        Instantiates a PolicyItem from given configuration - returns null if matching configuration is not present
        Parameters:
        instrument - type of support instrument to read from given data group
        group - data from config; group should contain requested subGroup - if not: null is returned
        Returns:
        PolicyItem initialised with matching config data; null if group contains no parameters for requested subGroup
        Throws:
        RuntimeException - if config data for given type is incomplete or if default constructor is missing / inaccessible
      • setDataFromConfig

        protected abstract void setDataFromConfig​(de.dlr.gitlab.fame.agent.input.ParameterData group)
                                           throws de.dlr.gitlab.fame.agent.input.ParameterData.MissingDataException
        Initialises an empty PolicyItem with its associated config data
        Parameters:
        group - DataProvider group matching type of PolicyItem to provide input from config
        Throws:
        de.dlr.gitlab.fame.agent.input.ParameterData.MissingDataException - if any required data is not provided
      • readMaxNumberOfNegativeHours

        protected int readMaxNumberOfNegativeHours​(de.dlr.gitlab.fame.agent.input.ParameterData group)
        Read data for maximum number of negative hours from given input
        Parameters:
        group - input group containing the requested paramter
        Returns:
        maxNumberOfNegativeHours if set or its default
      • isTypeOfMarketPremium

        public abstract boolean isTypeOfMarketPremium()
        Returns:
        true if PolicyItem returns a type of market premium
      • calcEligibleInfeed

        public abstract double calcEligibleInfeed​(TreeMap<de.dlr.gitlab.fame.time.TimeStamp,​Double> powerPrices,
                                                  SupportRequestData request)
        Calculate the infeed eligible for support under the given instrument
        Parameters:
        powerPrices - at the time the infeed occurred
        request - specifying the infeed data
        Returns:
        amount eligible for support payment in MWH based on infeed in accounting period
      • calcEligibleCapacity

        public abstract double calcEligibleCapacity​(SupportRequestData request)
        Calculate the capacity eligible for support under the given instrument
        Parameters:
        request - specifying the total capacity
        Returns:
        amount eligible for support payment in MW based on available capacity in accounting period
      • calcInfeedSupportRate

        public abstract double calcInfeedSupportRate​(de.dlr.gitlab.fame.time.TimePeriod accountingPeriod,
                                                     double marketValue)
        Calculate the support rate in EUR/MWh per eligible infeed
        Parameters:
        accountingPeriod - for which to calculate the support rate
        marketValue - of the respective energy carrier during the accounting period
        Returns:
        support rate in EUR/MWh per eligible infeed
      • calcCapacitySupportRate

        public abstract double calcCapacitySupportRate​(de.dlr.gitlab.fame.time.TimePeriod accountingPeriod)
        Calculate the support rate in EUR/MW per eligible installed capacity
        Parameters:
        accountingPeriod - for which to calculate the support rate
        Returns:
        support rate in EUR/MW per installed capacity
      • calcEligibleHours

        protected TreeMap<de.dlr.gitlab.fame.time.TimeStamp,​Boolean> calcEligibleHours​(int maxNumberOfNegativeHours,
                                                                                             Set<de.dlr.gitlab.fame.time.TimeStamp> times,
                                                                                             TreeMap<de.dlr.gitlab.fame.time.TimeStamp,​Double> powerPrices)
        Calculates at which times infeed is eligible for support based on the maximum number of hours with negative prices and the actual power prices
        Parameters:
        maxNumberOfNegativeHours - max number of hours with negative prices in a row that are still eligible for support
        times - at which to check for eligibility
        powerPrices - that occurred in the past
        Returns:
        mask of hours eligible for support: positive if number of negative hours is less than allowed maximum
      • isEligible

        protected boolean isEligible​(int maxNumberOfNegativeHours,
                                     int actualNegativeHours)
        Returns true if given actual number of hours with negative prices is below their maximum allowed number, otherwise returns false.
        Parameters:
        maxNumberOfNegativeHours - max number of hours with negative prices in a row that are still eligible for support
        actualNegativeHours - actual number of hours with negative prices in a row
        Returns:
        true if given actual negative hour count is smaller or equal than maximum number of negative hours (if defined)