Class LinearPowerModelCalculator
- java.lang.Object
-
- de.fzi.power.interpreter.calculators.AbstractResourcePowerModelCalculator
-
- de.fzi.power.interpreter.calculators.essential.LinearPowerModelCalculator
-
- All Implemented Interfaces:
IResourcePowerModelCalculator
public class LinearPowerModelCalculator extends AbstractResourcePowerModelCalculator
Creates a calculator that evaluates the power consumptionP
of aPowerConsumingResource
by interpolating between the resource's minimumP_min
and maximum power consumptionP_min
using the utilizationUtil
of the specific resource:
P = P_min + Util * (P_max - P_min)
-
-
Field Summary
-
Fields inherited from class de.fzi.power.interpreter.calculators.AbstractResourcePowerModelCalculator
binding
-
-
Constructor Summary
Constructors Constructor Description LinearPowerModelCalculator(ResourcePowerBinding binding)
Create a calculator for a linear power model.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.jscience.physics.amount.Amount<javax.measure.quantity.Power>
calculate(Collection<org.palladiosimulator.measurementframework.MeasuringValue> measurements)
Calculate the power consumption using a linear power model.Set<org.palladiosimulator.metricspec.MetricDescription>
getInputMetrics()
Returns the set of metrics for which this calculator needs measurements to be able to calculate the power consumption.
-
-
-
Constructor Detail
-
LinearPowerModelCalculator
public LinearPowerModelCalculator(ResourcePowerBinding binding)
Create a calculator for a linear power model.- Parameters:
powerConsumingResource
- The resource for which the calculator is created.
-
-
Method Detail
-
calculate
public org.jscience.physics.amount.Amount<javax.measure.quantity.Power> calculate(Collection<org.palladiosimulator.measurementframework.MeasuringValue> measurements)
Calculate the power consumption using a linear power model.- Specified by:
calculate
in interfaceIResourcePowerModelCalculator
- Specified by:
calculate
in classAbstractResourcePowerModelCalculator
- Parameters:
measurements
- TheMeasuringValue
s used for evaluation. More precisely, this calculator type requires that the collection contain at least one element of that represents a utilization measurement.
However, an empty collection is also valid: This is treated like a sole measurement that represents idleness (zero utilization).- Returns:
- The evaluated power consumption.
- See Also:
AbstractResourcePowerModelCalculator.calculate(Collection)
-
getInputMetrics
public Set<org.palladiosimulator.metricspec.MetricDescription> getInputMetrics()
Description copied from interface:IResourcePowerModelCalculator
Returns the set of metrics for which this calculator needs measurements to be able to calculate the power consumption.- Specified by:
getInputMetrics
in interfaceIResourcePowerModelCalculator
- Specified by:
getInputMetrics
in classAbstractResourcePowerModelCalculator
- Returns:
- The set of required metric descriptions.
-
-