diff --git a/src/dseengine/CPUResult.java b/src/dseengine/CPUResult.java
index bfa26f974b0c52831d26223e42921fc9b08f5e75..494d5712ec87ea2e426a7abc5f5eac0d0e5d220e 100755
--- a/src/dseengine/CPUResult.java
+++ b/src/dseengine/CPUResult.java
@@ -77,9 +77,9 @@ public class CPUResult  {
 	public String toStringResult() {
 		StringBuffer sb = new StringBuffer("CPU " + id + " " + name + " " + utilization);
 		if (contentions != null) {
-			sb.append(" ");
+			//sb.append("");
 			for(BusContentionResult bcr: contentions) {
-				sb.append(bcr.toStringResult(id, name));
+				sb.append("\n" + bcr.toStringResult(id, name));
 			}
 		}
 		return sb.toString();
diff --git a/src/dseengine/CPUWholeResult.java b/src/dseengine/CPUWholeResult.java
index 8c76dd6b4225523111bb9a681dedd84c4e76f54f..877e6094106b7d95be18cd77041ce12865e7b2b5 100755
--- a/src/dseengine/CPUWholeResult.java
+++ b/src/dseengine/CPUWholeResult.java
@@ -93,17 +93,23 @@ public class CPUWholeResult  {
 		BusContentionWholeResult bcwr;
 		
 		if (rescpu.contentions != null) {
+			TraceManager.addDev("Working on contentions");
 			for(BusContentionResult ct: rescpu.contentions) {
+				TraceManager.addDev("One contention");
 				o = contentionTable.get(ct.id);
 				if (o == null) {
 					bcwr = new BusContentionWholeResult(ct);
 					contentionTable.put(ct.id, bcwr);
 					addContentionOnBus(bcwr);
+					TraceManager.addDev("adding contention");
 				} else {
 					bcwr = (BusContentionWholeResult)o;
 					bcwr.updateResults(ct);
+					TraceManager.addDev("updating contention");
 				}
 			}
+		} else {
+			TraceManager.addDev("null contention");
 		}
 	}
 	
@@ -127,5 +133,50 @@ public class CPUWholeResult  {
 		return sb.toString();
 	}
 	
+	public double getAverageBusContention() {
+		double average = 0;
+		
+		if (contentions == null) {
+			TraceManager.addDev("No contention");
+			return 0;
+		}
+		
+		for(BusContentionWholeResult wbc: contentions) {
+			average += wbc.averageContention;
+		}
+		
+		return average / contentions.size();
+	}    
+	
+	public long getMaxBusContention() {
+		long max = 0;
+		
+		if (contentions == null) {
+			TraceManager.addDev("No contention");
+			return 0;
+		}
+		
+		for(BusContentionWholeResult wbc: contentions) {
+			max = Math.max(max, wbc.maxContention);
+		}
+		
+		return max;
+	}
+	
+	public long getMinBusContention() {
+		long min = 10000000;
+		
+		if (contentions == null) {
+			TraceManager.addDev("No contention");
+			return 0;
+		}
+		
+		for(BusContentionWholeResult wbc: contentions) {
+			min = Math.min(min, wbc.minContention);
+		}
+		
+		return min;
+	}
+	
 } // Class CPUWholeResult
 
diff --git a/src/dseengine/DSEConfiguration.java b/src/dseengine/DSEConfiguration.java
index 9e02347623882d00993483b3ebc4e888b3f1e850..d8a4cb344c80e8d43ff8a7699b0405df5709bf64 100755
--- a/src/dseengine/DSEConfiguration.java
+++ b/src/dseengine/DSEConfiguration.java
@@ -122,7 +122,7 @@ public class DSEConfiguration implements Runnable  {
 	private int nbOfSimulationsPerMapping = 1;
 	private TMLModeling taskModel = null;
 	private Vector<TMLMapping> mappings;
-	private Vector<DSESimulationResult> resultsDSE; 
+	private DSEMappingSimulationResults dsemapresults;
 	
 	
 	
@@ -810,12 +810,18 @@ public class DSEConfiguration implements Runnable  {
 	
 	public int printAllResults(String _arguments, boolean _debug, boolean _optimize) {
 		TraceManager.addDev("Printing all results");
+		String sres;
+		DSESimulationResult res;
 		
-		if (resultsDSE != null) {
-			int cpt = resultsID - resultsDSE.size();
-			for(DSESimulationResult res: resultsDSE) {
+		if (dsemapresults != null) {
+			int cpt = resultsID - dsemapresults.nbOfElements();
+			for(int i=0; i<dsemapresults.nbOfElements(); i++) {
+				res = dsemapresults.getResults(i);
 				try {
-					FileUtils.saveFile(pathToResults + "alldseresults_mapping" + cpt + ".txt", res.getAllExplanationHeader() + "\n" + res.getAllComments() + "\n" + res.getAllResults());
+					sres =  res.getAllExplanationHeader() + "\n";
+					sres += "#Mapping description: " + dsemapresults.getMapping(i).getSummaryTaskMapping() + "\n";
+					sres += res.getAllComments() + "\n" + res.getAllResults();
+					FileUtils.saveFile(pathToResults + "alldseresults_mapping" + cpt + ".txt", sres);
 				} catch (Exception e){
 					TraceManager.addDev("Error when saving results file" + e.getMessage());
 					return -1;
@@ -823,6 +829,10 @@ public class DSEConfiguration implements Runnable  {
 				}
 				cpt ++;
 			}
+			
+			
+			
+			
 		} else {
 			
 			if (results == null) {
@@ -853,26 +863,94 @@ public class DSEConfiguration implements Runnable  {
 	public int printResultsSummary(String _arguments, boolean _debug, boolean _optimize) {
 		TraceManager.addDev("Computing results");
 		
-		if (results == null) {
-			TraceManager.addDev("No results");
-			return -1;
-		}
-		
-		// Must compute results
-		results.computeResults();
+		String sres;
+		DSESimulationResult res;
 		
-		TraceManager.addDev("Results: #" + resultsID + "\n" +  results.getWholeResults());
-		
-		// Saving to file
-		try {
-			FileUtils.saveFile(pathToResults + "summary" + resultsID + ".txt", results.getExplanationHeader() + "\n" + results.getAllComments() + "\n" + results.getWholeResults());
-		} catch (Exception e){
-			TraceManager.addDev("Error when saving results file");
-			return -1;
+		if (dsemapresults != null) {
+			int cpt = resultsID - dsemapresults.nbOfElements();
+			dsemapresults.computeSummaryResult();
+			for(int i=0; i<dsemapresults.nbOfElements(); i++) {
+				
+				res = dsemapresults.getResults(i);
+				try {
+					sres =  res.getAllExplanationHeader() + "\n";
+					sres += "#Mapping description: " + dsemapresults.getMapping(i).getSummaryTaskMapping() + "\n";
+					sres += res.getAllComments() + "\n" + res.getWholeResults();
+					FileUtils.saveFile(pathToResults + "summary_dseresults_ofmapping" + cpt + ".txt", sres);
+				} catch (Exception e){
+					TraceManager.addDev("Error when saving results file" + e.getMessage());
+					return -1;
+					
+				}
+				cpt ++;
+			}
+			StringBuffer sb = new StringBuffer("# Overall results\n");
+			sb.append("#Mappings:\n" + dsemapresults.getDescriptionOfAllMappings() + "\n\n");
+			
+			
+			sb.append("\nCPUs:\n");
+			sb.append("Mapping with Highest min CPU Usage: " + dsemapresults.getMappingWithHighestMinCPUUsage() + "\n");
+			sb.append("Mapping with Lowest min CPU Usage: " + dsemapresults.getMappingWithLowestMinCPUUsage() + "\n");
+			
+			sb.append("Mapping with Highest Average CPU Usage: " + dsemapresults.getMappingWithHighestAverageCPUUsage() + "\n");
+			sb.append("Mapping with Lowest Average CPU Usage: " + dsemapresults.getMappingWithLowestAverageCPUUsage() + "\n");
+			
+			sb.append("Mapping with Highest max CPU Usage: " + dsemapresults.getMappingWithHighestMaxCPUUsage() + "\n");
+			sb.append("Mapping with Lowest max CPU Usage: " + dsemapresults.getMappingWithLowestMaxCPUUsage() + "\n");
 			
+			
+			sb.append("\nBus:\n");
+			sb.append("Mapping with Highest min Bus Usage: " + dsemapresults.getMappingWithHighestMinBusUsage() + "\n");
+			sb.append("Mapping with Lowest min Bus Usage: " + dsemapresults.getMappingWithLowestMinBusUsage() + "\n");
+			
+			sb.append("Mapping with Highest Average Bus Usage: " + dsemapresults.getMappingWithHighestAverageBusUsage() + "\n");
+			sb.append("Mapping with Lowest Average Bus Usage: " + dsemapresults.getMappingWithLowestAverageCPUUsage() + "\n");
+			
+			sb.append("Mapping with Highest max Bus Usage: " + dsemapresults.getMappingWithHighestMaxBusUsage() + "\n");
+			sb.append("Mapping with Lowest max Bus Usage: " + dsemapresults.getMappingWithLowestMaxBusUsage() + "\n");
+			
+			sb.append("\nContentions:\n");
+			sb.append("Mapping with Highest min bus contention: " + dsemapresults.getMappingWithHighestMinBusContention() + "\n");
+			sb.append("Mapping with Lowest min Bus contention: " + dsemapresults.getMappingWithLowestMinBusContention() + "\n");
+			
+			sb.append("Mapping with Highest Average Bus contention: " + dsemapresults.getMappingWithHighestAverageBusUsage() + "\n");
+			sb.append("Mapping with Lowest Average Bus contention: " + dsemapresults.getMappingWithLowestAverageCPUUsage() + "\n");
+			
+			sb.append("Mapping with Highest max Bus contention: " + dsemapresults.getMappingWithHighestMaxBusUsage() + "\n");
+			sb.append("Mapping with Lowest max Bus contention: " + dsemapresults.getMappingWithLowestMaxBusUsage() + "\n");
+			
+			try {
+				FileUtils.saveFile(pathToResults + "Overall_results_AllMappings_From_" + resultsID + ".txt", sb.toString());
+			} catch (Exception e){
+					TraceManager.addDev("Error when saving results file" + e.getMessage());
+					return -1;
+					
+				}
+			return 0;
+			
+		} else {
+			
+			if (results == null) {
+				TraceManager.addDev("No results");
+				return -1;
+			}
+			
+			// Must compute results
+			results.computeResults();
+			
+			TraceManager.addDev("Results: #" + resultsID + "\n" +  results.getWholeResults());
+			
+			// Saving to file
+			try {
+				FileUtils.saveFile(pathToResults + "summary" + resultsID + ".txt", results.getExplanationHeader() + "\n" + results.getAllComments() + "\n" + results.getWholeResults());
+			} catch (Exception e){
+				TraceManager.addDev("Error when saving results file");
+				return -1;
+				
+			}
+			
+			return 0;
 		}
-		
-		return 0;
 	}
 	
 	public int resetResults(String _arguments) {
@@ -1005,16 +1083,16 @@ public class DSEConfiguration implements Runnable  {
 		}
 		
 		int cpt = 0;
-		for(TMLMapping tmla: mappings) {
+		/*for(TMLMapping tmla: mappings) {
 			TraceManager.addDev("map " + cpt + ": " + tmla.getSummaryTaskMapping());
 			cpt ++;
-		}
+		}*/
 		
 		// For each maping, generate the simulation code
 		cpt = 0;
 		if (recordResults) {
-			if (resultsDSE == null) {
-				resultsDSE = new Vector<DSESimulationResult>();
+			if (dsemapresults == null) {
+				dsemapresults = new DSEMappingSimulationResults();
 			}
 		}
 		for(TMLMapping tmla: mappings) {
@@ -1027,9 +1105,9 @@ public class DSEConfiguration implements Runnable  {
 					resultsID ++;
 				}
 				
-				System.out.println("After Current TML Mapping: " + tmla.getSummaryTaskMapping());
+				//System.out.println("After Current TML Mapping: " + tmla.getSummaryTaskMapping());
 				
-				resultsDSE.add(results);
+				dsemapresults.addElement("Mapping #" + (cpt-1), results, tmla);
 				nbOfSimulations = nbOfSimulationsPerMapping;
 				// Executing the simulation
 				String cmd = prepareCommand();
@@ -1286,6 +1364,8 @@ public class DSEConfiguration implements Runnable  {
 	private void makeMapping(CPUWithTasks[] cpus_tasks,  Vector<TMLMapping> maps, TMLModeling _tmlm) {
 		TMLArchitecture tmla = new TMLArchitecture();
 		TMLMapping tmap = new TMLMapping(_tmlm, tmla, true);
+		DIPLOElement.setGeneralID(_tmlm.computeMaxID() + 1);
+		
 		HwCPU cpu;
 		
 		for(int i=0; i<cpus_tasks.length; i++) {
diff --git a/src/dseengine/DSEMappingSimulationResults.java b/src/dseengine/DSEMappingSimulationResults.java
new file mode 100755
index 0000000000000000000000000000000000000000..ada60be8813ab5a8321da441bbdc5ee232925a5f
--- /dev/null
+++ b/src/dseengine/DSEMappingSimulationResults.java
@@ -0,0 +1,526 @@
+/**Copyright or (C) or Copr. GET / ENST, Telecom-Paris, Ludovic Apvrille
+
+ludovic.apvrille AT enst.fr
+
+This software is a computer program whose purpose is to allow the 
+edition of TURTLE analysis, design and deployment diagrams, to 
+allow the generation of RT-LOTOS or Java code from this diagram, 
+and at last to allow the analysis of formal validation traces 
+obtained from external tools, e.g. RTL from LAAS-CNRS and CADP 
+from INRIA Rhone-Alpes.
+
+This software is governed by the CeCILL  license under French law and
+abiding by the rules of distribution of free software.  You can  use, 
+modify and/ or redistribute the software under the terms of the CeCILL
+license as circulated by CEA, CNRS and INRIA at the following URL
+"http://www.cecill.info". 
+
+As a counterpart to the access to the source code and  rights to copy,
+modify and redistribute granted by the license, users are provided only
+with a limited warranty  and the software's author,  the holder of the
+economic rights,  and the successive licensors  have only  limited
+liability. 
+
+In this respect, the user's attention is drawn to the risks associated
+with loading,  using,  modifying and/or developing or reproducing the
+software by the user in light of its specific status of free software,
+that may mean  that it is complicated to manipulate,  and  that  also
+therefore means  that it is reserved for developers  and  experienced
+professionals having in-depth computer knowledge. Users are therefore
+encouraged to load and test the software's suitability as regards their
+requirements in conditions enabling the security of their systems and/or 
+data to be ensured and,  more generally, to use and operate it in the 
+same conditions as regards security. 
+
+The fact that you are presently reading this means that you have had
+knowledge of the CeCILL license and that you accept its terms.
+
+/**
+* Class DSEMappingSimulationResults
+* Object for storing simulation results of several mappings
+* Creation: 20/09/2011
+* @version 1.0 20/09/2011
+* @author Ludovic APVRILLE
+* @see
+*/
+
+package dseengine;
+
+import java.io.*;
+import java.util.*;
+
+import tmltranslator.*;
+
+import myutil.*;
+
+
+import org.w3c.dom.*;
+import org.xml.sax.*;
+import javax.xml.parsers.*;
+
+//import uppaaldesc.*;
+
+public class DSEMappingSimulationResults  {
+	
+	
+	private Vector<String> comments;
+	private Vector<DSESimulationResult> results;
+	private Vector<TMLMapping> maps;
+	
+	
+	public DSEMappingSimulationResults() {
+		reset();
+	}
+	
+	public void reset() {
+		comments = new Vector<String>();
+		results = new Vector<DSESimulationResult>();
+		maps = new Vector<TMLMapping>();
+	}
+	
+	public void addElement(String _comment, DSESimulationResult _result, TMLMapping _tmla) {
+		comments.add(_comment);
+		results.add(_result);
+		maps.add(_tmla);
+	}
+	
+	public int nbOfElements() {
+		return comments.size();
+	}
+	
+	public String getComment(int index) {
+		return comments.get(index);
+	}
+	
+	public DSESimulationResult getResults(int index) {
+		return results.get(index);
+	}
+	
+	public TMLMapping getMapping(int index) {
+		return maps.get(index);
+	}
+	
+	public void computeSummaryResult() {
+		for(DSESimulationResult res: results) {
+			res.computeResults();
+		}
+	}
+	
+	public String getDescriptionOfAllMappings() {
+		StringBuffer sb = new StringBuffer("");
+		int cpt = 0;
+		
+		for(TMLMapping map: maps) {
+			sb.append("#" + cpt + ": " + map.getSummaryTaskMapping() + "\n");
+			cpt ++;
+		}
+		
+		return sb.toString();
+	}
+	
+	
+	public int getMappingWithLowestAverageCPUUsage() {
+		if (results.size() == 0) {
+			return -1;
+		}
+		
+		int currentIndex = 0;
+		int index = 0;
+		double value = 1.1;
+		double valuetmp;
+		
+		for(DSESimulationResult dserr: results) {
+			valuetmp = dserr.getAverageCPUUsage();
+			if (valuetmp < value) {
+				value = valuetmp;
+				index = currentIndex;
+			}
+			currentIndex ++;
+		}
+		
+		return index;
+	}
+	
+	public int getMappingWithHighestAverageCPUUsage() {
+		if (results.size() == 0) {
+			return -1;
+		}
+		
+		int currentIndex = 0;
+		int index = 0;
+		double value = -0.1;
+		double valuetmp;
+		
+		for(DSESimulationResult dserr: results) {
+			valuetmp = dserr.getAverageCPUUsage();
+			if (valuetmp > value) {
+				value = valuetmp;
+				index = currentIndex;
+			}
+			currentIndex ++;
+		}
+		
+		return index;
+	}
+	
+	public int getMappingWithLowestMaxCPUUsage() {
+		if (results.size() == 0) {
+			return -1;
+		}
+		
+		int currentIndex = 0;
+		int index = 0;
+		double value = 1.1;
+		double valuetmp;
+		
+		for(DSESimulationResult dserr: results) {
+			valuetmp = dserr.getMaxCPUUsage();
+			if (valuetmp < value) {
+				value = valuetmp;
+				index = currentIndex;
+			}
+			currentIndex ++;
+		}
+		
+		return index;
+	}
+	
+	public int getMappingWithHighestMaxCPUUsage() {
+		if (results.size() == 0) {
+			return -1;
+		}
+		
+		int currentIndex = 0;
+		int index = 0;
+		double value = -0.1;
+		double valuetmp;
+		
+		for(DSESimulationResult dserr: results) {
+			valuetmp = dserr.getMaxCPUUsage();
+			if (valuetmp > value) {
+				value = valuetmp;
+				index = currentIndex;
+			}
+			currentIndex ++;
+		}
+		
+		return index;
+	}
+	
+	public int getMappingWithLowestMinCPUUsage() {
+		if (results.size() == 0) {
+			return -1;
+		}
+		
+		int currentIndex = 0;
+		int index = 0;
+		double value = 1.1;
+		double valuetmp;
+		
+		for(DSESimulationResult dserr: results) {
+			valuetmp = dserr.getMinCPUUsage();
+			if (valuetmp < value) {
+				value = valuetmp;
+				index = currentIndex;
+			}
+			currentIndex ++;
+		}
+		
+		return index;
+	}
+	
+	public int getMappingWithHighestMinCPUUsage() {
+		if (results.size() == 0) {
+			return -1;
+		}
+		
+		int currentIndex = 0;
+		int index = 0;
+		double value = -0.1;
+		double valuetmp;
+		
+		for(DSESimulationResult dserr: results) {
+			valuetmp = dserr.getMinCPUUsage();
+			if (valuetmp > value) {
+				value = valuetmp;
+				index = currentIndex;
+			}
+			currentIndex ++;
+		}
+		
+		return index;
+	}
+	
+	// Bus usage
+	
+	public int getMappingWithLowestAverageBusUsage() {
+		if (results.size() == 0) {
+			return -1;
+		}
+		
+		int currentIndex = 0;
+		int index = 0;
+		double value = 1.1;
+		double valuetmp;
+		
+		for(DSESimulationResult dserr: results) {
+			valuetmp = dserr.getAverageBusUsage();
+			if (valuetmp < value) {
+				value = valuetmp;
+				index = currentIndex;
+			}
+			currentIndex ++;
+		}
+		
+		return index;
+	}
+	
+	public int getMappingWithHighestAverageBusUsage() {
+		if (results.size() == 0) {
+			return -1;
+		}
+		
+		int currentIndex = 0;
+		int index = 0;
+		double value = -0.1;
+		double valuetmp;
+		
+		for(DSESimulationResult dserr: results) {
+			valuetmp = dserr.getAverageBusUsage();
+			if (valuetmp > value) {
+				value = valuetmp;
+				index = currentIndex;
+			}
+			currentIndex ++;
+		}
+		
+		return index;
+	}
+	
+	public int getMappingWithLowestMaxBusUsage() {
+		if (results.size() == 0) {
+			return -1;
+		}
+		
+		int currentIndex = 0;
+		int index = 0;
+		double value = 1.1;
+		double valuetmp;
+		
+		for(DSESimulationResult dserr: results) {
+			valuetmp = dserr.getMaxBusUsage();
+			if (valuetmp < value) {
+				value = valuetmp;
+				index = currentIndex;
+			}
+			currentIndex ++;
+		}
+		
+		return index;
+	}
+	
+	public int getMappingWithHighestMaxBusUsage() {
+		if (results.size() == 0) {
+			return -1;
+		}
+		
+		int currentIndex = 0;
+		int index = 0;
+		double value = -0.1;
+		double valuetmp;
+		
+		for(DSESimulationResult dserr: results) {
+			valuetmp = dserr.getMaxBusUsage();
+			if (valuetmp > value) {
+				value = valuetmp;
+				index = currentIndex;
+			}
+			currentIndex ++;
+		}
+		
+		return index;
+	}
+	
+	public int getMappingWithLowestMinBusUsage() {
+		if (results.size() == 0) {
+			return -1;
+		}
+		
+		int currentIndex = 0;
+		int index = 0;
+		double value = 1.1;
+		double valuetmp;
+		
+		for(DSESimulationResult dserr: results) {
+			valuetmp = dserr.getMinBusUsage();
+			if (valuetmp < value) {
+				value = valuetmp;
+				index = currentIndex;
+			}
+			currentIndex ++;
+		}
+		
+		return index;
+	}
+	
+	public int getMappingWithHighestMinBusUsage() {
+		if (results.size() == 0) {
+			return -1;
+		}
+		
+		int currentIndex = 0;
+		int index = 0;
+		double value = -0.1;
+		double valuetmp;
+		
+		for(DSESimulationResult dserr: results) {
+			valuetmp = dserr.getMinBusUsage();
+			if (valuetmp > value) {
+				value = valuetmp;
+				index = currentIndex;
+			}
+			currentIndex ++;
+		}
+		
+		return index;
+	}
+	
+	// Bus contention
+	
+	public int getMappingWithLowestAverageBusContention() {
+		if (results.size() == 0) {
+			return -1;
+		}
+		
+		int currentIndex = 0;
+		int index = 0;
+		double value = 1000000000;
+		double valuetmp;
+		
+		for(DSESimulationResult dserr: results) {
+			valuetmp = dserr.getAverageBusContention();
+			if (valuetmp < value) {
+				value = valuetmp;
+				index = currentIndex;
+			}
+			currentIndex ++;
+		}
+		
+		return index;
+	}
+	
+	public int getMappingWithHighestAverageBusContention() {
+		if (results.size() == 0) {
+			return -1;
+		}
+		
+		int currentIndex = 0;
+		int index = 0;
+		double value = -0.1;
+		double valuetmp;
+		
+		for(DSESimulationResult dserr: results) {
+			valuetmp = dserr.getAverageBusContention();
+			if (valuetmp > value) {
+				value = valuetmp;
+				index = currentIndex;
+			}
+			currentIndex ++;
+		}
+		
+		return index;
+	}
+	
+	public int getMappingWithLowestMaxBusContention() {
+		if (results.size() == 0) {
+			return -1;
+		}
+		
+		int currentIndex = 0;
+		int index = 0;
+		long value = 1000000000;
+		long valuetmp;
+		
+		for(DSESimulationResult dserr: results) {
+			valuetmp = dserr.getMaxBusContention();
+			if (valuetmp < value) {
+				value = valuetmp;
+				index = currentIndex;
+			}
+			currentIndex ++;
+		}
+		
+		return index;
+	}
+	
+	public int getMappingWithHighestMaxBusContention() {
+		if (results.size() == 0) {
+			return -1;
+		}
+		
+		int currentIndex = 0;
+		int index = 0;
+		long value = 0;
+		long valuetmp;
+		
+		for(DSESimulationResult dserr: results) {
+			valuetmp = dserr.getMaxBusContention();
+			if (valuetmp > value) {
+				value = valuetmp;
+				index = currentIndex;
+			}
+			currentIndex ++;
+		}
+		
+		return index;
+	}
+	
+	public int getMappingWithLowestMinBusContention() {
+		if (results.size() == 0) {
+			return -1;
+		}
+		
+		int currentIndex = 0;
+		int index = 0;
+		long value = 100000000;
+		long valuetmp;
+		
+		for(DSESimulationResult dserr: results) {
+			valuetmp = dserr.getMinBusContention();
+			if (valuetmp < value) {
+				value = valuetmp;
+				index = currentIndex;
+			}
+			currentIndex ++;
+		}
+		
+		return index;
+	}
+	
+	public int getMappingWithHighestMinBusContention() {
+		if (results.size() == 0) {
+			return -1;
+		}
+		
+		int currentIndex = 0;
+		int index = 0;
+		long value = 0;
+		long valuetmp;
+		
+		for(DSESimulationResult dserr: results) {
+			valuetmp = dserr.getMinBusContention();
+			if (valuetmp > value) {
+				value = valuetmp;
+				index = currentIndex;
+			}
+			currentIndex ++;
+		}
+		
+		return index;
+	}
+	
+	
+	
+	
+} // Class DSEMappingSimulationResults
+
diff --git a/src/dseengine/DSESimulationResult.java b/src/dseengine/DSESimulationResult.java
index 28d306f4728e36532f2856a4ceb72e4823231c46..8142d32ced2198c08d29eb2ddff66dae0665a3c6 100755
--- a/src/dseengine/DSESimulationResult.java
+++ b/src/dseengine/DSESimulationResult.java
@@ -560,6 +560,101 @@ public class DSESimulationResult  {
 		return s;
 	}
 	
+	public double getAverageCPUUsage() {
+		double average = 0;
+		
+		for(CPUWholeResult wcpu: wcpus) {
+			average += wcpu.averageUtilization;
+		}
+		
+		return average / wcpus.size();
+	}
+	
+	public double getMaxCPUUsage() {
+		double max = 0;
+		
+		for(CPUWholeResult wcpu: wcpus) {
+			max = Math.max(max, wcpu.maxUtilization);
+		}
+		
+		return max;
+	}
+	
+	public double getMinCPUUsage() {
+		double min = 1.1;
+		
+		for(CPUWholeResult wcpu: wcpus) {
+			min= Math.min(min, wcpu.minUtilization);
+		}
+		
+		return min;
+	}
+	
+	// Bus
+	
+	public double getAverageBusUsage() {
+		double average = 0;
+		
+		for(BusWholeResult wbus: wbusses) {
+			average += wbus.averageUtilization;
+		}
+		
+		return average / busses.size();
+	}
+	
+	public double getMaxBusUsage() {
+		double max = 0;
+		
+		for(BusWholeResult wbus: wbusses) {
+			max = Math.max(max, wbus.maxUtilization);
+		}
+		
+		return max;
+	}
+	
+	public double getMinBusUsage() {
+		double min = 1.1;
+		
+		for(BusWholeResult wbus: wbusses) {
+			min= Math.min(min, wbus.minUtilization);
+		}
+		
+		return min;
+	}
+	
+	// Bus contention
+	
+	
+	public double getAverageBusContention() {
+		double average = 0;
+		
+		for(CPUWholeResult wcpu: wcpus) {
+			average += wcpu.getAverageBusContention();
+		}
+		
+		return average / wcpus.size();
+	}
+	
+	public long getMaxBusContention() {
+		long max = 0;
+		
+		for(CPUWholeResult wcpu: wcpus) {
+			max = Math.max(max, wcpu.getMaxBusContention());
+		}
+		
+		return max;
+	}
+	
+	public long getMinBusContention() {
+		long min = 0;
+		
+		for(CPUWholeResult wcpu: wcpus) {
+			min= Math.min(min, wcpu.getMinBusContention());
+		}
+		
+		return min;
+	}
+	
 	
 	
 	
diff --git a/src/tmltranslator/DIPLOElement.java b/src/tmltranslator/DIPLOElement.java
index cb2ef9d95bc8ec424110e7fd7c87d0a22e02a5c7..42f7eff1649832a52c39f0007911444027a7fd91 100755
--- a/src/tmltranslator/DIPLOElement.java
+++ b/src/tmltranslator/DIPLOElement.java
@@ -61,6 +61,10 @@ public class DIPLOElement {
 		return myID;
     }
 	
+	public static void setGeneralID(int _IDValue) {
+		ID = _IDValue;
+	}
+	
 	public static void resetID() {
 		TraceManager.addDev("Reset DIPLOID");
 		ID = 0;
diff --git a/src/tmltranslator/TMLModeling.java b/src/tmltranslator/TMLModeling.java
index ac049f8e312392894624664ba4803754d374a8a4..830332ee66642a44651cc4b12ee0021358d80901 100755
--- a/src/tmltranslator/TMLModeling.java
+++ b/src/tmltranslator/TMLModeling.java
@@ -1383,4 +1383,6 @@ public class TMLModeling {
 			correspondance[event.getID()] = event;
 		}
 	}
+	
+
 }
\ No newline at end of file