Class 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
    Christoph Schimeczek
    • 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
    • Constructor Detail

      • MeritOrderSensitivity

        public MeritOrderSensitivity()
    • Method Detail

      • updatePowers

        public final void updatePowers​(double maxChargePowerInMW,
                                       double maxDischargePowerInMW)
        sets maximum charging and discharging powers in MW according to specified values
        maxChargePowerInMW - to be set
        maxDischargePowerInMW - to be set
      • updateSensitivities

        public final void updateSensitivities​(SupplyOrderBook supplyBook,
                                              DemandOrderBook demandBook)
        updates sensitivities from given order books
        supplyBook - order book with supply orders after clearing
        demandBook - order book with demand orders after clearing
      • selectOrderBookItems

        protected abstract void selectOrderBookItems​(SupplyOrderBook supplyBook,
                                                     DemandOrderBook demandBook)
        pick from given supply and / or demand OrderBooks - and add picked one(s) to this sensitivity
        supplyBook - order book with supply orders after clearing
        demandBook - 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
        item - to inspect
        true if block power of given OrderBookItem is larger than Zero
      • extractOrders

        protected void extractOrders​(OrderBook book)
        Adds entries of given OrderBook (depending on its type) to either charging or discharging sensitivity
        book - to be read out
      • calcMonetaryValue

        protected abstract double calcMonetaryValue​(SensitivityItem item)
        Calculates monetary value of given item
        item - to assess
        monetary value of this SensitivityItem according to this Sensitivity type
      • getValuesInSteps

        public double[] getValuesInSteps​(int numberOfTransitionSteps)
        Calculate sensitivity in equally distributed steps of power
        numberOfTransitionSteps - to determine the granularity of the created sensitivity
        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
        numberOfTransitionSteps - to consider
        StepPower corresponding to step values returned by getValuesInSteps(int)
      • calcValueOfItemAtPower

        protected abstract double calcValueOfItemAtPower​(SensitivityItem item,
                                                         double power)
        Calculates value of given sensitivity item at specified power
        item - that is to be evaluated
        power - to be applied
        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
        electricityPriceForecast - value to store
      • isEmpty

        public boolean isEmpty()
        true if sensitivities have not been set yet