/*
 * GAConfiguration.java
 *
 * Created on 23. listopad 2005, 5:15
 *
 * To change this template, choose Tools | Options and locate the template under
 * the Source Creation and Management node. Right-click the template and choose
 * Open. You can then make changes to the template in the Source Editor.
 */

package cz.pcland.ga;

import cz.pcland.ga.crossover.CrossoverOpearator;
import cz.pcland.ga.fitness.Evaluator;
import cz.pcland.ga.selection.SelectionOperator;
import java.util.*;
//import java.io.*;
/**
 *
 * @author petr
 */
public class GAConfiguration {
    public static int popSize;
    public static double probOfCrossover;
    public static double probOfMutation;
    public static int elite;
    public static SelectionOperator selection;
    public static int strLen;
    Random rand;
    public static Evaluator firnessObj;
    public static CrossoverOpearator crossoverObject;
    public static int distributionDensity;
    public static boolean distributionEnabled;
    public static int steps;
    public static int showAfter;
    public static boolean setLowestFitnessToZero;
    
   /* public void saveToFile(File file){
        
    }
    
    public void loadFromFile(File file) {
        
    }*/
    
    /** Creates a new instance of GAConfiguration */
    public GAConfiguration(int popSize, double probOfCrossover, double probOfMutation, int elite, SelectionOperator reproduction, Evaluator fitObj, CrossoverOpearator crossoverObject,  int distributionDensity, boolean distributionEnabled, boolean setLowestFitnessToZero, int totalSteps, int showAfter ) {
        this.selection = reproduction;
        this.setLowestFitnessToZero = setLowestFitnessToZero;
        this.popSize = popSize;
        this.showAfter = showAfter;
        this.probOfCrossover = probOfCrossover;
        this.probOfMutation = probOfMutation;
        this.rand = new Random();
        this.elite = elite;
        this.firnessObj = fitObj;
        this.crossoverObject = crossoverObject;
        this.distributionDensity = distributionDensity;
        this.distributionEnabled = distributionEnabled;
        this.steps = totalSteps;
    }
    
}
