Changeset 774
- Timestamp:
- 01/10/13 10:54:36 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
DCWoRMS/trunk/src/example/energy/ComputingNodeWithFanEnergyEstimationPlugin.java
r751 r774 1 1 package example.energy; 2 2 3 import schedframe.events.scheduling.EventReason; 3 4 import schedframe.resources.computing.ComputingNode; 4 5 import schedframe.resources.computing.ComputingResource; 5 6 import schedframe.resources.computing.Processor; 6 7 import schedframe.resources.computing.profiles.energy.EnergyEvent; 8 import schedframe.resources.computing.profiles.energy.airthroughput.StandardAirThroughputStateName; 7 9 import schedframe.scheduling.manager.tasks.JobRegistry; 8 10 … … 22 24 try { 23 25 powerConsumption = powerConsumption + node.getPowerInterface().getPowerConsumption(node.getPowerInterface().getPowerState()); 24 powerConsumption = powerConsumption + node.getAirThroughputInterface().getPowerConsumption(node.getAirThroughputInterface().getAirThroughputState()); 26 if(event.getReason() == EventReason.SIM_INIT) 27 powerConsumption = powerConsumption + node.getAirThroughputInterface().getPowerConsumption(StandardAirThroughputStateName.FAN_OFF); 28 else 29 powerConsumption = powerConsumption + node.getAirThroughputInterface().getPowerConsumption(node.getAirThroughputInterface().getAirThroughputState()); 25 30 } catch (NoSuchFieldException e) { 26 31 } … … 32 37 double airThroughput = 0; 33 38 try { 34 airThroughput = resource.getAirThroughputInterface().getAirFlow(resource.getAirThroughputInterface().getAirThroughputState()); 39 if(event.getReason() == EventReason.SIM_INIT) 40 airThroughput = resource.getAirThroughputInterface().getAirFlow(StandardAirThroughputStateName.FAN_OFF); 41 else 42 airThroughput = resource.getAirThroughputInterface().getAirFlow(resource.getAirThroughputInterface().getAirThroughputState()); 35 43 } catch (NoSuchFieldException e) { 36 44 // TODO Auto-generated catch block
Note: See TracChangeset
for help on using the changeset viewer.