public abstract class PowerModelAbstract extends Object implements PowerModel
PowerModel
.NULL
Constructor and Description |
---|
PowerModelAbstract() |
Modifier and Type | Method and Description |
---|---|
double |
getEnergyLinearInterpolation(double fromUtilization,
double toUtilization,
double time)
Gets an estimation of energy consumption using linear interpolation of the utilization
change for a given time interval.
|
Host |
getHost() |
double |
getPower()
Gets the current power supply in Watts (w).
|
double |
getPower(double utilization)
Gets the power supply in Watts (W), according to the utilization
percentage of a critical resource, such as CPU
(which is currently the only resource considered).
|
protected abstract double |
getPowerInternal(double utilization)
An internal method to be implemented by sub classes
to get the power supply for the current CPU utilization.
|
void |
setHost(Host host) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getMaxPower
getPowerInKWatts, wattsSecToKWattsHour
public Host getHost()
getHost
in interface PowerModel
public final void setHost(Host host)
setHost
in interface PowerModel
public double getPower()
PowerAware
getPower
in interface PowerAware
PowerAware.getPowerInKWatts()
public final double getPower(double utilization) throws IllegalArgumentException
PowerModel
getPower
in interface PowerModel
utilization
- the utilization percentage (between [0 and 1]) of a
resource that impacts power supply.IllegalArgumentException
- when the utilization percentage is not
between [0 and 1]protected abstract double getPowerInternal(double utilization) throws IllegalArgumentException
The basic parameter validation is performed by the getPower(double)
method.
utilization
- the utilization percentage (between [0 and 1]) of a
resource that is critical for power supply.IllegalArgumentException
- when the utilization percentage is not
between [0 and 1]public double getEnergyLinearInterpolation(double fromUtilization, double toUtilization, double time)
PowerModel
PowerModel
in order to get power usage data.getEnergyLinearInterpolation
in interface PowerModel
fromUtilization
- the initial utilization percentagetoUtilization
- the final utilization percentagetime
- the time span (in seconds) between the initial and final utilization to compute the energy consumptionCopyright © 2015–2019 Systems, Security and Image Communication Lab - Instituto de Telecomunica����es (IT) - Universidade da Beira Interior (UBI) - Instituto Federal de Educa����o Ci��ncia e Tecnologia do Tocantins (IFTO). All rights reserved.