Class TimeOfUseTariffUtils


  • public class TimeOfUseTariffUtils
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static TimeOfUsePrices getNext24HourPrices​(java.time.Clock clock, com.google.common.collect.ImmutableSortedMap<java.time.ZonedDateTime,​java.lang.Float> priceMap, java.time.ZonedDateTime updateTimeStamp)
      Returns the Array of 24 hour [96 quarterly] electricity prices in EUR/MWh.
      static java.time.ZonedDateTime getNowRoundedDownToMinutes​(java.time.Clock clock, int minutes)
      Gets 'now' from the Clock and rounds it down to required minutes.
      static java.time.ZonedDateTime getNowRoundedDownToMinutes​(java.time.ZonedDateTime now, int minutes)
      Gets 'now' from the Clock and rounds it down to required minutes.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TimeOfUseTariffUtils

        public TimeOfUseTariffUtils()
    • Method Detail

      • getNext24HourPrices

        public static TimeOfUsePrices getNext24HourPrices​(java.time.Clock clock,
                                                          com.google.common.collect.ImmutableSortedMap<java.time.ZonedDateTime,​java.lang.Float> priceMap,
                                                          java.time.ZonedDateTime updateTimeStamp)
        Returns the Array of 24 hour [96 quarterly] electricity prices in EUR/MWh.
        Parameters:
        clock - the Clock
        priceMap - ImmutableSortedMap with quarterly Time stamps and the price.
        updateTimeStamp - time when prices are retrieved.
        Returns:
        the quarterly prices of next 24 hours along with the time they are retrieved.
      • getNowRoundedDownToMinutes

        public static java.time.ZonedDateTime getNowRoundedDownToMinutes​(java.time.Clock clock,
                                                                         int minutes)
        Gets 'now' from the Clock and rounds it down to required minutes.
        Parameters:
        clock - the Clock
        minutes - the custom minutes to roundoff to.
        Returns:
        the rounded result
      • getNowRoundedDownToMinutes

        public static java.time.ZonedDateTime getNowRoundedDownToMinutes​(java.time.ZonedDateTime now,
                                                                         int minutes)
        Gets 'now' from the Clock and rounds it down to required minutes.
        Parameters:
        now - the ZonedDateTime
        minutes - the custom minutes to roundoff to.
        Returns:
        the rounded result