import java.util.*;
import java.awt.*;
import java.applet.Applet;
import java.awt.event.*;
import javax.swing.*;

class fa extends f_xj
{
//çözümü istenen fonksiyon	
 double func(double x[])
 {
    double ff= 1.0+Math.cos(Math.PI*(x[0]-3.0))*Math.cos(2.0*Math.PI*(x[1]-2.0))/
    (1+(x[0]-3.0)*(x[0]-3.0)+(x[1]-2.0)*(x[1]-2.0));
    return -ff; 
  }
}

public class Harmonytest1 {

	public static void main(String[] args) {

		fa ff=new fa();
		double xmin[]={0,0};
        double xmax[]={4,4};
        int maxIter=2500000;
        double BW=0.3;
        double HMCR=0.95;
        int HMS=500;
        double PAR=0.7;
		HarmonySearch1 hs=new HarmonySearch1(ff,xmin,xmax,maxIter,BW,HMCR,HMS,PAR);
		String s="Harmony search : \n"+hs.toString()  ;  
        String s2="Harmony search optimization method ";
        JOptionPane.showMessageDialog(null,s,s2,JOptionPane.PLAIN_MESSAGE);
        hs.plot();
	}

}
