/*
EvoGen, Evolutionary Geneura is a framework for simulating distributed evolutionary computation experiments
Copyright (C) 2008 Junta de Andalucia CICE project P06-TIC-02025

This file is part of EvoGen.

EvoGen is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

EvoGen is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with EvoGen; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

contact:  http://geneura.ugr.es, https://forja.rediris.es/svn/geneura/evogen
*/
package multinomad.config;

import multinomad.tools.Function;
import multinomad.tools.JavaFunction;
import multinomad.tools.PyFunction;

public class Configuration {
	
	/** Accuracies **/
	public static final double[] accuracies = {1.0E-01,1.0E-02,1.0E-03,1.0E-04,1.0E-05};
	
	

	// --- Parameters:
	// - indexf is the index of the function
	public static int indexf = 1;
	public static Function f;
	
	public static int Psize;
	public static int associationSize;
	public static boolean javacec2013 = false;
		
	public static void setConfiguration(LoadProperties lp){	
		indexf = Integer.parseInt(lp.getProperty("F", "1"));
		Psize = Integer.parseInt(lp.getProperty("Psize", "25"));
		associationSize = Integer.parseInt(lp.getProperty("associationSize", "7"));
		javacec2013 = Boolean.parseBoolean(lp.getProperty("javacec2013", "false"));
		
		
		if (!javacec2013)
			f = new PyFunction(indexf);	
		else
			f = new JavaFunction(indexf);
	}
	
	
	
	

}
