Class WeightsUtil


public class WeightsUtil extends Object
  • Constructor Details

    • WeightsUtil

      public WeightsUtil()
  • Method Details

    • updateWeightsFromSoc

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

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

      public static void adjustSortingByWeights(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.

      inverters - a List of inverters