PowerModelSimple

public class PowerModelSimple extends PowerModelAbstract

A power model where the power consumption is defined by a UnaryOperator function given as parameter to the constructor. This way, the user can define how the power consumption increases along the time without requiring to create a new class for it.

However, specific classes that implement well known models are provided, such as PowerModelLinear, PowerModelSquare, PowerModelCubic and PowerModelSqrt.

Author:Manoel Campos da Silva Filho

Constructors

PowerModelSimple

public PowerModelSimple(double maxPower, double staticPowerPercent, UnaryOperator<Double> powerFunction)

Instantiates a PowerModelSimple.

Parameters:
  • maxPower – the max power that can be consumed in Watt-Second (Ws).
  • staticPowerPercent – the static power usage percentage between [0 and 1].
  • powerFunction – A function defining how the power consumption is computed based on the CPU utilization. When called, this function receives the utilization percentage in scale from [0 to 100] and must return the base power consumption for that CPU utilization. The function is only accountable to compute the base energy consumption because the total energy consumption depends on other factors such as the static power consumed by the Host, independent of its CPU usage.

Methods

getConstant

protected double getConstant()

Gets the constant which represents the power consumption for each fraction of resource used in Watt-Second (Ws).

Returns:the power consumption constant in Watt-Second (Ws)

getMaxPower

public double getMaxPower()

getPowerInternal

protected double getPowerInternal(double utilization)

getStaticPower

public final double getStaticPower()

Gets the static power consumption in Watt-Second (Ws) that is not dependent of resource usage, according to the getStaticPowerPercent(). It is the amount of energy consumed even when the host is idle.

Returns:the static power usage in Watt-Second (Ws)

getStaticPowerPercent

public double getStaticPowerPercent()

Gets the static power consumption percentage (between 0 and 1) that is not dependent of resource usage. It is the amount of energy consumed even when the host is idle.

Returns:the static power consumption percentage (between 0 and 1)