Index: DCWoRMS/trunk/src/example/localplugin/FCFSClusterLocalPlugin.java
===================================================================
--- DCWoRMS/trunk/src/example/localplugin/FCFSClusterLocalPlugin.java	(revision 493)
+++ DCWoRMS/trunk/src/example/localplugin/FCFSClusterLocalPlugin.java	(revision 497)
@@ -57,5 +57,5 @@
 					
 					/****************1. Choosing particular resources to perform execution****************/
-					Map<ResourceUnitName, ResourceUnit> choosenResources = chooseResourcesForExecution2(resourceManager, task);
+					Map<ResourceUnitName, ResourceUnit> choosenResources = chooseResourcesForExecution(resourceManager, task);
 					if (choosenResources != null) {
 						addToSchedulingPlan(plan, task, choosenResources);
@@ -80,72 +80,4 @@
 
 	private Map<ResourceUnitName, ResourceUnit> chooseResourcesForExecution(
-			ClusterResourceManager resourceManager, TaskInterface<?> task) {
-
-		Map<ResourceUnitName, ResourceUnit> map = new HashMap<ResourceUnitName, ResourceUnit>();
-
-		int cpuRequest;
-		try {
-			cpuRequest = Double.valueOf(task.getCpuCntRequest()).intValue();
-		} catch (NoSuchFieldException e) {
-			cpuRequest = 1;
-		}
-
-		if (cpuRequest != 0) {
-			List<ComputingResource> choosenResources = null;
-			List<Processor> processors = null;
-			processors = resourceManager.getProcessors();
-			if (processors.size() < cpuRequest) {
-				// log.warn("Task requires more cpus than is availiable in this resource.");
-				return null;
-			}
-
-			choosenResources = new ArrayList<ComputingResource>();
-
-			for (int i = 0; i < processors.size() && cpuRequest > 0; i++) {
-				if (processors.get(i).getStatus() == ResourceStatus.FREE) {
-					choosenResources.add(processors.get(i));
-					cpuRequest--;
-				}
-			}
-			if (cpuRequest > 0) {
-				// log.info("Task " + task.getJobId() + "_" + task.getId() +
-				// " requires more cpus than is availiable in this moment.");
-				return null;
-			}
-
-			ProcessingElements result = new ProcessingElements(processors.get(0).getParent().getName());
-			result.addAll(choosenResources);
-			map.put(StandardResourceUnitName.PE, result);
-
-		}
-		int memoryRequest;
-		try {
-			memoryRequest = Double.valueOf(task.getMemoryRequest()).intValue();
-		} catch (NoSuchFieldException e) {
-			memoryRequest = 0;
-		}
-		if (memoryRequest != 0) {
-			List<ComputingNode> nodes = resourceManager.getComputingNodes();
-
-			Memory memory = null;
-			for (ComputingNode node : nodes) {
-				try{
-					if (node.getFreeMemory() >= memoryRequest) {		
-						memory = new Memory(node.getMemory(), memoryRequest, memoryRequest);
-					}		
-				} catch(NoSuchFieldException e){
-					memory = null;
-				}
-			}
-			if(memory != null)
-				map.put(StandardResourceUnitName.MEMORY, memory);
-			else return null;
-		}
-
-		return map;
-	}
-
-
-	private Map<ResourceUnitName, ResourceUnit> chooseResourcesForExecution2(
 			ClusterResourceManager resourceManager, TaskInterface<?> task) {
 
@@ -204,5 +136,5 @@
 						return map;
 					}
-				}
+				} else return map;
 			}
 		}
Index: DCWoRMS/trunk/src/example/localplugin/FCFSNodePowerManagementClusterLocalPlugin.java
===================================================================
--- DCWoRMS/trunk/src/example/localplugin/FCFSNodePowerManagementClusterLocalPlugin.java	(revision 493)
+++ DCWoRMS/trunk/src/example/localplugin/FCFSNodePowerManagementClusterLocalPlugin.java	(revision 497)
@@ -40,18 +40,14 @@
 		ClusterResourceManager resourceManager = (ClusterResourceManager) resManager;
 		SchedulingPlan plan = new SchedulingPlan();
-		// chose the events types to serve.
-		// Different actions for different events are possible.
+
 		switch (event.getType()) {
 		case START_TASK_EXECUTION:
 		case TASK_FINISHED:
-			// our tasks are placed only in first queue (see
-			// BaseLocalPlugin.placeJobsInQueues() method)
+
 			TaskQueue q = queues.get(0);
-			// check all tasks in queue
 
 			for (int i = 0; i < q.size(); i++) {
 				WorkloadUnit job = q.get(i);
 				TaskInterface<?> task = (TaskInterface<?>) job;
-				// if status of the tasks in READY
 				if (task.getStatus() == DCWormsTags.READY) {
 
@@ -65,7 +61,5 @@
 				}
 			}
-
 			turnOffIdleNodes(resourceManager.getComputingNodes());
-
 			break;
 		}
@@ -151,9 +145,4 @@
 		return cpuRequest > 0 ? false : true;
 	}
-	
-	public String getName() {
-		return getClass().getName();
-	}
-
 
 }
Index: DCWoRMS/trunk/src/example/localplugin/FCFSRandomClusterLocalPlugin.java
===================================================================
--- DCWoRMS/trunk/src/example/localplugin/FCFSRandomClusterLocalPlugin.java	(revision 493)
+++ DCWoRMS/trunk/src/example/localplugin/FCFSRandomClusterLocalPlugin.java	(revision 497)
@@ -41,6 +41,6 @@
 			// BaseLocalPlugin.placeJobsInQueues() method)
 			TaskQueue q = queues.get(0);
+			
 			// check all tasks in queue
-
 			for (int i = 0; i < q.size(); i++) {
 				WorkloadUnit job = q.get(i);
@@ -48,12 +48,9 @@
 				// if status of the tasks in READY
 				if (task.getStatus() == DCWormsTags.READY) {
-					/*for(ResourceUnitName key:resManager.getSharedResourceUnits().keySet()){
-						System.out.println(key.getName());
-					}*/
-					addToSchedulingPlan(plan, task);
-					/*String nodeName = chooseRandomProvider(resourceManager);
+
+					String nodeName = chooseRandomProvider(resourceManager);
 					if (nodeName != null) {
 						addToSchedulingPlan(plan, task, nodeName);
-					}*/
+					}
 				}
 			}
@@ -68,9 +65,4 @@
 		return nodes.get(nodeIdx).getName();
 	}
-	
-	public String getName() {
-		return getClass().getName();
-	}
-
 
 }
Index: DCWoRMS/trunk/src/example/localplugin/FCFSConsolidationClusterLocalPlugin.java
===================================================================
--- DCWoRMS/trunk/src/example/localplugin/FCFSConsolidationClusterLocalPlugin.java	(revision 493)
+++ DCWoRMS/trunk/src/example/localplugin/FCFSConsolidationClusterLocalPlugin.java	(revision 497)
@@ -140,8 +140,4 @@
 		return suitableNodes;
 	}
-	
-	public String getName() {
-		return getClass().getName();
-	}
 
 }
Index: DCWoRMS/trunk/src/example/localplugin/FCFSCPUFreqScalingClusterLocalPlugin.java
===================================================================
--- DCWoRMS/trunk/src/example/localplugin/FCFSCPUFreqScalingClusterLocalPlugin.java	(revision 493)
+++ DCWoRMS/trunk/src/example/localplugin/FCFSCPUFreqScalingClusterLocalPlugin.java	(revision 497)
@@ -187,8 +187,4 @@
 		}
 	}
-	
-	public String getName() {
-		return getClass().getName();
-	}
 
 }
Index: DCWoRMS/trunk/src/example/localplugin/FCFSRackLocalPlugin.java
===================================================================
--- DCWoRMS/trunk/src/example/localplugin/FCFSRackLocalPlugin.java	(revision 497)
+++ DCWoRMS/trunk/src/example/localplugin/FCFSRackLocalPlugin.java	(revision 497)
@@ -0,0 +1,56 @@
+package example.localplugin;
+
+import gridsim.dcworms.DCWormsTags;
+import schedframe.events.scheduling.SchedulingEvent;
+import schedframe.scheduling.manager.resources.ClusterResourceManager;
+import schedframe.scheduling.manager.resources.ResourceManager;
+import schedframe.scheduling.manager.tasks.JobRegistry;
+import schedframe.scheduling.plan.SchedulingPlanInterface;
+import schedframe.scheduling.plan.impl.SchedulingPlan;
+import schedframe.scheduling.plugin.grid.ModuleList;
+import schedframe.scheduling.queue.TaskQueue;
+import schedframe.scheduling.queue.TaskQueueList;
+import schedframe.scheduling.tasks.TaskInterface;
+import schedframe.scheduling.tasks.WorkloadUnit;
+
+public class FCFSRackLocalPlugin  extends BaseLocalSchedulingPlugin {
+
+	public FCFSRackLocalPlugin() {
+	}
+
+	public SchedulingPlanInterface<?> schedule(SchedulingEvent event, TaskQueueList queues, JobRegistry jobRegistry,
+			ResourceManager resManager, ModuleList modules) {
+
+		ClusterResourceManager resourceManager = (ClusterResourceManager) resManager;
+		SchedulingPlan plan = new SchedulingPlan();
+		// chose the events types to serve.
+		// Different actions for different events are possible.
+		switch (event.getType()) {
+		case START_TASK_EXECUTION:
+		case TASK_FINISHED:
+		//case TIMER:
+			// our tasks are placed only in first queue (see
+			// BaseLocalPlugin.placeJobsInQueues() method)
+			TaskQueue q = queues.get(0);
+			// check all tasks in queue
+
+			for (int i = 0; i < q.size(); i++) {
+				WorkloadUnit job = q.get(i);
+				TaskInterface<?> task = (TaskInterface<?>) job;
+				// if status of the tasks in READY
+				if (task.getStatus() == DCWormsTags.READY) {
+					System.out.println(resourceManager.getSchedulers().get(0).get_name());
+					String nodeName = resourceManager.getSchedulers().get(0).get_name();
+					if (nodeName != null) {
+						addToSchedulingPlan(plan, task, nodeName);
+					}
+				}
+			}
+
+			break;
+		}
+		return plan;
+	}
+
+
+}
Index: DCWoRMS/trunk/src/example/localplugin/FCFSEnergyAwareClusterLocalPlugin.java
===================================================================
--- DCWoRMS/trunk/src/example/localplugin/FCFSEnergyAwareClusterLocalPlugin.java	(revision 493)
+++ 	(revision )
@@ -1,103 +1,0 @@
-package example.localplugin;
-
-import gridsim.dcworms.DCWormsTags;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.List;
-
-import schedframe.events.scheduling.SchedulingEvent;
-import schedframe.resources.computing.ComputingNode;
-import schedframe.scheduling.manager.resources.ClusterResourceManager;
-import schedframe.scheduling.manager.resources.ResourceManager;
-import schedframe.scheduling.manager.tasks.JobRegistry;
-import schedframe.scheduling.plan.SchedulingPlanInterface;
-import schedframe.scheduling.plan.impl.SchedulingPlan;
-import schedframe.scheduling.plugin.grid.ModuleList;
-import schedframe.scheduling.queue.TaskQueue;
-import schedframe.scheduling.queue.TaskQueueList;
-import schedframe.scheduling.tasks.TaskInterface;
-import schedframe.scheduling.tasks.WorkloadUnit;
-
-public class FCFSEnergyAwareClusterLocalPlugin extends BaseLocalSchedulingPlugin {
-
-	public FCFSEnergyAwareClusterLocalPlugin () {
-	}
-
-	public SchedulingPlanInterface<?> schedule(SchedulingEvent event, TaskQueueList queues, JobRegistry jobRegistry,
-			ResourceManager resManager, ModuleList modules) {
-
-		ClusterResourceManager resourceManager = (ClusterResourceManager) resManager;
-		SchedulingPlan plan = new SchedulingPlan();
-		// chose the events types to serve.
-		// Different actions for different events are possible.
-		switch (event.getType()) {
-		case START_TASK_EXECUTION:
-		case TASK_FINISHED:
-			// our tasks are placed only in first queue (see
-			// BaseLocalPlugin.placeJobsInQueues() method)
-			TaskQueue q = queues.get(0);
-			// check all tasks in queue
-
-			for (int i = 0; i < q.size(); i++) {
-				WorkloadUnit job = q.get(i);
-				TaskInterface<?> task = (TaskInterface<?>) job;
-				// if status of the tasks in READY
-				if (task.getStatus() == DCWormsTags.READY) {
-
-					String nodeName = chooseProviderForExecution(resourceManager, task);
-					if (nodeName != null) {
-						addToSchedulingPlan(plan, task, nodeName);
-					}
-				}
-			}
-
-			break;
-		}
-		return plan;
-	}
-
-	private String chooseProviderForExecution(ClusterResourceManager resourceManager, TaskInterface<?> task) {
-		int cpuRequest;
-		try {
-			cpuRequest = Double.valueOf(task.getCpuCntRequest()).intValue();
-		} catch (NoSuchFieldException e) {
-			cpuRequest = 1;
-		}
-		List<ComputingNode> nodes = resourceManager.getComputingNodes();
-		nodes = findSuitableNodes(cpuRequest, nodes);
-		Collections.sort(nodes, new Comparator<ComputingNode>(){
-			 
-		    public int compare(ComputingNode node1, ComputingNode node2){    
-		        return node1.getResourceCharacteristic().getParameters().get("category").get(0).getContent().compareTo(node2.getResourceCharacteristic().getParameters().get("category").get(0).getContent());
-		   
-		    }
-		});
-
-		return nodes.size() == 0 ? null : nodes.get(0).getName();
-	}
-	
-	private List<ComputingNode> findSuitableNodes(int cpuRequest, List<ComputingNode> nodes){
-		List<ComputingNode> avNodes = new ArrayList<ComputingNode>();
-		for(ComputingNode node: nodes){
-			if(node.getFreeProcessorsNumber() >= cpuRequest){
-				avNodes.add(node);
-			}
-		}
-		return avNodes;
-	}
-	
-	public String getName() {
-		return getClass().getName();
-	}
-
-	class CategoryComparator implements Comparator<String>{
-		 
-	    public int compare(String cat1, String cat2){    
-	        return cat1.compareTo(cat2);
-	   
-	    }
-	}
-}
-
Index: DCWoRMS/trunk/src/example/localplugin/RackLocalPlugin.java
===================================================================
--- DCWoRMS/trunk/src/example/localplugin/RackLocalPlugin.java	(revision 493)
+++ 	(revision )
@@ -1,61 +1,0 @@
-package example.localplugin;
-
-import gridsim.dcworms.DCWormsTags;
-import schedframe.events.scheduling.SchedulingEvent;
-import schedframe.scheduling.manager.resources.ClusterResourceManager;
-import schedframe.scheduling.manager.resources.ResourceManager;
-import schedframe.scheduling.manager.tasks.JobRegistry;
-import schedframe.scheduling.plan.SchedulingPlanInterface;
-import schedframe.scheduling.plan.impl.SchedulingPlan;
-import schedframe.scheduling.plugin.grid.ModuleList;
-import schedframe.scheduling.queue.TaskQueue;
-import schedframe.scheduling.queue.TaskQueueList;
-import schedframe.scheduling.tasks.TaskInterface;
-import schedframe.scheduling.tasks.WorkloadUnit;
-
-public class RackLocalPlugin  extends BaseLocalSchedulingPlugin {
-
-	public RackLocalPlugin() {
-	}
-
-	public SchedulingPlanInterface<?> schedule(SchedulingEvent event, TaskQueueList queues, JobRegistry jobRegistry,
-			ResourceManager resManager, ModuleList modules) {
-
-		ClusterResourceManager resourceManager = (ClusterResourceManager) resManager;
-		SchedulingPlan plan = new SchedulingPlan();
-		// chose the events types to serve.
-		// Different actions for different events are possible.
-		switch (event.getType()) {
-		case START_TASK_EXECUTION:
-		case TASK_FINISHED:
-		//case TIMER:
-			// our tasks are placed only in first queue (see
-			// BaseLocalPlugin.placeJobsInQueues() method)
-			TaskQueue q = queues.get(0);
-			// check all tasks in queue
-
-			for (int i = 0; i < q.size(); i++) {
-				WorkloadUnit job = q.get(i);
-				TaskInterface<?> task = (TaskInterface<?>) job;
-				// if status of the tasks in READY
-				if (task.getStatus() == DCWormsTags.READY) {
-					System.out.println(resourceManager.getSchedulers().get(0).get_name());
-					String nodeName = resourceManager.getSchedulers().get(0).get_name();
-					if (nodeName != null) {
-						addToSchedulingPlan(plan, task, nodeName);
-					}
-				}
-			}
-
-			break;
-		}
-		return plan;
-	}
-
-	
-	public String getName() {
-		return getClass().getName();
-	}
-
-
-}
