public static boolean writeEvents(int numNodes, int idTraffic) {
		double percent = 0;	
		int qntNodeEv = 0;
		double lambda = 0;
		Distribution distTraffic = null;
		
		System.out.println("------------------------------------------------------");
		System.out.println("ConfigTest");
		System.out.println("------------------------------------------------------");
		try {
			percent = Configuration.getDoubleParameter("ConfigTest/NodeEvents/percent");
			qntNodeEv = (int) (numNodes * percent) / 100;
			
			System.out.println("ConfigTest/NodeEvents/percent = "+percent);
			System.out.println("qntNodeEv = "+qntNodeEv);
		} catch (CorruptConfigurationEntryException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
		try {
			lambda = Configuration.getDoubleParameter("ConfigTest/Traffic/lambda");
			distTraffic = new PoissonDistribution(lambda);
		} catch (CorruptConfigurationEntryException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
		
		try {
			PrintStream ps = new PrintStream("./Traffic/"+idTraffic+"_traffic_"+numNodes+".txt");
			ps.println("Number of nodes: " + numNodes);
			Configuration.printConfiguration(ps);
			ps.println(separator);
			
			UniformDistribution ud = new UniformDistribution(2, numNodes);
			Set<Integer> setNodes = new HashSet<Integer>();
			
			while(setNodes.size() <= qntNodeEv){
				setNodes.add((int) ud.nextSample());
			}
			
			Iterator<Integer> it = setNodes.iterator();
			while(it.hasNext()){
				ps.println(it.next()+" "+(int)distTraffic.nextSample());
			}
			/*for(Node n : Tools.getNodeList()) {
				Position p = n.getPosition();
				ps.println(p.xCoord + ", " + p.yCoord + ", " + p.zCoord);
			}*/
			
			
			ps.close();
			
			return true;
		} catch (FileNotFoundException e) {
			// TODO Auto-generated catch block
			Tools.minorError(e.getMessage());
		}
		
		

		System.out.println("------------------------------------------------------");
		System.out.println("End ConfigTest");
		System.out.println("------------------------------------------------------");
		return false;
		
	}