Index: DCWoRMS/branches/coolemall/src/example/energy/coolemall/ProcessorEnergyEstimationPlugin.java
===================================================================
--- DCWoRMS/branches/coolemall/src/example/energy/coolemall/ProcessorEnergyEstimationPlugin.java	(revision 897)
+++ DCWoRMS/branches/coolemall/src/example/energy/coolemall/ProcessorEnergyEstimationPlugin.java	(revision 913)
@@ -1,4 +1,5 @@
 package example.energy.coolemall;
 
+import schedframe.Parameter;
 import schedframe.resources.ResourceStatus;
 import schedframe.resources.computing.ComputingResource;
@@ -13,20 +14,25 @@
 	public double estimatePowerConsumption(EnergyEvent event, JobRegistry jobRegistry,
 			ComputingResource resource) {
-		double powerConsumption;
+		double powerConsumption = 0;
 		Processor cpu = (Processor)resource;
 		if(resource.getPowerInterface().getPowerState().equals(StandardPowerStateName.OFF))
 			powerConsumption = 0;
 		else {
-			try {
-				if(resource.getStatus() == ResourceStatus.BUSY)
+			if(resource.getStatus() == ResourceStatus.BUSY){
+				try {
 					powerConsumption = cpu.getPowerInterface().getPowerConsumption(cpu.getPowerInterface().getPState());
-				else {
-					powerConsumption = cpu.getPowerInterface().getPowerConsumption(StandardPowerStateName.ON);
+				} catch (NoSuchFieldException e) {
+					Parameter param = cpu.getResourceCharacteristic().getParameters().get("maxPower");
+					if(param != null)
+						powerConsumption = Double.valueOf(param.get(0).getContent());
 				}
-			} catch (NoSuchFieldException e) {
+			}
+			else {
 				try {
 					powerConsumption = cpu.getPowerInterface().getPowerConsumption(StandardPowerStateName.ON);
-				} catch (NoSuchFieldException e1) {
-					powerConsumption = 10;
+				} catch (NoSuchFieldException e) {
+					Parameter param = cpu.getResourceCharacteristic().getParameters().get("maxPower");
+					if(param != null)
+						powerConsumption = 0.7 * Double.valueOf(param.get(0).getContent());
 				}
 			}
Index: DCWoRMS/branches/coolemall/src/example/energy/coolemall/NodeGroupEnergyEstimationPlugin.java
===================================================================
--- DCWoRMS/branches/coolemall/src/example/energy/coolemall/NodeGroupEnergyEstimationPlugin.java	(revision 897)
+++ DCWoRMS/branches/coolemall/src/example/energy/coolemall/NodeGroupEnergyEstimationPlugin.java	(revision 913)
@@ -1,7 +1,7 @@
 package example.energy.coolemall;
 
+import schedframe.Parameter;
 import schedframe.resources.computing.ComputingResource;
 import schedframe.resources.computing.profiles.energy.EnergyEvent;
-import schedframe.resources.computing.profiles.energy.power.PowerUsage;
 import schedframe.resources.computing.recs.Node;
 import schedframe.resources.computing.recs.NodeGroup;
@@ -13,12 +13,22 @@
 	public double estimatePowerConsumption(EnergyEvent event, JobRegistry jobRegistry,
 			ComputingResource resource) {
-		double power = 0;
+		double powerConsumption = 0;
 		NodeGroup nodeGroup = (NodeGroup)resource;
 		for(Node cn: nodeGroup.getNodes()){
-			PowerUsage powerUsage = cn.getPowerInterface().getRecentPowerUsage();
-			power += (powerUsage == null ? 0 : powerUsage.getValue());
+			try{
+				powerConsumption = powerConsumption + cn.getPowerInterface().getRecentPowerUsage().getValue();
+			} catch (Exception e){
+				
+			}
+		}
+		try {
+			powerConsumption = powerConsumption + nodeGroup.getPowerInterface().getPowerConsumption(nodeGroup.getPowerInterface().getPowerState());
+		} catch (NoSuchFieldException e) {
+			Parameter param = nodeGroup.getResourceCharacteristic().getParameters().get("maxPower");
+			if(param != null)
+				powerConsumption = powerConsumption + Double.valueOf(param.get(0).getContent());
 		}
 
-		return power;
+		return powerConsumption;
 	}
 
Index: DCWoRMS/branches/coolemall/src/example/energy/coolemall/CB1EnergyEstimationPlugin.java
===================================================================
--- DCWoRMS/branches/coolemall/src/example/energy/coolemall/CB1EnergyEstimationPlugin.java	(revision 897)
+++ DCWoRMS/branches/coolemall/src/example/energy/coolemall/CB1EnergyEstimationPlugin.java	(revision 913)
@@ -1,7 +1,7 @@
 package example.energy.coolemall;
 
+import schedframe.Parameter;
 import schedframe.resources.computing.ComputingResource;
 import schedframe.resources.computing.profiles.energy.EnergyEvent;
-import schedframe.resources.computing.profiles.energy.power.PowerUsage;
 import schedframe.resources.computing.recs.ComputeBox1;
 import schedframe.resources.computing.recs.NodeGroup;
@@ -13,12 +13,24 @@
 	public double estimatePowerConsumption(EnergyEvent event, JobRegistry jobRegistry,
 			ComputingResource resource) {
-		double power = 0;
+		double powerConsumption = 0;
 		ComputeBox1 computeBox1 = (ComputeBox1)resource;
 		for(NodeGroup ng:computeBox1.getNodesGroups()){
-			PowerUsage powerUsage = ng.getPowerInterface().getRecentPowerUsage();
-			power += (powerUsage == null ? 0 : powerUsage.getValue());
+			try{
+				powerConsumption = powerConsumption + ng.getPowerInterface().getRecentPowerUsage().getValue();
+			} catch (Exception e){
+				
+			}
 		}
 
-		return power;
+		try {
+			powerConsumption = powerConsumption + computeBox1.getPowerInterface().getPowerConsumption(computeBox1.getPowerInterface().getPowerState());
+		} catch (NoSuchFieldException e) {
+			Parameter param = computeBox1.getResourceCharacteristic().getParameters().get("maxPower");
+			if(param != null)
+				powerConsumption = powerConsumption + Double.valueOf(param.get(0).getContent());
+		}
+
+		
+		return powerConsumption;
 	}
 
Index: DCWoRMS/branches/coolemall/src/example/energy/coolemall/NodeEnergyEstimationPlugin.java
===================================================================
--- DCWoRMS/branches/coolemall/src/example/energy/coolemall/NodeEnergyEstimationPlugin.java	(revision 897)
+++ DCWoRMS/branches/coolemall/src/example/energy/coolemall/NodeEnergyEstimationPlugin.java	(revision 913)
@@ -1,4 +1,5 @@
 package example.energy.coolemall;
 
+import schedframe.Parameter;
 import schedframe.resources.computing.ComputingResource;
 import schedframe.resources.computing.Processor;
@@ -24,4 +25,7 @@
 			powerConsumption = powerConsumption + node.getPowerInterface().getPowerConsumption(node.getPowerInterface().getPowerState());
 		} catch (NoSuchFieldException e) {
+			Parameter param = node.getResourceCharacteristic().getParameters().get("maxPower");
+			if(param != null)
+				powerConsumption = powerConsumption + Double.valueOf(param.get(0).getContent());
 		}
 
