Index: DCWoRMS/trunk/src/test/article/recs/utils/TaskToApp.java
===================================================================
--- DCWoRMS/trunk/src/test/article/recs/utils/TaskToApp.java	(revision 656)
+++ DCWoRMS/trunk/src/test/article/recs/utils/TaskToApp.java	(revision 659)
@@ -5,5 +5,5 @@
 import java.util.Random;
 
-import dcworms.schedframe.scheduling.ExecTask;
+import schedframe.scheduling.tasks.TaskInterface;
 
 public class TaskToApp {
@@ -17,5 +17,5 @@
 	private static Map<String, AppType> mapping = new HashMap<String, AppType>();
 
-	public AppType getAppType(ExecTask task){
+	public AppType getAppType(TaskInterface<?> task){
 		AppType appType = null;
 		if(mapping.get(task.getJobId())!= null){
Index: DCWoRMS/trunk/src/test/article/recs/utils/RecsProcessorPowerInterface.java
===================================================================
--- DCWoRMS/trunk/src/test/article/recs/utils/RecsProcessorPowerInterface.java	(revision 659)
+++ DCWoRMS/trunk/src/test/article/recs/utils/RecsProcessorPowerInterface.java	(revision 659)
@@ -0,0 +1,134 @@
+package test.article.recs.utils;
+
+import java.util.Map;
+
+import schedframe.resources.ResourceStatus;
+import schedframe.resources.computing.ComputingResource;
+import schedframe.resources.computing.profiles.energy.EnergyEvent;
+import schedframe.resources.computing.profiles.energy.EnergyEventType;
+import schedframe.resources.computing.profiles.energy.power.PState;
+import schedframe.resources.computing.profiles.energy.power.PowerProfile;
+import schedframe.resources.computing.profiles.energy.power.PowerStateName;
+import schedframe.resources.computing.profiles.energy.power.StandardPowerStateName;
+import schedframe.resources.computing.profiles.energy.power.ui.ProcessorPowerInterface;
+
+public class RecsProcessorPowerInterface extends ProcessorPowerInterface {
+
+	protected PState currentPState;
+
+	public RecsProcessorPowerInterface(ComputingResource resource, PowerProfile pp){
+		super(resource, pp);
+		currentPowerState = StandardPowerStateName.ON;
+		currentPState = getLowestPState();
+		if(currentPState == null)
+			currentPState = getSupportedPStates().get("P0");
+	}
+	
+	public boolean setPowerState(PowerStateName powerState){
+		if(!supportPowerState(powerState))
+			return false;
+		if(powerState != currentPowerState){
+			currentPowerState = powerState;
+			if(powerState == StandardPowerStateName.OFF){
+				resource.setStatus(ResourceStatus.UNAVAILABLE);
+			} else if(powerState == StandardPowerStateName.ON){
+				resource.setStatus(ResourceStatus.FREE);
+			}
+			resource.handleEvent(new EnergyEvent(EnergyEventType.POWER_STATE_CHANGED, resource.getName()));		
+		}
+
+		return true;
+	}
+
+	public PState getPState(){
+		return currentPState;
+	}
+	
+	public Map<String, PState> getSupportedPStates() {
+		return powerProfile.getSupportedPStates();
+	}
+	
+	public boolean supportPState(PState pState) {
+
+		for(String pStateName: getSupportedPStates().keySet()){
+			if(pState.getName().equals(pStateName)){
+				return true;
+			}
+		}
+		return false;
+	}
+	
+	public boolean setPState(String pStateName){
+		PState newPState = getSupportedPStates().get(pStateName);
+
+
+		if(newPState != null && newPState != currentPState){
+			//double factor = newPState.getFrequency()/currentPState.getFrequency();
+			currentPState = newPState;
+			//CpuSpeed speed = (CpuSpeed)resource.getResourceCharacteristic().getResourceUnits().get(StandardResourceUnitName.CPUSPEED).get(0);
+			//speed.setAmount(Double.valueOf(currentPState.getFrequency()).intValue());
+			//new ResourceEventCommand(resource).execute(EnergyEventType.FREQUENCY_CHANGED);
+			resource.handleEvent(new EnergyEvent(EnergyEventType.FREQUENCY_CHANGED, resource.getName()));
+			//resource.getScheduler().sendInternal(GridSimTags.SCHEDULE_NOW, DCWormsTags.UPDATE, resource.getName());
+			return true;
+		}
+
+		return false;
+	}
+	
+	public double getFrequency() {
+		return currentPState.getFrequency();
+	}
+
+	public boolean setFrequency(double freq) {
+
+		for(String pStateName: getSupportedPStates().keySet()){
+			if(getSupportedPStates().get(pStateName).getFrequency() == freq){
+				setPState(pStateName);
+				return true;
+			}
+		}
+		return false;
+	}
+
+	public double getPowerConsumption(PState state) throws NoSuchFieldException{
+		double powerConsumption = 0;
+		if(supportPState(state)){
+			for(String pStateName: getSupportedPStates().keySet()){
+				if(pStateName.equals(state.getName())){
+					powerConsumption = getSupportedPStates().get(pStateName).getPower();
+					break;
+				}
+			}
+		}
+		return powerConsumption;
+	}
+	
+	private PState getLowestPState(){
+		PState lowPState = null;
+		double highestFreq = Double.MIN_VALUE;
+		for(String key: getSupportedPStates() .keySet()){
+			PState pState = getSupportedPStates().get(key);
+			if(pState.getFrequency() > highestFreq){
+				highestFreq = pState.getFrequency();
+				lowPState = pState;
+			}
+		}
+		return lowPState;
+	}
+	
+	private PState getHighestPState(){
+		PState highPState = null;
+		double lowestFreq = Double.MAX_VALUE;
+		for(String key: getSupportedPStates() .keySet()){
+			PState pState = getSupportedPStates().get(key);
+			if(pState.getFrequency() < lowestFreq){
+				lowestFreq = pState.getFrequency();
+				highPState = pState;
+			}
+		}
+		return highPState;
+	}
+
+}
+
