Class PowerModelHostSpec

java.lang.Object
org.cloudsimplus.power.models.PowerModelHostAbstract
org.cloudsimplus.power.models.PowerModelHostSpec
All Implemented Interfaces:
PowerModel, PowerModelHost

public class PowerModelHostSpec extends PowerModelHostAbstract
A power model created based on data from SPEC power benchmark.
Since:
CloudSim Plus 6.0.0
Author:
Anton Beloglazov, Manoel Campos da Silva Filho
  • Field Details

    • MIN_POWER_CONSUMPTION_DATA_SIZE

      public static final int MIN_POWER_CONSUMPTION_DATA_SIZE
      Since powerSpecs 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 the mentioned attribute for details. Less than 2 entries don't make sense, since for any CPU utilization, the power consumption will be the same.
      See Also:
  • Constructor Details

    • PowerModelHostSpec

      public PowerModelHostSpec(@NonNull @NonNull double[] powerSpecs)
      Instantiates a PowerModelHostSpec providing the power consumption data of the entity for different CPU utilization percentages.
      Parameters:
      powerSpecs - an array where each element represents the power consumption (in Watts) of the entity for specific CPU utilization percentage. Check
      invalid reference
      #getPowerSpecs()
      for more details about this data.
      See Also:
  • Method Details

    • getPowerMeasurement

      public PowerMeasurement getPowerMeasurement()
      Returns:
      the entity's current power usage as a PowerMeasurement object, which can hold additional information like static and dynamic fraction of power usage.
      See Also:
    • getPowerInternal

      protected double getPowerInternal(double utilizationFraction)
      Specified by:
      getPowerInternal in class PowerModelHostAbstract
      See Also:
    • getInstance

      public static PowerModelHostSpec getInstance(String powerSpecFilePath)

      Creates a PowerModelHostSpec instance reading the power consumption data (in Watts) from a file with a single line, where a space separates each value. The content for this file is usually obtained from https://www.spec.org.

      The power-specs directory in the examples' project contains sample files that can be used here. Check

      invalid reference
      #getPowerSpecs()
      for more details about the data of this file.
      Parameters:
      powerSpecFilePath - path to the power spec file
      Returns:
      a new PowerModelHostSpec instance