ICandidateSolution <T> RouletteWheelSelectCandidate(int totalFitness)
        {
            var value = _randomizer.IntLessThan(totalFitness);

            for (int i = 0; i < PopulationSize; i++)
            {
                value -= CurrentGeneration[i].Fitness;
                if (value <= 0)
                {
                    return(CurrentGeneration[i]);
                }
            }

            return(CurrentGeneration[PopulationSize - 1]);
        }
        public override void Repair()
        {
            var items    = CandidateItem.Count;
            var selected = Genes.Count(p => p);

            while (CandidateItem.Zip(Genes, (item, b) => new { item, b }).Where(p => p.b).Sum(p => p.item.Size) > Capacity)
            {
                var deslect = _randomizer.IntLessThan(selected);
                for (int i = 0; i < items; i++)
                {
                    if (Genes[i])
                    {
                        if (deslect == 0)
                        {
                            Genes[i] = false;
                            selected--;
                            break;
                        }

                        deslect--;
                    }
                }
            }
        }