Class PowerModelHostSpec

java.lang.Object
org.cloudbus.cloudsim.power.models.PowerModelHost
org.cloudbus.cloudsim.power.models.PowerModelHostSpec
All Implemented Interfaces:
PowerModel

public class PowerModelHostSpec extends PowerModelHost
Since:
CloudSim Plus 6.0.0
Author:
Anton Beloglazov
  • Field Details

    • MIN_POWER_CONSUMPTION_DATA_SIZE

      public static final int MIN_POWER_CONSUMPTION_DATA_SIZE
      Since powerSpec represents the power consumption data according to CPU utilization, as shorter the size of such a List, less accurate is the power consumption according to CPU utilization. Check mentioned attribute for details. Less than 2 entries doesn't make any sense, since for any CPU utilization, the power consumption will be the same.
      See Also:
  • Constructor Details

    • PowerModelHostSpec

      public PowerModelHostSpec(List<Double> powerSpec)
      Instantiates a PowerModelHostSpec providing the power consumption data of the entity for different CPU utilization percentages.
      Parameters:
      powerSpec - a list where each element represents the power consumption (in Watts) of the entity for specific CPU utilization percentage. If the list has 10 items, each element represents the power consumption for 10% of CPU utilization. This way, the 1st item represents the power consumption for 10% of CPU utilization, the 2nd for 20% of CPU utilization and so on. If the list has 100 itens, each item represents the power consumption for 1% of CPU utilization and so no.

      If there are 100 elements in this list, element at position 1 represents the power consumption for 1% of CPU utilization, where element 100,

      represents power consumption for 100% of CPU utilization.

      If there are only 10 elements in this list, each element represents the power consumption when the CPU utilization is between an interval between [p .. p+10], where p is the CPU utilization percentage. For instance, element 0 represents the power consumption when CPU utilization is between [0 .. 10%].

  • Method Details

    • getPowerMeasurement

      public PowerMeasurement getPowerMeasurement()
      Description copied from interface: PowerModel
      Returns the entity's current power usage as a PowerMeasurement, which can hold additional information like static and dynamic fraction of power usage.
    • getPower

      public double getPower(double utilizationFraction) throws IllegalArgumentException
      Description copied from class: PowerModelHost
      Computes the hosts power usage in Watts (W) at a certain degree of utilization. Mainly for backwards compatibility.
      Specified by:
      getPower in class PowerModelHost
      Parameters:
      utilizationFraction - the utilization percentage (between [0 and 1]) of the host.
      Returns:
      the power supply in Watts (W)
      Throws:
      IllegalArgumentException - if utilizationFraction is not between [0 and 1]