Index: DCWoRMS/branches/coolemall/src/simulator/EventManager.java
===================================================================
--- DCWoRMS/branches/coolemall/src/simulator/EventManager.java	(revision 1427)
+++ DCWoRMS/branches/coolemall/src/simulator/EventManager.java	(revision 1427)
@@ -0,0 +1,212 @@
+package simulator;
+
+import eduni.simjava.Sim_event;
+import eduni.simjava.Sim_system;
+import gridsim.GridSimCore;
+import gridsim.GridSimTags;
+import gridsim.dcworms.DCWormsTags;
+
+import java.util.ArrayList;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Properties;
+
+import schedframe.Initializable;
+import schedframe.SimulatedEnvironment;
+import schedframe.events.ResourceEventCommand;
+import schedframe.exceptions.ModuleException;
+import schedframe.exceptions.ResourceException;
+import schedframe.resources.ResourceType;
+import schedframe.resources.computing.ComputingResource;
+import schedframe.resources.computing.profiles.energy.ResourceEvent;
+import schedframe.scheduling.Scheduler;
+import schedframe.scheduling.plugin.Module;
+import schedframe.scheduling.plugin.ModuleType;
+
+public class EventManager extends GridSimCore implements Module{
+
+	protected SimulatedEnvironment simEnv;
+	
+	public EventManager(String name, SimulatedEnvironment resourceController) throws Exception {
+		super(name, 1);
+		this.simEnv = resourceController;
+	}
+
+	public void body() {
+		
+		for(Initializable initObj: simEnv.getToInit()){
+			initObj.initiate();
+		}
+		simEnv.setInitList(null);
+		
+		// Process events until END_OF_SIMULATION is received from the
+		// GridSimShutdown Entity
+		Sim_event ev = new Sim_event();
+		sim_get_next(ev);
+		boolean run = true;
+		while (Sim_system.running()  && run) {
+			// sim_get_next(ev);
+			// if the simulation finishes then exit the loop
+			if (ev.get_tag() == GridSimTags.END_OF_SIMULATION) {
+				// managemetnSystem_.setEndSimulation();
+				run = false;
+				break;
+			}
+			
+			// process the received event
+			processRequest(ev);
+			sim_get_next(ev);
+		}
+	}
+	
+	protected void processRequest(Sim_event ev) {
+		switch (ev.get_tag()) {
+
+		case DCWormsTags.TO_RESOURCES:
+			sendToResources(ev);
+			break;
+
+		case DCWormsTags.TO_SCHEDULERS:
+			//super.send((Integer)ev.get_data(), 0, DCWormsTags.PHASE_CHANGED, null);
+			break;
+
+		default:
+			break;
+		}
+	}
+	
+	public void send(String entityName, double delay, int tag, Object data){
+		super.send(entityName, delay, tag, data);
+	}
+	
+	public void send(int destId, double delay, int tag){
+		super.send(destId, delay, tag);
+	}
+	
+	public void send(int destId, double delay, int tag, Object data){
+		super.send(destId, delay, tag, data);
+	}
+	
+	public void init(Properties properties) throws ModuleException {
+	}
+
+	public void sendToAllSchedulers(double delay, int tag, Object data){
+		List<Scheduler> allSchedulers =  new ArrayList<Scheduler>();
+		if (simEnv.getScheduler().getChildren() != null) {
+			LinkedList<Scheduler> toExamine = new LinkedList<Scheduler>();
+			toExamine.push(simEnv.getScheduler());
+			allSchedulers.add(simEnv.getScheduler());
+
+			while (!toExamine.isEmpty()) {
+				Scheduler scheduler = toExamine.pop();
+				List<Scheduler> schedulers = scheduler.getChildren();
+				int numberOfSched = schedulers.size();
+				for (int i = 0; i < numberOfSched; i++) {
+					Scheduler schedulerChild = schedulers.get(i);
+					toExamine.addLast(schedulerChild);
+					allSchedulers.add(schedulerChild);
+				}
+			}
+		}
+		
+		for(Scheduler scheduler: allSchedulers){
+			//sendInternal(delay, DCWormsTags.TO_SCHEDULERS, scheduler.get_id());
+			super.send(scheduler.get_id(), delay, tag, data);
+		}
+	}
+	
+	public void sendToResources(ResourceType type, double delay, ResourceEvent event){
+		List<ComputingResource> computingResources = new ArrayList<ComputingResource>();
+
+		if (simEnv.getComputingResources() != null) {
+			for(ComputingResource compRes: simEnv.getComputingResources()){
+				computingResources.addAll(compRes.getDescendantsByType(type));
+			}
+		}
+		sendInternal(delay, DCWormsTags.TO_RESOURCES, new ResourceBroadcastOrder(computingResources, event));
+	}
+	
+	public void sendToAllResources(double delay, ResourceEvent event){
+		List<ComputingResource> computingResources = new ArrayList<ComputingResource>();
+
+		if (simEnv.getComputingResources() != null) {
+			LinkedList<ComputingResource> toExamine = new LinkedList<ComputingResource>();
+			for(ComputingResource compRes: simEnv.getComputingResources()){
+				toExamine.push(compRes);
+				computingResources.add(compRes);
+			}
+
+			while (!toExamine.isEmpty()) {
+				ComputingResource resource = toExamine.pop();
+				List<ComputingResource> resources = resource.getChildren();
+				int numberOfRes = resources.size();
+				for (int i = 0; i < numberOfRes; i++) {
+					ComputingResource resourceChild = resources.get(i);
+					toExamine.addLast(resourceChild);
+					computingResources.add(resourceChild);
+				}
+			}
+		}
+		sendInternal(delay, DCWormsTags.TO_RESOURCES, new ResourceBroadcastOrder(computingResources, event));
+	}
+
+	public void sendToResource(String resourceName, double delay, ResourceEvent event){
+		List<ComputingResource> computingResources = new ArrayList<ComputingResource>();
+
+		try {
+			computingResources.add(SimulatedEnvironment.getComputingResourceByName(resourceName));
+		} catch (ResourceException e) {
+
+		}
+		sendInternal(delay, DCWormsTags.TO_RESOURCES, new ResourceBroadcastOrder(computingResources, event));
+	}
+	
+	private void sendToResources(Sim_event ev){
+		ResourceEventCommand rec;
+		
+		ResourceBroadcastOrder rbo = (ResourceBroadcastOrder)ev.get_data();
+		List<ComputingResource> computingResources = rbo.getComputingResources();
+		ResourceEvent event = rbo.getEvent();
+		for(ComputingResource compRes: computingResources){
+			rec = new ResourceEventCommand(compRes);
+			rec.execute(event);
+		}
+	}
+	
+	public void sendInternal(double delay, int tag, Object data) {
+		this.send(this.get_id(), delay, tag, data);
+	}
+	
+	public void sendTo(List<String> ids){
+	}
+	
+	public void dispose() throws ModuleException {
+	}
+
+	public ModuleType getType() {
+		return ModuleType.EVENT_MANAGER;
+	}
+
+}
+
+class ResourceBroadcastOrder {
+
+	private List<ComputingResource> computingResources;
+	private ResourceEvent event;
+	
+	public ResourceBroadcastOrder(List<ComputingResource> computingResources, ResourceEvent event) {
+		super();
+		this.computingResources = computingResources;
+		this.event = event;
+	}
+
+	public List<ComputingResource> getComputingResources() {
+		return computingResources;
+	}
+
+	public ResourceEvent getEvent() {
+		return event;
+	}
+}
+
+
Index: DCWoRMS/branches/coolemall/src/simulator/DataCenterWorkloadSimulator.java
===================================================================
--- DCWoRMS/branches/coolemall/src/simulator/DataCenterWorkloadSimulator.java	(revision 1415)
+++ DCWoRMS/branches/coolemall/src/simulator/DataCenterWorkloadSimulator.java	(revision 1427)
@@ -31,5 +31,4 @@
 import simulator.workload.reader.xmlJob.QcgXmlJobReader;
 import simulator.workload.reader.xmlJob.XMLJobReader;
-import test.EventManager;
 import cern.jet.random.Uniform;
 import cern.jet.random.engine.MersenneTwister64;
Index: DCWoRMS/branches/coolemall/src/test/EventManager.java
===================================================================
--- DCWoRMS/branches/coolemall/src/test/EventManager.java	(revision 1421)
+++ 	(revision )
@@ -1,212 +1,0 @@
-package test;
-
-import eduni.simjava.Sim_event;
-import eduni.simjava.Sim_system;
-import gridsim.GridSimCore;
-import gridsim.GridSimTags;
-import gridsim.dcworms.DCWormsTags;
-
-import java.util.ArrayList;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Properties;
-
-import schedframe.Initializable;
-import schedframe.SimulatedEnvironment;
-import schedframe.events.ResourceEventCommand;
-import schedframe.exceptions.ModuleException;
-import schedframe.exceptions.ResourceException;
-import schedframe.resources.ResourceType;
-import schedframe.resources.computing.ComputingResource;
-import schedframe.resources.computing.profiles.energy.ResourceEvent;
-import schedframe.scheduling.Scheduler;
-import schedframe.scheduling.plugin.Module;
-import schedframe.scheduling.plugin.ModuleType;
-
-public class EventManager extends GridSimCore implements Module{
-
-	protected SimulatedEnvironment simEnv;
-	
-	public EventManager(String name, SimulatedEnvironment resourceController) throws Exception {
-		super(name, 1);
-		this.simEnv = resourceController;
-	}
-
-	public void body() {
-		
-		for(Initializable initObj: simEnv.getToInit()){
-			initObj.initiate();
-		}
-		simEnv.setInitList(null);
-		
-		// Process events until END_OF_SIMULATION is received from the
-		// GridSimShutdown Entity
-		Sim_event ev = new Sim_event();
-		sim_get_next(ev);
-		boolean run = true;
-		while (Sim_system.running()  && run) {
-			// sim_get_next(ev);
-			// if the simulation finishes then exit the loop
-			if (ev.get_tag() == GridSimTags.END_OF_SIMULATION) {
-				// managemetnSystem_.setEndSimulation();
-				run = false;
-				break;
-			}
-			
-			// process the received event
-			processRequest(ev);
-			sim_get_next(ev);
-		}
-	}
-	
-	protected void processRequest(Sim_event ev) {
-		switch (ev.get_tag()) {
-
-		case DCWormsTags.TO_RESOURCES:
-			sendToResources(ev);
-			break;
-
-		case DCWormsTags.TO_SCHEDULERS:
-			//super.send((Integer)ev.get_data(), 0, DCWormsTags.PHASE_CHANGED, null);
-			break;
-
-		default:
-			break;
-		}
-	}
-	
-	public void send(String entityName, double delay, int tag, Object data){
-		super.send(entityName, delay, tag, data);
-	}
-	
-	public void send(int destId, double delay, int tag){
-		super.send(destId, delay, tag);
-	}
-	
-	public void send(int destId, double delay, int tag, Object data){
-		super.send(destId, delay, tag, data);
-	}
-	
-	public void init(Properties properties) throws ModuleException {
-	}
-
-	public void sendToAllSchedulers(double delay, int tag, Object data){
-		List<Scheduler> allSchedulers =  new ArrayList<Scheduler>();
-		if (simEnv.getScheduler().getChildren() != null) {
-			LinkedList<Scheduler> toExamine = new LinkedList<Scheduler>();
-			toExamine.push(simEnv.getScheduler());
-			allSchedulers.add(simEnv.getScheduler());
-
-			while (!toExamine.isEmpty()) {
-				Scheduler scheduler = toExamine.pop();
-				List<Scheduler> schedulers = scheduler.getChildren();
-				int numberOfSched = schedulers.size();
-				for (int i = 0; i < numberOfSched; i++) {
-					Scheduler schedulerChild = schedulers.get(i);
-					toExamine.addLast(schedulerChild);
-					allSchedulers.add(schedulerChild);
-				}
-			}
-		}
-		
-		for(Scheduler scheduler: allSchedulers){
-			//sendInternal(delay, DCWormsTags.TO_SCHEDULERS, scheduler.get_id());
-			super.send(scheduler.get_id(), delay, tag, data);
-		}
-	}
-	
-	public void sendToResources(ResourceType type, double delay, ResourceEvent event){
-		List<ComputingResource> computingResources = new ArrayList<ComputingResource>();
-
-		if (simEnv.getComputingResources() != null) {
-			for(ComputingResource compRes: simEnv.getComputingResources()){
-				computingResources.addAll(compRes.getDescendantsByType(type));
-			}
-		}
-		sendInternal(delay, DCWormsTags.TO_RESOURCES, new ResourceBroadcastOrder(computingResources, event));
-	}
-	
-	public void sendToAllResources(double delay, ResourceEvent event){
-		List<ComputingResource> computingResources = new ArrayList<ComputingResource>();
-
-		if (simEnv.getComputingResources() != null) {
-			LinkedList<ComputingResource> toExamine = new LinkedList<ComputingResource>();
-			for(ComputingResource compRes: simEnv.getComputingResources()){
-				toExamine.push(compRes);
-				computingResources.add(compRes);
-			}
-
-			while (!toExamine.isEmpty()) {
-				ComputingResource resource = toExamine.pop();
-				List<ComputingResource> resources = resource.getChildren();
-				int numberOfRes = resources.size();
-				for (int i = 0; i < numberOfRes; i++) {
-					ComputingResource resourceChild = resources.get(i);
-					toExamine.addLast(resourceChild);
-					computingResources.add(resourceChild);
-				}
-			}
-		}
-		sendInternal(delay, DCWormsTags.TO_RESOURCES, new ResourceBroadcastOrder(computingResources, event));
-	}
-
-	public void sendToResource(String resourceName, double delay, ResourceEvent event){
-		List<ComputingResource> computingResources = new ArrayList<ComputingResource>();
-
-		try {
-			computingResources.add(SimulatedEnvironment.getComputingResourceByName(resourceName));
-		} catch (ResourceException e) {
-
-		}
-		sendInternal(delay, DCWormsTags.TO_RESOURCES, new ResourceBroadcastOrder(computingResources, event));
-	}
-	
-	private void sendToResources(Sim_event ev){
-		ResourceEventCommand rec;
-		
-		ResourceBroadcastOrder rbo = (ResourceBroadcastOrder)ev.get_data();
-		List<ComputingResource> computingResources = rbo.getComputingResources();
-		ResourceEvent event = rbo.getEvent();
-		for(ComputingResource compRes: computingResources){
-			rec = new ResourceEventCommand(compRes);
-			rec.execute(event);
-		}
-	}
-	
-	public void sendInternal(double delay, int tag, Object data) {
-		this.send(this.get_id(), delay, tag, data);
-	}
-	
-	public void sendTo(List<String> ids){
-	}
-	
-	public void dispose() throws ModuleException {
-	}
-
-	public ModuleType getType() {
-		return ModuleType.EVENT_MANAGER;
-	}
-
-}
-
-class ResourceBroadcastOrder {
-
-	private List<ComputingResource> computingResources;
-	private ResourceEvent event;
-	
-	public ResourceBroadcastOrder(List<ComputingResource> computingResources, ResourceEvent event) {
-		super();
-		this.computingResources = computingResources;
-		this.event = event;
-	}
-
-	public List<ComputingResource> getComputingResources() {
-		return computingResources;
-	}
-
-	public ResourceEvent getEvent() {
-		return event;
-	}
-}
-
-
Index: DCWoRMS/branches/coolemall/src/schedframe/scheduling/ExecutionHistoryItem.java
===================================================================
--- DCWoRMS/branches/coolemall/src/schedframe/scheduling/ExecutionHistoryItem.java	(revision 1423)
+++ DCWoRMS/branches/coolemall/src/schedframe/scheduling/ExecutionHistoryItem.java	(revision 1427)
@@ -1,5 +1,4 @@
 package schedframe.scheduling;
 
-import org.joda.time.DateTime;
 
 public class ExecutionHistoryItem {
Index: DCWoRMS/branches/coolemall/src/schedframe/scheduling/plugin/ModuleType.java
===================================================================
--- DCWoRMS/branches/coolemall/src/schedframe/scheduling/plugin/ModuleType.java	(revision 1396)
+++ DCWoRMS/branches/coolemall/src/schedframe/scheduling/plugin/ModuleType.java	(revision 1427)
@@ -3,5 +3,5 @@
 
 import schedframe.scheduling.plugin.grid.ResourceDiscovery;
-import test.EventManager;
+import simulator.EventManager;
 
 
Index: DCWoRMS/branches/coolemall/src/schedframe/scheduling/policy/local/LocalManagementSystem.java
===================================================================
--- DCWoRMS/branches/coolemall/src/schedframe/scheduling/policy/local/LocalManagementSystem.java	(revision 1423)
+++ DCWoRMS/branches/coolemall/src/schedframe/scheduling/policy/local/LocalManagementSystem.java	(revision 1427)
@@ -517,5 +517,4 @@
 			Executable exec = (Executable)execTask;
 
-
 			Map<ResourceUnitName, ResourceUnit> choosenResources = exec.getAllocatedResources().getLast().getResourceUnits();
 
