public Population SetFitnessAndSelection() { _matingPool = new Population(); int numberOfCiterions = 2; _subPopulations = _beginingPopulation.DevidePopulation(); _subPopulations[0].SortF1(); _subPopulations[1].SortF2(); for (int i = 0; i < numberOfCiterions; i++) { for (int j = 0; j < (int)_subPopulations[i].Size(); j++) { if (i == 0) { _matingPool.Add(_subPopulations[i].GetIndividual(j)); } else { _matingPool.Add(_subPopulations[i].GetIndividual(j)); } } } return(_matingPool); }