Class MeritOrderSensitivity
- java.lang.Object
-
- agents.markets.meritOrder.sensitivities.MeritOrderSensitivity
-
- Direct Known Subclasses:
MarginalCostSensitivity
,PriceNoSensitivity
,PriceSensitivity
public abstract class MeritOrderSensitivity extends Object
Represents changes of a merit-order derived value (e.g. electricity price or system cost) when the awarded power for supply or demand are changed- Author:
- Christoph Schimeczek
-
-
Field Summary
Fields Modifier and Type Field Description protected ArrayList<SensitivityItem>
chargingItems
list of changes (in terms of cumulated power and price) in the merit order for all possible charging events of the associated flexibility deviceprotected ArrayList<SensitivityItem>
dischargingItems
list of changes (in terms of cumulated power and price) in the merit order for all possible discharging events of the associated flexibility deviceprotected double
externalChargingPowerInMW
maximum external charging power > 0 of the associated flexibility deviceprotected double
externalDischargingPowerInMW
maximum external discharging power > 0 of the associated flexibility device
-
Constructor Summary
Constructors Constructor Description MeritOrderSensitivity()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract double
calcMonetaryValue(SensitivityItem item)
Calculates monetary value of given itemprotected abstract double
calcValueOfItemAtPower(SensitivityItem item, double power)
Calculates value of given sensitivity item at specified powerprotected void
extractOrders(OrderBook book)
Adds entries of givenOrderBook
(depending on its type) to either charging or discharging sensitivityprotected abstract Comparator<SensitivityItem>
getComparator()
StepPower
getStepPowers(int numberOfTransitionSteps)
Returns power per step depending on given transition step count and stored charging / discharging powersdouble[]
getValuesInSteps(int numberOfTransitionSteps)
Calculate sensitivity in equally distributed steps of powerprotected boolean
hasPositiveBlockPower(OrderBookItem item)
Returns true if the given item as a positive block powerboolean
isEmpty()
protected abstract void
selectOrderBookItems(SupplyOrderBook supplyBook, DemandOrderBook demandBook)
pick from given supply and / or demandOrderBook
s - and add picked one(s) to this sensitivityvoid
updatePowers(double maxChargePowerInMW, double maxDischargePowerInMW)
sets maximum charging and discharging powers in MW according to specified valuesabstract void
updatePriceForecast(double electricityPriceForecast)
Stores fixed electricity price forecast valuevoid
updateSensitivities(SupplyOrderBook supplyBook, DemandOrderBook demandBook)
updates sensitivities from given order books
-
-
-
Field Detail
-
externalChargingPowerInMW
protected double externalChargingPowerInMW
maximum external charging power > 0 of the associated flexibility device
-
externalDischargingPowerInMW
protected double externalDischargingPowerInMW
maximum external discharging power > 0 of the associated flexibility device
-
chargingItems
protected ArrayList<SensitivityItem> chargingItems
list of changes (in terms of cumulated power and price) in the merit order for all possible charging events of the associated flexibility device
-
dischargingItems
protected ArrayList<SensitivityItem> dischargingItems
list of changes (in terms of cumulated power and price) in the merit order for all possible discharging events of the associated flexibility device
-
-
Method Detail
-
updatePowers
public final void updatePowers(double maxChargePowerInMW, double maxDischargePowerInMW)
sets maximum charging and discharging powers in MW according to specified values- Parameters:
maxChargePowerInMW
- to be setmaxDischargePowerInMW
- to be set
-
updateSensitivities
public final void updateSensitivities(SupplyOrderBook supplyBook, DemandOrderBook demandBook)
updates sensitivities from given order books- Parameters:
supplyBook
- order book with supply orders after clearingdemandBook
- order book with demand orders after clearing
-
selectOrderBookItems
protected abstract void selectOrderBookItems(SupplyOrderBook supplyBook, DemandOrderBook demandBook)
pick from given supply and / or demandOrderBook
s - and add picked one(s) to this sensitivity- Parameters:
supplyBook
- order book with supply orders after clearingdemandBook
- order book with demand orders after clearing
-
hasPositiveBlockPower
protected final boolean hasPositiveBlockPower(OrderBookItem item)
Returns true if the given item as a positive block power- Parameters:
item
- to inspect- Returns:
- true if block power of given
OrderBookItem
is larger than Zero
-
extractOrders
protected void extractOrders(OrderBook book)
Adds entries of givenOrderBook
(depending on its type) to either charging or discharging sensitivity- Parameters:
book
- to be read out
-
getComparator
protected abstract Comparator<SensitivityItem> getComparator()
- Returns:
Comparator
forSensitivityItem
s to be used by this Sensitivity type
-
calcMonetaryValue
protected abstract double calcMonetaryValue(SensitivityItem item)
Calculates monetary value of given item- Parameters:
item
- to assess- Returns:
- monetary value of this
SensitivityItem
according to this Sensitivity type
-
getValuesInSteps
public double[] getValuesInSteps(int numberOfTransitionSteps)
Calculate sensitivity in equally distributed steps of power- Parameters:
numberOfTransitionSteps
- to determine the granularity of the created sensitivity- Returns:
- values of Sensitivity in (2 * numberOfTransitionSteps + 1) steps, equally dividing max charging and discharging powers; first entry corresponds to maximum discharging power, while the last entry resembles sensitivity value at maximum charging power
-
getStepPowers
public final StepPower getStepPowers(int numberOfTransitionSteps)
Returns power per step depending on given transition step count and stored charging / discharging powers- Parameters:
numberOfTransitionSteps
- to consider- Returns:
StepPower
corresponding to step values returned bygetValuesInSteps(int)
-
calcValueOfItemAtPower
protected abstract double calcValueOfItemAtPower(SensitivityItem item, double power)
Calculates value of given sensitivity item at specified power- Parameters:
item
- that is to be evaluatedpower
- to be applied- Returns:
- value of given
SensitivityItem
at specified power according to this Sensitivity type;
when power > 0: charging, otherwise discharging
-
updatePriceForecast
public abstract void updatePriceForecast(double electricityPriceForecast)
Stores fixed electricity price forecast value- Parameters:
electricityPriceForecast
- value to store
-
isEmpty
public boolean isEmpty()
- Returns:
- true if sensitivities have not been set yet
-
-