Revision 1593,
1.3 KB
checked in by wojtekp, 8 years ago
(diff) |
|
-
Property svn:mime-type set to
text/plain
|
Rev | Line | |
---|
[1593] | 1 | package experiments.e2dc2015.models.i5; |
---|
| 2 | |
---|
| 3 | import schedframe.resources.computing.profiles.energy.ResourceEvent; |
---|
| 4 | import schedframe.resources.devices.Device; |
---|
| 5 | import schedframe.resources.devices.PhysicalResource; |
---|
| 6 | import schedframe.scheduling.manager.tasks.JobRegistry; |
---|
| 7 | import example.energy.BaseEnergyEstimationPlugin; |
---|
| 8 | import experiments.e2dc2015.EnvironmentConditions; |
---|
| 9 | |
---|
| 10 | public 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.