// Path: src/nl/esciencecenter/diffevo/likelihoodfunctionfactories/LikelihoodFunctionFactory.java
// public interface LikelihoodFunctionFactory {
// 	
// 	LikelihoodFunction create();
// 
// }
// 
// Path: src/nl/esciencecenter/diffevo/likelihoodfunctionfactories/LikelihoodFunctionSSRFactory.java
// public class LikelihoodFunctionSSRFactory implements LikelihoodFunctionFactory{
// 
// 	public LikelihoodFunction create() {
// 		LikelihoodFunction likelihoodFunction = new LikelihoodFunctionSSR();
// 
// 		return likelihoodFunction;
// 	}
// 
// }
// 
// Path: src/nl/esciencecenter/diffevo/statespacemodelfactories/LinearDynamicStateSpaceModelFactory.java
// public class LinearDynamicStateSpaceModelFactory implements ModelFactory{
// 
// 	public Model create(double[] state,double[] parameterVector, double[] forcing, double[] times) {
// 		Model model = new LinearDynamicStateSpaceModel(state, parameterVector, forcing, times);
// 
// 		return model;
// 	}
// }
// 
// Path: src/nl/esciencecenter/diffevo/statespacemodelfactories/ModelFactory.java
// public interface ModelFactory {
// 	
// 	Model create(double[] initState, double[] parameterVector, double[] forcing, double[] times);
// 
// }


import static org.junit.Assert.*;
import java.io.File;
import nl.esciencecenter.diffevo.likelihoodfunctionfactories.LikelihoodFunctionFactory;
import nl.esciencecenter.diffevo.likelihoodfunctionfactories.LikelihoodFunctionSSRFactory;
import nl.esciencecenter.diffevo.statespacemodelfactories.LinearDynamicStateSpaceModelFactory;
import nl.esciencecenter.diffevo.statespacemodelfactories.ModelFactory;
import org.junit.Test;
package nl.esciencecenter.diffevo;





public class DiffEvoDynamicModelFunctionTest {
	
	private DiffEvo diffEvo;
	private int nPopExpected;
	
	public DiffEvoDynamicModelFunctionTest(){
		
		int nGens = 2;
		nPopExpected = 5;
		File file  = new File("test"+File.separator+"data"+File.separator+"lineartank.eas");
		DataReader reader = new DataReader(file);
		double[][] data = reader.getData();
		ParSpace parSpace;
		StateSpace stateSpace;

		double[] initState = new double[] {30};
		double[] times = data[0];
		double[] assimilate = data[1];
		double[][] obs = new double[][]{data[3]};
		double[] forcing = data[4];
		{
			double[] lowerBoundsParSpace = new double[] {110};
			double[] upperBoundsParSpace = new double[] {180};
			String[] parNames = new String[] {"resistance"};
			parSpace = new ParSpace(lowerBoundsParSpace,upperBoundsParSpace,parNames);
			parSpace.divideIntoIntervals(100);
		}
		{
			double[] lowerBoundsStateSpace = new double[] {0};
			double[] upperBoundsStateSpace = new double[] {100};
			String[] stateNames = new String[] {"waterlevel"};
			stateSpace = new StateSpace(lowerBoundsStateSpace,upperBoundsStateSpace,stateNames);
		}
// Path: src/nl/esciencecenter/diffevo/likelihoodfunctionfactories/LikelihoodFunctionFactory.java
// public interface LikelihoodFunctionFactory {
// 	
// 	LikelihoodFunction create();
// 
// }
// 
// Path: src/nl/esciencecenter/diffevo/likelihoodfunctionfactories/LikelihoodFunctionSSRFactory.java
// public class LikelihoodFunctionSSRFactory implements LikelihoodFunctionFactory{
// 
// 	public LikelihoodFunction create() {
// 		LikelihoodFunction likelihoodFunction = new LikelihoodFunctionSSR();
// 
// 		return likelihoodFunction;
// 	}
// 
// }
// 
// Path: src/nl/esciencecenter/diffevo/statespacemodelfactories/LinearDynamicStateSpaceModelFactory.java
// public class LinearDynamicStateSpaceModelFactory implements ModelFactory{
// 
// 	public Model create(double[] state,double[] parameterVector, double[] forcing, double[] times) {
// 		Model model = new LinearDynamicStateSpaceModel(state, parameterVector, forcing, times);
// 
// 		return model;
// 	}
// }
// 
// Path: src/nl/esciencecenter/diffevo/statespacemodelfactories/ModelFactory.java
// public interface ModelFactory {
// 	
// 	Model create(double[] initState, double[] parameterVector, double[] forcing, double[] times);
// 
// }


// Path: test/src/nl/esciencecenter/diffevo/DiffEvoDynamicModelFunctionTest.java
import static org.junit.Assert.*;
import java.io.File;
import nl.esciencecenter.diffevo.likelihoodfunctionfactories.LikelihoodFunctionFactory;
import nl.esciencecenter.diffevo.likelihoodfunctionfactories.LikelihoodFunctionSSRFactory;
import nl.esciencecenter.diffevo.statespacemodelfactories.LinearDynamicStateSpaceModelFactory;
import nl.esciencecenter.diffevo.statespacemodelfactories.ModelFactory;
import org.junit.Test;

package nl.esciencecenter.diffevo;





public class DiffEvoDynamicModelFunctionTest {
	
	private DiffEvo diffEvo;
	private int nPopExpected;
	
	public DiffEvoDynamicModelFunctionTest(){
		
		int nGens = 2;
		nPopExpected = 5;
		File file  = new File("test"+File.separator+"data"+File.separator+"lineartank.eas");
		DataReader reader = new DataReader(file);
		double[][] data = reader.getData();
		ParSpace parSpace;
		StateSpace stateSpace;

		double[] initState = new double[] {30};
		double[] times = data[0];
		double[] assimilate = data[1];
		double[][] obs = new double[][]{data[3]};
		double[] forcing = data[4];
		{
			double[] lowerBoundsParSpace = new double[] {110};
			double[] upperBoundsParSpace = new double[] {180};
			String[] parNames = new String[] {"resistance"};
			parSpace = new ParSpace(lowerBoundsParSpace,upperBoundsParSpace,parNames);
			parSpace.divideIntoIntervals(100);
		}
		{
			double[] lowerBoundsStateSpace = new double[] {0};
			double[] upperBoundsStateSpace = new double[] {100};
			String[] stateNames = new String[] {"waterlevel"};
			stateSpace = new StateSpace(lowerBoundsStateSpace,upperBoundsStateSpace,stateNames);
		}
		ModelFactory modelFactory = (ModelFactory) new LinearDynamicStateSpaceModelFactory();