Ignore:
Timestamp:
07/26/13 18:23:57 (12 years ago)
Author:
wojtekp
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • DCWoRMS/branches/coolemall/src/example/energy/coolemall/NodeEnergyEstimationPlugin.java

    r1055 r1146  
    7878                double delta2 = 2.162043729/2; 
    7979                double ro = 1.168; 
    80                 double power1 = resource.getPowerInterface().getRecentPowerUsage().getValue(); 
     80                double power1 = 0; 
    8181                double power2 = 0; 
    8282                 
     
    8787                        Integer id = Integer.parseInt(compResource.getName().split("_")[1]); 
    8888                        //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(); 
    9094                                power2 = compResource.getPowerInterface().getRecentPowerUsage().getValue(); 
    9195                        } 
Note: See TracChangeset for help on using the changeset viewer.