import java.io.*;

class fa extends f_xj
{
public double func(double x[]) 
{
//çözümü istenen fonksiyon	
double ff;
ff=x[0]*Math.sin(10.0*Math.PI*x[0])+3.0;
return ff; //maksimum testi
}
}


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