Package agents.policy
Class PolicyItem
- java.lang.Object
-
- agents.policy.PolicyItem
-
- All Implemented Interfaces:
de.dlr.gitlab.fame.communication.transfer.Portable
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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PolicyItem.SupportInstrument
Available support instruments
-
Constructor Summary
Constructors Constructor Description PolicyItem()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static PolicyItem
buildPolicy(PolicyItem.SupportInstrument instrument, de.dlr.gitlab.fame.agent.input.ParameterData group)
Instantiates aPolicyItem
from given configuration - returns null if matching configuration is not presentabstract double
calcCapacitySupportRate(de.dlr.gitlab.fame.time.TimePeriod accountingPeriod)
Calculate the support rate in EUR/MW per eligible installed capacityabstract double
calcEligibleCapacity(SupportRequestData request)
Calculate the capacity eligible for support under the given instrumentprotected 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 pricesabstract double
calcEligibleInfeed(TreeMap<de.dlr.gitlab.fame.time.TimeStamp,Double> powerPrices, SupportRequestData request)
Calculate the infeed eligible for support under the given instrumentabstract double
calcInfeedSupportRate(de.dlr.gitlab.fame.time.TimePeriod accountingPeriod, double marketValue)
Calculate the support rate in EUR/MWh per eligible infeedstatic Class<? extends PolicyItem>
getClass(PolicyItem.SupportInstrument instrument)
Return the Subtype ofPolicyItem
implementing the given instrumentabstract PolicyItem.SupportInstrument
getSupportInstrument()
protected boolean
isEligible(int maxNumberOfNegativeHours, int actualNegativeHours)
Returnstrue
if given actual number of hours with negative prices is below their maximum allowed number, otherwise returnsfalse
.abstract boolean
isTypeOfMarketPremium()
protected int
readMaxNumberOfNegativeHours(de.dlr.gitlab.fame.agent.input.ParameterData group)
Read data for maximum number of negative hours from given inputprotected abstract void
setDataFromConfig(de.dlr.gitlab.fame.agent.input.ParameterData group)
Initialises an emptyPolicyItem
with its associated config data
-
-
-
Method Detail
-
buildPolicy
public static PolicyItem buildPolicy(PolicyItem.SupportInstrument instrument, de.dlr.gitlab.fame.agent.input.ParameterData group)
Instantiates aPolicyItem
from given configuration - returns null if matching configuration is not present- Parameters:
instrument
- type of support instrument to read from given data groupgroup
- 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
-
getClass
public static Class<? extends PolicyItem> getClass(PolicyItem.SupportInstrument instrument)
Return the Subtype ofPolicyItem
implementing the given instrument- Parameters:
instrument
- to get the implementing class for- Returns:
PolicyItem
implementing the givenPolicyItem.SupportInstrument
-
setDataFromConfig
protected abstract void setDataFromConfig(de.dlr.gitlab.fame.agent.input.ParameterData group) throws de.dlr.gitlab.fame.agent.input.ParameterData.MissingDataException
Initialises an emptyPolicyItem
with its associated config data- Parameters:
group
- DataProvider group matching type ofPolicyItem
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
-
getSupportInstrument
public abstract PolicyItem.SupportInstrument getSupportInstrument()
- Returns:
PolicyItem.SupportInstrument
thisPolicyItem
is covering
-
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 occurredrequest
- 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 ratemarketValue
- 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 supporttimes
- at which to check for eligibilitypowerPrices
- 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)
Returnstrue
if given actual number of hours with negative prices is below their maximum allowed number, otherwise returnsfalse
.- Parameters:
maxNumberOfNegativeHours
- max number of hours with negative prices in a row that are still eligible for supportactualNegativeHours
- 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)
-
-