Interface PowerModel
- All Superinterfaces:
PowerAware
- All Known Implementing Classes:
PowerModelAbstract
,PowerModelCubic
,PowerModelLinear
,PowerModelSimple
,PowerModelSpecPower
,PowerModelSpecPowerHpProLiantMl110G3PentiumD930
,PowerModelSpecPowerHpProLiantMl110G4Xeon3040
,PowerModelSpecPowerHpProLiantMl110G5Xeon3075
,PowerModelSpecPowerIbmX3250XeonX3470
,PowerModelSpecPowerIbmX3250XeonX3480
,PowerModelSpecPowerIbmX3550XeonX5670
,PowerModelSpecPowerIbmX3550XeonX5675
,PowerModelSqrt
,PowerModelSquare
public interface PowerModel extends PowerAware
Provides a model for power consumption of hosts, depending on utilization of a critical system
component, such as CPU.
This is the fundamental class to enable power-aware Hosts.
However, a Host just provides power usage data if a PowerModel is set using the
Host.setPowerModel(PowerModel)
.
The power consumption data is return in Watt-Second (Ws),
which is just in a different scale than the usual Kilowatt-Hour (kWh).
The interface implements the Null Object
Design Pattern in order to start avoiding NullPointerException
when
using the NULL
object instead of attributing null
to
PowerModel
variables.
If you are using any algorithms, policies or workload included in the power package please cite the following paper:
- Since:
- CloudSim Toolkit 2.0
- Author:
- Anton Beloglazov, Manoel Campos da Silva Filho
-
Field Summary
Fields Modifier and Type Field Description static PowerModel
NULL
A property that implements the Null Object Design Pattern forHost
objects. -
Method Summary
Modifier and Type Method 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
getMaxPower()
Gets the max power that can be supplied by the host 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).void
setHost(Host host)
Methods inherited from interface org.cloudbus.cloudsim.power.models.PowerAware
getPower, getPowerInKWatts
-
Field Details
-
Method Details
-
getHost
Host getHost() -
setHost
-
getMaxPower
double getMaxPower()Gets the max power that can be supplied by the host in Watts (W).- Returns:
- the max power supply in Watts (W)
-
getPower
double getPower(double utilization) throws java.lang.IllegalArgumentExceptionGets 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).- Parameters:
utilization
- the utilization percentage (between [0 and 1]) of a resource that impacts power supply.- Returns:
- the power supply in Watts (W)
- Throws:
java.lang.IllegalArgumentException
- when the utilization percentage is not between [0 and 1]
-
getEnergyLinearInterpolation
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. It's required to set aPowerModel
in order to get power usage data.- Parameters:
fromUtilization
- the initial utilization percentagetoUtilization
- the final utilization percentagetime
- the time span (in seconds) between the initial and final utilization to compute the energy consumption- Returns:
- the estimated energy consumption in Watts-sec (Ws)
-