Changeset 1146 for DCWoRMS/branches/coolemall/src/example/energy
- Timestamp:
- 07/26/13 18:23:57 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
DCWoRMS/branches/coolemall/src/example/energy/coolemall/NodeEnergyEstimationPlugin.java
r1055 r1146 78 78 double delta2 = 2.162043729/2; 79 79 double ro = 1.168; 80 double power1 = resource.getPowerInterface().getRecentPowerUsage().getValue();80 double power1 = 0; 81 81 double power2 = 0; 82 82 … … 87 87 Integer id = Integer.parseInt(compResource.getName().split("_")[1]); 88 88 //we take into account the power of nodes placed "behind" the given nodes 89 if(id - resId == 9 || id - resId == -9){ 89 if(id - resId == 9){ 90 power1 = compResource.getPowerInterface().getRecentPowerUsage().getValue(); 91 power2 = resource.getPowerInterface().getRecentPowerUsage().getValue(); 92 } else if(id - resId == -9){ 93 power1 = resource.getPowerInterface().getRecentPowerUsage().getValue(); 90 94 power2 = compResource.getPowerInterface().getRecentPowerUsage().getValue(); 91 95 }
Note: See TracChangeset
for help on using the changeset viewer.