Class DemandBalancer


  • public class DemandBalancer
    extends Object
    Encapsulates the actual market coupling algorithm; Dispatch the demand among energy exchanges in order to maximise the total welfare. To this end, the algorithm reduces price differences of connected markets by transferring demand bids.
    Author:
    A. Achraf El Ghazi, Felix Nitsch
    • Field Detail

      • MIN_SHIFT_AMOUNT_IN_MWH

        public static final double MIN_SHIFT_AMOUNT_IN_MWH
        Minimal amount of energy to be shifted between markets
        See Also:
        Constant Field Values
    • Constructor Detail

      • DemandBalancer

        public DemandBalancer​(double minEffectiveDemandOffset)
        Creates new DemandBalancer
        Parameters:
        minEffectiveDemandOffset - added to the demand shift in order to enforce price changes
    • Method Detail

      • balance

        public void balance​(Map<Long,​CouplingData> couplingRequests)
        Maximises the overall welfare by balancing the demand among all participant DayAheadMarkets under given transmission capacity constraints.
        The algorithm guarantees correctness and termination, within some tolerance parameters, by computing and applying two criteria: (1) shifting only the minimal-effective-demand at a time, and (2) processing always the most-effective-pair of {EnergyExchange}s first. The minimal-effective-demand is the maximum demand that can be shifted from the more expensive EnergyExchange to the less one without reducing the clearing-price of the more expensive one plus minEffectiveDemandOffset. The most-effective-pair are the two DayAheadMarkets with the largest market-clearing-price difference and allow to shift the minimal-effective-demand from the more expensive to the less (maximal-non-effective-demand). The tolerance parameters are: + minEffectiveDemandOffset which sets how much demand is added to the computed maximal-non-effective-demand to achieve price change via demand shifting.
        Parameters:
        couplingRequests - map of market id to CouplingData of all markets that have to be coupled - to be updated by this method