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
  • 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 of the entity for specific CPU utilization percentage. The index of the list represents the CPU utilization percentage and the value, the power consumption for that percentage.

      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]