Class TimeOfUseTariffUtils
- java.lang.Object
-
- io.openems.edge.timeofusetariff.api.utils.TimeOfUseTariffUtils
-
public class TimeOfUseTariffUtils extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description TimeOfUseTariffUtils()
-
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.
-
-
-
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
- theClock
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
- theClock
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
- theZonedDateTime
minutes
- the custom minutes to roundoff to.- Returns:
- the rounded result
-
-