// Path: src/nl/esciencecenter/diffevo/likelihoodfunctionfactories/LikelihoodFunctionFactory.java
// public interface LikelihoodFunctionFactory {
// 	
// 	LikelihoodFunction create();
// 
// }
// 
// Path: src/nl/esciencecenter/diffevo/likelihoodfunctionfactories/LikelihoodFunctionRastriginModelFactory.java
// public class LikelihoodFunctionRastriginModelFactory implements
// 		LikelihoodFunctionFactory {
// 
// 	@Override
// 	public LikelihoodFunction create() {
// 		return new LikelihoodFunctionRastriginModel();
// 	}
// 
// }
// 
// Path: src/nl/esciencecenter/diffevo/likelihoodfunctions/LikelihoodFunction.java
// public interface LikelihoodFunction {
// 	
// 	double evaluate(double[][] obs, double[][] sim);
// 	double evaluate(double[] parameterVector);
// 	String getName();
// 
// }


import static org.junit.Assert.*;
import nl.esciencecenter.diffevo.likelihoodfunctionfactories.LikelihoodFunctionFactory;
import nl.esciencecenter.diffevo.likelihoodfunctionfactories.LikelihoodFunctionRastriginModelFactory;
import nl.esciencecenter.diffevo.likelihoodfunctions.LikelihoodFunction;
import org.junit.Test;
package nl.esciencecenter.diffevo;




public class RastriginModelTest {

	private int nGens;
	private int nPop;
	private ParSpace parSpace;
	private LikelihoodFunctionFactory likelihoodFunctionFactory;
	private DiffEvo diffEvo;
	private EvalResults evalResults;

	public RastriginModelTest(){
		nGens = 3000;
		nPop = 50;
		double[] lowerBoundsParSpace = new double[]{-5.12,-5.12};
		double[] upperBoundsParSpace  = new double[]{5.12,5.12};
		String[] parNames = new String[]{"p1","p2"};
		parSpace = new ParSpace(lowerBoundsParSpace,upperBoundsParSpace,parNames);
		parSpace.divideIntoIntervals(200);
		likelihoodFunctionFactory = (LikelihoodFunctionFactory) new LikelihoodFunctionRastriginModelFactory();
	
		// run the optimization:
// Path: src/nl/esciencecenter/diffevo/likelihoodfunctionfactories/LikelihoodFunctionFactory.java
// public interface LikelihoodFunctionFactory {
// 	
// 	LikelihoodFunction create();
// 
// }
// 
// Path: src/nl/esciencecenter/diffevo/likelihoodfunctionfactories/LikelihoodFunctionRastriginModelFactory.java
// public class LikelihoodFunctionRastriginModelFactory implements
// 		LikelihoodFunctionFactory {
// 
// 	@Override
// 	public LikelihoodFunction create() {
// 		return new LikelihoodFunctionRastriginModel();
// 	}
// 
// }
// 
// Path: src/nl/esciencecenter/diffevo/likelihoodfunctions/LikelihoodFunction.java
// public interface LikelihoodFunction {
// 	
// 	double evaluate(double[][] obs, double[][] sim);
// 	double evaluate(double[] parameterVector);
// 	String getName();
// 
// }


// Path: test/src/nl/esciencecenter/diffevo/RastriginModelTest.java
import static org.junit.Assert.*;
import nl.esciencecenter.diffevo.likelihoodfunctionfactories.LikelihoodFunctionFactory;
import nl.esciencecenter.diffevo.likelihoodfunctionfactories.LikelihoodFunctionRastriginModelFactory;
import nl.esciencecenter.diffevo.likelihoodfunctions.LikelihoodFunction;
import org.junit.Test;

package nl.esciencecenter.diffevo;




public class RastriginModelTest {

	private int nGens;
	private int nPop;
	private ParSpace parSpace;
	private LikelihoodFunctionFactory likelihoodFunctionFactory;
	private DiffEvo diffEvo;
	private EvalResults evalResults;

	public RastriginModelTest(){
		nGens = 3000;
		nPop = 50;
		double[] lowerBoundsParSpace = new double[]{-5.12,-5.12};
		double[] upperBoundsParSpace  = new double[]{5.12,5.12};
		String[] parNames = new String[]{"p1","p2"};
		parSpace = new ParSpace(lowerBoundsParSpace,upperBoundsParSpace,parNames);
		parSpace.divideIntoIntervals(200);
		likelihoodFunctionFactory = (LikelihoodFunctionFactory) new LikelihoodFunctionRastriginModelFactory();
	
		// run the optimization:
		diffEvo = new DiffEvo(nGens, nPop, parSpace, likelihoodFunctionFactory);