Index: /DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/NodeEnergyEstimationPlugin.java
===================================================================
--- /DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/NodeEnergyEstimationPlugin.java	(revision 1500)
+++ /DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/NodeEnergyEstimationPlugin.java	(revision 1583)
@@ -29,5 +29,5 @@
 
 	private static double Pidle = 6;
-	private static double Pfull = 16;
+	private static double Pfull = 20;
 
 
@@ -89,5 +89,5 @@
 		for(Device device: node.getParent().getResourceCharacteristic().getDevices()){
 			if(device.getType().equals(StandardResourceType.Fan)){
-				if(Integer.valueOf(device.getName().split("_")[1]) == Integer.valueOf(node.getName().split("_")[1]) || Integer.valueOf(device.getName().split("_")[1]) == Integer.valueOf(cpu.getParent().getName().split("_")[1]) - EnvironmentConditions.NODES_IN_A_ROW){
+				if(Integer.valueOf(device.getName().split("_")[1]).intValue() == Integer.valueOf(node.getName().split("_")[1]).intValue() || Integer.valueOf(device.getName().split("_")[1]).intValue() == Integer.valueOf(cpu.getParent().getName().split("_")[1]).intValue() - EnvironmentConditions.NODES_IN_A_ROW){
 					Fan fan = (Fan) device;
 					V = fan.getAirflowInterface().getRecentAirflow().getValue();
Index: /DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/CpuEnergyEstimationPlugin.java
===================================================================
--- /DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/CpuEnergyEstimationPlugin.java	(revision 1500)
+++ /DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/CpuEnergyEstimationPlugin.java	(revision 1583)
@@ -154,5 +154,5 @@
 		for(Device device: cpu.getParent().getParent().getResourceCharacteristic().getDevices()){
 			if(device.getType().equals(StandardResourceType.Fan)){
-				if(Integer.valueOf(device.getName().split("_")[1]) == Integer.valueOf(cpu.getParent().getName().split("_")[1]) /*|| Integer.valueOf(device.getName().split("_")[1]) == Integer.valueOf(cpu.getParent().getName().split("_")[1]) - EnvironmentConditions.NODES_IN_A_ROW*/){
+				if(Integer.valueOf(device.getName().split("_")[1]).intValue() == Integer.valueOf(cpu.getParent().getName().split("_")[1]).intValue() /*|| Integer.valueOf(device.getName().split("_")[1]) == Integer.valueOf(cpu.getParent().getName().split("_")[1]) - EnvironmentConditions.NODES_IN_A_ROW*/){
 					Fan fan = (Fan) device;
 					V = fan.getAirflowInterface().getRecentAirflow().getValue();
@@ -196,5 +196,5 @@
 		NodeGroup ng = (NodeGroup) cpu.getParent().getParent();
 		for(Node n: ng.getNodes()){
-			if(Integer.valueOf(n.getName().split("_")[1]) - Integer.valueOf(cpu.getParent().getName().split("_")[1]) == EnvironmentConditions.NODES_IN_A_ROW){
+			if(Integer.valueOf(n.getName().split("_")[1]).intValue() - Integer.valueOf(cpu.getParent().getName().split("_")[1]).intValue() == EnvironmentConditions.NODES_IN_A_ROW){
 				Tin = n.getThermalInterface().getRecentTemperature().getValue();
 
Index: /DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/FCFSBF_RandomPluginMigrate.java
===================================================================
--- /DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/FCFSBF_RandomPluginMigrate.java	(revision 1500)
+++ /DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/FCFSBF_RandomPluginMigrate.java	(revision 1583)
@@ -137,5 +137,5 @@
 		for(Device d: n.getParent().getResourceCharacteristic().getDevices()){
 			//System.out.println(d.getName() + "; " + n.getName());
-			if(Integer.valueOf(d.getName().split("_")[1]) == Integer.valueOf(n.getName().split("_")[1]) || Integer.valueOf(d.getName().split("_")[1]) == Integer.valueOf(n.getName().split("_")[1]) - EnvironmentConditions.NODES_IN_A_ROW){
+			if(Integer.valueOf(d.getName().split("_")[1]).intValue() == Integer.valueOf(n.getName().split("_")[1]).intValue() || Integer.valueOf(d.getName().split("_")[1]).intValue() == Integer.valueOf(n.getName().split("_")[1]).intValue() - EnvironmentConditions.NODES_IN_A_ROW){
 				Fan f = (Fan) d;
 				int speed;
Index: /DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/FCFSBF_RandomPluginFansMng.java
===================================================================
--- /DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/FCFSBF_RandomPluginFansMng.java	(revision 1500)
+++ /DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/FCFSBF_RandomPluginFansMng.java	(revision 1583)
@@ -111,5 +111,5 @@
 		for(Device d: n.getParent().getResourceCharacteristic().getDevices()){
 			//System.out.println(d.getName() + "; " + n.getName());
-			if(Integer.valueOf(d.getName().split("_")[1]) == Integer.valueOf(n.getName().split("_")[1]) || Integer.valueOf(d.getName().split("_")[1]) == Integer.valueOf(n.getName().split("_")[1]) - EnvironmentConditions.NODES_IN_A_ROW){
+			if(Integer.valueOf(d.getName().split("_")[1]).intValue() == Integer.valueOf(n.getName().split("_")[1]).intValue() || Integer.valueOf(d.getName().split("_")[1]).intValue() == Integer.valueOf(n.getName().split("_")[1]).intValue() - EnvironmentConditions.NODES_IN_A_ROW){
 				Fan f = (Fan) d;
 				int speed;
Index: /DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/FCFSBF_RandomPluginPowerCapping.java
===================================================================
--- /DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/FCFSBF_RandomPluginPowerCapping.java	(revision 1500)
+++ /DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/FCFSBF_RandomPluginPowerCapping.java	(revision 1583)
@@ -125,5 +125,5 @@
 		for(Device d: n.getParent().getResourceCharacteristic().getDevices()){
 			//System.out.println(d.getName() + "; " + n.getName());
-			if(Integer.valueOf(d.getName().split("_")[1]) == Integer.valueOf(n.getName().split("_")[1]) || Integer.valueOf(d.getName().split("_")[1]) == Integer.valueOf(n.getName().split("_")[1]) - EnvironmentConditions.NODES_IN_A_ROW){
+			if(Integer.valueOf(d.getName().split("_")[1]).intValue() == Integer.valueOf(n.getName().split("_")[1]).intValue() || Integer.valueOf(d.getName().split("_")[1]).intValue() == Integer.valueOf(n.getName().split("_")[1]).intValue() - EnvironmentConditions.NODES_IN_A_ROW){
 				Fan f = (Fan) d;
 				int speed;
@@ -316,5 +316,5 @@
 
 									if(fan.getChilledResources().contains(n.getFullName())){
-										fan.getAirflowInterface().setAirflowState(new CustomAirflowStateName("2"));
+										fan.getAirflowInterface().setAirflowState(new CustomAirflowStateName("ON_30"));
 									}
 								}
@@ -409,5 +409,5 @@
 
 									if(fan.getChilledResources().contains(n.getFullName())){
-										fan.getAirflowInterface().setAirflowState(new CustomAirflowStateName("2"));
+										fan.getAirflowInterface().setAirflowState(new CustomAirflowStateName("ON_30"));
 									}
 								}
Index: /DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/NodeGroupEnergyEstimationPlugin.java
===================================================================
--- /DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/NodeGroupEnergyEstimationPlugin.java	(revision 1500)
+++ /DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/NodeGroupEnergyEstimationPlugin.java	(revision 1583)
@@ -21,9 +21,9 @@
 			try{
 				powerConsumption = powerConsumption + node.getPowerInterface().getRecentPowerUsage().getValue();
+				powerConsumption = powerConsumption + node.getProcessors().get(0).getResourceCharacteristic().getDevices().get(0).getPowerInterface().getRecentPowerUsage().getValue();
 
 			} catch (Exception e){
 			}
 		}
-
 		for(Device device: nodeGroup.getResourceCharacteristic().getDevices()){
 			if(device.getType().equals(StandardResourceType.Fan)){
Index: /DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/NodeEnergyEstimationPluginPowerCapping.java
===================================================================
--- /DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/NodeEnergyEstimationPluginPowerCapping.java	(revision 1500)
+++ /DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/NodeEnergyEstimationPluginPowerCapping.java	(revision 1583)
@@ -42,6 +42,6 @@
 	private double next_timer = -1;
 
-	private static double Pidle = 15;
-	private static double Pfull = 76;
+	private static double Pidle = 6;
+	private static double Pfull = 20;
 
 
@@ -55,11 +55,10 @@
 		double powerConsumption = 0;
 
-		/*double Pcpu = 0;	
+		double Pcpu = 0;	
 		for(Processor cpu: node.getProcessors()){
 			Pcpu = Pcpu + cpu.getPowerInterface().getRecentPowerUsage().getValue();
-		}*/
-		
-		//powerConsumption = Pidle + (Pfull- Pidle) * node.getLoadInterface().getRecentUtilization().getValue()/100; 
-		powerConsumption = Pidle + node.getProcessors().get(0).getPowerInterface().getRecentPowerUsage().getValue(); 
+		}
+		
+		powerConsumption = Pcpu + Pidle + (Pfull- Pidle) * node.getLoadInterface().getRecentUtilization().getValue()/100;
 		
 		/*if(powerCapLevel!= -1 && powerConsumption > powerCapLevel){
@@ -114,5 +113,5 @@
 		for(Device device: node.getParent().getResourceCharacteristic().getDevices()){
 			if(device.getType().equals(StandardResourceType.Fan)){
-				if(Integer.valueOf(device.getName().split("_")[1]) == Integer.valueOf(node.getName().split("_")[1]) || Integer.valueOf(device.getName().split("_")[1]) == Integer.valueOf(cpu.getParent().getName().split("_")[1]) - EnvironmentConditions.NODES_IN_A_ROW){
+				if(Integer.valueOf(device.getName().split("_")[1]).intValue() == Integer.valueOf(node.getName().split("_")[1]).intValue() || Integer.valueOf(device.getName().split("_")[1]).intValue() == Integer.valueOf(cpu.getParent().getName().split("_")[1]).intValue() - EnvironmentConditions.NODES_IN_A_ROW){
 					Fan fan = (Fan) device;
 					V = fan.getAirflowInterface().getRecentAirflow().getValue();
Index: /DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/PowerLeakageEnergyEstimationPlugin.java
===================================================================
--- /DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/PowerLeakageEnergyEstimationPlugin.java	(revision 1500)
+++ /DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/PowerLeakageEnergyEstimationPlugin.java	(revision 1583)
@@ -1,43 +1,29 @@
 package experiments.simpat2014.models.article;
 
-import java.util.List;
-
-import schedframe.resources.CoolEmAllResourceType;
-import schedframe.resources.computing.ComputingResource;
-import schedframe.resources.computing.Node;
-import schedframe.resources.computing.Processor;
-import schedframe.resources.computing.Rack;
-import schedframe.resources.computing.coolemall.ComputeBox1;
-import schedframe.resources.computing.coolemall.NodeGroup;
 import schedframe.resources.computing.profiles.energy.ResourceEvent;
-import schedframe.resources.computing.profiles.energy.airthroughput.CustomAirflowStateName;
-import schedframe.resources.computing.profiles.energy.power.PState;
-import schedframe.resources.computing.profiles.energy.power.StandardPowerStateName;
 import schedframe.resources.devices.Device;
 import schedframe.resources.devices.PhysicalResource;
 import schedframe.scheduling.manager.tasks.JobRegistry;
-import simulator.DataCenterWorkloadSimulator;
 import example.energy.BaseEnergyEstimationPlugin;
-import example.energy.coolemall.CoolEmAllTestbedMeasurements;
-import gridsim.dcworms.DCWormsTags;
+
 
 public class PowerLeakageEnergyEstimationPlugin extends BaseEnergyEstimationPlugin{
 
-	private static double Tidle = 28;
-	private static double Tfull = 60;
-	
 	public double estimatePowerConsumption(ResourceEvent event, JobRegistry jobRegistry,
 			PhysicalResource resource) {
 
-		double powerConsumption = 0;
+		double powerLekage = 0;
 		Device pl = (Device) resource;
-		double tempDiff = pl.getComputingResource().getThermalInterface().getRecentTemperature().getValue() - Tidle;
-		double factor = 0.01 * tempDiff;
-		powerConsumption = factor * pl.getComputingResource().getPowerInterface().getRecentPowerUsage().getValue();
+		double tempDiff = pl.getComputingResource().getThermalInterface().getRecentTemperature().getValue() - 65;
+		if(tempDiff < 0)
+			return 0;
+
+		powerLekage = 0.02 * tempDiff * pl.getComputingResource().getPowerInterface().getRecentPowerUsage().getValue();
+		//powerConsumption = factor * pl.getComputingResource().getPowerInterface().getRecentPowerUsage().getValue();
 		/*Device pl = (Device) resource;
 		if(pl.getComputingResource().getThermalInterface().getRecentTemperature().getValue() > 90){
 			powerConsumption = powerConsumption + 15;
 		}*/
-		return powerConsumption;
+		return powerLekage;
 	}
 
