Class PowerModelHostSimple
java.lang.Object
org.cloudbus.cloudsim.power.models.PowerModelHost
org.cloudbus.cloudsim.power.models.PowerModelHostSimple
- All Implemented Interfaces:
PowerModel
public class PowerModelHostSimple extends PowerModelHost
Simple power model for hosts with linear power profile.
- Since:
- CloudSim Plus 6.0.0
-
Field Summary
Fields inherited from class org.cloudbus.cloudsim.power.models.PowerModelHost
NULL
-
Constructor Summary
Constructors Constructor Description PowerModelHostSimple(double maxPower, double staticPower)
Instantiates aPowerModelHostSimple
by specifying its static and max power usage. -
Method Summary
Modifier and Type Method Description double
getMaxPower()
Gets the maximum power (in watts) the host consumes under full load.double
getPower(double utilizationFraction)
Computes the hosts power usage in Watts (W) at a certain degree of utilization.PowerMeasurement
getPowerMeasurement()
Returns the entity's current power usage as aPowerMeasurement
, which can hold additional information like static and dynamic fraction of power usage.double
getStaticPower()
Gets the static power (in watts) the host consumes when idle.Methods inherited from class org.cloudbus.cloudsim.power.models.PowerModelHost
getHost, setHost
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
-
Constructor Details
-
PowerModelHostSimple
public PowerModelHostSimple(double maxPower, double staticPower)Instantiates aPowerModelHostSimple
by specifying its static and max power usage.- Parameters:
maxPower
- power (in watts) the host consumes under full load.staticPower
- power (in watts) the host consumes when idle.
-
-
Method Details
-
getPowerMeasurement
Description copied from interface:PowerModel
Returns the entity's current power usage as aPowerMeasurement
, which can hold additional information like static and dynamic fraction of power usage. -
getPower
Computes the hosts power usage in Watts (W) at a certain degree of utilization. Mainly for backwards compatibility.- Specified by:
getPower
in classPowerModelHost
- 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]
-
getMaxPower
public double getMaxPower()Gets the maximum power (in watts) the host consumes under full load.- Returns:
-
getStaticPower
public double getStaticPower()Gets the static power (in watts) the host consumes when idle.- Returns:
-