source: DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/PowerLeakageEnergyEstimationPlugin.java @ 1583

Revision 1583, 1.1 KB checked in by wojtekp, 9 years ago (diff)
RevLine 
[1500]1package experiments.simpat2014.models.article;
[1469]2
3import schedframe.resources.computing.profiles.energy.ResourceEvent;
4import schedframe.resources.devices.Device;
5import schedframe.resources.devices.PhysicalResource;
6import schedframe.scheduling.manager.tasks.JobRegistry;
7import example.energy.BaseEnergyEstimationPlugin;
8
[1583]9
[1469]10public class PowerLeakageEnergyEstimationPlugin extends BaseEnergyEstimationPlugin{
11
12        public double estimatePowerConsumption(ResourceEvent event, JobRegistry jobRegistry,
13                        PhysicalResource resource) {
14
[1583]15                double powerLekage = 0;
[1469]16                Device pl = (Device) resource;
[1583]17                double tempDiff = pl.getComputingResource().getThermalInterface().getRecentTemperature().getValue() - 65;
18                if(tempDiff < 0)
19                        return 0;
20
21                powerLekage = 0.02 * tempDiff * pl.getComputingResource().getPowerInterface().getRecentPowerUsage().getValue();
22                //powerConsumption = factor * pl.getComputingResource().getPowerInterface().getRecentPowerUsage().getValue();
[1469]23                /*Device pl = (Device) resource;
24                if(pl.getComputingResource().getThermalInterface().getRecentTemperature().getValue() > 90){
25                        powerConsumption = powerConsumption + 15;
26                }*/
[1583]27                return powerLekage;
[1469]28        }
29
30
31}
Note: See TracBrowser for help on using the repository browser.