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> powerIncrementFunction)

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.
  • powerIncrementFunction – a function that defines how the power consumption increases along the time. This function receives the utilization percentage in scale from 0 to 100 and returns a factor representing how the power consumption will increase for the given utilization percentage. The function return is again a percentage value between [0 and 1].

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)