source: DCWoRMS/branches/coolemall/src/experiments/e2dc2015/models/i5/PowerLeakageEnergyEstimationPlugin.java @ 1593

Revision 1593, 1.3 KB checked in by wojtekp, 8 years ago (diff)
  • Property svn:mime-type set to text/plain
RevLine 
[1593]1package experiments.e2dc2015.models.i5;
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;
8import experiments.e2dc2015.EnvironmentConditions;
9
10public class PowerLeakageEnergyEstimationPlugin extends BaseEnergyEstimationPlugin{
11
12        public double estimatePowerConsumption(ResourceEvent event, JobRegistry jobRegistry,
13                        PhysicalResource resource) {
14
15                double powerLekage = 0;
16                Device pl = (Device) resource;
17                double tempDiff = pl.getComputingResource().getThermalInterface().getRecentTemperature().getValue() - EnvironmentConditions.i5_baseLeakageTemp;
18                if(tempDiff < 0)
19                        return 0;
20                if(pl.getComputingResource().getThermalInterface().getRecentTemperature().getValue() > 90){
21                        powerLekage = 0.3 * tempDiff;
22                } else
23                        powerLekage = EnvironmentConditions.i5_leakageFactor * tempDiff;
24                //powerConsumption = factor * pl.getComputingResource().getPowerInterface().getRecentPowerUsage().getValue();
25                /*Device pl = (Device) resource;
26                if(pl.getComputingResource().getThermalInterface().getRecentTemperature().getValue() > 90){
27                        powerConsumption = powerConsumption + 15;
28                }*/
29                return powerLekage;
30        }
31
32
33}
Note: See TracBrowser for help on using the repository browser.