Index: DCWoRMS/branches/coolemall/src/example/localplugin/coolemall/computebox1/CB1_FCFS_Consolidation_SP.java
===================================================================
--- DCWoRMS/branches/coolemall/src/example/localplugin/coolemall/computebox1/CB1_FCFS_Consolidation_SP.java	(revision 1253)
+++ DCWoRMS/branches/coolemall/src/example/localplugin/coolemall/computebox1/CB1_FCFS_Consolidation_SP.java	(revision 1258)
@@ -9,10 +9,8 @@
 
 import schedframe.events.scheduling.SchedulingEvent;
-import schedframe.exceptions.ResourceException;
 import schedframe.resources.ResourceStatus;
-import schedframe.resources.StandardResourceType;
-import schedframe.resources.computing.Node;
 import schedframe.resources.computing.ComputingResource;
 import schedframe.resources.computing.Core;
+import schedframe.resources.computing.Node;
 import schedframe.resources.units.ProcessingElements;
 import schedframe.resources.units.ResourceUnit;
@@ -78,11 +76,5 @@
 		Map<ResourceUnitName, ResourceUnit> map = new HashMap<ResourceUnitName, ResourceUnit>();
 		
-		List<Node> nodes = null;
-		try {
-			nodes = (List<Node>) resourceManager.getResourcesOfType(StandardResourceType.Node);
-		} catch (ResourceException e) {
-			// TODO Auto-generated catch block
-			e.printStackTrace();
-		}
+		List<Node> nodes = resourceManager.getNodes();
 		List<Node> avNodes = filterNodes(nodes, task);
 		Collections.sort(avNodes, new FavourableNodeComparator());
Index: DCWoRMS/branches/coolemall/src/example/localplugin/coolemall/computebox1/CB1_FCFS_Consolidation_NodePowMan_SP.java
===================================================================
--- DCWoRMS/branches/coolemall/src/example/localplugin/coolemall/computebox1/CB1_FCFS_Consolidation_NodePowMan_SP.java	(revision 1253)
+++ DCWoRMS/branches/coolemall/src/example/localplugin/coolemall/computebox1/CB1_FCFS_Consolidation_NodePowMan_SP.java	(revision 1258)
@@ -59,9 +59,5 @@
 			TaskQueue q = queues.get(0);
 			
-			List<Node> notSelectedNodes = null;
-			try {
-				notSelectedNodes = (List<Node>) resourceManager.getResourcesOfType(StandardResourceType.Node);
-			} catch (ResourceException e) {
-			}
+			List<Node> notSelectedNodes = resourceManager.getNodes();
 			
 			// check all tasks in queue
@@ -92,11 +88,5 @@
 		Map<ResourceUnitName, ResourceUnit> map = new HashMap<ResourceUnitName, ResourceUnit>();
 		
-		List<Node> nodes = null;
-		try {
-			nodes = (List<Node>) resourceManager.getResourcesOfType(StandardResourceType.Node);
-		} catch (ResourceException e) {
-			// TODO Auto-generated catch block
-			e.printStackTrace();
-		}
+		List<Node> nodes = resourceManager.getNodes();
 		List<Node> avNodes = filterNodes(nodes, task);
 		Node node;
Index: DCWoRMS/branches/coolemall/src/example/localplugin/coolemall/computebox1/CB1_FCFS_ConsolidationAtom_NodePowMan_SP.java
===================================================================
--- DCWoRMS/branches/coolemall/src/example/localplugin/coolemall/computebox1/CB1_FCFS_ConsolidationAtom_NodePowMan_SP.java	(revision 1253)
+++ DCWoRMS/branches/coolemall/src/example/localplugin/coolemall/computebox1/CB1_FCFS_ConsolidationAtom_NodePowMan_SP.java	(revision 1258)
@@ -12,7 +12,7 @@
 import schedframe.resources.ResourceStatus;
 import schedframe.resources.StandardResourceType;
-import schedframe.resources.computing.Node;
 import schedframe.resources.computing.ComputingResource;
 import schedframe.resources.computing.Core;
+import schedframe.resources.computing.Node;
 import schedframe.resources.computing.Processor;
 import schedframe.resources.computing.profiles.energy.airthroughput.UserAirThroughputStateName;
@@ -59,9 +59,5 @@
 			TaskQueue q = queues.get(0);
 			
-			List<Node> notSelectedNodes = null;
-			try {
-				notSelectedNodes = (List<Node>) resourceManager.getResourcesOfType(StandardResourceType.Node);
-			} catch (ResourceException e) {
-			}
+			List<Node> notSelectedNodes = resourceManager.getNodes();
 			
 			// check all tasks in queue
@@ -92,11 +88,5 @@
 		Map<ResourceUnitName, ResourceUnit> map = new HashMap<ResourceUnitName, ResourceUnit>();
 		
-		List<Node> nodes = null;
-		try {
-			nodes = (List<Node>) resourceManager.getResourcesOfType(StandardResourceType.Node);
-		} catch (ResourceException e) {
-			// TODO Auto-generated catch block
-			e.printStackTrace();
-		}
+		List<Node> nodes = resourceManager.getNodes();
 		List<Node> avNodes = filterNodes(nodes, task);
 		Node node;
Index: DCWoRMS/branches/coolemall/src/example/localplugin/coolemall/computebox1/CB1_FCFS_LoadBalancing_SP.java
===================================================================
--- DCWoRMS/branches/coolemall/src/example/localplugin/coolemall/computebox1/CB1_FCFS_LoadBalancing_SP.java	(revision 1247)
+++ DCWoRMS/branches/coolemall/src/example/localplugin/coolemall/computebox1/CB1_FCFS_LoadBalancing_SP.java	(revision 1258)
@@ -4,8 +4,5 @@
 
 import schedframe.events.scheduling.SchedulingEvent;
-import schedframe.exceptions.ResourceException;
-import schedframe.resources.StandardResourceType;
 import schedframe.resources.computing.Node;
-import schedframe.resources.computing.ComputingResource;
 import schedframe.scheduling.manager.resources.ClusterResourceManager;
 import schedframe.scheduling.manager.resources.ResourceManager;
@@ -59,21 +56,15 @@
 	@SuppressWarnings("unchecked")
 	private String chooseProvider(ClusterResourceManager resourceManager) {
-		List<ComputingResource> nodes = null;
-		try {
-			nodes = (List<ComputingResource>) resourceManager.getResourcesOfType(StandardResourceType.Node);
-		} catch (ResourceException e) {
-			// TODO Auto-generated catch block
-			e.printStackTrace();
-		}
+		List<Node> nodes = resourceManager.getNodes();
 		int nodeIdx = findLeastLoadedResourceIdx(nodes);
 		return nodes.get(nodeIdx).getFullName();
 	}
 	
-	private int findLeastLoadedResourceIdx(List<ComputingResource> nodes ){
+	private int findLeastLoadedResourceIdx(List<Node> nodes ){
 		int resourceIdx = -1;
 		int minLoad = Integer.MAX_VALUE;
 		
 		for(int i = 0; i < nodes.size(); i++){
-			Node node = (Node) nodes.get(i);
+			Node node = nodes.get(i);
 			JobRegistry jr = new JobRegistryImpl(node.getFullName());
 			int totalLoad = jr.getRunningTasks().size(); 
Index: DCWoRMS/branches/coolemall/src/example/localplugin/coolemall/computebox1/CB1_FCFS_Random_SP.java
===================================================================
--- DCWoRMS/branches/coolemall/src/example/localplugin/coolemall/computebox1/CB1_FCFS_Random_SP.java	(revision 1253)
+++ DCWoRMS/branches/coolemall/src/example/localplugin/coolemall/computebox1/CB1_FCFS_Random_SP.java	(revision 1258)
@@ -8,10 +8,8 @@
 
 import schedframe.events.scheduling.SchedulingEvent;
-import schedframe.exceptions.ResourceException;
 import schedframe.resources.ResourceStatus;
-import schedframe.resources.StandardResourceType;
-import schedframe.resources.computing.Node;
 import schedframe.resources.computing.ComputingResource;
 import schedframe.resources.computing.Core;
+import schedframe.resources.computing.Node;
 import schedframe.resources.units.ProcessingElements;
 import schedframe.resources.units.ResourceUnit;
@@ -78,11 +76,5 @@
 		Map<ResourceUnitName, ResourceUnit> map = new HashMap<ResourceUnitName, ResourceUnit>();
 		
-		List<Node> nodes = null;
-		try {
-			nodes = (List<Node>) resourceManager.getResourcesOfType(StandardResourceType.Node);
-		} catch (ResourceException e) {
-			// TODO Auto-generated catch block
-			e.printStackTrace();
-		}
+		List<Node> nodes = resourceManager.getNodes();
 		List<Node> avNodes = filterNodes(nodes, task);
 		if(avNodes.size() == 0)
Index: DCWoRMS/branches/coolemall/src/example/localplugin/coolemall/computebox2/CB2_FCFS_Consolidation_SP.java
===================================================================
--- DCWoRMS/branches/coolemall/src/example/localplugin/coolemall/computebox2/CB2_FCFS_Consolidation_SP.java	(revision 1253)
+++ DCWoRMS/branches/coolemall/src/example/localplugin/coolemall/computebox2/CB2_FCFS_Consolidation_SP.java	(revision 1258)
@@ -9,10 +9,8 @@
 
 import schedframe.events.scheduling.SchedulingEvent;
-import schedframe.exceptions.ResourceException;
 import schedframe.resources.ResourceStatus;
-import schedframe.resources.StandardResourceType;
-import schedframe.resources.computing.Node;
 import schedframe.resources.computing.ComputingResource;
 import schedframe.resources.computing.Core;
+import schedframe.resources.computing.Node;
 import schedframe.resources.units.ProcessingElements;
 import schedframe.resources.units.ResourceUnit;
@@ -78,11 +76,5 @@
 		Map<ResourceUnitName, ResourceUnit> map = new HashMap<ResourceUnitName, ResourceUnit>();
 		
-		List<Node> nodes = null;
-		try {
-			nodes = (List<Node>) resourceManager.getResourcesOfType(StandardResourceType.Node);
-		} catch (ResourceException e) {
-			// TODO Auto-generated catch block
-			e.printStackTrace();
-		}
+		List<Node> nodes = resourceManager.getNodes();
 		List<Node> avNodes = filterNodes(nodes, task);
 		Collections.sort(avNodes, new FavourableNodeComparator());
Index: DCWoRMS/branches/coolemall/src/example/localplugin/coolemall/computebox2/CB2_FCFS_Consolidation_NodePowMan_SP.java
===================================================================
--- DCWoRMS/branches/coolemall/src/example/localplugin/coolemall/computebox2/CB2_FCFS_Consolidation_NodePowMan_SP.java	(revision 1253)
+++ DCWoRMS/branches/coolemall/src/example/localplugin/coolemall/computebox2/CB2_FCFS_Consolidation_NodePowMan_SP.java	(revision 1258)
@@ -12,7 +12,7 @@
 import schedframe.resources.ResourceStatus;
 import schedframe.resources.StandardResourceType;
-import schedframe.resources.computing.Node;
 import schedframe.resources.computing.ComputingResource;
 import schedframe.resources.computing.Core;
+import schedframe.resources.computing.Node;
 import schedframe.resources.computing.Processor;
 import schedframe.resources.computing.profiles.energy.airthroughput.UserAirThroughputStateName;
@@ -59,9 +59,5 @@
 			TaskQueue q = queues.get(0);
 			
-			List<Node> notSelectedNodes = null;
-			try {
-				notSelectedNodes = (List<Node>) resourceManager.getResourcesOfType(StandardResourceType.Node);
-			} catch (ResourceException e) {
-			}
+			List<Node> notSelectedNodes = resourceManager.getNodes();
 			
 			// check all tasks in queue
@@ -92,11 +88,5 @@
 		Map<ResourceUnitName, ResourceUnit> map = new HashMap<ResourceUnitName, ResourceUnit>();
 		
-		List<Node> nodes = null;
-		try {
-			nodes = (List<Node>) resourceManager.getResourcesOfType(StandardResourceType.Node);
-		} catch (ResourceException e) {
-			// TODO Auto-generated catch block
-			e.printStackTrace();
-		}
+		List<Node> nodes = resourceManager.getNodes();
 		List<Node> avNodes = filterNodes(nodes, task);
 		Node node;
Index: DCWoRMS/branches/coolemall/src/example/localplugin/coolemall/computebox2/CB2_FCFS_LoadBalancing_SP.java
===================================================================
--- DCWoRMS/branches/coolemall/src/example/localplugin/coolemall/computebox2/CB2_FCFS_LoadBalancing_SP.java	(revision 1247)
+++ DCWoRMS/branches/coolemall/src/example/localplugin/coolemall/computebox2/CB2_FCFS_LoadBalancing_SP.java	(revision 1258)
@@ -4,8 +4,5 @@
 
 import schedframe.events.scheduling.SchedulingEvent;
-import schedframe.exceptions.ResourceException;
-import schedframe.resources.StandardResourceType;
 import schedframe.resources.computing.Node;
-import schedframe.resources.computing.ComputingResource;
 import schedframe.scheduling.manager.resources.ClusterResourceManager;
 import schedframe.scheduling.manager.resources.ResourceManager;
@@ -59,21 +56,15 @@
 	@SuppressWarnings("unchecked")
 	private String chooseProvider(ClusterResourceManager resourceManager) {
-		List<ComputingResource> nodes = null;
-		try {
-			nodes = (List<ComputingResource>) resourceManager.getResourcesOfType(StandardResourceType.Node);
-		} catch (ResourceException e) {
-			// TODO Auto-generated catch block
-			e.printStackTrace();
-		}
+		List<Node> nodes = resourceManager.getNodes();
 		int nodeIdx = findLeastLoadedResourceIdx(nodes);
 		return nodes.get(nodeIdx).getFullName();
 	}
 	
-	private int findLeastLoadedResourceIdx(List<ComputingResource> nodes ){
+	private int findLeastLoadedResourceIdx(List<Node> nodes ){
 		int resourceIdx = -1;
 		int minLoad = Integer.MAX_VALUE;
 		
 		for(int i = 0; i < nodes.size(); i++){
-			Node node = (Node) nodes.get(i);
+			Node node = nodes.get(i);
 			JobRegistry jr = new JobRegistryImpl(node.getFullName());
 			int totalLoad = jr.getRunningTasks().size(); 
Index: DCWoRMS/branches/coolemall/src/example/localplugin/coolemall/computebox2/CB2_FCFS_Random_SP.java
===================================================================
--- DCWoRMS/branches/coolemall/src/example/localplugin/coolemall/computebox2/CB2_FCFS_Random_SP.java	(revision 1253)
+++ DCWoRMS/branches/coolemall/src/example/localplugin/coolemall/computebox2/CB2_FCFS_Random_SP.java	(revision 1258)
@@ -8,8 +8,6 @@
 
 import schedframe.events.scheduling.SchedulingEvent;
-import schedframe.exceptions.ResourceException;
-import schedframe.resources.StandardResourceType;
+import schedframe.resources.computing.ComputingResource;
 import schedframe.resources.computing.Node;
-import schedframe.resources.computing.ComputingResource;
 import schedframe.resources.computing.Processor;
 import schedframe.resources.units.ProcessingElements;
@@ -81,11 +79,5 @@
 		Map<ResourceUnitName, ResourceUnit> map = new HashMap<ResourceUnitName, ResourceUnit>();
 		
-		List<Node> nodes = null;
-		try {
-			nodes = (List<Node>) resourceManager.getResourcesOfType(StandardResourceType.Node);
-		} catch (ResourceException e) {
-			// TODO Auto-generated catch block
-			e.printStackTrace();
-		}
+		List<Node> nodes = resourceManager.getNodes();
 		List<Node> avNodes = filterNodes(nodes, task);
 		if(avNodes.size() == 0)
Index: DCWoRMS/branches/coolemall/src/example/localplugin/coolemall/recs/RECS_FCFS_Consolidation_SP.java
===================================================================
--- DCWoRMS/branches/coolemall/src/example/localplugin/coolemall/recs/RECS_FCFS_Consolidation_SP.java	(revision 1247)
+++ DCWoRMS/branches/coolemall/src/example/localplugin/coolemall/recs/RECS_FCFS_Consolidation_SP.java	(revision 1258)
@@ -9,9 +9,7 @@
 
 import schedframe.events.scheduling.SchedulingEvent;
-import schedframe.exceptions.ResourceException;
 import schedframe.resources.ResourceStatus;
-import schedframe.resources.StandardResourceType;
+import schedframe.resources.computing.ComputingResource;
 import schedframe.resources.computing.Node;
-import schedframe.resources.computing.ComputingResource;
 import schedframe.resources.computing.Processor;
 import schedframe.resources.computing.profiles.energy.power.StandardPowerStateName;
@@ -53,10 +51,5 @@
 			TaskQueue q = queues.get(0);
 			// check all tasks in queue
-			List<Node> nodes;
-			try {
-				nodes = (List<Node>) resourceManager.getResourcesOfType(StandardResourceType.Node);
-			} catch (ResourceException e) {
-				break;
-			}
+			List<Node> nodes = resourceManager.getNodes();
 			for (int i = 0; i < q.size(); i++) {
 				TaskInterface<?> task = q.get(i);
Index: DCWoRMS/branches/coolemall/src/example/localplugin/coolemall/recs/RECS_FCFS_LB_SP.java
===================================================================
--- DCWoRMS/branches/coolemall/src/example/localplugin/coolemall/recs/RECS_FCFS_LB_SP.java	(revision 1247)
+++ DCWoRMS/branches/coolemall/src/example/localplugin/coolemall/recs/RECS_FCFS_LB_SP.java	(revision 1258)
@@ -4,8 +4,5 @@
 
 import schedframe.events.scheduling.SchedulingEvent;
-import schedframe.exceptions.ResourceException;
-import schedframe.resources.StandardResourceType;
 import schedframe.resources.computing.Node;
-import schedframe.resources.computing.ComputingResource;
 import schedframe.scheduling.manager.resources.ClusterResourceManager;
 import schedframe.scheduling.manager.resources.ResourceManager;
@@ -60,21 +57,16 @@
 	@SuppressWarnings("unchecked")
 	private String chooseProvider(ClusterResourceManager resourceManager) {
-		List<ComputingResource> nodes = null;
-		try {
-			nodes = (List<ComputingResource>) resourceManager.getResourcesOfType(StandardResourceType.Node);
-		} catch (ResourceException e) {
-			// TODO Auto-generated catch block
-			e.printStackTrace();
-		}
+		List<Node> nodes = resourceManager.getNodes();
+		
 		int nodeIdx = findLeastLoadedResourceIdx(nodes);
 		return nodes.get(nodeIdx).getFullName();
 	}
 	
-	private int findLeastLoadedResourceIdx(List<ComputingResource> nodes ){
+	private int findLeastLoadedResourceIdx(List<Node> nodes ){
 		int resourceIdx = -1;
 		int minLoad = Integer.MAX_VALUE;
 		
 		for(int i = 0; i < nodes.size(); i++){
-			Node node = (Node) nodes.get(i);
+			Node node = nodes.get(i);
 			JobRegistry jr = new JobRegistryImpl(node.getFullName());
 			int totalLoad = jr.getRunningTasks().size(); 
Index: DCWoRMS/branches/coolemall/src/example/localplugin/coolemall/recs/RECS_FCFS_Random_SP.java
===================================================================
--- DCWoRMS/branches/coolemall/src/example/localplugin/coolemall/recs/RECS_FCFS_Random_SP.java	(revision 1253)
+++ DCWoRMS/branches/coolemall/src/example/localplugin/coolemall/recs/RECS_FCFS_Random_SP.java	(revision 1258)
@@ -8,10 +8,8 @@
 
 import schedframe.events.scheduling.SchedulingEvent;
-import schedframe.exceptions.ResourceException;
 import schedframe.resources.ResourceStatus;
-import schedframe.resources.StandardResourceType;
-import schedframe.resources.computing.Node;
 import schedframe.resources.computing.ComputingResource;
 import schedframe.resources.computing.Core;
+import schedframe.resources.computing.Node;
 import schedframe.resources.computing.profiles.energy.airthroughput.UserAirThroughputStateName;
 import schedframe.resources.devices.Device;
@@ -57,11 +55,5 @@
 			TaskQueue q = queues.get(0);
 			
-			List<Node> notSelectedNodes = null;
-			try {
-				notSelectedNodes = (List<Node>) resourceManager.getResourcesOfType(StandardResourceType.Node);
-			} catch (ResourceException e) {
-				// TODO Auto-generated catch block
-				e.printStackTrace();
-			}
+			List<Node> notSelectedNodes = resourceManager.getNodes();
 			// check all tasks in queue
 			for (int i = 0; i < q.size(); i++) {
@@ -89,11 +81,5 @@
 	@SuppressWarnings("unchecked")
 	private Node chooseRandomProvider(ClusterResourceManager resourceManager) {
-		List<Node> nodes = null;
-		try {
-			nodes = (List<Node>) resourceManager.getResourcesOfType(StandardResourceType.Node);
-		} catch (ResourceException e) {
-			// TODO Auto-generated catch block
-			e.printStackTrace();
-		}
+		List<Node> nodes = resourceManager.getNodes();
 		nodes = filterNodes(nodes);
 		int nodeIdx = rand.nextInt(nodes.size());
@@ -116,11 +102,5 @@
 		Map<ResourceUnitName, ResourceUnit> map = new HashMap<ResourceUnitName, ResourceUnit>();
 		
-		List<Node> nodes = null;
-		try {
-			nodes = (List<Node>) resourceManager.getResourcesOfType(StandardResourceType.Node);
-		} catch (ResourceException e1) {
-			// TODO Auto-generated catch block
-			e1.printStackTrace();
-		}
+		List<Node> nodes = resourceManager.getNodes();
 		List<Node> avNodes = filterNodes(nodes, task);
 		if(avNodes.size() == 0)
Index: DCWoRMS/branches/coolemall/src/example/localplugin/coolemall/FCFSBF_RECS_SP.java
===================================================================
--- DCWoRMS/branches/coolemall/src/example/localplugin/coolemall/FCFSBF_RECS_SP.java	(revision 1207)
+++ 	(revision )
@@ -1,76 +1,0 @@
-package example.localplugin.coolemall;
-
-import java.util.List;
-import java.util.Random;
-
-import schedframe.events.scheduling.SchedulingEvent;
-import schedframe.exceptions.ResourceException;
-import schedframe.resources.StandardResourceType;
-import schedframe.resources.computing.ComputingResource;
-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 example.localplugin.BaseLocalSchedulingPlugin;
-import gridsim.dcworms.DCWormsTags;
-
-public class FCFSBF_RECS_SP extends BaseLocalSchedulingPlugin {
-
-	private Random rand;
-	
-	public FCFSBF_RECS_SP () {
-		rand = new Random(47);
-	}
-
-	public SchedulingPlanInterface<?> schedule(SchedulingEvent event, TaskQueueList queues, JobRegistry jobRegistry,
-			 ResourceManager resManager, ModuleList modules) {
-
-		ClusterResourceManager resourceManager = (ClusterResourceManager) resManager;
-		SchedulingPlan plan = new SchedulingPlan();
-		// choose 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
-			// BaseLocalSchedulingPlugin.placeJobsInQueues() method)
-			TaskQueue q = queues.get(0);
-			
-			// check all tasks in queue
-			for (int i = 0; i < q.size(); i++) {
-				TaskInterface<?> task = q.get(i);
-				// if status of the tasks in READY
-				if (task.getStatus() == DCWormsTags.READY) {
-
-					String nodeName = chooseRandomProvider(resourceManager);
-					if (nodeName != null) {
-						addToSchedulingPlan(plan, task, nodeName);
-					}
-				}
-			}
-			break;
-		}
-		return plan;
-	}
-
-	@SuppressWarnings("unchecked")
-	private String chooseRandomProvider(ClusterResourceManager resourceManager) {
-		List<ComputingResource> nodes = null;
-		try {
-			nodes = (List<ComputingResource>) resourceManager.getResourcesOfType(StandardResourceType.Node);
-		} catch (ResourceException e) {
-			// TODO Auto-generated catch block
-			e.printStackTrace();
-		}
-		int nodeIdx = rand.nextInt(nodes.size());
-		return nodes.get(nodeIdx).getFullName();
-	}
-
-}
-
Index: DCWoRMS/branches/coolemall/src/example/localplugin/Cluster_FCFSBF_RandomPlugin.java
===================================================================
--- DCWoRMS/branches/coolemall/src/example/localplugin/Cluster_FCFSBF_RandomPlugin.java	(revision 1258)
+++ DCWoRMS/branches/coolemall/src/example/localplugin/Cluster_FCFSBF_RandomPlugin.java	(revision 1258)
@@ -0,0 +1,67 @@
+package example.localplugin;
+
+import gridsim.dcworms.DCWormsTags;
+
+import java.util.List;
+import java.util.Random;
+
+import schedframe.events.scheduling.SchedulingEvent;
+import schedframe.resources.computing.Node;
+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;
+
+public class Cluster_FCFSBF_RandomPlugin extends BaseLocalSchedulingPlugin {
+
+	private Random rand;
+	
+	public Cluster_FCFSBF_RandomPlugin() {
+		rand = new Random(5);
+	}
+
+	public SchedulingPlanInterface<?> schedule(SchedulingEvent event, TaskQueueList queues, JobRegistry jobRegistry,
+			 ResourceManager resManager, ModuleList modules) {
+
+		ClusterResourceManager resourceManager = (ClusterResourceManager) resManager;
+		SchedulingPlan plan = new SchedulingPlan();
+		// choose 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
+			// BaseLocalSchedulingPlugin.placeJobsInQueues() method)
+			TaskQueue q = queues.get(0);
+			
+			// check all tasks in queue
+			for (int i = 0; i < q.size(); i++) {
+				TaskInterface<?> task = q.get(i);
+				// if status of the tasks in READY
+				if (task.getStatus() == DCWormsTags.READY) {
+
+					String nodeName = chooseRandomProvider(resourceManager);
+					if (nodeName != null) {
+						addToSchedulingPlan(plan, task, nodeName);
+					}
+				}
+			}
+			break;
+		}
+		return plan;
+	}
+
+	private String chooseRandomProvider(ClusterResourceManager resourceManager) {
+		List<Node> nodes = resourceManager.getNodes();
+		int nodeIdx = rand.nextInt(nodes.size());
+		return nodes.get(nodeIdx).getFullName();
+	}
+
+}
+
Index: DCWoRMS/branches/coolemall/src/example/localplugin/Cluster_FCFSBF_ConsolidationPlugin.java
===================================================================
--- DCWoRMS/branches/coolemall/src/example/localplugin/Cluster_FCFSBF_ConsolidationPlugin.java	(revision 1258)
+++ DCWoRMS/branches/coolemall/src/example/localplugin/Cluster_FCFSBF_ConsolidationPlugin.java	(revision 1258)
@@ -0,0 +1,145 @@
+package example.localplugin;
+
+import gridsim.dcworms.DCWormsTags;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import schedframe.events.scheduling.SchedulingEvent;
+import schedframe.resources.ResourceStatus;
+import schedframe.resources.computing.Node;
+import schedframe.resources.computing.ComputingResource;
+import schedframe.resources.units.Memory;
+import schedframe.resources.units.ProcessingElements;
+import schedframe.resources.units.ResourceUnit;
+import schedframe.resources.units.ResourceUnitName;
+import schedframe.resources.units.StandardResourceUnitName;
+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;
+
+public class Cluster_FCFSBF_ConsolidationPlugin extends BaseLocalSchedulingPlugin {
+
+	public Cluster_FCFSBF_ConsolidationPlugin () {
+	}
+
+	public SchedulingPlanInterface<?> schedule(SchedulingEvent event, TaskQueueList queues, JobRegistry jobRegistry,
+			ResourceManager resManager, ModuleList modules) {
+
+		ClusterResourceManager resourceManager = (ClusterResourceManager) resManager;
+		SchedulingPlan plan = new SchedulingPlan();
+		// choose 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
+			// BaseLocalSchedulingPlugin.placeJobsInQueues() method)
+			TaskQueue q = queues.get(0);
+			// check all tasks in queue
+
+			for (int i = 0; i < q.size(); i++) {
+				TaskInterface<?> task = q.get(i);
+				// if status of the tasks in READY
+				if (task.getStatus() == DCWormsTags.READY) {
+
+					Map<ResourceUnitName, ResourceUnit> choosenResources =  chooseResourcesForExecution(resourceManager, task);
+					if (choosenResources  != null) {
+						addToSchedulingPlan(plan, task, choosenResources);
+					} 
+				}
+			}
+
+			break;
+		}
+		return plan;
+	}
+	
+	private Map<ResourceUnitName, ResourceUnit> chooseResourcesForExecution(ClusterResourceManager resourceManager, TaskInterface<?> task){
+
+		List<Node> nodes = resourceManager.getNodes();
+		nodes = findSuitableNodes(task, nodes);
+		Collections.sort(nodes, new Comparator<Node>(){
+		    public int compare(Node node1, Node node2){   
+		        return node1.getResourceCharacteristic().getParameters().get("category").get(0).getContent().compareTo(node2.getResourceCharacteristic().getParameters().get("category").get(0).getContent());
+		    }
+		});
+		if(nodes.size() > 0)
+		{
+			Node node = nodes.get(0);
+			Map<ResourceUnitName, ResourceUnit> map = new HashMap<ResourceUnitName, ResourceUnit>();
+			List<ComputingResource> choosenResources =  new ArrayList<ComputingResource>();
+			int cpuRequest;
+			try {
+				cpuRequest = Double.valueOf(task.getCpuCntRequest()).intValue();
+			} catch (NoSuchFieldException e) {
+				cpuRequest = 0;
+			}
+			for (int i = 0; i < node.getProcessors().size() && cpuRequest > 0; i++) {
+				if (node.getProcessors().get(i).getStatus() == ResourceStatus.FREE) {
+					choosenResources.add(node.getProcessors().get(i));
+					cpuRequest--;
+				}
+			}
+			ProcessingElements result = new ProcessingElements(node.getFullName());
+			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) {
+				Memory memory;
+				try {
+					memory = new Memory(node.getMemory(), memoryRequest, memoryRequest);
+					map.put(StandardResourceUnitName.MEMORY, memory);
+				} catch (NoSuchFieldException e) {
+					return null;
+				}
+
+			}
+			return map;
+		} else 
+			return null;
+	}
+	
+	private List<Node> findSuitableNodes(TaskInterface<?> task, List<Node> nodes) {
+		int cpuRequest;
+		try {
+			cpuRequest = Double.valueOf(task.getCpuCntRequest()).intValue();
+		} catch (NoSuchFieldException e) {
+			cpuRequest = 1;
+		}
+		int memoryRequest;
+		try {
+			memoryRequest = Double.valueOf(task.getMemoryRequest()).intValue();
+		} catch (NoSuchFieldException e) {
+			memoryRequest = 0;
+		}
+		List<Node> suitableNodes = new ArrayList<Node>();
+		for(Node node: nodes){
+			try{
+				if(node.getFreeProcessorsNumber() >= cpuRequest && node.getFreeMemory() >= memoryRequest){
+					suitableNodes.add(node);
+				}	
+			} catch (NoSuchFieldException e){
+				
+			}
+		}
+		return suitableNodes;
+	}
+
+}
Index: DCWoRMS/branches/coolemall/src/example/localplugin/FCFSBF_RandomClusterPlugin.java
===================================================================
--- DCWoRMS/branches/coolemall/src/example/localplugin/FCFSBF_RandomClusterPlugin.java	(revision 1247)
+++ 	(revision )
@@ -1,67 +1,0 @@
-package example.localplugin;
-
-import gridsim.dcworms.DCWormsTags;
-
-import java.util.List;
-import java.util.Random;
-
-import schedframe.events.scheduling.SchedulingEvent;
-import schedframe.resources.computing.Node;
-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;
-
-public class FCFSBF_RandomClusterPlugin extends BaseLocalSchedulingPlugin {
-
-	private Random rand;
-	
-	public FCFSBF_RandomClusterPlugin() {
-		rand = new Random(5);
-	}
-
-	public SchedulingPlanInterface<?> schedule(SchedulingEvent event, TaskQueueList queues, JobRegistry jobRegistry,
-			 ResourceManager resManager, ModuleList modules) {
-
-		ClusterResourceManager resourceManager = (ClusterResourceManager) resManager;
-		SchedulingPlan plan = new SchedulingPlan();
-		// choose 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
-			// BaseLocalSchedulingPlugin.placeJobsInQueues() method)
-			TaskQueue q = queues.get(0);
-			
-			// check all tasks in queue
-			for (int i = 0; i < q.size(); i++) {
-				TaskInterface<?> task = q.get(i);
-				// if status of the tasks in READY
-				if (task.getStatus() == DCWormsTags.READY) {
-
-					String nodeName = chooseRandomProvider(resourceManager);
-					if (nodeName != null) {
-						addToSchedulingPlan(plan, task, nodeName);
-					}
-				}
-			}
-			break;
-		}
-		return plan;
-	}
-
-	private String chooseRandomProvider(ClusterResourceManager resourceManager) {
-		List<Node> nodes = resourceManager.getNodes();
-		int nodeIdx = rand.nextInt(nodes.size());
-		return nodes.get(nodeIdx).getFullName();
-	}
-
-}
-
Index: DCWoRMS/branches/coolemall/src/example/localplugin/FCFSBF_ConsolidationClusterPlugin.java
===================================================================
--- DCWoRMS/branches/coolemall/src/example/localplugin/FCFSBF_ConsolidationClusterPlugin.java	(revision 1247)
+++ 	(revision )
@@ -1,141 +1,0 @@
-package example.localplugin;
-
-import gridsim.dcworms.DCWormsTags;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import schedframe.events.scheduling.SchedulingEvent;
-import schedframe.resources.ResourceStatus;
-import schedframe.resources.computing.Node;
-import schedframe.resources.computing.ComputingResource;
-import schedframe.resources.units.Memory;
-import schedframe.resources.units.ProcessingElements;
-import schedframe.resources.units.ResourceUnit;
-import schedframe.resources.units.ResourceUnitName;
-import schedframe.resources.units.StandardResourceUnitName;
-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;
-
-public class FCFSBF_ConsolidationClusterPlugin extends BaseLocalSchedulingPlugin {
-
-	public FCFSBF_ConsolidationClusterPlugin () {
-	}
-
-	public SchedulingPlanInterface<?> schedule(SchedulingEvent event, TaskQueueList queues, JobRegistry jobRegistry,
-			ResourceManager resManager, ModuleList modules) {
-
-		ClusterResourceManager resourceManager = (ClusterResourceManager) resManager;
-		SchedulingPlan plan = new SchedulingPlan();
-		// choose 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
-			// BaseLocalSchedulingPlugin.placeJobsInQueues() method)
-			TaskQueue q = queues.get(0);
-			// check all tasks in queue
-
-			for (int i = 0; i < q.size(); i++) {
-				TaskInterface<?> task = q.get(i);
-				// if status of the tasks in READY
-				if (task.getStatus() == DCWormsTags.READY) {
-
-					Map<ResourceUnitName, ResourceUnit> choosenResources = null;
-					try {
-						choosenResources = chooseResourcesForExecution(resourceManager, task);
-					} catch (NoSuchFieldException e) {
-						// TODO Auto-generated catch block
-						e.printStackTrace();
-					}
-					if (choosenResources  != null) {
-						addToSchedulingPlan(plan, task, choosenResources);
-					} 
-				}
-			}
-
-			break;
-		}
-		return plan;
-	}
-	
-	private Map<ResourceUnitName, ResourceUnit> chooseResourcesForExecution(ClusterResourceManager resourceManager, TaskInterface<?> task) throws NoSuchFieldException {
-
-		List<Node> nodes = resourceManager.getNodes();
-		nodes = findSuitableNodes(task, nodes);
-		Collections.sort(nodes, new Comparator<Node>(){
-		    public int compare(Node node1, Node node2){   
-		        return node1.getResourceCharacteristic().getParameters().get("category").get(0).getContent().compareTo(node2.getResourceCharacteristic().getParameters().get("category").get(0).getContent());
-		    }
-		});
-		if(nodes.size() > 0)
-		{
-			Node node = nodes.get(0);
-			Map<ResourceUnitName, ResourceUnit> map = new HashMap<ResourceUnitName, ResourceUnit>();
-			List<ComputingResource> choosenResources =  new ArrayList<ComputingResource>();
-			int cpuRequest;
-			try {
-				cpuRequest = Double.valueOf(task.getCpuCntRequest()).intValue();
-			} catch (NoSuchFieldException e) {
-				cpuRequest = 0;
-			}
-			for (int i = 0; i < node.getProcessors().size() && cpuRequest > 0; i++) {
-				if (node.getProcessors().get(i).getStatus() == ResourceStatus.FREE) {
-					choosenResources.add(node.getProcessors().get(i));
-					cpuRequest--;
-				}
-			}
-			ProcessingElements result = new ProcessingElements(node.getFullName());
-			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) {
-				Memory memory = new Memory(node.getMemory(), memoryRequest, memoryRequest);
-				map.put(StandardResourceUnitName.MEMORY, memory);
-			}
-			return map;
-		} else 
-			return null;
-	}
-	
-	private List<Node> findSuitableNodes(TaskInterface<?> task, List<Node> nodes) throws NoSuchFieldException{
-		int cpuRequest;
-		try {
-			cpuRequest = Double.valueOf(task.getCpuCntRequest()).intValue();
-		} catch (NoSuchFieldException e) {
-			cpuRequest = 1;
-		}
-		int memoryRequest;
-		try {
-			memoryRequest = Double.valueOf(task.getMemoryRequest()).intValue();
-		} catch (NoSuchFieldException e) {
-			memoryRequest = 0;
-		}
-		List<Node> suitableNodes = new ArrayList<Node>();
-		for(Node node: nodes){
-			if(node.getFreeProcessorsNumber() >= cpuRequest && node.getFreeMemory() >= memoryRequest){
-				suitableNodes.add(node);
-			}
-		}
-		return suitableNodes;
-	}
-
-}
