#ifndef POPULATION #define POPULATION //#include "Generator.h" //#include "Evaluator.h" #include "Graf.h" #include "Genetic.h" /** * clas implementing a population of chromosomes */ class Population { public: /** * the number of chromosomes */ int no_ind; /** * the number of generations the population will evolve */ int no_gen; /** * the number of genes contained by a chromosome */ int length; /** * the input graph of tasks */ TaskGraf tasks; /** * the input graph of processors */ ProcesorGraf procs; /** * the best chromosome of the current population */ Chromosome best; public: /** * the constructor * * @param i the number of chromosomes * @param g the number of generations the population will evolve * @param l the number of genes contained by a chromosome * @param t the input graph of tasks * @param p the input graph of processors */ Population(int i = 0 , int g = 0, int l = 0 , TaskGraf t = NULL, ProcesorGraf p = NULL); /** * method starting the population's evolution */ void run(); /** * method that returns the best chromosome obtained * * @return the best chromosome of the current population */ Chromosome getBest(); }; #endif