import java.io.*;

class fa extends f_xj
{
double func(double x[])
 { double ff= 34+x[0]*(Math.sin(3.0*Math.PI*(x[0]-x[1]))+x[1]*Math.sin(20.0*Math.PI*x[1]));
    return ff;
}
}


class NA108

{
    public static void main(String args[]) throws IOException
    {
    int N=25;
	int POPSIZE=400;
    int MAXGENS=400;
    int NVARS=2;
    double PXOVER=0.3;
    double PMUTATION=0.02;
    fa fx=new fa();
    Genetic2 xx=new Genetic2(POPSIZE,MAXGENS,NVARS,N,PXOVER,PMUTATION);
    double low[]=new double[NVARS];
    double high[]=new double[NVARS];
    low[0]=-1.0;high[0]=1.0;
    low[1]=-1.0;high[1]=1.0;
    xx.setPopulation(low,high,fx);
    System.out.println("best=\n"+Matrix.toStringT(xx.calculate(fx,false))); 
    }
}
