Class PowerModelHost

java.lang.Object
org.cloudbus.cloudsim.power.models.PowerModelHost
All Implemented Interfaces:
PowerModel
Direct Known Subclasses:
PowerModelHostSimple, PowerModelHostSpec

public abstract class PowerModelHost
extends Object
implements PowerModel
Abstract implementation of a host power model.
Since:
CloudSim Plus 6.0.0
  • Field Summary

    Fields
    Modifier and Type Field Description
    static PowerModelHost NULL
    An attribute that implements the Null Object Design Pattern for PowerModelHost objects.
  • Constructor Summary

    Constructors
    Constructor Description
    PowerModelHost()  
  • Method Summary

    Modifier and Type Method Description
    Host getHost()
    Gets the Host this PowerModel is collecting power consumption measurements from.
    abstract double getPower​(double utilizationFraction)
    Computes the hosts power usage in Watts (W) at a certain degree of utilization.
    void setHost​(Host host)
    Sets the Host this PowerModel will collect power consumption measurements from.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.cloudbus.cloudsim.power.models.PowerModel

    getPower, getPowerMeasurement
  • Field Details

  • Constructor Details

    • PowerModelHost

      public PowerModelHost()
  • Method Details

    • getHost

      public Host getHost()
      Gets the Host this PowerModel is collecting power consumption measurements from.
      Returns:
    • setHost

      public void setHost​(Host host)
      Sets the Host this PowerModel will collect power consumption measurements from.
      Parameters:
      host - the Host to set
    • getPower

      public abstract double getPower​(double utilizationFraction) throws IllegalArgumentException
      Computes the hosts power usage in Watts (W) at a certain degree of utilization. Mainly for backwards compatibility.
      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]