Class WeightsUtil


  • public class WeightsUtil
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      WeightsUtil()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void adjustSortingByWeights​(java.util.List<Inverter> inverters)
      Adjust the sorting of Inverters by weights.
      static void sortByWeights​(java.util.List<Inverter> inverters)
      Sorts the list of Inverters by their weights descending.
      static void updateWeightsFromSoc​(java.util.List<Inverter> inverters, java.util.List<ManagedSymmetricEss> esss)
      Sets the weight of each Inverter according to the SoC of its ESS.
      • Methods inherited from class java.lang.Object

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

      • WeightsUtil

        public WeightsUtil()
    • Method Detail

      • updateWeightsFromSoc

        public static void updateWeightsFromSoc​(java.util.List<Inverter> inverters,
                                                java.util.List<ManagedSymmetricEss> esss)
        Sets the weight of each Inverter according to the SoC of its ESS.
        Parameters:
        inverters - a List of inverters
        esss - list of ManagedSymmetricEsss
      • sortByWeights

        public static void sortByWeights​(java.util.List<Inverter> inverters)
        Sorts the list of Inverters by their weights descending.
        Parameters:
        inverters - a List of inverters
      • adjustSortingByWeights

        public static void adjustSortingByWeights​(java.util.List<Inverter> inverters)
        Adjust the sorting of Inverters by weights.

        This is different to 'invertersSortByWeights()' in that it tries to avoid resorting the entire list all the time. Instead it only adjusts the list slightly.

        Parameters:
        inverters - a List of inverters