public void onExit() {
		int numberOfNodes = Tools.getNodeList().size();
		int density = 0;
		int simulationID = 0;
		try {
			density = sinalgo.configuration.Configuration.getIntegerParameter("Density");
			simulationID = sinalgo.configuration.Configuration.getIntegerParameter("SimulationID");
		} catch (CorruptConfigurationEntryException e) {
			e.printStackTrace();
		}
		myLog.logln("N� \t ID \t Hops \t a.size() \t min \t mediana \t media \t max");
		for (int i = 1; i <= numberOfNodes; i++) {
			// Para gerar o valor de centralidade dos nós lido pelo CT
			// *Lembrar* de de colocar false na chamada do Logging.getLogger no preRun() 
/*			ImportanceNode n = (ImportanceNode) Tools.getNodeByID(i);
			myLog.logln(Integer.toString(i) + "\t" +
						Double.toString(n.getCentrality()));*/
			
			// Ver histograma dos paths (nao sei se esta funcionando)
/*			int simulationID = 0;
			try {
				simulationID = sinalgo.configuration.Configuration.getIntegerParameter("SimulationID");
			} catch (CorruptConfigurationEntryException e) {
				e.printStackTrace();
			}
			ImportanceNode n = (ImportanceNode) Tools.getNodeByID(i);
			if (n.isSink()) {
				Hashtable<Integer, Integer> pacote = new Hashtable<Integer, Integer>();
				pacote = n.getPacket();
				Iterator <Integer> it = pacote.keySet().iterator();
				while (it.hasNext()) {
					Integer path = it.next();
					Integer freq = pacote.get(path);
					myLog.logln(Integer.toString(simulationID) + "\t" +
								Integer.toString(Tools.getNodeList().size()) + "\t" +
								Integer.toString(path) + "\t" +
								Integer.toString(freq));
				}
			}
*/			
/*			// Para fazer o estudo do Importance, erro, tamanho do pacote, pacotes perdidos, etc 
			ImportanceNode n = (ImportanceNode) Tools.getNodeByID(i);
			// Erro relativo em %
			double delta = Math.abs(n.getCentrality() - n.getRcentrality());
			double error;
			if (delta > 0.0) {
				if (n.getRcentrality() > 0.0)
					error = (delta/n.getRcentrality()) * 100;
				else
					error = 0;
			} else {			// delta == 0.0
				error = 0.0;
			}
			
			// Nao precisa de verificar o Stress, uma vez já foi visto que ele tem erro 0
			double deltaStress = Math.abs(n.getRStress() - n.getHopsToSink());
			double errorStress;
			if (deltaStress > 0.0) {
				if (n.getRStress() > 0.0)
					errorStress = (deltaStress/n.getRStress()) * 100;
				else
					errorStress = 0;
			} else {			// delta == 0.0
				errorStress = 0.0;
			}

			myLog.logln(Integer.toString(i) + "\t" +
						Integer.toString(numberOfNodes) + "\t" +
						Integer.toString(density) + "\t" +
						Integer.toString(n.getHopsToSink()) + "\t" +
						Integer.toString(n.getPathsToSinkThroughMe()) + "\t" +
						Double.toString(n.getCentrality()) + "\t" +
						Double.toString(n.getRcentrality()) + "\t" +
						Double.toString(error) + "\t" +
						Integer.toString(n.getPacketSize()) + "\t" +
						Integer.toString(n.getLostPackets()) + "\t" +
						Integer.toString(n.getMaxPacketSize())
						);*/
			
			// Para verificar os valores de sonsPaths de cada nó
			/*ImportanceNode n = (ImportanceNode) Tools.getNodeByID(i);
			if (n.getHopsToSink() >= 2) {
				String s = "";
				for (Iterator iter = n.getPacket().values().iterator(); iter.hasNext();) {
					   Integer t = (Integer) iter.next();
					   s += t.toString() + " ";
				}
				myLog.logln(Integer.toString(i) + "\t" +
							Integer.toString(n.getHopsToSink()) + "\t" +
							s);	
			}*/
			// Para imprimir um resumo do sonsPaths de cada nó como um dataset.R com
			ImportanceNode n = (ImportanceNode) Tools.getNodeByID(i);
			if (n.getHopsToSink() >= 2) {
				
				List<Integer> a = new ArrayList<Integer>(n.getPacket().values());
				if (a.size() > 0) {																// tem alguma coisa no pacote
					methods m = new methods();

					myLog.logln(Integer.toString(Tools.getNodeList().size()) + "\t" +
								//Integer.toString(density) + "\t" +
								//.toString(simulationID) + "\t" +
								Integer.toString(i) + "\t" +
								Integer.toString(n.getHopsToSink()) + "\t" +
								Integer.toString(a.size()) + "\t" +
								Integer.toString(Collections.min(a)) + "\t" +
								Double.toString(m.median(a)) + "\t" +
								Double.toString(m.mean(a)) + "\t" +
								Integer.toString(Collections.max(a)) + "\t" /*+
								Double.toString(m.sd(a))*/);
				}
			}
			
		}
	}